mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-28 13:36:06 +01:00
Avoid potential call with a null parameter to User.getInstance
This commit is contained in:
parent
10d8352f1c
commit
5c2f2ecfc7
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user