- Remove level debug message

- Try to prevent null pointer
- Allow door right click
- Prevent destroying of soil
This commit is contained in:
kaenganxt
2014-12-20 22:07:24 +01:00
parent 6b0a6e738e
commit f7190f70ca
3 changed files with 8 additions and 3 deletions

View File

@@ -122,7 +122,6 @@ public final class Level {
}
level += (double) (maxSmashLevel / 4);
level += (double) maxFFLevel;
System.out.println(level);
anuraLevel.put(P, (int) level);
smashLevel.put(P, (int) sLevel);
ffLevel.put(P, (int) fLevel);

View File

@@ -43,7 +43,7 @@ public class PlayerCommands implements CommandExecutor {
Core.statusMsg(sender, "only_player_cmd", false);
return true;
}
if (Core.getMainClass().getFeatures().featureEnabled.get(P).get(Features.Feature.BOAT)) {
if (Core.getMainClass().getFeatures().hasFeature(P, Features.Feature.BOAT) && Core.getMainClass().getFeatures().featureEnabled.get(P).get(Features.Feature.BOAT)) {
Core.getMainClass().getFeatures().disableFeature(P, Features.Feature.BOAT);
} else {
Core.getMainClass().getFeatures().enableFeature(P, Features.Feature.BOAT);

View File

@@ -153,10 +153,16 @@ public class PlayerInteract implements Listener {
cancelled = false;
} else if (event.getClickedBlock().getType().equals(Material.WOOD_BUTTON)) {
cancelled = false;
} else if (event.getClickedBlock().getType().equals(Material.WOODEN_DOOR)) {
cancelled = false;
}
} else if (event.getAction().equals(Action.PHYSICAL)) {
cancelled = false;
if (event.getClickedBlock().getType() != Material.SOIL) {
cancelled = false;
}
} else if (event.getAction().equals(Action.RIGHT_CLICK_AIR)) {
}
if (event.getAction().equals(Action.RIGHT_CLICK_AIR) || event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
if (event.getPlayer().getItemInHand().getType().equals(Material.BOW)) {
cancelled = false;
} else if (event.getPlayer().getItemInHand().getType().equals(Material.EXP_BOTTLE)) {