From 198bdaa62a095a86807ede8639946742733f88cb Mon Sep 17 00:00:00 2001 From: Tobias de Bruijn Date: Tue, 11 Jan 2022 23:18:02 +0100 Subject: [PATCH] Minor fixes --- .../array21/skinfixer/commands/subcommands/HelpCommand.java | 2 +- .../array21/skinfixer/commands/subcommands/SetCommand.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/array21/skinfixer/commands/subcommands/HelpCommand.java b/src/main/java/dev/array21/skinfixer/commands/subcommands/HelpCommand.java index f4cf96e..577d3ed 100644 --- a/src/main/java/dev/array21/skinfixer/commands/subcommands/HelpCommand.java +++ b/src/main/java/dev/array21/skinfixer/commands/subcommands/HelpCommand.java @@ -12,7 +12,7 @@ @CommandInfo(name = "help", description = "Get information about the commands SkinFixer has and how to use them") public class HelpCommand implements Subcommand { - private HashMap helpMessages; + private final HashMap helpMessages; public HelpCommand(HashMap helpMessages) { this.helpMessages = helpMessages; } diff --git a/src/main/java/dev/array21/skinfixer/commands/subcommands/SetCommand.java b/src/main/java/dev/array21/skinfixer/commands/subcommands/SetCommand.java index 87781ad..23bca73 100644 --- a/src/main/java/dev/array21/skinfixer/commands/subcommands/SetCommand.java +++ b/src/main/java/dev/array21/skinfixer/commands/subcommands/SetCommand.java @@ -40,7 +40,7 @@ public void onSubcommand(SkinFixer plugin, CommandSender sender, String[] args) slim = true; } - int code = Integer.valueOf(args[0]); + int code = Integer.parseInt(args[0]); Player p = (Player) sender; SkinChangeHandler sck = new SkinChangeHandler(plugin); @@ -76,7 +76,7 @@ private boolean isValidInt(String s) { } BigInteger bi = new BigInteger(s); - if(bi.compareTo(BigInteger.valueOf((long) Integer.MAX_VALUE)) > 0) { + if(bi.compareTo(BigInteger.valueOf(Integer.MAX_VALUE)) > 0) { return false; }