Dieser Commit ist enthalten in:
Ursprung
7dec79e022
Commit
914bf4f353
@ -24,7 +24,9 @@ import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.type.Dispenser;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -74,10 +76,4 @@ public class InFightInventory implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onBlockDispense(BlockDispenseEvent e) {
|
||||
if(Config.ArenaRegion.inRegion(e.getBlock()) && e.getItem().getType() == Material.TNT)
|
||||
e.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -29,10 +29,12 @@ import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.type.Dispenser;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockDispenseEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
@ -161,4 +163,14 @@ public class Permanent implements Listener {
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onBlockDispense(BlockDispenseEvent e) {
|
||||
|
||||
if(!Config.ArenaRegion.inRegion(e.getBlock()))
|
||||
return;
|
||||
|
||||
if(e.getItem().getType() == Material.TNT || e.getBlock().getRelative(((Dispenser) e.getBlock().getBlockData()).getFacing()).isLiquid())
|
||||
e.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren