Added Listener for Water Remover
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
ed14b52948
Commit
6d67cd7f6f
@ -197,6 +197,7 @@ public class FightSystem extends JavaPlugin {
|
||||
pm.registerEvents(new FoodLevelChangeListener(), plugin);
|
||||
pm.registerEvents(new PlayerRespawnListener(), plugin);
|
||||
pm.registerEvents(new EntityDamageListener(), plugin);
|
||||
pm.registerEvents(new EntityExplodeListener(), plugin);
|
||||
|
||||
//WinConditions
|
||||
if(fileManager.getBooleanFromConfig("WinConditions.AllDead")) pm.registerEvents(new WinconditionAllDead(), plugin);
|
||||
|
21
src/me/yaruma/fightsystem/listener/EntityExplodeListener.java
Normale Datei
21
src/me/yaruma/fightsystem/listener/EntityExplodeListener.java
Normale Datei
@ -0,0 +1,21 @@
|
||||
package me.yaruma.fightsystem.listener;
|
||||
|
||||
import me.yaruma.fightsystem.FightSystem;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
|
||||
public class EntityExplodeListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void handleEntityExplode(EntityExplodeEvent event) {
|
||||
for(Block block : event.blockList()) {
|
||||
if(block.getType() != Material.WATER || block.getType() != Material.STATIONARY_WATER)
|
||||
FightSystem.getPlugin().getWaterRemover().add(block.getLocation());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren