Fix attempt NPE in Methods

http://pastie.org/9383324
This commit is contained in:
jack lin 2014-07-18 18:02:52 +12:00
parent 7d9419d319
commit fbf533f49d

View file

@ -502,6 +502,7 @@ public class Methods {
public static boolean canBend(String player, String ability) {
BendingPlayer bPlayer = getBendingPlayer(player);
Player p = Bukkit.getPlayer(player);
if (bPlayer == null) return false;
if (!bPlayer.isToggled) return false;
if (p == null) return false;
if (!p.hasPermission("bending.ability." + ability)) return false;