SteamWar/SpigotCore
Archiviert
13
0

Fixing...
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Chaoscaot 2021-11-27 10:34:53 +01:00
Ursprung cf9f2a2375
Commit 82421d9544
2 geänderte Dateien mit 10 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -19,7 +19,7 @@
SCHEM_SELECTOR_TITLE={0} auswählen: {1}
SCHEM_SELECTOR_BACK=§eZurück
SCHEM_SELECTOR_DIR=Ordner
SCHEM_SELECTOR_DIR=§9Ordner
SCHEM_SELECTOR_RANK=§8Rang {0}
SCHEM_SELECTOR_OWN=§7Eigene Schematics
SCHEM_SELECTOR_PUB=§7Public Schematics

Datei anzeigen

@ -97,7 +97,7 @@ public class SchematicSelector {
list.add(renderItem(node));
}
SWListInv<SchematicNode> inv = new SWListInv<>(player, MessageFormat.format(injectable.createTitle(player), target.target.getName(player), filter.getName().isEmpty()?(parent == null?"/":parent.generateBreadcrumbs(user)):filter.getName()), false, list, (clickType, node) -> handleClick(node, parent));
SWListInv<SchematicNode> inv = new SWListInv<>(player, MessageFormat.format(injectable.createTitle(player), target.target.getName(player), filter.getName() == null?(parent == null?"/":parent.generateBreadcrumbs(user)):filter.getName()), false, list, (clickType, node) -> handleClick(node, parent));
if(publicMode == PublicMode.ALL) {
if(user.getId() == 0) {
inv.setItem(48, Material.BUCKET, Core.MESSAGE.parse("SCHEM_SELECTOR_OWN", player), clickType -> {
@ -152,13 +152,13 @@ public class SchematicSelector {
else
m = SWItem.getMaterial(node.getItem());
String name = "§" + (filter.getName().isEmpty()?"e":"7") + node.getName();
String name = "§" + (filter.getName() == null?"e":"7") + node.getName();
if(!filter.getName().isEmpty()) {
if(filter.getName() != null) {
name = name.replace(filter.getName(), "§e" + filter.getName() + "§7");
}
SWItem item = new SWItem(m, name, Collections.singletonList(node.isDir() ? ("§9" + Core.MESSAGE.parse("SCHEM_SELECTOR_DIR", player)) : "§7" + node.getSchemtype().name()), !node.isDir() && !node.getSchemtype().writeable(), click -> {
SWItem item = new SWItem(m, name, Collections.singletonList(node.isDir() ? (Core.MESSAGE.parse("SCHEM_SELECTOR_DIR", player)) : "§7" + node.getSchemtype().name()), !node.isDir() && !node.getSchemtype().writeable(), click -> {
});
if(!node.isDir() && node.getRank() > 0) {
item.setLore(Arrays.asList("§7" + node.getSchemtype().name(), Core.MESSAGE.parse("SCHEM_SELECTOR_RANK", player)));
@ -182,7 +182,7 @@ public class SchematicSelector {
SWInventory inv = new SWInventory(player, 9, Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_TITLE", player));
InvCallback nameCallback = clickType -> {
if(clickType.isRightClick()) {
filter.setName("");
filter.setName(null);
openFilter();
} else {
SWAnvilInv swAnvilInv = new SWAnvilInv(player, Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_ENTER_NAME", player));
@ -194,7 +194,7 @@ public class SchematicSelector {
swAnvilInv.open();
}
};
if(filter.getName().isEmpty()) {
if(filter.getName() == null) {
inv.setItem(0, Material.NAME_TAG, Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_NAME", player), nameCallback);
} else {
inv.setItem(0, Material.NAME_TAG, Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_NAME", player), Collections.singletonList(Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_NAME_SEARCH", player, filter.getName())), true, nameCallback);
@ -386,13 +386,13 @@ public class SchematicSelector {
private boolean filter;
private String name = "";
private String name = null;
private Integer owner = null;
private SchematicType type = null;
private Material item = null;
public void reset() {
name = "";
name = null;
owner = null;
type = null;
item = null;
@ -401,7 +401,7 @@ public class SchematicSelector {
public boolean matches(SchematicNode node) {
boolean matches = true;
if(!name.isEmpty() && !node.getName().contains(name)) {
if(name != null && !node.getName().contains(name)) {
matches = false;
}