Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
117277c926
Commit
e73ae9210c
@ -22,6 +22,7 @@ package de.steamwar.sql;
|
|||||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.Core;
|
||||||
import de.steamwar.core.WorldEditWrapper;
|
import de.steamwar.core.WorldEditWrapper;
|
||||||
|
import de.steamwar.inventory.SWItem;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
@ -321,7 +322,7 @@ public class SchematicNode {
|
|||||||
if (currentNode == null) {
|
if (currentNode == null) {
|
||||||
node = SchematicNode.getSchematicsAccessibleByUser(user.getId(), 0).stream().filter(node1 -> node1.getName().equals(layers[finalI])).findAny();
|
node = SchematicNode.getSchematicsAccessibleByUser(user.getId(), 0).stream().filter(node1 -> node1.getName().equals(layers[finalI])).findAny();
|
||||||
} else {
|
} else {
|
||||||
node = Optional.of(SchematicNode.getSchematicNode(layers[i], currentNode.getId()));
|
node = Optional.ofNullable(SchematicNode.getSchematicNode(layers[i], currentNode.getId()));
|
||||||
}
|
}
|
||||||
if (!node.isPresent()) {
|
if (!node.isPresent()) {
|
||||||
return null;
|
return null;
|
||||||
@ -401,6 +402,9 @@ public class SchematicNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getItem() {
|
public String getItem() {
|
||||||
|
if (item.isEmpty()) {
|
||||||
|
return isDir ? "CHEST" : "CAULDRON_ITEM";
|
||||||
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,11 +144,7 @@ public class SchematicSelector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private SWListInv.SWListEntry<SchematicNode> renderItem(SchematicNode node) {
|
private SWListInv.SWListEntry<SchematicNode> renderItem(SchematicNode node) {
|
||||||
Material m;
|
Material m = SWItem.getMaterial(node.getItem());
|
||||||
if (node.getItem().isEmpty())
|
|
||||||
m = node.isDir()?SWItem.getMaterial("CHEST"):SWItem.getMaterial("CAULDRON_ITEM");
|
|
||||||
else
|
|
||||||
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());
|
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