UUID fix for SuperVanish/PremiumVanish hook

This commit is contained in:
cnaude 2017-02-21 21:18:46 -07:00
parent 28c924e875
commit 2b6d26d95b
2 changed files with 6 additions and 5 deletions

View File

@ -398,7 +398,7 @@
<dependency> <dependency>
<groupId>com.cnaude.supervanish</groupId> <groupId>com.cnaude.supervanish</groupId>
<artifactId>SuperVanish</artifactId> <artifactId>SuperVanish</artifactId>
<version>5.6.2</version> <version>5.9.1</version>
</dependency> </dependency>
<!-- SimpleTicketManager --> <!-- SimpleTicketManager -->

View File

@ -17,8 +17,9 @@
package com.cnaude.purpleirc.Hooks; package com.cnaude.purpleirc.Hooks;
import com.cnaude.purpleirc.PurpleIRC; import com.cnaude.purpleirc.PurpleIRC;
import java.util.List;
import de.myzelyam.api.vanish.VanishAPI; import de.myzelyam.api.vanish.VanishAPI;
import java.util.List;
import java.util.UUID;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
/** /**
@ -43,9 +44,9 @@ public class SuperVanishHook {
* @return * @return
*/ */
public boolean isVanished(Player player) { public boolean isVanished(Player player) {
List<String> invisiblePlayers = VanishAPI.getInvisiblePlayers(); List<UUID> invisiblePlayers = VanishAPI.getInvisiblePlayers();
for (String uuid : invisiblePlayers) { for (UUID uuid : invisiblePlayers) {
if (uuid.equalsIgnoreCase(player.getUniqueId().toString())) { if (uuid.equals(player.getUniqueId())) {
plugin.logDebug("Player " + player.getName() + " is vanished."); plugin.logDebug("Player " + player.getName() + " is vanished.");
return true; return true;
} }