Update PapiExtension.java

This commit is contained in:
CrazyCloudCraft | Argantiu 2022-07-15 13:16:28 +02:00 committed by GitHub
parent f43c84cb15
commit 651ec8f2af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,13 +73,13 @@ public class PapiExtension extends PlaceholderExpansion {
case "world_loaded":
if (!config.hasWorld())
return "none";
return Objects.requireNonNull(SystemWorld.getSystemWorld(config.getWorldname()).isLoaded() + "";
return Objects.requireNonNull(SystemWorld.getSystemWorld(config.getWorldname())).isLoaded() + "";
case "pretty_world_name":
if (!p.isOnline()) {
if (!config.hasWorld()) {
Player p1 = p.getPlayer();
if (p1 != null && p1.isOnline())
return Objects.requireNonNull(p1.getLocation().getWorld().getName();
return Objects.requireNonNull(p1.getLocation().getWorld()).getName();
return "none";
}
return config.getOwner().getName();