Database correction / Code cleanup, Fixes #490

This commit is contained in:
boy0001
2015-08-07 02:05:15 +10:00
parent 5ea7403d2e
commit 46e48857bf
33 changed files with 350 additions and 183 deletions

View File

@ -474,7 +474,7 @@ import com.plotsquared.bukkit.util.BukkitUtil;
*/
public Plot[] getPlots(final World world, final Player plr, final boolean just_owner) {
final ArrayList<Plot> pPlots = new ArrayList<>();
for (final Plot plot : PS.get().getPlots(world.getName()).values()) {
for (final Plot plot : PS.get().getPlotsInWorld(world.getName())) {
if (just_owner) {
if ((plot.owner != null) && (plot.owner.equals(UUIDHandler.getUUID(BukkitUtil.getPlayer(plr))))) {
pPlots.add(plot);
@ -499,7 +499,7 @@ import com.plotsquared.bukkit.util.BukkitUtil;
* @see com.intellectualcrafters.plot.object.Plot
*/
public Plot[] getPlots(final World world) {
Collection<Plot> plots = PS.get().getPlots(world.getName()).values();
Collection<Plot> plots = PS.get().getPlotsInWorld(world.getName());
return plots.toArray(new Plot[plots.size()]);
}