Add exception when set Settings
This commit is contained in:
parent
3667515982
commit
31ce546e53
|
@ -22,7 +22,7 @@ repositories {
|
|||
dependencies {
|
||||
|
||||
compileOnly "org.spigotmc:spigot:1.8-R0.1-SNAPSHOT"
|
||||
compileOnly 'me.map:ultimatekingdom:1.0.12-ALPHA'
|
||||
compileOnly 'me.map:ultimatekingdom:1.0.15-ALPHA'
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -12,9 +12,7 @@ import me.map.ultimatekingdom.API.settings.SettingsType;
|
|||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -56,7 +54,11 @@ public class Example extends JavaPlugin {
|
|||
UltimateKingdom.getKingdomServer().PlaceHolders().PlayerPlaceHolders().register(new OwnPlaceHolder());
|
||||
|
||||
//registeren van een true/false setting voor kingdom
|
||||
try {
|
||||
kingdom.setSetting(Example.newsetting.setValue(true));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//ophalen setting
|
||||
if (kingdom.hasSetting(Example.newsetting)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user