mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-24 11:55:57 +01:00
Merge branch 'master' of github.com:PEXPlugins/Modifyworld
This commit is contained in:
commit
c62222e324
@ -52,7 +52,7 @@ public class EntityListener extends ModifyworldListener {
|
||||
|
||||
if (edbe.getEntity() instanceof Player) {
|
||||
player = (Player) edbe.getEntity();
|
||||
if (edbe.getDamager() != null) { // Prevent from taking damage by entity
|
||||
if (edbe.getDamager() != null && player.isOnline()) { // Prevent from taking damage by entity
|
||||
if (_permissionDenied(player, "modifyworld.damage.take", edbe.getDamager())) {
|
||||
cancelDamageEvent(player, event);
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ public class PlayerListener extends ModifyworldListener {
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (action == Action.RIGHT_CLICK_AIR) { //RIGHT_CLICK_AIR is cancelled by default.
|
||||
if (action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK) { //RIGHT_CLICK_AIR is cancelled by default.
|
||||
switch (player.getItemInHand().getType()) {
|
||||
case POTION: //Only check splash potions.
|
||||
if ((player.getItemInHand().getDurability() & 0x4000) != 0x4000) {
|
||||
@ -265,7 +265,9 @@ public class PlayerListener extends ModifyworldListener {
|
||||
event.getPlayer().updateInventory();
|
||||
}
|
||||
}
|
||||
return;
|
||||
if (action == Action.RIGHT_CLICK_AIR) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user