Skip to content

Commit

Permalink
POM version correction, allowing stop to be used ingame, fixing AIOOD…
Browse files Browse the repository at this point in the history
…E when using /warp
  • Loading branch information
darkdiplomat committed Sep 2, 2013
1 parent e09d37f commit 47cf97c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>net.canarymod</groupId>
<artifactId>CanaryLib</artifactId>
<packaging>jar</packaging>
<version>1.0-RC-1</version>
<version>1.0-RC-2-SNAPSHOT</version>
<name>CanaryLib</name>
<url>http://www.canarymod.net</url>
<inceptionYear>2012</inceptionYear>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/canarymod/commandsys/CommandList.java
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ public void setSpawnCommand(MessageReceiver caller, String[] parameters) {
description = "warp info",
permissions = { "canary.command.warp.use" },
toolTip = "/warp <name>",
min = 2,
max = 2)
public void warpUse(MessageReceiver caller, String[] parameters) {
natives.get("warp").execute(caller, parameters);
Expand Down Expand Up @@ -746,7 +747,7 @@ public void spawnCommand(MessageReceiver caller, String[] parameters) {

@Command(aliases = { "stop", "shutdown" },
description = "stop info",
permissions = { "*" },
permissions = { "canary.super.command.stop" },
toolTip = "/stop")
public void stopCommand(MessageReceiver caller, String[] parameters) {
natives.get("stop").execute(caller, parameters);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.canarymod.commandsys.commands;

import net.canarymod.Canary;
import net.canarymod.Translator;
import net.canarymod.api.Server;
import net.canarymod.api.entity.living.humanoid.Player;
Expand All @@ -15,7 +16,8 @@ public void execute(MessageReceiver caller, String[] parameters) {
((Server) caller).initiateShutdown();
}
else if (caller instanceof Player) {
caller.notice(Translator.translate("stop player"));
Canary.getServer().notice(Translator.translateAndFormat("stop console", caller.getName()));
Canary.getServer().initiateShutdown();
}
else {
throw new CommandException("Unknown MessageReceiver: " + caller.getClass().getSimpleName());
Expand Down

0 comments on commit 47cf97c

Please sign in to comment.