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 org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.World;
import java.util.Objects;
public class PapiExtension extends PlaceholderExpansion {
WorldSystem worldSystem = WorldSystem.getInstance();
private WorldSystem worldSystem = WorldSystem.getInstance();
@Override
public String getIdentifier() {
@ -50,8 +49,8 @@ public class PapiExtension extends PlaceholderExpansion {
if (!config.hasWorld())
return "none";
return SystemWorld.getSystemWorld(config.getWorldname()).isLoaded() + "";
}
return super.onRequest(p, params);
default:
throw new IllegalArgumentException("No placeholder named\"" + getIdentifier() + "_" + params + "\" is known");
}
}
}