Fixed null pointers for getName

This commit is contained in:
boy0001 2014-12-23 02:44:13 +11:00
parent e0adcb3b60
commit 5c4f1332d6
5 changed files with 31 additions and 9 deletions

View file

@ -31,6 +31,7 @@ import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.PlayerFunctions;
import com.intellectualcrafters.plot.util.PlotHelper;
import com.intellectualcrafters.plot.util.UUIDHandler;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@ -228,7 +229,11 @@ import java.util.UUID;
* OfflinePlayer plr = Bukkit.getOfflinePlayer(uuid); if (plr.getName()
* == null) { return "unknown"; } return plr.getName();
*/
return UUIDHandler.getName(uuid);
String name = UUIDHandler.getName(uuid);
if (name == null) {
return "unknown";
}
return name;
}
private Biome getBiomeAt(final Plot plot) {