SteamWar/MissileWars
Archiviert
13
0

Merge remote-tracking branch 'origin/master'

Dieser Commit ist enthalten in:
Lixfel 2020-09-04 16:10:34 +02:00
Commit c07a080a42
2 geänderte Dateien mit 11 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -97,4 +97,5 @@ public class MWTeam {
public String getColoredName() { public String getColoredName() {
return color.toString() + teamName; return color.toString() + teamName;
} }
} }

Datei anzeigen

@ -8,6 +8,8 @@ import org.bukkit.Location;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.FoodLevelChangeEvent; import org.bukkit.event.entity.FoodLevelChangeEvent;
import org.bukkit.event.inventory.InventoryOpenEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerMoveEvent; import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerPickupArrowEvent; import org.bukkit.event.player.PlayerPickupArrowEvent;
@ -57,4 +59,12 @@ public class ArenaListener extends BasicListener {
public void onHunger(FoodLevelChangeEvent e){ public void onHunger(FoodLevelChangeEvent e){
e.setCancelled(true); e.setCancelled(true);
} }
@EventHandler(ignoreCancelled = true)
public void onInventoryOpen(InventoryOpenEvent event) {
if(event.getView().getType() != InventoryType.PLAYER &&
event.getView().getType() != InventoryType.CRAFTING &&
event.getView().getType() != InventoryType.CREATIVE)
event.setCancelled(true);
}
} }