Players could flip trap doors (PC-Bugs-440)

Fixes an issue where players would be able to flip trap doors in Dragon
Escape to either troll players or give them an advantage.
This commit is contained in:
Sam 2016-06-02 22:30:18 +01:00
parent b51007da91
commit ee10751e23

View File

@ -628,4 +628,13 @@ public class DragonEscape extends SoloGame
other.sendBlockChange(data.Block.getLocation(), data.Material, data.Data);
}
}
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event)
{
if(event.getClickedBlock().getType() != Material.TRAP_DOOR)
return;
// Stops players using trap doors in game.
event.setCancelled(true);
}
}