Schemnodes Schematic System #93
@ -131,7 +131,7 @@ public class GUI {
|
||||
SteamwarUser owneruser = SteamwarUser.get(node.getOwner());
|
||||
SWItem skull = SWItem.getPlayerSkull(owneruser.getUserName());
|
||||
skull.setName("§7von §e" + owneruser.getUserName());
|
||||
inv.setItem(6, skull);
|
||||
inv.setItem(6, skull.getItemStack(), clickType -> {});
|
||||
|
||||
inv.setItem(8, SWItem.getDye(1), (byte) 1, "§cZugriff entfernen", click -> {
|
||||
player.closeInventory();
|
||||
|
@ -341,6 +341,11 @@ public class SchematicCommand extends SWCommand {
|
||||
SchematicCommandUtils.changeType(player, node, type, extend);
|
||||
}
|
||||
|
||||
@Register("move")
|
||||
public void moveToNull(Player player, SchematicNode node) {
|
||||
move(player, node, "/");
|
||||
}
|
||||
|
||||
@Register("move")
|
||||
public void move(Player player, SchematicNode node, @Mapper("dirStringMapper") String name) {
|
||||
SteamwarUser user = getUser(player);
|
||||
@ -350,7 +355,7 @@ public class SchematicCommand extends SWCommand {
|
||||
}
|
||||
|
||||
if (name.equals("/")) {
|
||||
node.setParent(0);
|
||||
node.setParent(null);
|
||||
} else {
|
||||
if (name.startsWith("/")) name = name.substring(1);
|
||||
if (name.endsWith("/")) name = name.substring(0, name.length() - 1);
|
||||
@ -612,6 +617,21 @@ public class SchematicCommand extends SWCommand {
|
||||
};
|
||||
}
|
||||
|
||||
@ClassMapper(value = SchematicNode.class, local = true)
|
||||
public TypeMapper<SchematicNode> nodeTypeMapper() {
|
||||
return new TypeMapper<SchematicNode>() {
|
||||
@Override
|
||||
public List<String> tabCompletes(CommandSender commandSender, String[] strings, String s) {
|
||||
return SchematicNode.getNodeTabcomplete(getUser((Player) commandSender), s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchematicNode map(CommandSender commandSender, String[] previousArguments, String s) {
|
||||
return SchematicNode.getNodeFromPath(getUser((Player) commandSender), s);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
enum Extend {
|
||||
AUSFAHREN,
|
||||
NORMAL
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren