mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 20:25:13 +00:00
Timers are only updated if a timer exists for a player.
This commit is contained in:
1 parent
d46d0aba7e
commit
1a78b2dad7
3 files changed
+6
-1
No files matched your search
@@ -70,7 +70,8 @@ public class ScriptPlayerEventHandler {
|
||||
|
||||
if(PlayerDataController.instance != null) {
|
||||
PlayerDataController.instance.getPlayerData(player).scriptData = data.scriptData;
|
||||
PlayerDataController.instance.getPlayerData(player).timers.update();
|
||||
if(PlayerDataController.instance.getPlayerData(player).timers.size() > 0)
|
||||
PlayerDataController.instance.getPlayerData(player).timers.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,8 @@ public class DataTimers implements ITimers {
|
||||
this.timers = new HashMap();
|
||||
}
|
||||
|
||||
public int size() { return this.timers.size(); }
|
||||
|
||||
class Timer {
|
||||
public int id;
|
||||
private boolean repeat;
|
||||
|
||||
@@ -17,4 +17,6 @@ public interface ITimers {
|
||||
void reset(int var1);
|
||||
|
||||
void clear();
|
||||
|
||||
int size();
|
||||
}
|
||||
Reference in new issue
Block a user