From d079fcf379fb08248f0c81549c1361080a809ac8 Mon Sep 17 00:00:00 2001 From: RoboMWM Date: Fri, 21 Jul 2017 23:24:52 -0700 Subject: [PATCH] Warn server owners about use of out-of-date Worldguard closes #162 --- .../ryanhamshire/GriefPrevention/WorldGuardWrapper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/me/ryanhamshire/GriefPrevention/WorldGuardWrapper.java b/src/me/ryanhamshire/GriefPrevention/WorldGuardWrapper.java index eccbf87..aaf8f59 100644 --- a/src/me/ryanhamshire/GriefPrevention/WorldGuardWrapper.java +++ b/src/me/ryanhamshire/GriefPrevention/WorldGuardWrapper.java @@ -26,7 +26,13 @@ class WorldGuardWrapper public boolean canBuild(Location lesserCorner, Location greaterCorner, Player creatingPlayer) { World world = lesserCorner.getWorld(); - + + if (worldGuard == null) + { + GriefPrevention.AddLogEntry("WorldGuard is out of date. Please update or remove WorldGuard."); + return true; + } + if(new RegionPermissionModel(this.worldGuard, creatingPlayer).mayIgnoreRegionProtection(world)) return true; RegionManager manager = this.worldGuard.getRegionManager(world);