Update Detoblock
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
a7e14074a9
Commit
1c2353fab2
@ -21,30 +21,23 @@ package de.steamwar.bausystem.features.detonator;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum Detoblock {
|
||||
SWITCH(0, true, "Hebel"),
|
||||
WOOD_BUTTON(30, "Knopf"),
|
||||
STONE_BUTTON(20, "Knopf"),
|
||||
PRESSURE_PLATE(30, "Druckplatte"),
|
||||
WEIGHTED_PRESSURE_PLATE(20, "Druckplatte"),
|
||||
TRIPWIRE(30, "Tripwire"),
|
||||
NOTEBLOCK(1, "Noteblock"),
|
||||
DAYLIGHTSENSOR(0, true, "Tageslichtsensor"),
|
||||
POWERABLE(0, true, "Aktivierbarer Block"),
|
||||
INVALID(-1, "Invalider");
|
||||
SWITCH(0, true, "DETONATOR_BUTTON_SWITCH"),
|
||||
WOOD_BUTTON(30, "DETONATOR_BUTTON_WOOD-Button"),
|
||||
STONE_BUTTON(20, "DETONATOR_BUTTON_STONE-Button"),
|
||||
PRESSURE_PLATE(30, "DETONATOR_BUTTON_PRESSURE-PLATE"),
|
||||
WEIGHTED_PRESSURE_PLATE(20, "DETONATOR_BUTTON_WEIGHTED-PRESSURE-PLATE"),
|
||||
TRIPWIRE(30, "DETONATOR_BUTTON_TRIPWIRE"),
|
||||
NOTEBLOCK(1, "DETONATOR_BUTTON_NOTEBLOCK"),
|
||||
DAYLIGHTSENSOR(0, true, "DETONATOR_BUTTON_DAYLIGHTSENSOR"),
|
||||
INVALID(-1, "DETONATOR_BUTTON_INVALID");
|
||||
|
||||
@Getter
|
||||
private final int time;
|
||||
@Getter
|
||||
private final boolean toggle;
|
||||
@Getter
|
||||
private boolean toggle;
|
||||
private final String name;
|
||||
|
||||
Detoblock(int time, String name) {
|
||||
this.time = time;
|
||||
this.name = name;
|
||||
toggle = false;
|
||||
}
|
||||
}
|
||||
|
@ -128,6 +128,19 @@ COUNTINGWAND_MESSAGE_R-CLICK = §7Erste Position bei: §8[§7{0}§8, §7{1}§8,
|
||||
COUNTINGWAND_MESSAGE_L-CLICK = §7Zweite Position bei: §8[§7{0}§8, §7{1}§8, §7{2}§8] ({3})
|
||||
COUNTINGWAND_MESSAGE_DIMENSION = §e{0}§8, §e{1}§8, §e{2}
|
||||
|
||||
# Detonator
|
||||
DETONATOR_LOC_REMOVE = §e{0} entfernt
|
||||
DETONATOR_LOC_ADD = §e{0} hinzugefügt
|
||||
DETONATOR_BUTTON_SWITCH = Hebel
|
||||
DETONATOR_BUTTON_WOOD-Button = Knopf
|
||||
DETONATOR_BUTTON_STONE-Button = Knopf
|
||||
DETONATOR_BUTTON_PRESSURE-PLATE = Druckplatte
|
||||
DETONATOR_BUTTON_WEIGHTED-PRESSURE-PLATE = Druckplatte
|
||||
DETONATOR_BUTTON_TRIPWIRE = Tripwire
|
||||
DETONATOR_BUTTON_NOTEBLOCK = Noteblock
|
||||
DETONATOR_BUTTON_DAYLIGHTSENSOR = Tageslichtsensor
|
||||
DETONATOR_BUTTON_INVALID = Invalider
|
||||
|
||||
# Hotbar
|
||||
HOTBAR_SAVED = §7Deine Hotbar wurde als Standard gespeichert
|
||||
HOTBAR_LOADED = §7Deine Standard Hotbar wurde geladen
|
||||
|
@ -89,10 +89,10 @@ public class DetonatorListener implements Listener {
|
||||
}
|
||||
if (detonator.getLocations().contains(location)) {
|
||||
detonator.removeLocation(location);
|
||||
SWUtils.sendToActionbar(p, ColorConfig.HIGHLIGHT + detoblock.getName() + " entfernt");
|
||||
SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("DETONATOR_LOC_REMOVE", p, BauSystem.MESSAGE.parse(detoblock.getName(), p)));
|
||||
} else {
|
||||
detonator.addLocation(location);
|
||||
SWUtils.sendToActionbar(p, ColorConfig.HIGHLIGHT + detoblock.getName() + " hinzugefügt");
|
||||
SWUtils.sendToActionbar(p, BauSystem.MESSAGE.parse("DETONATOR_LOC_ADD", p, BauSystem.MESSAGE.parse(detoblock.getName(), p)));
|
||||
}
|
||||
detonator.write();
|
||||
}
|
||||
|
@ -21,9 +21,12 @@ package de.steamwar.bausystem.features.loader;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum LoaderButton {
|
||||
SWITCH(0, true, "LOADER_BUTTON_SWITCH"),
|
||||
WOOD_BUTTON(30, "LOADER_BUTTON_WOOD-Button"),
|
||||
@ -35,19 +38,10 @@ public enum LoaderButton {
|
||||
DAYLIGHTSENSOR(0, true, "LOADER_BUTTON_DAYLIGHTSENSOR"),
|
||||
INVALID(-1, "LOADER_BUTTON_INVALID");
|
||||
|
||||
@Getter
|
||||
private final int time;
|
||||
@Getter
|
||||
private final boolean toggle;
|
||||
@Getter
|
||||
private boolean toggle;
|
||||
private final String name;
|
||||
|
||||
LoaderButton(int time, String name) {
|
||||
this.time = time;
|
||||
this.name = name;
|
||||
toggle = false;
|
||||
}
|
||||
|
||||
public static LoaderButton fromBlock(Block block) {
|
||||
switch (block.getType()) {
|
||||
case LEVER:
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren