Fixing PR(TM) Stuff
Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
4f0bbecc36
Commit
fed00014bc
@ -21,13 +21,8 @@ package de.steamwar.schematicsystem.commands;
|
||||
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.command.TypeMapper;
|
||||
import de.steamwar.comms.packets.PrepareSchemPacket;
|
||||
import de.steamwar.inventory.SWAnvilInv;
|
||||
import de.steamwar.inventory.SWInventory;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import de.steamwar.inventory.SchematicSelector;
|
||||
import de.steamwar.schematicsystem.AutoCheckResult;
|
||||
import de.steamwar.schematicsystem.CheckSchemType;
|
||||
import de.steamwar.schematicsystem.SchematicSystem;
|
||||
import de.steamwar.sql.*;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
@ -254,7 +249,6 @@ public class SchematicCommand extends SWCommand {
|
||||
}
|
||||
|
||||
@Register("delmember")
|
||||
@Register("remmember")
|
||||
public void delMember(Player player, SchematicNode node, @Mapper("memberMapper") NodeMember member) {
|
||||
SteamwarUser user = getUser(player);
|
||||
|
||||
@ -274,22 +268,22 @@ public class SchematicCommand extends SWCommand {
|
||||
}
|
||||
|
||||
member.delete();
|
||||
player.sendMessage(SchematicSystem.PREFIX + "Der Spieler §e" + target.getUserName() + " §7hat nun keinen zugriff mehr auf die Schematic §e" + node.generateBreadcrumbs(user));
|
||||
player.sendMessage(SchematicSystem.PREFIX + "Der Spieler §e" + target.getUserName() + " §7hat nun keinen Zugriff mehr auf die Schematic §e" + node.generateBreadcrumbs(user));
|
||||
|
||||
Player t = Bukkit.getPlayer(target.getUUID());
|
||||
if (t != null) {
|
||||
t.sendMessage(SchematicSystem.PREFIX + "Du hast nun keinen zugriff mehr auf die Schematic §e" + node.getName() + " §7von §e" + player.getName());
|
||||
t.sendMessage(SchematicSystem.PREFIX + "Du hast nun keinen Zugriff mehr auf die Schematic §e" + node.getName() + " §7von §e" + player.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Register("search")
|
||||
public void schemSearch(Player player, String quarry) {
|
||||
public void schemSearch(Player player, String query) {
|
||||
SteamwarUser user = getUser(player);
|
||||
List<SchematicNode> nodes = SchematicNode.filterSchems(user.getId(), node -> node.getName().contains(quarry));
|
||||
List<SchematicNode> nodes = SchematicNode.filterSchems(user.getId(), node -> node.getName().contains(query));
|
||||
player.sendMessage("§eSchematics §8(§e" + nodes.size() + "§8)");
|
||||
nodes.forEach(node -> {
|
||||
String br = node.generateBreadcrumbs(user);
|
||||
TextComponent schematics = new TextComponent("§7" + br.replace(quarry, "§e§l" + quarry + "§7"));
|
||||
TextComponent schematics = new TextComponent("§7" + br.replace(query, "§e§l" + query + "§7"));
|
||||
schematics.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§eSchematic verwalten").create()));
|
||||
schematics.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem info " + br));
|
||||
|
||||
@ -422,7 +416,7 @@ public class SchematicCommand extends SWCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@Register("remteam")
|
||||
@Register("delteam")
|
||||
public void remTeam(Player player, SchematicNode node) {
|
||||
SteamwarUser user = getUser(player);
|
||||
if (node.getOwner() != user.getId()) {
|
||||
@ -453,7 +447,6 @@ public class SchematicCommand extends SWCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@Register("remallmember")
|
||||
@Register("clearmember")
|
||||
public void clearMember(Player player, SchematicNode node) {
|
||||
SteamwarUser user = getUser(player);
|
||||
|
@ -331,7 +331,11 @@ public class SchematicCommandUtils {
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.getType().equals(type.toDB())) {
|
||||
if(!type.isAssignable()) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cZu diesem Typen können keine Schematics geändert werden.");
|
||||
}
|
||||
|
||||
if (node.getSchemtype().equals(type)) {
|
||||
player.sendMessage(SchematicSystem.PREFIX + "§cDie Schematic hat schon diesen Typen");
|
||||
return;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren