Allowing UserID as WorldName
Dieser Commit ist enthalten in:
Ursprung
574543c673
Commit
a389fa9756
@ -34,12 +34,17 @@ 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){
|
||||
getLogger().log(Level.SEVERE, "owner is no UUID", e);
|
||||
Bukkit.shutdown();
|
||||
return;
|
||||
try{
|
||||
owner = SteamwarUser.get(Integer.parseInt(worldName)).getUUID();
|
||||
}catch(NumberFormatException ex){
|
||||
getLogger().log(Level.SEVERE, "owner is no UUID", e);
|
||||
Bukkit.shutdown();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren