mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 09:00:28 +08:00
Fixed LiteBans detection #367
This commit is contained in:
parent
91398d86d0
commit
313e75cc9c
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.djrapitops</groupId>
|
||||
<artifactId>Plan</artifactId>
|
||||
<version>4.0.0</version>
|
||||
<version>4.0.3</version>
|
||||
<packaging>jar</packaging>
|
||||
<repositories>
|
||||
<repository>
|
||||
@ -70,7 +70,7 @@
|
||||
<dependency>
|
||||
<groupId>com.djrapitops</groupId>
|
||||
<artifactId>PlanPluginBridge</artifactId>
|
||||
<version>4.0.0</version>
|
||||
<version>4.0.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- Testing -->
|
||||
|
@ -1,4 +1,4 @@
|
||||
name: Plan
|
||||
author: Rsl1122
|
||||
main: main.java.com.djrapitops.plan.PlanBungee
|
||||
version: 4.0.2
|
||||
version: 4.0.3
|
@ -1,7 +1,7 @@
|
||||
name: Plan
|
||||
author: Rsl1122
|
||||
main: main.java.com.djrapitops.plan.Plan
|
||||
version: 4.0.2
|
||||
version: 4.0.3
|
||||
softdepend:
|
||||
- OnTime
|
||||
- EssentialsX
|
||||
|
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.djrapitops</groupId>
|
||||
<artifactId>PlanPluginBridge</artifactId>
|
||||
<version>4.0.0</version>
|
||||
<version>4.0.3</version>
|
||||
<packaging>jar</packaging>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
@ -13,6 +13,8 @@ import com.djrapitops.pluginbridge.plan.superbvote.SuperbVoteHook;
|
||||
import com.djrapitops.pluginbridge.plan.towny.TownyHook;
|
||||
import com.djrapitops.pluginbridge.plan.vault.VaultHook;
|
||||
import com.djrapitops.pluginbridge.plan.viaversion.ViaVersionHook;
|
||||
import main.java.com.djrapitops.plan.Log;
|
||||
import main.java.com.djrapitops.plan.Settings;
|
||||
import main.java.com.djrapitops.plan.data.additional.HookHandler;
|
||||
|
||||
/**
|
||||
@ -56,7 +58,10 @@ public class Bridge {
|
||||
for (Hook hook : hooks) {
|
||||
try {
|
||||
hook.hook();
|
||||
} catch (Exception | NoClassDefFoundError ignore) {
|
||||
} catch (Exception | NoClassDefFoundError e) {
|
||||
if (Settings.DEV_MODE.isTrue()) {
|
||||
Log.toLog("PluginBridge", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,10 @@ public abstract class Hook {
|
||||
|
||||
protected HookHandler hookHandler;
|
||||
|
||||
private Hook() {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
* <p>
|
||||
@ -45,8 +49,9 @@ public abstract class Hook {
|
||||
/**
|
||||
* Constructor to set enabled to false.
|
||||
*/
|
||||
public Hook() {
|
||||
public Hook(HookHandler hookHandler) {
|
||||
enabled = false;
|
||||
this.hookHandler = hookHandler;
|
||||
}
|
||||
|
||||
protected void addPluginDataSource(PluginData pluginData) {
|
||||
|
@ -25,7 +25,7 @@ public class LiteBansHook extends Hook {
|
||||
*/
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
public LiteBansHook(HookHandler hookH) {
|
||||
super();
|
||||
super(hookH);
|
||||
try {
|
||||
Database.get();
|
||||
enabled = true;
|
||||
|
Loading…
Reference in New Issue
Block a user