Skip to content

Commit

Permalink
Possible fix for exception on player join/leave, added api version, u…
Browse files Browse the repository at this point in the history
…pdated pom dependencies, version bump
  • Loading branch information
Shimell committed Nov 23, 2021
1 parent ba36db0 commit 1e04108
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
24 changes: 13 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>uk.co.angrybee.joe</groupId>
<artifactId>discord-whitelister</artifactId>
<version>1.4.9</version>
<version>1.5.0</version>

<name>discord-whitelister</name>
<url>https://github.com/JoeShimell/DiscordWhitelisterSpigot</url>
Expand All @@ -22,9 +22,6 @@
</repository>

<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>dv8tion</id>
<name>m2-dv8tion</name>
<url>https://m2.dv8tion.net/releases</url>
Expand All @@ -36,10 +33,9 @@
<url>https://jitpack.io</url>
</repository>

<!-- EssX-->
<repository>
<id>ess-repo</id>
<url>https://ci.ender.zone/plugin/repository/everything</url>
<id>essentials-releases</id>
<url>https://repo.essentialsx.net/releases/</url>
</repository>

</repositories>
Expand All @@ -56,7 +52,7 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>4.3.0_288</version>
<version>4.3.0_346</version>
<exclusions>
<exclusion>
<groupId>club.minnced</groupId>
Expand Down Expand Up @@ -96,16 +92,22 @@
<artifactId>SuperVanish</artifactId>
<!-- POM is invalid with java compiler ver > 8 (maven-compiler-plugin source & target version is set to 8) -->
<!-- TODO: get updated version if/when available for better support with compiler versions > 8 -->
<version>6.2.6</version>
<version>6.2.6-2</version>
<scope>provided</scope>
</dependency>

<!-- EssX-->
<dependency>
<groupId>net.ess3</groupId>
<groupId>net.essentialsx</groupId>
<artifactId>EssentialsX</artifactId>
<version>2.18.2</version>
<version>2.19.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- VanishNoPacket -->
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/uk/co/angrybee/joe/DiscordWhitelister.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
import uk.co.angrybee.joe.events.SuperVanishEvents;
import uk.co.angrybee.joe.events.VanishNoPacketEvents;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.logging.Logger;
import java.util.stream.Stream;

Expand Down Expand Up @@ -82,7 +79,7 @@ public void onEnable() {
PluginManager pluginManager = getServer().getPluginManager();
essentialsPlugin = (Essentials) pluginManager.getPlugin("Essentials");
vanishNoPacketPlugin = (VanishPlugin) pluginManager.getPlugin("VanishNoPacket");
hasSuperVanishOrPremiumVanish = pluginManager.getPlugin("SuperVanish") != null || pluginManager.getPlugin("PremiumVanish") != null;
hasSuperVanishOrPremiumVanish = pluginManager.isPluginEnabled("SuperVanish") || pluginManager.isPluginEnabled("PremiumVanish");

int initSuccess = InitBot(true);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/uk/co/angrybee/joe/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static boolean isVanished(Player player) {
}

// For SuperVanish / PremiumVanish
if(VanishAPI.getPlugin() != null) {
if(hasSuperVanishOrPremiumVanish) {
//getPluginLogger().info("Checking via SV if " + player.getDisplayName() + " is vanished: " + VanishAPI.isInvisible(player));
//getPluginLogger().info("Checking via SV for list of vanished players: " + VanishAPI.getAllInvisiblePlayers());
if(VanishAPI.isInvisible(player)) return true;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/uk/co/angrybee/joe/VersionInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ public static String getLongVersion() {
return "v." + getVersion();
}

private static String version = "1.4.8";
private static String version = "1.5.0";
}
3 changes: 2 additions & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: DiscordWhitelister
version: 1.4.8
version: 1.5.0
api-version: 1.17
author: Joe Shimell
main: uk.co.angrybee.joe.DiscordWhitelister
description: Discord Whitelister.
Expand Down

0 comments on commit 1e04108

Please sign in to comment.