mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Setup & PlotPlayer caching
- Fixed setup for empty configuration nodes - Fixed PlotPlayer caching (@Byteflux) #305
This commit is contained in:
parent
dcf1475d92
commit
4276359219
@ -144,6 +144,12 @@ public class Setup extends SubCommand {
|
||||
object.step = ((PlotGenerator) SetupUtils.generators.get(object.plotManager)).getNewPlotWorld(null).getSettingNodes();
|
||||
((PlotGenerator) SetupUtils.generators.get(object.plotManager)).processSetup(object);
|
||||
}
|
||||
if (object.step.length == 0) {
|
||||
object.current = 4;
|
||||
MainUtil.sendMessage(plr, "&6What do you want your world to be called?");
|
||||
object.setup_index = 0;
|
||||
return true;
|
||||
}
|
||||
final ConfigurationNode step = object.step[object.setup_index];
|
||||
sendMessage(plr, C.SETUP_STEP, object.setup_index + 1 + "", step.getDescription(), step.getType().getType(), step.getDefaultValue() + "");
|
||||
} else {
|
||||
|
@ -50,8 +50,13 @@ public class BukkitUtil extends BlockManager {
|
||||
if (player == lastPlayer) {
|
||||
return lastPlotPlayer;
|
||||
}
|
||||
String name = player.getName();
|
||||
PlotPlayer pp = UUIDHandler.players.get(name);
|
||||
if (pp != null) {
|
||||
return pp;
|
||||
}
|
||||
lastPlotPlayer = new BukkitPlayer(player);
|
||||
UUIDHandler.players.put(lastPlotPlayer.getName(), lastPlotPlayer);
|
||||
UUIDHandler.players.put(name, lastPlotPlayer);
|
||||
lastPlayer = player;
|
||||
return lastPlotPlayer;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user