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() {
|
public void onEnable() {
|
||||||
plugin = this;
|
plugin = this;
|
||||||
|
|
||||||
|
String worldName = Bukkit.getWorlds().get(0).getName();
|
||||||
try{
|
try{
|
||||||
owner = UUID.fromString(Bukkit.getWorlds().get(0).getName());
|
owner = UUID.fromString(worldName);
|
||||||
}catch(IllegalArgumentException e){
|
}catch(IllegalArgumentException e){
|
||||||
getLogger().log(Level.SEVERE, "owner is no UUID", e);
|
try{
|
||||||
Bukkit.shutdown();
|
owner = SteamwarUser.get(Integer.parseInt(worldName)).getUUID();
|
||||||
return;
|
}catch(NumberFormatException ex){
|
||||||
|
getLogger().log(Level.SEVERE, "owner is no UUID", e);
|
||||||
|
Bukkit.shutdown();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren