From 392142e79273cfde7c6eaf818c457f8838f32b61 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Mon, 29 Dec 2014 21:56:43 +0000 Subject: [PATCH] [0.45-PRE2] Improve tab-complete support. --- pom.xml | 8 +++++++- .../canary/playtimelimiter/PlayTimeCommand.java | 7 ++++--- .../canary/playtimelimiter/PlayTimeLimiter.java | 4 ++-- src/main/resources/Canary.inf | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 760ca34..0319d0d 100644 --- a/pom.xml +++ b/pom.xml @@ -9,9 +9,15 @@ PlayTimeLimiter https://github.com/UnoModding/Canary-PlayTimeLimiter PlayTimeLimiter is a CanaryLib plugin for Minecraft servers to only allow players to limit the amount of time players spend on your server. - 0.45-PRE + 0.45-PRE2 2014 + + UTF-8 + 1.6 + ${project.groupId}.${project.artifactId}.${project.name} + + vi-repo diff --git a/src/main/java/unomodding/canary/playtimelimiter/PlayTimeCommand.java b/src/main/java/unomodding/canary/playtimelimiter/PlayTimeCommand.java index 810baa3..0e9f7e1 100644 --- a/src/main/java/unomodding/canary/playtimelimiter/PlayTimeCommand.java +++ b/src/main/java/unomodding/canary/playtimelimiter/PlayTimeCommand.java @@ -220,10 +220,11 @@ public void blacklistRemoveCommand(MessageReceiver caller, String[] args) { @TabComplete(commands = { "playtime", "pt" }) public List playtimeTabComplete(MessageReceiver caller, String[] parameters) { if (parameters.length == 1) { - return TabCompleteHelper.matchTo(parameters, new String[] { "start", "stop", "add", "remove", "check", - "blacklist" }); + return TabCompleteHelper.matchTo(parameters, new String[] { "start", "stop", "add", "remove", "set", + "check", "blacklist" }); } else if (parameters.length == 2 - && (parameters[1].equals("add") || parameters[1].equals("remove") || parameters[1].equals("check"))) { + && (parameters[1].equals("add") || parameters[1].equals("remove") || parameters[1].equals("check") + || parameters[1].equals("set"))) { return TabCompleteHelper.matchTo(parameters, Canary.getServer().getKnownPlayerNames()); } else if(parameters.length == 2 && parameters[1].equals("blacklist")) { return TabCompleteHelper.matchTo(parameters, new String[] { "add", "remove" }); diff --git a/src/main/java/unomodding/canary/playtimelimiter/PlayTimeLimiter.java b/src/main/java/unomodding/canary/playtimelimiter/PlayTimeLimiter.java index 7a6a984..699871d 100644 --- a/src/main/java/unomodding/canary/playtimelimiter/PlayTimeLimiter.java +++ b/src/main/java/unomodding/canary/playtimelimiter/PlayTimeLimiter.java @@ -78,14 +78,14 @@ public boolean enable() { getConfig().setBoolean("timeTravels", true); getConfig().save(); } - if (!getConfig().containsKey("timeCap")) { + /*if (!getConfig().containsKey("timeCap")) { getConfig().setBoolean("timeCap", true); getConfig().save(); } if (!getConfig().containsKey("timeCapValue")) { getConfig().setInt("timeCapValue", 18000); getConfig().save(); - } + }*/ if (!getConfig().containsKey("blacklist")) { getConfig().setBoolean("blacklist", false); getConfig().save(); diff --git a/src/main/resources/Canary.inf b/src/main/resources/Canary.inf index e87fffe..13ab8b4 100644 --- a/src/main/resources/Canary.inf +++ b/src/main/resources/Canary.inf @@ -1,4 +1,4 @@ name=${project.name} -main-class=unomodding.canary.playtimelimiter.PlayTimeLimiter +main-class=$(mainclass} author=UnoModding version=${project.version} \ No newline at end of file