Badges update automatically and link to the plugin page on MineUniverse.
MainHelper.reformateText("&cSome text");
MainHelper.hasPermission(player, permission);
MainHelper.isPluginThere(mainPlugin, "Litebans");
MainHelper.addLore(lore, itemstack);
MainHelper.getRenamedItemstack(customname, itemstack);
private void checkUpdate() {
UpdateChecker updater = new UpdateChecker(this, 52712, false);
UpdateChecker.UpdateResult result = updater.getResult();
switch (result) {
case NO_UPDATE: {
getLogger().info(perfix + MainHelper.reformateText("&6There is no update available! Everything is up to date!"));
break;
}
case UPDATE_AVAILABLE: {
// TODO: 4/12/2017 Fix link
getLogger().info(perfix + MainHelper.reformateText("&aThere is an update available! You can download it at https://www.spigotmc.org/resources/anti-combat-log.52712/"));
break;
}
case FAIL_SPIGOT: {
getLogger().info(perfix + MainHelper.reformateText("&cThere is a problem with Spigot. sorry for the inconvenience"));
break;
}
case BAD_RESOURCEID: {
getLogger().info(perfix + MainHelper.reformateText("&cStupid me. I placed the wrong ResourceID. Contact him on Spigot!"));
break;
}
}
}
Config config = new Config(plugin, "config.yml");
#Enables if you want to auto check for updates updatechecker: true #These commands will be disabled when being in combat. command-blacklist: - /spawn - /ci #When this is allowed, players can be punished for combat logging allow-punishments: true
public class Config extends ConfigHandler {
private static boolean updateChecker;
private static boolean punishmentsAllowed;
private static List<String> blacklistedCommands;
public Config(JavaPlugin plugin, String filename) {
super(plugin, filename);
loadConfig();
}
private void loadConfig() {
updateChecker = getConfig().getBoolean("updatechecker");
punishmentsAllowed = getConfig().getBoolean("allow-punishments");
blacklistedCommands= getConfig().getStringList("command-blacklist");
}
public static List<String> getBlacklistedCommands() {
return blacklistedCommands;
}
public static boolean isUpdateChecker() {
return updateChecker;
}
public static boolean ispunishmentsAllowed () {
return punishmentsAllowed ;
}
}
Config.ispunishmentsAllowed();