Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
bd7c13dfd7
Commit
c327471ef2
@ -513,8 +513,10 @@ SIMULATOR_CREATE = §aSimulator created
|
||||
SIMULATOR_EDIT_LOCATION = §7Edit position
|
||||
SIMULATOR_EDIT_PROPERTIES = §7Edit properties
|
||||
SIMULATOR_EDIT_OTHER = §7Edit other
|
||||
SIMULATOR_EDIT_GROUP = §7Edit group
|
||||
|
||||
SIMULATOR_WAND_NAME = §eSimulator
|
||||
SIMULATOR_WAND_NAME_SELECTED = §7Simulator §8- §e{0}
|
||||
SIMULATOR_WAND_LORE_1 = §eRigth click §8- §7adds a position
|
||||
SIMULATOR_WAND_LORE_2 = §eSneaking §8- §7Free movement
|
||||
SIMULATOR_WAND_LORE_3 = §eLeft click §8- §7Start the simulation
|
||||
@ -540,10 +542,11 @@ SIMULATOR_POSITION_ADD = §eSet position
|
||||
SIMULATOR_GUI_TNT_SPAWN_NAME = §eTNT
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_1 = §7TNT-Count§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_2 = §7Tick§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_3 = §7
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_4 = §7x§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_5 = §7y§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_6 = §7z§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_3 = §7Lifespan§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_4 = §7
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_5 = §7x§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_6 = §7y§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_7 = §7z§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_GROUP_NAME = §eTNT group
|
||||
SIMULATOR_GUI_TNT_GROUP_LORE_1 = §7Element count§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_DISABLED = §cDisabled
|
||||
@ -579,6 +582,7 @@ SIMULATOR_TNT_SPAWN_ACTIVATED_NAME = §7Primed by
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_WITH = §7Primed by §8- §e{0}
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_COMPARATOR = Comparator
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_REPEATER = Repeater
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_OBSERVER = Observer
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_UNKNOWN = Unknown
|
||||
SIMULATOR_TNT_SPAWN_INACTIVE = §7> §7{0}
|
||||
SIMULATOR_TNT_SPAWN_ACTIVE = §e> §7{0}
|
||||
|
@ -514,8 +514,10 @@ SIMULATOR_CREATE = §aSimulator erstellt
|
||||
SIMULATOR_EDIT_LOCATION = §7Editiere Positionen
|
||||
SIMULATOR_EDIT_PROPERTIES = §7Editiere Eigenschaften
|
||||
SIMULATOR_EDIT_OTHER = §7Editiere Andere
|
||||
SIMULATOR_EDIT_GROUP = §7Editiere Gruppe
|
||||
|
||||
SIMULATOR_WAND_NAME = §eKanonensimulator
|
||||
SIMULATOR_WAND_NAME_SELECTED = §7Kanonensimulator §8- §e{0}
|
||||
SIMULATOR_WAND_LORE_1 = §eRechtsklick §8- §7Füge eine Position hinzu
|
||||
SIMULATOR_WAND_LORE_2 = §eSneaken §8- §7Freie Bewegung
|
||||
SIMULATOR_WAND_LORE_3 = §eLinksklick §8- §7Starte die Simulation
|
||||
@ -541,10 +543,11 @@ SIMULATOR_POSITION_ADD = §ePosition setzen
|
||||
SIMULATOR_GUI_TNT_SPAWN_NAME = §eTNT
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_1 = §7TNT-Anzahl§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_2 = §7Tick§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_3 = §7
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_4 = §7x§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_5 = §7y§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_6 = §7z§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_3 = §7Lebensdauer§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_4 = §7
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_5 = §7x§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_6 = §7y§8: §e{0}
|
||||
SIMULATOR_GUI_TNT_SPAWN_LORE_7 = §7z§8: §e{0}
|
||||
SIMULATOR_GUI_NAME = Kanonensimulator
|
||||
SIMULATOR_GUI_DELETE = §cTNT löschen
|
||||
SIMULATOR_GUI_START = §eStarten
|
||||
@ -573,6 +576,7 @@ SIMULATOR_TNT_SPAWN_POSITION_Z = §7z-Position §8- §e{0}
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_WITH = §7Gezündet durch §8- §e{0}
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_COMPARATOR = Comparator
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_REPEATER = Repeater
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_OBSERVER = Observer
|
||||
SIMULATOR_TNT_SPAWN_ACTIVATED_UNKNOWN = Unbekannt
|
||||
SIMULATOR_TNT_SPAWN_MATERIAL = §eMaterial
|
||||
SIMULATOR_TNT_SPAWN_MATERIAL_LORE_1 = §7Jetziges Material§8: §e{0}
|
||||
|
@ -35,10 +35,10 @@ public class OrderUtils {
|
||||
private final List<Material> activationOrder = new ArrayList<>();
|
||||
|
||||
private final Map<Material, String> nameMap = new HashMap<>();
|
||||
private final Map<Integer, Material> reverseActivationOrderLookupTable = new HashMap<>();
|
||||
|
||||
static {
|
||||
add(Material.REPEATER, "SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_REPEATER");
|
||||
add(Material.OBSERVER, "SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_OBSERVER");
|
||||
add(Material.COMPARATOR, "SIMULATOR_TNT_SPAWN_ACTIVATED_WITH_COMPARATOR");
|
||||
}
|
||||
|
||||
@ -87,7 +87,6 @@ public class OrderUtils {
|
||||
|
||||
private void add(Material material, String name) {
|
||||
activationOrder.add(material);
|
||||
reverseActivationOrderLookupTable.put(activationOrder.size() - 1, material);
|
||||
nameMap.put(material, name);
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import yapion.exceptions.YAPIONException;
|
||||
import yapion.hierarchy.types.YAPIONArray;
|
||||
import yapion.hierarchy.types.YAPIONObject;
|
||||
@ -85,22 +86,18 @@ public class SimulatorStorage implements Enable, Disable {
|
||||
return tntSimulators.get(selection);
|
||||
}
|
||||
|
||||
public static void setSimulator(ItemStack itemStack, TNTSimulator simulator) {
|
||||
public static void setSimulator(Player player, ItemStack itemStack, TNTSimulator simulator) {
|
||||
for (Map.Entry<String, TNTSimulator> entry : tntSimulators.entrySet()) {
|
||||
if (entry.getValue() == simulator) {
|
||||
ItemUtils.setTag(itemStack, simulatorSelection, entry.getKey());
|
||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||
itemMeta.setDisplayName(BauSystem.MESSAGE.parse("SIMULATOR_WAND_NAME_SELECTED", player, entry.getKey()));
|
||||
itemStack.setItemMeta(itemMeta);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void setSimulator(ItemStack itemStack, String name) {
|
||||
if (!ItemUtils.isItem(itemStack, "simulator")) {
|
||||
return;
|
||||
}
|
||||
ItemUtils.setTag(itemStack, simulatorSelection, name);
|
||||
}
|
||||
|
||||
public static void removeSimulator(ItemStack itemStack) {
|
||||
if (!ItemUtils.isItem(itemStack, "simulator")) {
|
||||
return;
|
||||
|
@ -48,7 +48,7 @@ public class SimulatorSelectionGUI {
|
||||
if (current != null) {
|
||||
current.remove(player);
|
||||
}
|
||||
SimulatorStorage.setSimulator(hand, tntSimulator);
|
||||
SimulatorStorage.setSimulator(player, hand, tntSimulator);
|
||||
player.getInventory().setItemInMainHand(hand);
|
||||
player.closeInventory();
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ public class TNTSimulatorGui {
|
||||
otherLore.add("");
|
||||
otherLore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_DISABLED", player));
|
||||
}
|
||||
inv.setItem(51, new SWItem(Material.ANVIL, BauSystem.MESSAGE.parse("SIMULATOR_EDIT_OTHER", player), otherLore, false, clickType -> {
|
||||
inv.setItem(51, new SWItem(Material.ANVIL, BauSystem.MESSAGE.parse("SIMULATOR_EDIT_GROUP", player), otherLore, false, clickType -> {
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -149,11 +149,12 @@ public class TNTElement implements SimulatorElement {
|
||||
public SWItem menu(Player p) {
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_1", p, count));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_2", p, fuseTicks));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_3", p));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_4", p, getPosition().getX()));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_5", p, getPosition().getY()));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_6", p, getPosition().getZ()));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_2", p, getTickOffset()));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_3", p, getFuseTicks()));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_4", p));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_5", p, getPosition().getX()));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_6", p, getPosition().getY()));
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_SPAWN_LORE_7", p, getPosition().getZ()));
|
||||
if (disabled) {
|
||||
lore.add("");
|
||||
lore.add(BauSystem.MESSAGE.parse("SIMULATOR_GUI_TNT_DISABLED", p));
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren