SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix NPE in FreezeListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-06-26 20:59:31 +02:00
Ursprung 6c6b17eb30
Commit 4b4b623fee

Datei anzeigen

@ -100,7 +100,9 @@ public class FreezeListener implements Listener, ScoreboardElement {
@EventHandler
public void onInventoryMoveEvent(InventoryMoveItemEvent e) {
if (Region.getRegion(e.getDestination().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) {
if (e.getDestination().getLocation() != null && Region.getRegion(e.getDestination().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) {
e.setCancelled(true);
} else if (e.getSource().getLocation() != null && Region.getRegion(e.getSource().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) {
e.setCancelled(true);
}
}