mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-07 04:53:00 +00:00
home
This commit is contained in:
parent
ef9e1dd1ac
commit
1f76b5c551
3 changed files with 24 additions and 9 deletions
|
@ -46,6 +46,7 @@ import com.intellectualcrafters.plot.object.PlotCluster;
|
|||
import com.intellectualcrafters.plot.object.PlotGenerator;
|
||||
import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.object.PlotManager;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.object.PlotWorld;
|
||||
import com.intellectualcrafters.plot.util.ClusterManager;
|
||||
import com.intellectualcrafters.plot.util.ExpireManager;
|
||||
|
@ -176,6 +177,23 @@ public class PlotSquared {
|
|||
return new HashMap<>();
|
||||
}
|
||||
|
||||
public static Set<Plot> getPlots(final PlotPlayer player) {
|
||||
final UUID uuid = player.getUUID();
|
||||
final ArrayList<Plot> myplots = new ArrayList<>();
|
||||
for (final String world : plots.keySet()) {
|
||||
if (isPlotWorld(world)) {
|
||||
for (final Plot plot : plots.get(world).values()) {
|
||||
if (plot.hasOwner()) {
|
||||
if (plot.getOwner().equals(uuid)) {
|
||||
myplots.add(plot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return new HashSet<>(myplots);
|
||||
}
|
||||
|
||||
public static boolean removePlot(final String world, final PlotId id, final boolean callEvent) {
|
||||
if (callEvent) {
|
||||
if (!IMP.callRemovePlot(world, id)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue