mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-07 04:53:00 +00:00
Started working on cluster commands
This commit is contained in:
parent
cbdb3d307b
commit
61898b0157
14 changed files with 525 additions and 179 deletions
|
@ -24,6 +24,7 @@ package com.intellectualcrafters.plot.commands;
|
|||
import net.milkbowl.vault.economy.Economy;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
@ -167,6 +168,17 @@ public class Auto extends SubCommand {
|
|||
return sendMessage(plr, C.NOT_IN_PLOT);
|
||||
}
|
||||
PlotCluster cluster = ClusterManager.getCluster(loc);
|
||||
PlotId bot = cluster.getP1();
|
||||
PlotId top = cluster.getP2();
|
||||
PlotId id = new PlotId((bot.x + top.x) / 2, (bot.y + top.y) / 2);
|
||||
int width = Math.max(top.x - bot.x, top.y - bot.y);
|
||||
int max = width * width;
|
||||
|
||||
// TODO finish cluster auto claiming
|
||||
|
||||
for (int i = 0; i <= max; i++) {
|
||||
id = getNextPlot(id, 1);
|
||||
}
|
||||
}
|
||||
|
||||
boolean br = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue