Use the Flag#getHintReference() in the sendMessage()

That is to ensure an easier maintenance process.
This commit is contained in:
Florian CUNY 2018-12-27 13:53:11 +01:00
parent 460911c92b
commit 146331d0fe

View File

@ -34,7 +34,8 @@ public class IslandGoCommand extends CompositeCommand {
} }
if ((getIWM().inWorld(user.getWorld()) && Flags.PREVENT_TELEPORT_WHEN_FALLING.isSetForWorld(user.getWorld())) if ((getIWM().inWorld(user.getWorld()) && Flags.PREVENT_TELEPORT_WHEN_FALLING.isSetForWorld(user.getWorld()))
&& user.getPlayer().getFallDistance() > 0) { && user.getPlayer().getFallDistance() > 0) {
user.sendMessage("protection.flags.PREVENT_TELEPORT_WHEN_FALLING.hint"); // We're sending the "hint" to the player to tell them they cannot teleport while falling.
user.sendMessage(Flags.PREVENT_TELEPORT_WHEN_FALLING.getHintReference());
return true; return true;
} }
if (!args.isEmpty() && NumberUtils.isDigits(args.get(0))) { if (!args.isEmpty() && NumberUtils.isDigits(args.get(0))) {