diff --git a/PlanPluginBridge/pom.xml b/PlanPluginBridge/pom.xml
index 261aec740..0d7c71827 100644
--- a/PlanPluginBridge/pom.xml
+++ b/PlanPluginBridge/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.djrapitops
PlanPluginBridge
- 4.6.0
+ 4.6.0-1
jar
${project.groupId}:${project.artifactId}
diff --git a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/griefprevention/GriefPreventionHook.java b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/griefprevention/GriefPreventionHook.java
index 6b40c1265..447e27b4b 100644
--- a/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/griefprevention/GriefPreventionHook.java
+++ b/PlanPluginBridge/src/main/java/com/djrapitops/pluginbridge/plan/griefprevention/GriefPreventionHook.java
@@ -17,6 +17,7 @@
package com.djrapitops.pluginbridge.plan.griefprevention;
import com.djrapitops.plan.data.plugin.HookHandler;
+import com.djrapitops.plugin.logging.console.PluginLogger;
import com.djrapitops.pluginbridge.plan.Hook;
import me.ryanhamshire.GriefPrevention.DataStore;
import me.ryanhamshire.GriefPrevention.GriefPrevention;
@@ -36,14 +37,23 @@ import static org.bukkit.plugin.java.JavaPlugin.getPlugin;
@Singleton
public class GriefPreventionHook extends Hook {
+ private final PluginLogger logger;
+
@Inject
- public GriefPreventionHook() {
+ public GriefPreventionHook(
+ PluginLogger logger
+ ) {
super("me.ryanhamshire.GriefPrevention.GriefPrevention");
+ this.logger = logger;
}
public void hook(HookHandler handler) throws NoClassDefFoundError {
if (enabled) {
DataStore dataStore = getPlugin(GriefPrevention.class).dataStore;
+ if (dataStore == null) {
+ logger.warn("GriefPrevention DataStore was not initialized yet. Run '/plan reload' to try to re-hook.");
+ return;
+ }
handler.addPluginDataSource(new GriefPreventionData(dataStore));
}
}