Avoid potential call with a null parameter to User.getInstance

This commit is contained in:
tastybento 2022-04-16 15:12:19 -07:00
parent 10d8352f1c
commit 5c2f2ecfc7
1 changed files with 3 additions and 3 deletions

View File

@ -79,9 +79,8 @@ public class ResetCommand extends CompositeCommand
else if (!args.get(1).isEmpty())
{
UUID targetUUID = this.getPlayers().getUUID(args.get(0));
User target = User.getInstance(targetUUID);
if (targetUUID == null || target == null)
if (targetUUID == null)
{
if (user.isPlayer())
{
@ -95,7 +94,8 @@ public class ResetCommand extends CompositeCommand
return false;
}
User target = User.getInstance(targetUUID);
// Add world name back at the start
if (args.get(1).equals("all"))