mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-07 13:03:06 +00:00
Fixed null pointers for getName
This commit is contained in:
parent
e0adcb3b60
commit
5c4f1332d6
5 changed files with 31 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue