mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 09:37:29 +00:00
Remove From TagMap
This commit is contained in:
1 parent
cc2e8805d8
commit
abb2d13e6e
2 files changed
+12
-2
No files matched your search
@@ -149,6 +149,7 @@ public class ServerCloneController implements ICloneHandler {
|
||||
if(!file.exists())
|
||||
return false;
|
||||
file.delete();
|
||||
removeFromTagMap(name, tab);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -175,6 +176,15 @@ public class ServerCloneController implements ICloneHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean removeFromTagMap(String name, int tab){
|
||||
TagMap tagMap = ServerTagMapController.Instance.getTagMap(tab);
|
||||
if(tagMap.removeClone(name)){
|
||||
ServerTagMapController.Instance.saveTagMap(tagMap);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void cleanTags(NBTTagCompound nbttagcompound){
|
||||
if(nbttagcompound.hasKey("ItemGiverId"))
|
||||
nbttagcompound.setInteger("ItemGiverId", 0);
|
||||
|
||||
Reference in new issue
Block a user