mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 13:25:10 +00:00
Made API return a DBC player object if a player is a DBC player. Deprecated old getDBCPlayer() function.
This commit is contained in:
1 parent
ad222657c4
commit
d57571ea0d
3 files changed
+54
-34
No files matched your search
@@ -33,7 +33,7 @@ import java.util.*;
|
||||
|
||||
public class ScriptEntity<T extends Entity> implements IEntity {
|
||||
protected T entity;
|
||||
private Map<String,Object> tempData = new HashMap<String,Object>();
|
||||
private Map<String,Object> tempData = new HashMap<>();
|
||||
|
||||
public ScriptEntity(T entity){
|
||||
this.entity = entity;
|
||||
@@ -513,6 +513,12 @@ public class ScriptEntity<T extends Entity> implements IEntity {
|
||||
return tempData.get(key);
|
||||
}
|
||||
|
||||
public void copyTempData(IEntity<?> scriptEntity) {
|
||||
if (scriptEntity != null) {
|
||||
this.tempData = ((ScriptEntity<?>) scriptEntity).tempData;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tempdata gets cleared when the entity gets unloaded or the world restarts
|
||||
* @param key The key for the data stored
|
||||
|
||||
Reference in new issue
Block a user