Preventing arrow pickups
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
11251727bf
Commit
4aee1f4c72
@ -1,5 +1,6 @@
|
||||
package de.steamwar.fightsystem;
|
||||
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.fightsystem.commands.*;
|
||||
import de.steamwar.fightsystem.countdown.*;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
@ -59,6 +60,8 @@ public class FightSystem extends JavaPlugin {
|
||||
new EventJoinListener();
|
||||
new TestListener();
|
||||
new NormalJoinListener();
|
||||
if(Core.getVersion() > 8)
|
||||
new ArrowPickupListener();
|
||||
|
||||
new WinconditionAllDead();
|
||||
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