Fix non TNT-Kits only no tnt
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
669a822bd6
Commit
228cb9e768
@ -100,8 +100,8 @@ public class InFightInventoryListener extends BasicListener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockPlace(BlockPlaceEvent e) {
|
public void onBlockPlace(BlockPlaceEvent e) {
|
||||||
FightPlayer fp = Fight.getFightPlayer(e.getPlayer());
|
FightPlayer fp = Fight.getFightPlayer(e.getPlayer());
|
||||||
if(fp != null && !fp.getKit().isTnt()){
|
if(fp != null && !fp.getKit().isTnt() && e.getBlockPlaced().getType() == Material.TNT){
|
||||||
BasicListener.toActionbar(e.getPlayer(), TextComponent.fromLegacyText("§cDu darfst keine Blöcke setzen!"));
|
BasicListener.toActionbar(e.getPlayer(), TextComponent.fromLegacyText("§cDu darfst kein TNT setzen!"));
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren