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

@ -251,7 +251,10 @@ import java.util.UUID;
}
@SuppressWarnings("deprecation")
public static void setSign(final World world, final String name, final Plot p) {
public static void setSign(final World world, String name, final Plot p) {
if (name == null) {
name = "unknown";
}
final PlotManager manager = PlotMain.getPlotManager(world);
final PlotWorld plotworld = PlotMain.getWorldSettings(world);
final Location loc = manager.getSignLoc(world, plotworld, p);