Don't throw a warning if we're expecting a null object.

This commit is contained in:
gmcferrin
2013-08-21 14:20:12 +00:00
parent 51bf989418
commit 2bae937b28
5 changed files with 15 additions and 8 deletions

View File

@ -67,7 +67,7 @@ public abstract class ExperienceCommand implements TabExecutor {
}
String playerName = Misc.getMatchedPlayerName(args[0]);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
if (mcMMOPlayer == null) {

View File

@ -58,7 +58,7 @@ public class SkillresetCommand extends ExperienceCommand {
}
String playerName = Misc.getMatchedPlayerName(args[0]);
mcMMOPlayer = UserManager.getPlayer(playerName);
mcMMOPlayer = UserManager.getPlayer(playerName, true);
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
if (mcMMOPlayer == null) {

View File

@ -34,7 +34,7 @@ public class InspectCommand implements TabExecutor {
}
String playerName = Misc.getMatchedPlayerName(args[0]);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
if (mcMMOPlayer == null) {

View File

@ -52,7 +52,7 @@ public class McrankCommand implements TabExecutor {
}
String playerName = Misc.getMatchedPlayerName(args[0]);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
if (mcMMOPlayer != null) {
playerName = mcMMOPlayer.getPlayer().getName();