SteamWar/BauSystem
Archiviert
13
0

Allowing UserID as WorldName

Dieser Commit ist enthalten in:
Lixfel 2019-12-31 12:58:55 +01:00
Ursprung 574543c673
Commit a389fa9756

Datei anzeigen

@ -34,13 +34,18 @@ public class BauSystem extends JavaPlugin implements Listener {
public void onEnable() {
plugin = this;
String worldName = Bukkit.getWorlds().get(0).getName();
try{
owner = UUID.fromString(Bukkit.getWorlds().get(0).getName());
owner = UUID.fromString(worldName);
}catch(IllegalArgumentException e){
try{
owner = SteamwarUser.get(Integer.parseInt(worldName)).getUUID();
}catch(NumberFormatException ex){
getLogger().log(Level.SEVERE, "owner is no UUID", e);
Bukkit.shutdown();
return;
}
}
try {
CommandRemover.removeAll("tp", "gamemode", "time");