mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-09-27 14:52:59 +02:00
41 lines
1.0 KiB
Java
41 lines
1.0 KiB
Java
package com.sekwah.advancedportals;
|
|
|
|
/**
|
|
* This contains generally used settings mostly
|
|
*/
|
|
public class Settings {
|
|
|
|
private int currentWarpParticles = 0;
|
|
|
|
private int currentWarpSound = 0;
|
|
|
|
private String commandLevels = "n";
|
|
|
|
public Settings(AdvancedPortalsPlugin plugin) {
|
|
ConfigAccessor config = new ConfigAccessor(plugin, "config.yml");
|
|
currentWarpParticles = config.getConfig().getInt("WarpParticles");
|
|
currentWarpSound = config.getConfig().getInt("WarpSound");
|
|
|
|
commandLevels = config.getConfig().getString("CommandLevels", "n");
|
|
if(commandLevels.contains("n") || commandLevels.equals("")) {
|
|
commandLevels = "n";
|
|
}
|
|
}
|
|
|
|
public String getCommandLevels(){
|
|
return this.commandLevels;
|
|
}
|
|
|
|
public boolean hasCommandLevel(String level){
|
|
return this.commandLevels.contains(level);
|
|
}
|
|
|
|
public int getCurrentWarpSound() {
|
|
return currentWarpSound;
|
|
}
|
|
|
|
public int getCurrentWarpParticles() {
|
|
return currentWarpParticles;
|
|
}
|
|
}
|