diff --git a/src/main/java/org/sgrewritten/stargate/Stargate.java b/src/main/java/org/sgrewritten/stargate/Stargate.java index eca151c4..f5e750a5 100644 --- a/src/main/java/org/sgrewritten/stargate/Stargate.java +++ b/src/main/java/org/sgrewritten/stargate/Stargate.java @@ -174,8 +174,10 @@ public void onEnable() { BStatsHelper.registerMetrics(pluginId, this, getRegistry()); servicesManager = this.getServer().getServicesManager(); servicesManager.register(StargateAPI.class, this, this, ServicePriority.High); - RegisteredServiceProvider blockUtilProvider = servicesManager.getRegistration(BlockUtilAPI.class); - BlockDropManager.setProvider(blockUtilProvider); + if(NonLegacyClass.BLOCK_UTIL.isImplemented()) { + RegisteredServiceProvider blockUtilProvider = servicesManager.getRegistration(BlockUtilAPI.class); + BlockDropManager.setProvider(blockUtilProvider); + } } catch (StargateInitializationException | IOException | SQLException | URISyntaxException e) { Stargate.log(e); diff --git a/src/main/java/org/sgrewritten/stargate/property/NonLegacyClass.java b/src/main/java/org/sgrewritten/stargate/property/NonLegacyClass.java index 6eb4ba50..1448812d 100644 --- a/src/main/java/org/sgrewritten/stargate/property/NonLegacyClass.java +++ b/src/main/java/org/sgrewritten/stargate/property/NonLegacyClass.java @@ -16,7 +16,9 @@ public enum NonLegacyClass { /** * Check for bkcommonlib compatibility */ - MULTI_BLOCK_CHANGE_EVENT("com.bergerkiller.bukkit.common.events.MultiBlockChangeEvent"); + MULTI_BLOCK_CHANGE_EVENT("com.bergerkiller.bukkit.common.events.MultiBlockChangeEvent"), + + BLOCK_UTIL("dev.thorinwasher.blockutil.BlockUtil"); private Class aClass = null;