Added warning for outdated servers.

For those vulnerable to piston grief due to the addition of slime
blocks, which the Spigot team did not address in early versions of 1.8.
This commit is contained in:
ryanhamshire 2015-03-07 11:10:50 -08:00
parent 0ecaa0b674
commit d3a2637b92

View File

@ -474,6 +474,8 @@ public class BlockEventHandler implements Listener
//pulling up is always safe
if(event.getDirection() == BlockFace.UP) return;
try
{
//don't track in worlds where claims are not enabled
if(!GriefPrevention.instance.claimsEnabledForWorld(event.getBlock().getWorld())) return;
@ -524,6 +526,11 @@ public class BlockEventHandler implements Listener
}
}
}
catch(NoSuchMethodError exception)
{
GriefPrevention.AddLogEntry("Your server is running an outdated version of 1.8 which has a griefing vulnerability. Update your server (reruns buildtools.jar to get an updated server JAR file) to ensure playres can't steal claimed blocks using pistons.");
}
}
//blocks are ignited ONLY by flint and steel (not by being near lava, open flames, etc), unless configured otherwise
@EventHandler(priority = EventPriority.LOWEST)