Dieser Commit ist enthalten in:
Ursprung
0b76f01dac
Commit
534f352c37
@ -883,6 +883,7 @@ REGION_TNT_BUILD=§cEine Explosion hätte Blöcke im Baubereich zerstört
|
|||||||
# Team
|
# Team
|
||||||
LOCK_SCHEM_NO_USER=§7Dieser Spieler existiert nicht!
|
LOCK_SCHEM_NO_USER=§7Dieser Spieler existiert nicht!
|
||||||
LOCK_SCHEM_NO_SCHEM=§7Dieser Spieler besitzt keine Schematic mit diesem Namen!
|
LOCK_SCHEM_NO_SCHEM=§7Dieser Spieler besitzt keine Schematic mit diesem Namen!
|
||||||
|
LOCK_SCHEM_DIR=§7Die angegebene Schematic ist ein Ordner
|
||||||
LOCK_SCHEM_LOCKED=§e{0} §7von §e{1} §7wurde von §e{2} §7auf §eNORMAL §7zurück gesetz. §f§lGrund: §f{3}
|
LOCK_SCHEM_LOCKED=§e{0} §7von §e{1} §7wurde von §e{2} §7auf §eNORMAL §7zurück gesetz. §f§lGrund: §f{3}
|
||||||
LOCK_SCHEM_HELP=§8/§eschemlock §8[§7Owner§8] [§7Schematic§8] [§7Grund§8] - §7Sperre eine Schematic
|
LOCK_SCHEM_HELP=§8/§eschemlock §8[§7Owner§8] [§7Schematic§8] [§7Grund§8] - §7Sperre eine Schematic
|
||||||
AFK_KICK_MESSAGE=§cAuf diesem Server ist seit 5 Minuten nichts passiert.
|
AFK_KICK_MESSAGE=§cAuf diesem Server ist seit 5 Minuten nichts passiert.
|
||||||
|
@ -21,26 +21,24 @@ package de.steamwar.bausystem.features.region.items;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.Permission;
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.bausystem.features.region.ResetCommand;
|
||||||
import de.steamwar.bausystem.linkage.LinkageType;
|
import de.steamwar.bausystem.linkage.LinkageType;
|
||||||
import de.steamwar.bausystem.linkage.Linked;
|
import de.steamwar.bausystem.linkage.Linked;
|
||||||
|
import de.steamwar.bausystem.linkage.LinkedInstance;
|
||||||
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import de.steamwar.inventory.SWListInv;
|
|
||||||
import de.steamwar.inventory.SchematicSelector;
|
import de.steamwar.inventory.SchematicSelector;
|
||||||
import de.steamwar.sql.SchematicNode;
|
|
||||||
import de.steamwar.sql.SteamwarUser;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Linked(LinkageType.BAU_GUI_ITEM)
|
@Linked(LinkageType.BAU_GUI_ITEM)
|
||||||
public class ResetBauGuiItem extends BauGuiItem {
|
public class ResetBauGuiItem extends BauGuiItem {
|
||||||
|
|
||||||
|
@LinkedInstance
|
||||||
|
private ResetCommand resetCommand;
|
||||||
|
|
||||||
public ResetBauGuiItem() {
|
public ResetBauGuiItem() {
|
||||||
super(6);
|
super(6);
|
||||||
}
|
}
|
||||||
@ -54,11 +52,11 @@ public class ResetBauGuiItem extends BauGuiItem {
|
|||||||
public boolean click(ClickType click, Player p) {
|
public boolean click(ClickType click, Player p) {
|
||||||
if (click == ClickType.LEFT) {
|
if (click == ClickType.LEFT) {
|
||||||
p.closeInventory();
|
p.closeInventory();
|
||||||
p.performCommand("reset");
|
resetCommand.genericResetCommand(p);
|
||||||
} else {
|
} else {
|
||||||
SchematicSelector selector = new SchematicSelector(p, SchematicSelector.selectSchematic(), node -> {
|
SchematicSelector selector = new SchematicSelector(p, SchematicSelector.selectSchematic(), node -> {
|
||||||
p.closeInventory();
|
p.closeInventory();
|
||||||
p.performCommand("reset " + node.generateBreadcrumbs(SteamwarUser.get(p.getUniqueId())));
|
resetCommand.schematicResetCommand(p, node);
|
||||||
});
|
});
|
||||||
selector.open();
|
selector.open();
|
||||||
}
|
}
|
||||||
|
@ -21,12 +21,13 @@ package de.steamwar.bausystem.features.region.items;
|
|||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.Permission;
|
import de.steamwar.bausystem.Permission;
|
||||||
|
import de.steamwar.bausystem.features.region.TestblockCommand;
|
||||||
import de.steamwar.bausystem.linkage.LinkageType;
|
import de.steamwar.bausystem.linkage.LinkageType;
|
||||||
import de.steamwar.bausystem.linkage.Linked;
|
import de.steamwar.bausystem.linkage.Linked;
|
||||||
|
import de.steamwar.bausystem.linkage.LinkedInstance;
|
||||||
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
import de.steamwar.bausystem.linkage.specific.BauGuiItem;
|
||||||
import de.steamwar.inventory.SWItem;
|
import de.steamwar.inventory.SWItem;
|
||||||
import de.steamwar.inventory.SchematicSelector;
|
import de.steamwar.inventory.SchematicSelector;
|
||||||
import de.steamwar.sql.SteamwarUser;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
@ -35,6 +36,9 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
@Linked(LinkageType.BAU_GUI_ITEM)
|
@Linked(LinkageType.BAU_GUI_ITEM)
|
||||||
public class TestblockBauGuiItem extends BauGuiItem {
|
public class TestblockBauGuiItem extends BauGuiItem {
|
||||||
|
|
||||||
|
@LinkedInstance
|
||||||
|
private TestblockCommand testblockCommand;
|
||||||
|
|
||||||
public TestblockBauGuiItem() {
|
public TestblockBauGuiItem() {
|
||||||
super(5);
|
super(5);
|
||||||
}
|
}
|
||||||
@ -48,11 +52,11 @@ public class TestblockBauGuiItem extends BauGuiItem {
|
|||||||
public boolean click(ClickType click, Player p) {
|
public boolean click(ClickType click, Player p) {
|
||||||
if (click == ClickType.LEFT) {
|
if (click == ClickType.LEFT) {
|
||||||
p.closeInventory();
|
p.closeInventory();
|
||||||
p.performCommand("testblock");
|
testblockCommand.genericTestblockCommand(p);
|
||||||
} else {
|
} else {
|
||||||
SchematicSelector selector = new SchematicSelector(p, SchematicSelector.selectSchematic(), node -> {
|
SchematicSelector selector = new SchematicSelector(p, SchematicSelector.selectSchematic(), node -> {
|
||||||
p.closeInventory();
|
p.closeInventory();
|
||||||
p.performCommand("testblock " + node.generateBreadcrumbs(SteamwarUser.get(p.getUniqueId())));
|
testblockCommand.schematicTestblockCommand(p, node);
|
||||||
});
|
});
|
||||||
selector.open();
|
selector.open();
|
||||||
}
|
}
|
||||||
|
@ -68,9 +68,13 @@ public class LockSchemCommand extends SWCommand {
|
|||||||
BauSystem.MESSAGE.send("LOCK_SCHEM_NO_USER", p);
|
BauSystem.MESSAGE.send("LOCK_SCHEM_NO_USER", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Schematic schematic = Schematic.getSchemFromDB(schematicName, schemOwner.getUUID());
|
SchematicNode schematic = SchematicNode.getNodeFromPath(schemOwner, schematicName);
|
||||||
if (schematic == null) {
|
if (schematic == null) {
|
||||||
BauSystem.MESSAGE.send("LOCK_SCHEM_NO_SCHEM", p);
|
BauSystem.MESSAGE.send("LOCK_SCHEM_DIR", p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(schematic.isDir()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,9 +83,9 @@ public class LockSchemCommand extends SWCommand {
|
|||||||
builder.append(s).append(" ");
|
builder.append(s).append(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
BauSystem.MESSAGE.send("LOCK_SCHEM_LOCKED", p, schematic.getSchemName(), schemOwner.getUserName(), schematic.getSchemType().name(), builder.toString());
|
BauSystem.MESSAGE.send("LOCK_SCHEM_LOCKED", p, schematic.getName(), schemOwner.getUserName(), schematic.getSchemtype().name(), builder.toString());
|
||||||
schematic.setSchemType(SchematicType.Normal);
|
schematic.setSchemtype(SchematicType.Normal);
|
||||||
new CheckedSchematic(schematic.getSchemName(), schematic.getSchemOwner(), steamwarUser.getId(), Timestamp.from(Instant.now()), Timestamp.from(Instant.now()), builder.toString());
|
new CheckedSchematic(schematic.getName(), schematic.getOwner(), steamwarUser.getId(), Timestamp.from(Instant.now()), Timestamp.from(Instant.now()), builder.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendHelp(Player player) {
|
private void sendHelp(Player player) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren