mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Move the ChimaeraWing permission check and add feedback
This commit is contained in:
parent
d8f799f8b4
commit
21100de85d
@ -41,6 +41,11 @@ public final class ChimaeraWing {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Permissions.chimaeraWing(player)) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mcMMOPlayer = UserManager.getPlayer(player);
|
mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
location = player.getLocation();
|
location = player.getLocation();
|
||||||
@ -48,7 +53,7 @@ public final class ChimaeraWing {
|
|||||||
long recentlyHurt = mcMMOPlayer.getRecentlyHurt();
|
long recentlyHurt = mcMMOPlayer.getRecentlyHurt();
|
||||||
long lastTeleport = mcMMOPlayer.getLastTeleport();
|
long lastTeleport = mcMMOPlayer.getLastTeleport();
|
||||||
|
|
||||||
if (Permissions.chimaeraWing(player) && ItemUtils.isChimaeraWing(inHand)) {
|
if (ItemUtils.isChimaeraWing(inHand)) {
|
||||||
if (mcMMOPlayer.getTeleportCommenceLocation() != null) {
|
if (mcMMOPlayer.getTeleportCommenceLocation() != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user