mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Fix NPE in WiredHandler
This commit is contained in:
parent
add7156b9a
commit
44de2a81ec
@ -415,10 +415,12 @@ 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 == null) return;
|
||||||
|
|
||||||
if (t.getType() == WiredTriggerType.AT_GIVEN_TIME || t.getType() == WiredTriggerType.PERIODICALLY || t.getType() == WiredTriggerType.PERIODICALLY_LONG) {
|
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