mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
parent
7e67505dfb
commit
2ca7d139fe
@ -128,6 +128,10 @@ public class PlayerListener implements Listener {
|
|||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
if (mcMMOPlayer == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mcMMOPlayer.getGodMode() && !Permissions.mcgod(player)) {
|
if (mcMMOPlayer.getGodMode() && !Permissions.mcgod(player)) {
|
||||||
mcMMOPlayer.toggleGodMode();
|
mcMMOPlayer.toggleGodMode();
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.GodMode.Forbidden"));
|
player.sendMessage(LocaleLoader.getString("Commands.GodMode.Forbidden"));
|
||||||
|
@ -29,5 +29,4 @@ public class MctopCommandAsyncTask extends BukkitRunnable {
|
|||||||
|
|
||||||
new MctopCommandDisplayTask(userslist, page, tablePrefix, sender).runTaskLater(mcMMO.p, 1);
|
new MctopCommandDisplayTask(userslist, page, tablePrefix, sender).runTaskLater(mcMMO.p, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ public final class CombatUtils {
|
|||||||
if (target instanceof Player) {
|
if (target instanceof Player) {
|
||||||
Player player = (Player) target;
|
Player player = (Player) target;
|
||||||
|
|
||||||
if (Misc.isNPCEntity(player)) {
|
if (Misc.isNPCEntity(player) || !player.isOnline()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,6 +291,11 @@ public final class CombatUtils {
|
|||||||
}
|
}
|
||||||
else if (attacker instanceof Player) {
|
else if (attacker instanceof Player) {
|
||||||
Player player = (Player) attacker;
|
Player player = (Player) attacker;
|
||||||
|
|
||||||
|
if (Misc.isNPCEntity(player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PlayerProfile profile = UserManager.getPlayer(player).getProfile();
|
PlayerProfile profile = UserManager.getPlayer(player).getProfile();
|
||||||
|
|
||||||
if (Permissions.mobHealthDisplay(player) && profile.getMobHealthbarType() != MobHealthbarType.DISABLED) {
|
if (Permissions.mobHealthDisplay(player) && profile.getMobHealthbarType() != MobHealthbarType.DISABLED) {
|
||||||
|
Loading…
Reference in New Issue
Block a user