mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-15 02:59:06 +02:00
Ignore case on gamemode signs and code cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user