Updated to 2.2.0 (resolved some issues and patches).

This commit is contained in:
CoderMarido 2018-09-15 14:13:31 +02:00
parent f98aac586f
commit cabe8de692
4 changed files with 11 additions and 9 deletions

View File

@ -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

View File

@ -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");
}

View File

@ -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]

View File

@ -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