summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandme.java
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-08-27 23:14:49 +0200
committersnowleo <schneeleo@gmail.com>2011-08-27 23:14:49 +0200
commit362c2bbf48bf5e32b1b95abc691a78feba5c788c (patch)
tree596560b087344b634b3bf7af29794711e87f5014 /Essentials/src/com/earth2me/essentials/commands/Commandme.java
parentcd18881dec695ee5758c8124d9b7d6dd9f7b5f0e (diff)
downloadEssentials-362c2bbf48bf5e32b1b95abc691a78feba5c788c.tar
Essentials-362c2bbf48bf5e32b1b95abc691a78feba5c788c.tar.gz
Essentials-362c2bbf48bf5e32b1b95abc691a78feba5c788c.tar.lz
Essentials-362c2bbf48bf5e32b1b95abc691a78feba5c788c.tar.xz
Essentials-362c2bbf48bf5e32b1b95abc691a78feba5c788c.zip
Correctly charge for the use of commands.
We now first test, if the user could pay it, do the stuff and then charge him. If the command throws an exception, the user will not be charged.
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandme.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandme.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandme.java b/Essentials/src/com/earth2me/essentials/commands/Commandme.java
index 098558f11..7441b723b 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandme.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandme.java
@@ -17,8 +17,7 @@ public class Commandme extends EssentialsCommand
{
if (user.isMuted())
{
- user.sendMessage(Util.i18n("voiceSilenced"));
- return;
+ throw new Exception(Util.i18n("voiceSilenced"));
}
if (args.length < 1)
@@ -31,7 +30,6 @@ public class Commandme extends EssentialsCommand
message.append(args[i]);
message.append(' ');
}
- charge(user);
ess.broadcastMessage(user.getName(), "* " + user.getDisplayName() + " " + message);
}
}