Skip to content

Commit

Permalink
Add world option to config and a comment with a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Luncaaa committed Jun 29, 2023
1 parent b87abf3 commit f89e702
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Objects;
import java.util.UUID;
import java.util.*;

public class DisplaysManager {
private final Plugin plugin;
Expand Down Expand Up @@ -66,6 +64,7 @@ public void createDisplay(Player p, DisplayType type, String name, String value)

// Set properties in the display file.
ConfigurationSection locationSection = displayConfig.createSection("location");
locationSection.set("world", p.getWorld().getName());
locationSection.set("x", p.getLocation().getX());
locationSection.set("y", p.getLocation().getY());
locationSection.set("z", p.getLocation().getZ());
Expand Down Expand Up @@ -113,6 +112,7 @@ public void createDisplay(Player p, DisplayType type, String name, String value)
}

displayConfig.set("id", newDisplay.getDisplay().getUniqueId().toString());
displayConfig.setComments("id", List.of("DO NOT MODIFY"));
displayConfigManager.save();
displays.put(name, newDisplay);
p.sendMessage(MessagesManager.getColoredMessage("&aThe display &e" + name + " &ahas been successfully created.", true));
Expand Down

0 comments on commit f89e702

Please sign in to comment.