Updated to 2.2.1 (resolved some issues and patches).

This commit is contained in:
CoderMarido 2018-09-16 15:09:21 +02:00
parent cabe8de692
commit c598442b3c
4 changed files with 13 additions and 10 deletions

View File

@ -57,7 +57,7 @@ import nl.marido.deluxeheads.volatilecode.reflection.craftbukkit.CraftServer;
public class DeluxeHeads extends JavaPlugin implements Listener {
private static DeluxeHeads instance;
private static ConsoleCommandSender csender;
private static ConsoleCommandSender console;
private CacheFile cache;
private MenuConfig oldMenuConfig;
private Menus menus;
@ -68,9 +68,12 @@ public class DeluxeHeads extends JavaPlugin implements Listener {
private boolean commandsRegistered = false;
private boolean blockStoreAvailable = false;
// Thank you for purchasing DeluxeHeads.
public static String user = "%%__USER__%%";
@Override
public void onEnable() {
csender = this.getServer().getConsoleSender();
console = this.getServer().getConsoleSender();
instance = this;
if (Version.isBelow(Version.v1_8)) {
print("&c-------------------------------------------------------------------");
@ -139,7 +142,7 @@ public class DeluxeHeads extends JavaPlugin implements Listener {
unregisterCommands();
}
SimpleCommandMap commandMap = CraftServer.get().getCommandMap();
RuntimeCommand heads = new RuntimeCommand("deluxeheads");
RuntimeCommand heads = new RuntimeCommand(mainConfig.getHeadCommand());
heads.setExecutor(new HeadsCommand());
heads.setDescription(mainConfig.getHeadDescription());
heads.setAliases(Arrays.asList(mainConfig.getHeadAliases()));
@ -343,7 +346,7 @@ public class DeluxeHeads extends JavaPlugin implements Listener {
}
public boolean isExemptFromCost(Player player) {
if (!mainConfig.isEconomyEnabled() || player.hasPermission("heads.bypasscost"))
if (!mainConfig.isEconomyEnabled() || player.hasPermission("deluxeheads.bypasscost"))
return true;
return mainConfig.isFreeInCreative() && player.getGameMode() == GameMode.CREATIVE;
@ -373,7 +376,7 @@ public class DeluxeHeads extends JavaPlugin implements Listener {
}
public static String getCategoryPermission(String category) {
return "heads.category." + category.toLowerCase().replace(' ', '_');
return "deluxeheads.category." + category.toLowerCase().replace(' ', '_');
}
public static DeluxeHeads getInstance() {
@ -418,7 +421,7 @@ public class DeluxeHeads extends JavaPlugin implements Listener {
public static void print(String print) {
if (print != null)
csender.sendMessage(ChatColor.translateAlternateColorCodes('&', print));
console.sendMessage(ChatColor.translateAlternateColorCodes('&', print));
}
public static FileConfigFile getVersionedConfig(String resource) {

View File

@ -57,7 +57,7 @@ public class DeluxeHeadsAPI {
}
private static Head fromNameAndTexture(String name, String texture) {
return (texture == null ? null : fromCacheHead(new CacheHead(name, "HeadsAPI", texture)));
return (texture == null ? null : fromCacheHead(new CacheHead(name, "DeluxeHeadsAPI", texture)));
}
private static List<Head> fromCacheHeads(List<CacheHead> heads) {

View File

@ -97,7 +97,7 @@ public class MainConfig {
vaultEcoEnabled = loadBoolean(config, "economy.vault-eco.enabled", true, shouldSave);
itemEcoEnabled = loadBoolean(config, "economy.item-eco.enabled", false, shouldSave);
Item defaultItemEcoItem = Items.createSkull().name("&6Player Head Token").lore("&8Use in /heads!");
Item defaultItemEcoItem = Items.createSkull().name("&6Player Head Token").lore("&8Use in /deluxeheads!");
itemEcoItem = loadItem(config, "economy.item-eco.item", defaultItemEcoItem, shouldSave);
@ -140,7 +140,7 @@ public class MainConfig {
searchLabel = loadString(config, "commands.heads.sub-commands.search", "search", shouldSave);
helpLabel = loadString(config, "commands.heads.sub-commands.help", "help", shouldSave);
headLabel = loadString(config, "commands.heads.label", "heads", shouldSave);
headLabel = loadString(config, "commands.heads.label", "deluxeheads", shouldSave);
headDescription = loadString(config, "commands.heads.description", "Get a cool head", shouldSave);
headAliases = loadStringArray(config, "commands.heads.aliases", new String[] { "head" }, shouldSave);
}

View File

@ -3,7 +3,7 @@ main: nl.marido.deluxeheads.DeluxeHeads
description: Enhance your server with over 17,000 awesome unique heads with amazing features.
author: Marido
website: https://marido.host/deluxeheads
version: 2.2.0
version: 2.2.1
api-version: 1.13
softdepend: [Vault, PlayerPoints, BlockStore]
loadbefore: [DeluxeMenus]