summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-05-07 00:16:45 +0100
committerKHobbits <rob@khobbits.co.uk>2012-05-07 00:16:45 +0100
commit8d6b864b5b3e90a09d26b1fd3b5ae6455b772f63 (patch)
treef77736dd9bb3367f933a647bf0d02d06d6cc78cb
parentdeca5e5e73c7ba1cc331121d4a4e44f037d08b40 (diff)
downloadEssentials-8d6b864b5b3e90a09d26b1fd3b5ae6455b772f63.tar
Essentials-8d6b864b5b3e90a09d26b1fd3b5ae6455b772f63.tar.gz
Essentials-8d6b864b5b3e90a09d26b1fd3b5ae6455b772f63.tar.lz
Essentials-8d6b864b5b3e90a09d26b1fd3b5ae6455b772f63.tar.xz
Essentials-8d6b864b5b3e90a09d26b1fd3b5ae6455b772f63.zip
Revert "Update home count..." This reverts commit 9b731cc39c450c200c2c9a5c08492b54758d1344.
On second thought, this would just lead to inconsistency....
-rw-r--r--Essentials/src/com/earth2me/essentials/UserData.java12
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsethome.java2
2 files changed, 1 insertions, 13 deletions
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java
index 533b58acf..5686e0439 100644
--- a/Essentials/src/com/earth2me/essentials/UserData.java
+++ b/Essentials/src/com/earth2me/essentials/UserData.java
@@ -4,7 +4,6 @@ import static com.earth2me.essentials.I18n._;
import java.io.File;
import java.util.*;
import org.bukkit.Location;
-import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@@ -150,17 +149,6 @@ public abstract class UserData extends PlayerExtension implements IConf
return new ArrayList<String>(homes.keySet());
}
- public int getHomeCount()
- {
- int count = getHomes().size();
- Location bed = getBedSpawnLocation();
- if (bed != null && bed.getBlock().getType() == Material.BED_BLOCK)
- {
- count++;
- }
- return count;
- }
-
public void setHome(String name, Location loc)
{
//Invalid names will corrupt the yaml
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java
index a4bdb08ad..f622094d2 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java
@@ -33,7 +33,7 @@ public class Commandsethome extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomeCount() < ess.getSettings().getHomeLimit(user))
+ if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() < ess.getSettings().getHomeLimit(user))
|| (user.getHomes().contains(args[0].toLowerCase(Locale.ENGLISH))))
{
user.setHome(args[0].toLowerCase(Locale.ENGLISH));