Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class UtilBlock {
- private Block block;
- private long timeInSecs;
- public UtilBlock(Block block, long timeInSecs) {
- this.block = block;
- this.timeInSecs = timeInSecs;
- }
- @SuppressWarnings("deprecation")
- public void saveBlockToRestore() {
- final int BeforeId = block.getTypeId();
- final byte BeforeData = block.getData();
- Bukkit.getScheduler().runTaskLater(MushroomRegen.scheduler, new Runnable(){
- @Override
- public void run() {
- block.setTypeId(BeforeId);
- block.setData(BeforeData);
- }
- }, timeInSecs*20);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement