Fixed some minor problems in PapiExtension

This commit is contained in:
Butzlabben 2019-03-17 20:46:28 +01:00
parent 7eccbb3882
commit c717b19118

View File

@ -7,13 +7,12 @@ import de.butzlabben.world.wrapper.WorldPlayer;
import me.clip.placeholderapi.expansion.PlaceholderExpansion; import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
import org.bukkit.World;
import java.util.Objects; import java.util.Objects;
public class PapiExtension extends PlaceholderExpansion { public class PapiExtension extends PlaceholderExpansion {
WorldSystem worldSystem = WorldSystem.getInstance(); private WorldSystem worldSystem = WorldSystem.getInstance();
@Override @Override
public String getIdentifier() { public String getIdentifier() {
@ -50,8 +49,8 @@ public class PapiExtension extends PlaceholderExpansion {
if (!config.hasWorld()) if (!config.hasWorld())
return "none"; return "none";
return SystemWorld.getSystemWorld(config.getWorldname()).isLoaded() + ""; return SystemWorld.getSystemWorld(config.getWorldname()).isLoaded() + "";
default:
} throw new IllegalArgumentException("No placeholder named\"" + getIdentifier() + "_" + params + "\" is known");
return super.onRequest(p, params); }
} }
} }