- Katılım
- 6 Mayıs 2018
- Mesajlar
- 407
- Elmaslar
- 98
- Puanlar
- 14.025
- Yaş
- 23
- Minecraft
- _BatuhanDEV_
trap doorun açık olup olmadıgını kontrol ettirmesi ve ona göre göre sandığı açabilmesi lazım
Java:
{
@Deprecated
@EventHandler
public void protect_chest(final PlayerInteractEvent e) {
final Player p = e.getPlayer();
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
final Material look_at = p.getTargetBlock((HashSet)null, 5).getType();
final Material click = e.getClickedBlock().getType();
if (click.equals((Object)Material.CHEST)) {
if (look_at != Material.CHEST) {
e.setCancelled(true);
this.pm(p, "&4Eri\u015fim Engellendi");
}
this.pm(p, "");
this.pm(p, "&aBak\u0131lan Block = " + look_at);
this.pm(p, "");
}
}
}