summaryrefslogtreecommitdiffstats
path: root/EssentialsSigns
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-01-04 21:41:05 +0000
committerKHobbits <rob@khobbits.co.uk>2012-01-04 21:41:05 +0000
commit3513d72a7b883701ba8d90c523da5af8bf4d0d07 (patch)
tree98bd43940f664469c8553c7818ec11ea947f0ced /EssentialsSigns
parent8432e1fc7d5a208086a89d19299e8c4cf268c7f5 (diff)
downloadEssentials-3513d72a7b883701ba8d90c523da5af8bf4d0d07.tar
Essentials-3513d72a7b883701ba8d90c523da5af8bf4d0d07.tar.gz
Essentials-3513d72a7b883701ba8d90c523da5af8bf4d0d07.tar.lz
Essentials-3513d72a7b883701ba8d90c523da5af8bf4d0d07.tar.xz
Essentials-3513d72a7b883701ba8d90c523da5af8bf4d0d07.zip
Fixing Warp, Spawnmob signs
Fix Imports
Diffstat (limited to 'EssentialsSigns')
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSign.java4
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignBuy.java2
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignEnchant.java6
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignFree.java2
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignGameMode.java2
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignHeal.java2
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignKit.java5
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignProtection.java4
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignSell.java2
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignSpawnmob.java10
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignTime.java2
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignTrade.java4
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignWarp.java9
-rw-r--r--EssentialsSigns/src/com/earth2me/essentials/signs/SignWeather.java2
14 files changed, 29 insertions, 27 deletions
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSign.java b/EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSign.java
index a6057f6ab..abef8dd25 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSign.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSign.java
@@ -1,7 +1,9 @@
package com.earth2me.essentials.signs;
+import com.earth2me.essentials.ChargeException;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.*;
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.Util;
import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.IUser;
import java.util.HashSet;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignBuy.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignBuy.java
index fd84bd0f3..e35e78b50 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignBuy.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignBuy.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;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignEnchant.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignEnchant.java
index 9d640c735..3800c50de 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignEnchant.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignEnchant.java
@@ -2,13 +2,11 @@ package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
import com.earth2me.essentials.Enchantments;
-import com.earth2me.essentials.api.IEssentials;
-import com.earth2me.essentials.api.IUser;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.Trade;
-import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
+import com.earth2me.essentials.api.IEssentials;
+import com.earth2me.essentials.api.IUser;
import java.util.Locale;
-import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignFree.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignFree.java
index 0dad2b100..4e77a2ad7 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignFree.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignFree.java
@@ -1,8 +1,8 @@
package com.earth2me.essentials.signs;
import static com.earth2me.essentials.I18n._;
-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.craftbukkit.ShowInventory;
import org.bukkit.Material;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignGameMode.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignGameMode.java
index 05fb7c17f..0068cadf8 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignGameMode.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignGameMode.java
@@ -2,8 +2,8 @@ package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.IUser;
import java.util.Locale;
import org.bukkit.GameMode;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignHeal.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignHeal.java
index 3f412f5b4..ba10f3586 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignHeal.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignHeal.java
@@ -2,8 +2,8 @@ package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.IUser;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignKit.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignKit.java
index 4e7aaf793..87f9bb118 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignKit.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignKit.java
@@ -1,12 +1,11 @@
package com.earth2me.essentials.signs;
-import com.earth2me.essentials.*;
+import com.earth2me.essentials.ChargeException;
+import com.earth2me.essentials.Trade;
import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.IUser;
import com.earth2me.essentials.settings.Kit;
-import java.util.List;
import java.util.Locale;
-import java.util.Map;
public class SignKit extends EssentialsSign
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignProtection.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignProtection.java
index 1ec05ec2d..9dc68087e 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignProtection.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignProtection.java
@@ -2,10 +2,10 @@ package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.Trade;
-import com.earth2me.essentials.api.IUser;
import com.earth2me.essentials.Util;
+import com.earth2me.essentials.api.IEssentials;
+import com.earth2me.essentials.api.IUser;
import java.util.*;
import org.bukkit.Location;
import org.bukkit.Material;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignSell.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignSell.java
index 7a5f4969b..4e16be23d 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignSell.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignSell.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;
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)
{
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignTime.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignTime.java
index 2d1ab2a87..8480a1d83 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignTime.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignTime.java
@@ -2,8 +2,8 @@ package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.IUser;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignTrade.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignTrade.java
index 04db5511c..796d9fdd6 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignTrade.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignTrade.java
@@ -1,7 +1,9 @@
package com.earth2me.essentials.signs;
+import com.earth2me.essentials.ChargeException;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.*;
+import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.Util;
import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.IUser;
import org.bukkit.inventory.ItemStack;
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignWarp.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignWarp.java
index 3ab254705..70a4f53c1 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignWarp.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignWarp.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 org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
@@ -49,10 +49,9 @@ public class SignWarp extends EssentialsSign
{
final String warpName = sign.getLine(1);
final String group = sign.getLine(2);
- if ((!group.isEmpty()
- && ("§2Everyone".equals(group)
- || player.inGroup(group)))
- || (group.isEmpty() && (!ess.getSettings().getPerWarpPermission() || player.isAuthorized("essentials.warp." + warpName))))
+
+ if ((!group.isEmpty() && ("§2Everyone".equals(group) || player.inGroup(group)))
+ || (group.isEmpty() && player.isAuthorized("essentials.warp." + warpName)))
{
final Trade charge = getTrade(sign, 3, ess);
try
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/SignWeather.java b/EssentialsSigns/src/com/earth2me/essentials/signs/SignWeather.java
index c674e04a9..bc019b0cd 100644
--- a/EssentialsSigns/src/com/earth2me/essentials/signs/SignWeather.java
+++ b/EssentialsSigns/src/com/earth2me/essentials/signs/SignWeather.java
@@ -2,8 +2,8 @@ package com.earth2me.essentials.signs;
import com.earth2me.essentials.ChargeException;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.api.IEssentials;
import com.earth2me.essentials.api.IUser;