forked from Upstream/CitizensCMD
Tabcomplete for sounds fixed + "citizens-check" added to config
Allows you to disable the self disabling of the plugin.
This commit is contained in:
parent
f7c9933b02
commit
98fc5bdbe9
@ -68,7 +68,10 @@ public final class CitizensCMD extends JavaPlugin {
|
|||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
||||||
if (!hasCitizens()) {
|
checkOldConfig(this);
|
||||||
|
saveDefaultConfig();
|
||||||
|
|
||||||
|
if (!hasCitizens() && getConfig().getBoolean("citizens-check")) {
|
||||||
Util.disablePlugin(this);
|
Util.disablePlugin(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -76,8 +79,6 @@ public final class CitizensCMD extends JavaPlugin {
|
|||||||
commandHandler = new CommandHandler(this);
|
commandHandler = new CommandHandler(this);
|
||||||
commandHandler.enable();
|
commandHandler.enable();
|
||||||
|
|
||||||
checkOldConfig(this);
|
|
||||||
|
|
||||||
new Metrics(this);
|
new Metrics(this);
|
||||||
|
|
||||||
info(color(TAG + "&3Citizens&cCMD &8&o" + getDescription().getVersion() + " &8By &3Mateus Moreira &c@LichtHund"));
|
info(color(TAG + "&3Citizens&cCMD &8&o" + getDescription().getVersion() + " &8By &3Mateus Moreira &c@LichtHund"));
|
||||||
@ -90,7 +91,6 @@ public final class CitizensCMD extends JavaPlugin {
|
|||||||
cooldownHandler = new CooldownHandler(this);
|
cooldownHandler = new CooldownHandler(this);
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this, () -> cooldownHandler.initialize(), 30L);
|
Bukkit.getScheduler().scheduleSyncDelayedTask(this, () -> cooldownHandler.initialize(), 30L);
|
||||||
|
|
||||||
saveDefaultConfig();
|
|
||||||
registerCommands();
|
registerCommands();
|
||||||
registerEvents();
|
registerEvents();
|
||||||
|
|
||||||
|
@ -157,7 +157,9 @@ public class CommandHandler implements CommandExecutor, TabCompleter, IHandler {
|
|||||||
switch (subCMD) {
|
switch (subCMD) {
|
||||||
case "add":
|
case "add":
|
||||||
if (args.length == 2) return getCommandNames(subCMD, args, 1, (Player) sender);
|
if (args.length == 2) return getCommandNames(subCMD, args, 1, (Player) sender);
|
||||||
if (args.length == 3) return getCommandNames(subCMD, args, 2, (Player) sender);
|
if (args[1].equalsIgnoreCase("sound")) {
|
||||||
|
if (args.length == 3) return getCommandNames(subCMD, args, 2, (Player) sender);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "remove":
|
case "remove":
|
||||||
|
@ -20,3 +20,6 @@ shift-confirm: true
|
|||||||
#
|
#
|
||||||
# Select cooldown display format, SHORT = 3m 3s | MEDIUM = 3 min 3 sec | FULL - 3 minutes 3 seconds
|
# Select cooldown display format, SHORT = 3m 3s | MEDIUM = 3 min 3 sec | FULL - 3 minutes 3 seconds
|
||||||
cooldown-time-display: MEDIUM
|
cooldown-time-display: MEDIUM
|
||||||
|
#
|
||||||
|
# Disables citizens check on startup
|
||||||
|
citizens-check: true
|
Loading…
Reference in New Issue
Block a user