mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 04:57:27 +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
@@ -705,17 +705,9 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
return data.getGUIOpen();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public ScriptDBCPlayer<T> getDBCPlayer() {
|
||||
Set keySet = player.getEntityData().getCompoundTag("PlayerPersisted").func_150296_c();
|
||||
Iterator iterator = keySet.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
String s = (String)iterator.next();
|
||||
if(s.contains("jrmc"))
|
||||
return new ScriptDBCPlayer<T>(this.player);
|
||||
}
|
||||
return null;
|
||||
return this instanceof ScriptDBCPlayer ? (ScriptDBCPlayer<T>) this : null;
|
||||
}
|
||||
|
||||
public boolean blocking() {
|
||||
|
||||
Reference in new issue
Block a user