From cabe8de6926167dd8b5af7fbd3e3cd224841de2f Mon Sep 17 00:00:00 2001 From: CoderMarido Date: Sat, 15 Sep 2018 14:13:31 +0200 Subject: [PATCH] Updated to 2.2.0 (resolved some issues and patches). --- src/italian/config.yml | 4 ++-- src/nl/marido/deluxeheads/DeluxeHeads.java | 9 +++++---- src/plugin.yml | 3 ++- src/pre1_13/config.yml | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/italian/config.yml b/src/italian/config.yml index ac1841a..54ba978 100644 --- a/src/italian/config.yml +++ b/src/italian/config.yml @@ -23,9 +23,9 @@ breaking-head-names: default-name: 'Decoration Head' commands: heads: - label: 'heads' + label: 'deluxeheads' aliases: - - 'head' + - 'heads' description: 'Ottieni Teste fantastiche' sub-commands: # open menu is when no arguments are supplied diff --git a/src/nl/marido/deluxeheads/DeluxeHeads.java b/src/nl/marido/deluxeheads/DeluxeHeads.java index 4ef330e..cdf0226 100644 --- a/src/nl/marido/deluxeheads/DeluxeHeads.java +++ b/src/nl/marido/deluxeheads/DeluxeHeads.java @@ -70,6 +70,8 @@ public class DeluxeHeads extends JavaPlugin implements Listener { @Override public void onEnable() { + csender = this.getServer().getConsoleSender(); + instance = this; if (Version.isBelow(Version.v1_8)) { print("&c-------------------------------------------------------------------"); print("&c DeluxeHeads no longer supports versions below Minecraft 1.8."); @@ -78,7 +80,6 @@ public class DeluxeHeads extends JavaPlugin implements Listener { Bukkit.getPluginManager().disablePlugin(this); return; } - instance = this; Clock timer = Clock.start(); loadCache(); try { @@ -138,11 +139,11 @@ public class DeluxeHeads extends JavaPlugin implements Listener { unregisterCommands(); } SimpleCommandMap commandMap = CraftServer.get().getCommandMap(); - RuntimeCommand heads = new RuntimeCommand(mainConfig.getHeadCommand()); + RuntimeCommand heads = new RuntimeCommand("deluxeheads"); heads.setExecutor(new HeadsCommand()); heads.setDescription(mainConfig.getHeadDescription()); heads.setAliases(Arrays.asList(mainConfig.getHeadAliases())); - commandMap.register("heads", heads); + commandMap.register("deluxeheads", heads); commandsRegistered = true; } @@ -167,7 +168,7 @@ public class DeluxeHeads extends JavaPlugin implements Listener { if (!getDataFolder().exists() && !getDataFolder().mkdirs()) throw new RuntimeException("Unable to create the data folder to save plugin files"); if (!getDataFolder().isDirectory()) - throw new RuntimeException("plugins/Heads should be a directory, yet there is a file with the same name"); + throw new RuntimeException("plugins/DeluxeHeads should be a directory, yet there is a file with the same name"); return new File(getDataFolder(), "heads.cache"); } diff --git a/src/plugin.yml b/src/plugin.yml index 4bf838b..6907316 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -2,7 +2,8 @@ name: DeluxeHeads main: nl.marido.deluxeheads.DeluxeHeads description: Enhance your server with over 17,000 awesome unique heads with amazing features. author: Marido -version: 2.1.9 +website: https://marido.host/deluxeheads +version: 2.2.0 api-version: 1.13 softdepend: [Vault, PlayerPoints, BlockStore] loadbefore: [DeluxeMenus] diff --git a/src/pre1_13/config.yml b/src/pre1_13/config.yml index cb31e64..1b3728c 100644 --- a/src/pre1_13/config.yml +++ b/src/pre1_13/config.yml @@ -23,9 +23,9 @@ breaking-head-names: default-name: 'Decoration Head' commands: heads: - label: 'heads' + label: 'deluxeheads' aliases: - - 'head' + - 'heads' description: 'Get cool heads' sub-commands: # open menu is when no arguments are supplied