Merge pull request #33 from Rodzynus/master

Correctly recognise vanished players during quit event.
This commit is contained in:
Chris 2017-05-23 18:45:53 -07:00 committed by GitHub
commit ab0d4a2962
2 changed files with 4 additions and 8 deletions

View File

@ -12,7 +12,7 @@
<groupId>com.cnaude</groupId>
<artifactId>PurpleIRC</artifactId>
<version>1.0-${build.number}</version>
<version>1.0-SNAPSHOT</version>
<name>PurpleIRC-spigot</name>
<description>Minecraft IRC integration for CraftBukkit/Spigot servers.</description>
<url>http://www.spigotmc.org/resources/purpleirc.2836/</url>
@ -83,11 +83,6 @@
<id>placeholderapi</id>
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<repository>
<id>Scarsz-Jenkins</id>
<url>http://scarsz.tech:8080/plugin/repository/everything/</url>
</repository>
</repositories>

View File

@ -44,13 +44,14 @@ public class SuperVanishHook {
* @return
*/
public boolean isVanished(Player player) {
List<UUID> invisiblePlayers = VanishAPI.getInvisiblePlayers();
for (UUID uuid : invisiblePlayers) {
List<UUID> allinvisiblePlayers = VanishAPI.getAllInvisiblePlayers();
for (UUID uuid : allinvisiblePlayers) {
if (uuid.equals(player.getUniqueId())) {
plugin.logDebug("Player " + player.getName() + " is vanished.");
return true;
}
}
plugin.logDebug("Player " + player.getName() + " is not vanished.");
return false;
}
}