mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Fix NPE in WiredHandler
This commit is contained in:
parent
add7156b9a
commit
44de2a81ec
@ -415,11 +415,13 @@ public class WiredHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void resetTimers(Room room) {
|
public static void resetTimers(Room room) {
|
||||||
if (!room.isLoaded())
|
if (!room.isLoaded() || room.getRoomSpecialTypes() == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
room.getRoomSpecialTypes().getTriggers().forEach(t-> {
|
room.getRoomSpecialTypes().getTriggers().forEach(t -> {
|
||||||
if(t.getType() == WiredTriggerType.AT_GIVEN_TIME || t.getType() == WiredTriggerType.PERIODICALLY || t.getType() == WiredTriggerType.PERIODICALLY_LONG) {
|
if (t == null) return;
|
||||||
|
|
||||||
|
if (t.getType() == WiredTriggerType.AT_GIVEN_TIME || t.getType() == WiredTriggerType.PERIODICALLY || t.getType() == WiredTriggerType.PERIODICALLY_LONG) {
|
||||||
((WiredTriggerReset) t).resetTimer();
|
((WiredTriggerReset) t).resetTimer();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user