summaryrefslogtreecommitdiffstats
path: root/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java')
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java48
1 files changed, 0 insertions, 48 deletions
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java
deleted file mode 100644
index e581c8516..000000000
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.earth2me.essentials.signs;
-
-import com.earth2me.essentials.api.ChargeException;
-import com.earth2me.essentials.api.IEssentials;
-import com.earth2me.essentials.api.IUser;
-import com.earth2me.essentials.commands.Commandspawnmob;
-import com.earth2me.essentials.economy.Trade;
-
-
-public class SignSpawnmob extends EssentialsSign
-{
- public SignSpawnmob()
- {
- super("Spawnmob");
- }
-
- @Override
- protected boolean onSignCreate(ISign sign, IUser player, String username, IEssentials ess) throws SignException, ChargeException
- {
- validateInteger(sign, 1);
- validateTrade(sign, 3, ess);
- return true;
- }
-
- //TODO: This should call a method not a command
- @Override
- protected boolean onSignInteract(ISign sign, IUser player, String username, IEssentials ess) throws SignException, ChargeException
- {
- final Trade charge = getTrade(sign, 3, ess);
- charge.isAffordableFor(player);
- Commandspawnmob command = new Commandspawnmob();
- command.init(ess, "spawnmob");
- String[] args = new String[]
- {
- sign.getLine(2), sign.getLine(1)
- };
- try
- {
- command.run(player, "spawnmob", args);
- }
- catch (Exception ex)
- {
- throw new SignException(ex.getMessage(), ex);
- }
- charge.charge(player);
- return true;
- }
-}