Whitelist hoppers and let them cross regions regardless of permissions.

This commit is contained in:
sk89q 2015-01-04 13:57:03 -08:00
parent 93ced5ca7a
commit 3c8121d088

View File

@ -117,7 +117,9 @@ private void tellErrorMessage(DelegateEvent event, Cause cause, Location locatio
private boolean isWhitelisted(Cause cause, World world) {
Object rootCause = cause.getRootCause();
if (rootCause instanceof Player) {
if (rootCause instanceof Block) {
return ((Block) rootCause).getType() == Material.HOPPER;
} else if (rootCause instanceof Player) {
Player player = (Player) rootCause;
WorldConfiguration config = getWorldConfig(world);