From e9a14b204f1e7991d3b990c7f120ee2b02880fb1 Mon Sep 17 00:00:00 2001 From: snowleo Date: Tue, 30 Aug 2011 03:15:50 +0200 Subject: [PATCH] NoChargeException for teleport commands --- Essentials/src/com/earth2me/essentials/Essentials.java | 5 +++++ .../essentials/commands/NoChargeException.java | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Essentials/src/com/earth2me/essentials/commands/NoChargeException.java diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 883389625..3ea10f64a 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -28,6 +28,7 @@ import org.bukkit.*; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import com.earth2me.essentials.commands.IEssentialsCommand; +import com.earth2me.essentials.commands.NoChargeException; import com.earth2me.essentials.commands.NotEnoughArgumentsException; import com.earth2me.essentials.register.payment.Methods; import com.earth2me.essentials.signs.SignBlockListener; @@ -451,6 +452,10 @@ public class Essentials extends JavaPlugin implements IEssentials } return true; } + catch (NoChargeException ex) + { + return true; + } catch (NotEnoughArgumentsException ex) { sender.sendMessage(command.getDescription()); diff --git a/Essentials/src/com/earth2me/essentials/commands/NoChargeException.java b/Essentials/src/com/earth2me/essentials/commands/NoChargeException.java new file mode 100644 index 000000000..bb0088792 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/NoChargeException.java @@ -0,0 +1,10 @@ +package com.earth2me.essentials.commands; + + +public class NoChargeException extends Exception +{ + public NoChargeException() + { + super("Will charge later"); + } +}