mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 08:38:31 +00:00
Send All Tags to Client for Viewing
This commit is contained in:
1 parent
ac87f2c2c2
commit
30b3f55e7c
4 files changed
+23
-26
No files matched your search
@@ -34,13 +34,13 @@ public class ServerTagMapController {
|
||||
public TagMap getTagMap(int tab){
|
||||
this.tagMap = new TagMap(tab);
|
||||
try {
|
||||
File file = new File(getCloneTabDir(tab), "_____tag_map.dat");
|
||||
File file = new File(getCloneTabDir(tab), "___tagmap.dat");
|
||||
if(file.exists()){
|
||||
loadTagMapFile(file);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
File file = new File(getCloneTabDir(tab), "_____tag_map.dat_old");
|
||||
File file = new File(getCloneTabDir(tab), "___tagmap.dat_old");
|
||||
if(file.exists()){
|
||||
loadTagMapFile(file);
|
||||
}
|
||||
@@ -63,9 +63,9 @@ public class ServerTagMapController {
|
||||
public void saveTagMap(TagMap tagMap){
|
||||
try {
|
||||
File saveDir = getCloneTabDir(tagMap.cloneTab);
|
||||
File file = new File(saveDir, "_____tag_map.dat_new");
|
||||
File file1 = new File(saveDir, "_____tag_map.dat_old");
|
||||
File file2 = new File(saveDir, "_____tag_map.dat");
|
||||
File file = new File(saveDir, "___tagmap.dat_new");
|
||||
File file1 = new File(saveDir, "___tagmap.dat_old");
|
||||
File file2 = new File(saveDir, "___tagmap.dat");
|
||||
CompressedStreamTools.writeCompressed(tagMap.writeNBT(), new FileOutputStream(file));
|
||||
if(file1.exists())
|
||||
{
|
||||
|
||||
@@ -231,6 +231,10 @@ public class TagController implements ITagHandler {
|
||||
return names;
|
||||
}
|
||||
|
||||
public HashSet<Tag> getAllTags(){
|
||||
return new HashSet<Tag>(this.tags.values());
|
||||
}
|
||||
|
||||
public HashSet<Tag> getValidTags(TagMap tagMap){
|
||||
HashSet<Tag> tags = new HashSet<Tag>();
|
||||
for(UUID tagUUID : tagMap.getAllUUIDs()){
|
||||
|
||||
Reference in new issue
Block a user