MAIN/src/main/java/com/trafalcraft/anti_redstone_clock/commands/CheckList.java aktualisiert
This commit is contained in:
@@ -16,6 +16,7 @@ import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.md_5.bungee.api.chat.hover.content.Text;
|
||||
|
||||
public class CheckList {
|
||||
|
||||
private static final CheckList ourInstance = new CheckList();
|
||||
|
||||
public static CheckList getInstance() {
|
||||
@@ -37,15 +38,18 @@ public class CheckList {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Collection<Location> allLocation = RedstoneClockController.getAllLoc();
|
||||
int totalPage = (int) Math.ceil(allLocation.size() / 5.0);
|
||||
sender.sendMessage(Msg.RED_STONE_CLOCK_LIST_HEADER.toString().replace("$page",
|
||||
"(" + page + "/" + totalPage + ")"));
|
||||
|
||||
int i = 1;
|
||||
int minElements = 5 * (page - 1);
|
||||
int maxElements = 5 * page;
|
||||
String teleportCMD = Main.getInstance().getConfig().getString("teleportCMD", "tp $x $y $z");
|
||||
String teleportCMD = Main.getInstance().getConfig().getString("teleportCMD", "teleport $x $y $z");
|
||||
int maxPulses = Main.getInstance().getConfig().getInt("MaxPulses");
|
||||
|
||||
for (Location loc : allLocation) {
|
||||
if (i > minElements && i <= maxElements) {
|
||||
int clock = RedstoneClockController.getRedstoneClock(loc).getNumberOfClock();
|
||||
|
Reference in New Issue
Block a user