style: gui adjustements
This commit is contained in:
parent
de9904df52
commit
c6f037a24d
4 changed files with 24 additions and 15 deletions
|
@ -1,7 +1,5 @@
|
|||
package xyz.atnrch.nicko;
|
||||
|
||||
import com.comphenix.protocol.ProtocolLibrary;
|
||||
import com.comphenix.protocol.ProtocolManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
|
@ -39,7 +37,6 @@ public class NickoBukkit extends JavaPlugin {
|
|||
private Configuration configuration;
|
||||
private LocaleFileManager localeFileManager;
|
||||
private PlayerNameStore nameStore;
|
||||
private ProtocolManager protocolManager;
|
||||
|
||||
public NickoBukkit() { this.unitTesting = false; }
|
||||
|
||||
|
@ -83,7 +80,6 @@ public class NickoBukkit extends JavaPlugin {
|
|||
}
|
||||
|
||||
if (!unitTesting) {
|
||||
protocolManager = ProtocolLibrary.getProtocolManager();
|
||||
localeFileManager = new LocaleFileManager();
|
||||
if (configuration.isCustomLocale()) {
|
||||
if (localeFileManager.dumpFromLocale(Locale.ENGLISH)) {
|
||||
|
@ -98,10 +94,8 @@ public class NickoBukkit extends JavaPlugin {
|
|||
command.setExecutor(new NickoCommand());
|
||||
}
|
||||
|
||||
//new SimpleItem(new ItemBuilder(Material.BLACK_STAINED_GLASS_PANE).setDisplayName(" "))
|
||||
//new SimpleItem(new ItemBuilder(Material.ORANGE_STAINED_GLASS_PANE).setDisplayName(" "))
|
||||
Structure.addGlobalIngredient('#', new SimpleItem(new ItemBuilder(Material.AIR)));
|
||||
Structure.addGlobalIngredient('%', new SimpleItem(new ItemBuilder(Material.AIR)));
|
||||
Structure.addGlobalIngredient('%', new SimpleItem(new ItemBuilder(Material.BLACK_STAINED_GLASS_PANE).setDisplayName(" ")));
|
||||
Structure.addGlobalIngredient('U', new OptionUnavailable());
|
||||
Structure.addGlobalIngredient('E', new ExitGUI());
|
||||
|
||||
|
|
|
@ -17,7 +17,11 @@ public class CacheManagementGUI {
|
|||
public CacheManagementGUI(Player player) {
|
||||
final AdminGUI parent = new AdminGUI(player);
|
||||
this.gui = Gui.normal()
|
||||
.setStructure("B # S A D")
|
||||
.setStructure(
|
||||
"# # # # # # # # #",
|
||||
"# # # S A D # # #",
|
||||
"B # # # # # # # #"
|
||||
)
|
||||
.addIngredient('B', new GoBack(parent.getGUI(), parent.getTitle()))
|
||||
.addIngredient('S', new CacheOverview())
|
||||
.addIngredient('A', new InvalidateCompleteCache())
|
||||
|
|
|
@ -40,12 +40,12 @@ public class CacheDetailedGUI {
|
|||
final CacheManagementGUI parent = new CacheManagementGUI(player);
|
||||
gui = ScrollGui.items(guiItemBuilder -> {
|
||||
guiItemBuilder.setStructure(
|
||||
"# # # # # # # # #",
|
||||
"# x x x x x x U #",
|
||||
"# x x x x x x # #",
|
||||
"# x x x x x x # #",
|
||||
"# x x x x x x D #",
|
||||
"B # # # # # # # #");
|
||||
"x x x x x x x x U",
|
||||
"x x x x x x x x #",
|
||||
"x x x x x x x x #",
|
||||
"x x x x x x x x #",
|
||||
"x x x x x x x x D",
|
||||
"B % % % % % % % %");
|
||||
guiItemBuilder.addIngredient('x', Markers.CONTENT_LIST_SLOT_HORIZONTAL);
|
||||
guiItemBuilder.addIngredient('U', new ScrollUp());
|
||||
guiItemBuilder.addIngredient('D', new ScrollDown());
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package xyz.atnrch.nicko.gui.items.admin.cache;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||
import xyz.xenondevs.invui.item.builder.SkullBuilder;
|
||||
import xyz.xenondevs.invui.item.impl.AsyncItem;
|
||||
|
@ -18,4 +22,11 @@ public class EntryPlaceholder extends AsyncItem {
|
|||
return skull;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleClick(@NotNull ClickType click, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
||||
if (click.isLeftClick() || click.isRightClick()) {
|
||||
event.getView().close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue