Fix grow flags

This commit is contained in:
MattBDev 2016-06-02 00:33:50 -04:00
commit e6433a24ab

View File

@ -109,7 +109,6 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.projectiles.BlockProjectileSource; import org.bukkit.projectiles.BlockProjectileSource;
import org.bukkit.projectiles.ProjectileSource; import org.bukkit.projectiles.ProjectileSource;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
@ -780,7 +779,10 @@ public class PlayerEvents extends PlotListener implements Listener {
return; return;
} }
Plot plot = area.getOwnedPlot(location); Plot plot = area.getOwnedPlot(location);
switch (block.getType()) { if (plot == null) {
return;
}
switch (event.getSource().getType()) {
case GRASS: case GRASS:
if (Flags.GRASS_GROW.isFalse(plot)) { if (Flags.GRASS_GROW.isFalse(plot)) {
event.setCancelled(true); event.setCancelled(true);