mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-03 02:55:46 +00:00
Ignore case on gamemode signs and code cleanup
This commit is contained in:
parent
6513842d28
commit
b40d663c7e
1 changed files with 17 additions and 18 deletions
|
@ -30,14 +30,14 @@ public class SignGameMode extends EssentialsSign
|
|||
final Trade charge = getTrade(sign, 1, ess);
|
||||
final String mode = sign.getLine(2).trim();
|
||||
|
||||
if(mode.isEmpty())
|
||||
if (mode.isEmpty())
|
||||
{
|
||||
throw new SignException(_("invalidSignLine", 3));
|
||||
}
|
||||
|
||||
charge.isAffordableFor(player);
|
||||
|
||||
performSetMode(mode, player);
|
||||
performSetMode(mode.toLowerCase(Locale.ENGLISH), player);
|
||||
player.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
|
||||
charge.charge(player);
|
||||
return true;
|
||||
|
@ -58,5 +58,4 @@ public class SignGameMode extends EssentialsSign
|
|||
player.setGameMode(GameMode.ADVENTURE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue