catch more instances of people using outdated worldguard versions
This commit is contained in:
parent
393aa27329
commit
d31c62e233
|
|
@ -26,12 +26,8 @@ class WorldGuardWrapper
|
||||||
|
|
||||||
public boolean canBuild(Location lesserCorner, Location greaterCorner, Player creatingPlayer)
|
public boolean canBuild(Location lesserCorner, Location greaterCorner, Player creatingPlayer)
|
||||||
{
|
{
|
||||||
if (worldGuard == null)
|
try
|
||||||
{
|
{
|
||||||
GriefPrevention.AddLogEntry("WorldGuard is out of date and not enabled. Please update or remove WorldGuard.", CustomLogEntryTypes.Debug, false);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
BukkitPlayer localPlayer = new BukkitPlayer(this.worldGuard, creatingPlayer);
|
BukkitPlayer localPlayer = new BukkitPlayer(this.worldGuard, creatingPlayer);
|
||||||
World world = WorldGuard.getInstance().getPlatform().getWorldByName(lesserCorner.getWorld().getName());
|
World world = WorldGuard.getInstance().getPlatform().getWorldByName(lesserCorner.getWorld().getName());
|
||||||
|
|
||||||
|
|
@ -57,4 +53,11 @@ class WorldGuardWrapper
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
catch (Throwable rock)
|
||||||
|
{
|
||||||
|
GriefPrevention.AddLogEntry("WorldGuard is out of date. Please update or remove WorldGuard, or disable WorldGuard integration in GP's config (CreationRequiresWorldGuardBuildPermission)", CustomLogEntryTypes.Debug, false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user