mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-26 05:07:45 +00:00
Revert "Update home count..." This reverts commit 9b731cc39c
.
On second thought, this would just lead to inconsistency....
This commit is contained in:
parent
deca5e5e73
commit
8d6b864b5b
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue