Dieser Commit ist enthalten in:
Ursprung
ed5a0fbd7c
Commit
aae9b0c267
@ -23,6 +23,7 @@ import de.steamwar.lobby.command.ModifyCommand;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.player.*;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -32,20 +33,18 @@ public class InventoryInteraction extends BasicListener {
|
||||
@EventHandler
|
||||
public void handlePlayerInteract(PlayerInteractEvent event) {
|
||||
ItemStack item = event.getItem();
|
||||
if(item == null || item.getType() == Material.FIREWORK_ROCKET)
|
||||
if(item == null)
|
||||
return;
|
||||
|
||||
if(item.getType() == Material.FIREWORK_ROCKET && (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK)) {
|
||||
item.setAmount(2);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!ModifyCommand.modifying(event.getPlayer()))
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void handleItemConsume(PlayerItemConsumeEvent event) {
|
||||
ItemStack item = event.getItem();
|
||||
if (item.getType() == Material.FIREWORK_ROCKET)
|
||||
item.setAmount(2);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void handlePlayerDropItem(PlayerDropItemEvent event) {
|
||||
event.setCancelled(true);
|
||||
|
@ -215,7 +215,7 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
|
||||
case "PRE_RUNNING":
|
||||
return "Kampfbeginn in";
|
||||
case "RUNNING":
|
||||
return "Kampf läuft noch";
|
||||
return "Kampf läuft";
|
||||
case "end":
|
||||
case "SPECTATE":
|
||||
return "Zuschauerphase";
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren