Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
c20eb8c331
Commit
7cd8d40e11
@ -567,12 +567,17 @@ LOADER_HELP_START=§8/§eloader start §8- §7Playback of previously recorded ac
|
|||||||
LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pauses Loader
|
LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pauses Loader
|
||||||
LOADER_HELP_GUI=§8/§7loader gui §8- §7Shows Loader gui
|
LOADER_HELP_GUI=§8/§7loader gui §8- §7Shows Loader gui
|
||||||
LOADER_HELP_STOP=§8/§eloader stop §8- §7Stops recording/playback
|
LOADER_HELP_STOP=§8/§eloader stop §8- §7Stops recording/playback
|
||||||
|
LOADER_HELP_WAIT=§8/§7loader wait §8[§7Ticks§8] - §7Sets wait time between shots
|
||||||
|
LOADER_HELP_SPEED=§8/§7loader speed §8[§7Ticks§8] - §7Sets wait time between actions
|
||||||
LOADER_NO_LOADER=§cYou have no Laoder. Create one with /loader setup
|
LOADER_NO_LOADER=§cYou have no Laoder. Create one with /loader setup
|
||||||
LOADER_NEW=§7Load your cannon and fire it once, to initialise the loader.
|
LOADER_NEW=§7Load your cannon and fire it once, to initialise the loader.
|
||||||
LOADER_HOW_TO_START=§7Then, execute /§eloader start§7 to start the Loader
|
LOADER_HOW_TO_START=§7Then, execute /§eloader start§7 to start the Loader
|
||||||
LOADER_ACTIVE=§7The Loader is now active.
|
LOADER_ACTIVE=§7The Loader is now active.
|
||||||
LOADER_STOP=§7The Loader has been stopped.
|
LOADER_STOP=§7The Loader has been stopped.
|
||||||
LOADER_PAUSED=§7The Loader is now paused.
|
LOADER_PAUSED=§7The Loader is now paused.
|
||||||
|
LOADER_SMALL_TIME=§cThe wait time is too small
|
||||||
|
LOADER_NEW_TIME=§7The wait time is now: {0}
|
||||||
|
LOADER_NEW_LOAD_TIME=§7The action wait time is now: {0}
|
||||||
LOADER_PERMS=§cYou are not allowed to use the Loader here
|
LOADER_PERMS=§cYou are not allowed to use the Loader here
|
||||||
|
|
||||||
LOADER_NOTHING_RECORDED=§cYou have not recorded anything yet!
|
LOADER_NOTHING_RECORDED=§cYou have not recorded anything yet!
|
||||||
|
@ -535,12 +535,17 @@ LOADER_HELP_START=§8/§eloader start §8- §7Spielt die zuvor aufgenommenen Akt
|
|||||||
LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pausiert das Abspielen
|
LOADER_HELP_PAUSE=§8/§7loader pause §8- §7Pausiert das Abspielen
|
||||||
LOADER_HELP_GUI=§8/§7loader settings §8- §7Zeigt die Einstellungen an
|
LOADER_HELP_GUI=§8/§7loader settings §8- §7Zeigt die Einstellungen an
|
||||||
LOADER_HELP_STOP=§8/§eloader stop §8- §7Stoppt die Aufnahme bzw. das Abspielen
|
LOADER_HELP_STOP=§8/§eloader stop §8- §7Stoppt die Aufnahme bzw. das Abspielen
|
||||||
|
LOADER_HELP_WAIT=§8/§7loader wait §8[§7Ticks§8] - §7Setzt die Wartezeit zwischen Schüssen
|
||||||
|
LOADER_HELP_SPEED=§8/§7loader speed §8[§7Ticks§8] - §7Setzt die Wartezeit zwischen Aktionen
|
||||||
LOADER_NO_LOADER=§cDu hast noch keinen Loader. Erstelle dir einen mit /loader setup
|
LOADER_NO_LOADER=§cDu hast noch keinen Loader. Erstelle dir einen mit /loader setup
|
||||||
LOADER_NEW=§7Belade und feuer einmal die Kanone ab, um den Loader zu initialisieren.
|
LOADER_NEW=§7Belade und feuer einmal die Kanone ab, um den Loader zu initialisieren.
|
||||||
LOADER_HOW_TO_START=§7Führe dann /§eloader start§7 um den Loader zu starten
|
LOADER_HOW_TO_START=§7Führe dann /§eloader start§7 um den Loader zu starten
|
||||||
LOADER_ACTIVE=§7Der Loader ist nun aktiviert.
|
LOADER_ACTIVE=§7Der Loader ist nun aktiviert.
|
||||||
LOADER_STOP=§7Der Loader ist nun gestoppt.
|
LOADER_STOP=§7Der Loader ist nun gestoppt.
|
||||||
LOADER_PAUSED=§7Der Loader ist nun pausiert.
|
LOADER_PAUSED=§7Der Loader ist nun pausiert.
|
||||||
|
LOADER_SMALL_TIME=§cDie Wartezeit ist zu klein
|
||||||
|
LOADER_NEW_TIME=§7Die Schusswartezeit ist nun: {0}
|
||||||
|
LOADER_NEW_LOAD_TIME=§7Die Setzwartezeit ist nun: {0}
|
||||||
LOADER_PERMS=§cDu darfst hier nicht den Detonator nutzen
|
LOADER_PERMS=§cDu darfst hier nicht den Detonator nutzen
|
||||||
|
|
||||||
LOADER_NOTHING_RECORDED=§cEs wurden keine Elemente aufgenommen!
|
LOADER_NOTHING_RECORDED=§cEs wurden keine Elemente aufgenommen!
|
||||||
|
@ -124,6 +124,25 @@ public class Loader implements Listener {
|
|||||||
LOADER_MAP.remove(p);
|
LOADER_MAP.remove(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean setTicksBetweenShots(int delay) {
|
||||||
|
if (elements.size() == 0) return false;
|
||||||
|
LoaderElement loaderElement = elements.get(elements.size() - 1);
|
||||||
|
if (loaderElement instanceof LoaderWait) {
|
||||||
|
((LoaderWait) loaderElement).setDelay(delay);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTicksBetweenBlocks(int delay) {
|
||||||
|
for (int i = 0; i < elements.size() - 1; i++) {
|
||||||
|
LoaderElement loaderElement = elements.get(i);
|
||||||
|
if (loaderElement instanceof LoaderWait) {
|
||||||
|
((LoaderWait) loaderElement).setDelay(delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void gui(SettingsSorting settingsSorting) {
|
public void gui(SettingsSorting settingsSorting) {
|
||||||
List<SWListInv.SWListEntry<LoaderElement>> list = new ArrayList<>();
|
List<SWListInv.SWListEntry<LoaderElement>> list = new ArrayList<>();
|
||||||
AtomicBoolean allWait = new AtomicBoolean(true);
|
AtomicBoolean allWait = new AtomicBoolean(true);
|
||||||
|
@ -83,6 +83,25 @@ public class LoaderCommand extends SWCommand {
|
|||||||
loader.gui(Loader.SettingsSorting.ALL);
|
loader.gui(Loader.SettingsSorting.ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(value = "wait", description = "LOADER_HELP_WAIT")
|
||||||
|
public void shotDelayLoader(@Validator Player p, @Min(intValue = 1) @ErrorMessage("LOADER_SMALL_TIME") int delay) {
|
||||||
|
Loader loader = Loader.getLoader(p);
|
||||||
|
if (loaderNullCheck(loader, p)) return;
|
||||||
|
if (loader.setTicksBetweenShots(delay)) {
|
||||||
|
BauSystem.MESSAGE.send("LOADER_NEW_TIME", p, delay);
|
||||||
|
} else {
|
||||||
|
BauSystem.MESSAGE.send("LOADER_SMALL_TIME", p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register(value = "speed", description = "LOADER_HELP_SPEED")
|
||||||
|
public void speedLoader(@Validator Player p, @Min(intValue = 0) @ErrorMessage("LOADER_SMALL_TIME") int delay) {
|
||||||
|
Loader loader = Loader.getLoader(p);
|
||||||
|
if (loaderNullCheck(loader, p)) return;
|
||||||
|
BauSystem.MESSAGE.send("LOADER_NEW_LOAD_TIME", p, delay);
|
||||||
|
loader.setTicksBetweenBlocks(delay);
|
||||||
|
}
|
||||||
|
|
||||||
@ClassValidator(value = Player.class, local = true)
|
@ClassValidator(value = Player.class, local = true)
|
||||||
public TypeValidator<Player> loaderValidator() {
|
public TypeValidator<Player> loaderValidator() {
|
||||||
return (commandSender, player, messageSender) -> {
|
return (commandSender, player, messageSender) -> {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren