Add SchematicSelector #132
@ -22,6 +22,7 @@ package de.steamwar.sql;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.core.WorldEditWrapper;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
@ -321,7 +322,7 @@ public class SchematicNode {
|
||||
if (currentNode == null) {
|
||||
node = SchematicNode.getSchematicsAccessibleByUser(user.getId(), 0).stream().filter(node1 -> node1.getName().equals(layers[finalI])).findAny();
|
||||
} else {
|
||||
node = Optional.of(SchematicNode.getSchematicNode(layers[i], currentNode.getId()));
|
||||
node = Optional.ofNullable(SchematicNode.getSchematicNode(layers[i], currentNode.getId()));
|
||||
}
|
||||
if (!node.isPresent()) {
|
||||
return null;
|
||||
@ -401,6 +402,9 @@ public class SchematicNode {
|
||||
}
|
||||
|
||||
public String getItem() {
|
||||
if (item.isEmpty()) {
|
||||
return isDir ? "CHEST" : "CAULDRON_ITEM";
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
|
@ -144,11 +144,7 @@ public class SchematicSelector {
|
||||
}
|
||||
|
||||
private SWListInv.SWListEntry<SchematicNode> renderItem(SchematicNode node) {
|
||||
Material m;
|
||||
if (node.getItem().isEmpty())
|
||||
m = node.isDir()?SWItem.getMaterial("CHEST"):SWItem.getMaterial("CAULDRON_ITEM");
|
||||
else
|
||||
m = SWItem.getMaterial(node.getItem());
|
||||
Material m = SWItem.getMaterial(node.getItem());
|
||||
|
||||
String name = Core.MESSAGE.parse(filter.name == null?"SCHEM_SELECTOR_ITEM_NAME":"SCHEM_SELECTOR_ITEM_NAME_FILTER", player, node.getName());
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren