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,11 +415,13 @@ public class WiredHandler {
|
||||
}
|
||||
|
||||
public static void resetTimers(Room room) {
|
||||
if (!room.isLoaded())
|
||||
if (!room.isLoaded() || room.getRoomSpecialTypes() == null)
|
||||
return;
|
||||
|
||||
room.getRoomSpecialTypes().getTriggers().forEach(t-> {
|
||||
if(t.getType() == WiredTriggerType.AT_GIVEN_TIME || t.getType() == WiredTriggerType.PERIODICALLY || t.getType() == WiredTriggerType.PERIODICALLY_LONG) {
|
||||
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) {
|
||||
((WiredTriggerReset) t).resetTimer();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user