Preventing arrow pickups #108
@ -1,5 +1,6 @@
|
|||||||
package de.steamwar.fightsystem;
|
package de.steamwar.fightsystem;
|
||||||
|
|
||||||
|
import de.steamwar.core.Core;
|
||||||
import de.steamwar.fightsystem.commands.*;
|
import de.steamwar.fightsystem.commands.*;
|
||||||
import de.steamwar.fightsystem.countdown.*;
|
import de.steamwar.fightsystem.countdown.*;
|
||||||
import de.steamwar.fightsystem.fight.Fight;
|
import de.steamwar.fightsystem.fight.Fight;
|
||||||
@ -59,6 +60,8 @@ public class FightSystem extends JavaPlugin {
|
|||||||
new EventJoinListener();
|
new EventJoinListener();
|
||||||
new TestListener();
|
new TestListener();
|
||||||
new NormalJoinListener();
|
new NormalJoinListener();
|
||||||
|
if(Core.getVersion() > 8)
|
||||||
|
new ArrowPickupListener();
|
||||||
|
|
||||||
new WinconditionAllDead();
|
new WinconditionAllDead();
|
||||||
new WinconditionCaptainDead();
|
new WinconditionCaptainDead();
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
package de.steamwar.fightsystem.listener;
|
||||||
|
|
||||||
|
import de.steamwar.fightsystem.states.FightState;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.player.PlayerPickupArrowEvent;
|
||||||
|
|
||||||
|
import java.util.EnumSet;
|
||||||
|
|
||||||
|
public class ArrowPickupListener extends BasicListener {
|
||||||
|
|
||||||
|
public ArrowPickupListener() {
|
||||||
|
super(EnumSet.allOf(FightState.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onArrowPickup(PlayerPickupArrowEvent e){
|
||||||
|
e.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren