|
@@ -1,7 +1,9 @@
|
|
|
package me.km.plots;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Collections;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
import java.util.UUID;
|
|
|
import me.km.plots.PlotMap.Plot;
|
|
@@ -76,7 +78,7 @@ public class WorldPlotMap
|
|
|
return map.getPlotAt(pos.getX(), pos.getY(), pos.getZ());
|
|
|
}
|
|
|
|
|
|
- public Plot add(IWorld w, BlockPos pos1, BlockPos pos2)
|
|
|
+ public PlotMap.Plot add(IWorld w, BlockPos pos1, BlockPos pos2)
|
|
|
{
|
|
|
PlotMap map = maps.get(w);
|
|
|
if(map == null)
|
|
@@ -95,4 +97,24 @@ public class WorldPlotMap
|
|
|
map.remove(p);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public Iterator<PlotMap.Plot> getIterator(IWorld w)
|
|
|
+ {
|
|
|
+ PlotMap map = maps.get(w);
|
|
|
+ if(map != null)
|
|
|
+ {
|
|
|
+ return map.getIterator();
|
|
|
+ }
|
|
|
+ return Collections.EMPTY_LIST.iterator();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Iterator<PlotMap.Plot> getIterator(IWorld w, UUID uuid)
|
|
|
+ {
|
|
|
+ PlotMap map = maps.get(w);
|
|
|
+ if(map != null)
|
|
|
+ {
|
|
|
+ return map.getIterator(uuid);
|
|
|
+ }
|
|
|
+ return Collections.EMPTY_LIST.iterator();
|
|
|
+ }
|
|
|
}
|