mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 06:07:27 +00:00
Refactored addData to setData
Added hasData
This commit is contained in:
1 parent
d119a7524e
commit
810e29ca75
2 files changed
+7
-3
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package noppes.npcs.controllers.data.action;
|
||||
|
||||
import noppes.npcs.api.handler.data.IAction;
|
||||
import noppes.npcs.config.ConfigScript;
|
||||
import noppes.npcs.scripted.ScriptedActionManager;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -128,7 +127,7 @@ public class Action implements IAction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAction addData(String key, Object v) {
|
||||
public IAction setData(String key, Object v) {
|
||||
dataStore.put(key, v);
|
||||
return this;
|
||||
}
|
||||
@@ -139,6 +138,11 @@ public class Action implements IAction {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasData(String key) {
|
||||
return dataStore.containsKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getUpdateEveryXTick() {
|
||||
return updateEveryXTick;
|
||||
|
||||
Reference in new issue
Block a user