Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
40ba9b838e
Commit
823e6e5534
@ -136,9 +136,8 @@ public class Loader implements Listener {
|
|||||||
}
|
}
|
||||||
list.add(new SWListInv.SWListEntry<>(element.menu(p), element));
|
list.add(new SWListInv.SWListEntry<>(element.menu(p), element));
|
||||||
}
|
}
|
||||||
SWListInv<LoaderElement> swListInv = new SWListInv<>(p, "Loader Settings", false, list, (clickType, entry) -> {
|
SWListInv<LoaderElement> swListInv = new SWListInv<>(p, "Loader Settings", false, list, (clickType, loaderElement) -> {});
|
||||||
entry.click(p, () -> settings(settingsSorting));
|
swListInv.setCallback((clickType, entry) -> entry.click(p, swListInv::open));
|
||||||
});
|
|
||||||
|
|
||||||
SWItem onlyWaitElements = new SWItem(Material.CLOCK, "§eNur Warten", clickType -> {
|
SWItem onlyWaitElements = new SWItem(Material.CLOCK, "§eNur Warten", clickType -> {
|
||||||
settings(settingsSorting == SettingsSorting.WAIT ? null : SettingsSorting.WAIT);
|
settings(settingsSorting == SettingsSorting.WAIT ? null : SettingsSorting.WAIT);
|
||||||
@ -162,7 +161,7 @@ public class Loader implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getProgress() {
|
public String getProgress() {
|
||||||
return "§7" + (currentElement + 1) + "§8/§7" + elements.size();
|
return (currentElement + 1) + "§8/§7" + elements.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SettingsSorting {
|
public enum SettingsSorting {
|
||||||
|
@ -42,8 +42,10 @@ public class LoaderScoreboardElement implements ScoreboardElement {
|
|||||||
public String get(Region region, Player p) {
|
public String get(Region region, Player p) {
|
||||||
Loader loader = Loader.getLoader(p);
|
Loader loader = Loader.getLoader(p);
|
||||||
if (loader == null) return null;
|
if (loader == null) return null;
|
||||||
if (loader.getStage() == Loader.Stage.RUNNING || loader.getStage() == Loader.Stage.PAUSE) {
|
if (loader.getStage() == Loader.Stage.RUNNING) {
|
||||||
return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_LOADER", p) + "§8: " + BauSystem.MESSAGE.parse(loader.getStage().getChatValue(), p) + " §8(" + loader.getProgress() + "§8)";
|
return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_LOADER", p) + "§8: §a" + loader.getProgress();
|
||||||
|
} else if (loader.getStage() == Loader.Stage.PAUSE) {
|
||||||
|
return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_LOADER", p) + "§8: §c" + loader.getProgress();
|
||||||
} else {
|
} else {
|
||||||
return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_LOADER", p) + "§8: " + BauSystem.MESSAGE.parse(loader.getStage().getChatValue(), p);
|
return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_LOADER", p) + "§8: " + BauSystem.MESSAGE.parse(loader.getStage().getChatValue(), p);
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren