SteamWar/SpigotCore
Archiviert
13
0

Merge pull request 'Add Schematic Type Material' (#150) from schematic_type_material into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #150
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2021-12-27 17:09:00 +01:00
Commit 17f5c42530

Datei anzeigen

@ -292,7 +292,7 @@ public class SchematicSelector {
} else { } else {
List<SWListInv.SWListEntry<SchematicType>> types = new ArrayList<>(); List<SWListInv.SWListEntry<SchematicType>> types = new ArrayList<>();
SchematicType.values().forEach(schematicType -> { SchematicType.values().forEach(schematicType -> {
types.add(new SWListInv.SWListEntry<>(new SWItem(SWItem.getMaterial("STONE_BUTTON"), "§e" + schematicType.name(), Collections.emptyList(), schematicType.fightType(), n -> {}), schematicType)); types.add(new SWListInv.SWListEntry<>(new SWItem(schematicType.getMaterial(), "§e" + schematicType.name(), Collections.emptyList(), schematicType.fightType(), n -> {}), schematicType));
}); });
SWListInv<SchematicType> listInv = new SWListInv<>(player, Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_SEL_TYPE", player), types, (clickType1, schematicType) -> { SWListInv<SchematicType> listInv = new SWListInv<>(player, Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_SEL_TYPE", player), types, (clickType1, schematicType) -> {
filter.setType(schematicType); filter.setType(schematicType);
@ -303,9 +303,9 @@ public class SchematicSelector {
}; };
if(filter.getType() == null) { if(filter.getType() == null) {
inv.setItem(2, SWItem.getMaterial("STONE_BUTTON"), Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_TYPE", player), schemTypeCallback); inv.setItem(2, SchematicType.Normal.getMaterial(), Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_TYPE", player), schemTypeCallback);
} else { } else {
inv.setItem(2, SWItem.getMaterial("STONE_BUTTON"), Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_TYPE", player), Collections.singletonList(Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_TYPE_SEARCH", player, filter.getType().name())), true, schemTypeCallback); inv.setItem(2, filter.getType().getMaterial(), Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_TYPE", player), Collections.singletonList(Core.MESSAGE.parse("SCHEM_SELECTOR_FILTER_TYPE_SEARCH", player, filter.getType().name())), true, schemTypeCallback);
} }
} }