Fix createWarps, reenable LockSchemCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
48803dc3d2
Commit
292cb689aa
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
PREFIX = §eBau§8System§8»
|
PREFIX = §eBau§8System§8»
|
||||||
TIME = HH:mm:ss
|
TIME = HH:mm:ss
|
||||||
|
DATE=........
|
||||||
COMMAND_HELP_HEAD=§7---=== (§e{0}§7) ===---
|
COMMAND_HELP_HEAD=§7---=== (§e{0}§7) ===---
|
||||||
ONLY_SCHEMS=§cDu kannst hier keinen Ordner angeben
|
ONLY_SCHEMS=§cDu kannst hier keinen Ordner angeben
|
||||||
|
|
||||||
@ -27,6 +28,8 @@ LIST_PREVIOUS_PAGE=§eVorherige Seite
|
|||||||
LIST_NEXT_PAGE=§eNächste Seite
|
LIST_NEXT_PAGE=§eNächste Seite
|
||||||
|
|
||||||
# Permission
|
# Permission
|
||||||
|
PERMISSION_WORLD = Einstellungen vornehmen
|
||||||
|
PERMISSION_WORLD_EDIT = WorldEdit verwenden
|
||||||
PERMISSION_CHANGE_YOU_ENABLE = §aDer Spieler darf nun {0}
|
PERMISSION_CHANGE_YOU_ENABLE = §aDer Spieler darf nun {0}
|
||||||
PERMISSION_CHANGE_YOU_DISABLE = §cDer Spieler darf nun nicht mehr {0}
|
PERMISSION_CHANGE_YOU_DISABLE = §cDer Spieler darf nun nicht mehr {0}
|
||||||
PERMISSION_CHANGE_OTHER_ENABLE = §aDu kannst nun auf der Welt von §6{0} §a{1}
|
PERMISSION_CHANGE_OTHER_ENABLE = §aDu kannst nun auf der Welt von §6{0} §a{1}
|
||||||
@ -122,6 +125,10 @@ BACKUP_LORE=§eKlicken zum Laden
|
|||||||
|
|
||||||
# Bau
|
# Bau
|
||||||
BAU_COMMAND_HELP_INFO = §8/§ebau info §8- §7Alias für §8/§ebauinfo
|
BAU_COMMAND_HELP_INFO = §8/§ebau info §8- §7Alias für §8/§ebauinfo
|
||||||
|
BAU_COMMAND_HELP_TOGGLEWE = §8/§ebau togglewe §8[§7Player§8] §8- §7Editiere die WorldEdit Rechte eines Spielers
|
||||||
|
BAU_COMMAND_HELP_TOGGLEWORLD = §8/§ebau toggleworld §8[§7Player§8] §8- §7Editiere die Welt Rechte eines Spielers
|
||||||
|
BAU_UNKNOWN_PLAYER = §cUnbekannter Spieler
|
||||||
|
BAU_NO_PLAYER = §cDer Spieler ist kein Mitglied deiner Welt!
|
||||||
BAU_NO_WORLD = §cDies ist nicht deine Welt!
|
BAU_NO_WORLD = §cDies ist nicht deine Welt!
|
||||||
|
|
||||||
BAU_INFO_ITEM_NAME = §eBau-Management
|
BAU_INFO_ITEM_NAME = §eBau-Management
|
||||||
@ -1067,6 +1074,11 @@ REGION_TNT_TB=§aTNT-Schaden außerhalb Baurahmen aktiviert
|
|||||||
REGION_TNT_NO_PERMS=§cDu darfst hier nicht TNT-Schaden (de-)aktivieren
|
REGION_TNT_NO_PERMS=§cDu darfst hier nicht TNT-Schaden (de-)aktivieren
|
||||||
REGION_TNT_BUILD=§cEine Explosion hätte Blöcke im Baubereich zerstört
|
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_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 gesetzt.
|
||||||
|
LOCK_SCHEM_HELP=§8/§eschemlock §8[§7Owner§8] [§7Schematic§8] - §7Sperre eine Schematic (Nutzer über Sperrungsgrund informieren!)
|
||||||
AFK_KICK_MESSAGE=§cAuf diesem Server ist seit 5 Minuten nichts passiert.
|
AFK_KICK_MESSAGE=§cAuf diesem Server ist seit 5 Minuten nichts passiert.
|
||||||
AFK_WARNING_MESSAGE=§cDieser Server wird bei weiterer Inaktivität in einer Minute gestoppt
|
AFK_WARNING_MESSAGE=§cDieser Server wird bei weiterer Inaktivität in einer Minute gestoppt
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public class BackupCommand extends SWCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "createWarp", description = "BACKUP_HELP_CREATE")
|
@Register(value = "create", description = "BACKUP_HELP_CREATE")
|
||||||
public void backupCreate(@Guard Player p) {
|
public void backupCreate(@Guard Player p) {
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
if (checkGlobalRegion(region, p)) {
|
if (checkGlobalRegion(region, p)) {
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.features.team;
|
package de.steamwar.bausystem.features.team;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.BauSystem;
|
||||||
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.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
@ -51,7 +52,7 @@ public class LockSchemCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void genericCommand(Player p, String owner, String schematicName, String... reason) {
|
public void genericCommand(Player p, String owner, String schematicName) {
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId());
|
SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId());
|
||||||
UserGroup userGroup = steamwarUser.getUserGroup();
|
UserGroup userGroup = steamwarUser.getUserGroup();
|
||||||
|
|
||||||
@ -64,33 +65,26 @@ public class LockSchemCommand extends SWCommand {
|
|||||||
|
|
||||||
SteamwarUser schemOwner = SteamwarUser.get(owner);
|
SteamwarUser schemOwner = SteamwarUser.get(owner);
|
||||||
if (schemOwner == null) {
|
if (schemOwner == null) {
|
||||||
//BauSystem.MESSAGE.send("LOCK_SCHEM_NO_USER", p);
|
BauSystem.MESSAGE.send("LOCK_SCHEM_NO_USER", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SchematicNode schematic = SchematicNode.getNodeFromPath(schemOwner, schematicName);
|
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_NO_SCHEM", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(schematic.isDir()) {
|
if(schematic.isDir()) {
|
||||||
//BauSystem.MESSAGE.send("LOCK_SCHEM_DIR", p);
|
BauSystem.MESSAGE.send("LOCK_SCHEM_DIR", p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder builder = new StringBuilder();
|
BauSystem.MESSAGE.send("LOCK_SCHEM_LOCKED", p, schematic.getName(), schemOwner.getUserName(), schematic.getSchemtype().name());
|
||||||
for (String s : reason) {
|
|
||||||
builder.append(s).append(" ");
|
|
||||||
}
|
|
||||||
|
|
||||||
//BauSystem.MESSAGE.send("LOCK_SCHEM_LOCKED", p, schematic.getName(), schemOwner.getUserName(), schematic.getSchemtype().name(), builder.toString());
|
|
||||||
schematic.setSchemtype(SchematicType.Normal);
|
schematic.setSchemtype(SchematicType.Normal);
|
||||||
//TODO: Tansfer command to bungee
|
|
||||||
//new CheckedSchematic(schematic.getId(), steamwarUser.getId(), Timestamp.from(Instant.now()), Timestamp.from(Instant.now()), builder.toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendHelp(Player player) {
|
private void sendHelp(Player player) {
|
||||||
//BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", player, "Lock Schem");
|
BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", player, "Lock Schem");
|
||||||
//BauSystem.MESSAGE.sendPrefixless("LOCK_SCHEM_HELP", player);
|
BauSystem.MESSAGE.sendPrefixless("LOCK_SCHEM_HELP", player);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -44,7 +44,7 @@ import java.util.ArrayList;
|
|||||||
public class WarpCommand extends SWCommand implements Disable, Enable {
|
public class WarpCommand extends SWCommand implements Disable, Enable {
|
||||||
|
|
||||||
private static final String[] FORBIDDEN_NAMES = new String[]{
|
private static final String[] FORBIDDEN_NAMES = new String[]{
|
||||||
"add", "createWarp", "delete", "list", "info", "gui"
|
"add", "create", "delete", "list", "info", "gui"
|
||||||
};
|
};
|
||||||
|
|
||||||
protected WarpCommand() {
|
protected WarpCommand() {
|
||||||
@ -62,7 +62,7 @@ public class WarpCommand extends SWCommand implements Disable, Enable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Register(value = "add", description = "WARP_HELP_ADD")
|
@Register(value = "add", description = "WARP_HELP_ADD")
|
||||||
@Register("createWarp")
|
@Register("create")
|
||||||
public void addWarp(@Guard Player player, String name) {
|
public void addWarp(@Guard Player player, String name) {
|
||||||
for (String forbiddenName : FORBIDDEN_NAMES) {
|
for (String forbiddenName : FORBIDDEN_NAMES) {
|
||||||
if (name.equalsIgnoreCase(forbiddenName)) {
|
if (name.equalsIgnoreCase(forbiddenName)) {
|
||||||
|
@ -29,7 +29,7 @@ public interface ScoreboardItem {
|
|||||||
* If return value contains {@code '?'} it will be replaced to the color
|
* If return value contains {@code '?'} it will be replaced to the color
|
||||||
* code of the current {@link Region}.
|
* code of the current {@link Region}.
|
||||||
*
|
*
|
||||||
* @param player the player to createWarp the scoreboard line for
|
* @param player the player to create the scoreboard line for
|
||||||
* @param region the region the player is in
|
* @param region the region the player is in
|
||||||
* @return the String to send, can be {@code null}
|
* @return the String to send, can be {@code null}
|
||||||
*/
|
*/
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren