diff --git a/src/main/java/br/net/fabiozumbi12/rankupper/PermsAPI.java b/src/main/java/br/net/fabiozumbi12/rankupper/PermsAPI.java index d0b9fc2..db76907 100644 --- a/src/main/java/br/net/fabiozumbi12/rankupper/PermsAPI.java +++ b/src/main/java/br/net/fabiozumbi12/rankupper/PermsAPI.java @@ -27,8 +27,7 @@ public List getGroups(User player){ } public String getHighestGroup(User player){ String best = ""; - int beb = -1; - ArrayList prevPerms = new ArrayList<>(); + int beb = -1; for (Subject sub:player.getParents()){ if (sub.getContainingCollection().equals(getGroups()) && (sub.getIdentifier() != null)){ System.out.println(sub.getIdentifier() + " - " + sub.getParents().size()); diff --git a/src/main/java/br/net/fabiozumbi12/rankupper/RUCommands.java b/src/main/java/br/net/fabiozumbi12/rankupper/RUCommands.java index b85bbdb..42224bc 100644 --- a/src/main/java/br/net/fabiozumbi12/rankupper/RUCommands.java +++ b/src/main/java/br/net/fabiozumbi12/rankupper/RUCommands.java @@ -1,5 +1,9 @@ package br.net.fabiozumbi12.rankupper; +import java.util.HashMap; +import java.util.Map; +import java.util.NoSuchElementException; + import org.spongepowered.api.command.CommandException; import org.spongepowered.api.command.CommandResult; import org.spongepowered.api.command.CommandSource; @@ -10,11 +14,6 @@ import org.spongepowered.api.entity.living.player.User; import org.spongepowered.api.service.economy.account.UniqueAccount; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.NoSuchElementException; - public class RUCommands implements CommandExecutor{ private void ExecuteTopCount(CommandSource p) { @@ -46,7 +45,6 @@ private void ExecuteTopCount(CommandSource p) { private void SendCheckMessage(CommandSource sender, User playerToCheck) { int time = RankUpper.cfgs.getPlayerTime(RankUpper.cfgs.getPlayerKey(playerToCheck)); - List pgroups = RankUpper.perms.getGroups(playerToCheck); String pgroup = RankUpper.perms.getHighestGroup(playerToCheck); if (pgroup == null){ RULang.sendMessage(sender, RULang.get("commands.check.youplayed").replace("{time}", RUUtil.timeDescript(time)).replace("{group}", "None"));