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.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java
index f21d937b3..58383782b 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
-import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.IUser;
import com.earth2me.essentials.commands.Commandspawnmob;
@@ -22,20 +22,22 @@ public class SignSpawnmob extends EssentialsSign
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.setEssentials(ess);
+ Commandspawnmob command = new Commandspawnmob();
+ command.init(ess, "spawnmob");
String[] args = new String[]
{
sign.getLine(2), sign.getLine(1)
};
try
{
- command.run(ess.getServer(), player, "spawnmob", args);
+ command.run(player, args);
}
catch (Exception ex)
{