mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-23 10:45:54 +01:00
Starting rewriting menus
This commit is contained in:
parent
246ab7dd0c
commit
03b5c5194e
54
src/main/java/com/songoda/skyblock/gui/GuiBans.java
Normal file
54
src/main/java/com/songoda/skyblock/gui/GuiBans.java
Normal file
@ -0,0 +1,54 @@
|
||||
package com.songoda.skyblock.gui;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.CompatibleSound;
|
||||
import com.songoda.core.gui.Gui;
|
||||
import com.songoda.core.gui.GuiUtils;
|
||||
import com.songoda.core.utils.TextUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.ban.BanManager;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class GuiBans extends Gui {
|
||||
private final SkyBlock plugin;
|
||||
private final BanManager banManager;
|
||||
private final Island island;
|
||||
private final FileConfiguration languageLoad;
|
||||
private final boolean admin;
|
||||
|
||||
public GuiBans(SkyBlock plugin, Island island, Gui returnGui, boolean admin) {
|
||||
super(returnGui);
|
||||
this.plugin = plugin;;
|
||||
this.banManager = plugin.getBanManager();
|
||||
this.island = island;
|
||||
this.admin = admin;
|
||||
this.languageLoad = plugin.getFileManager()
|
||||
.getConfig(new File(plugin.getDataFolder(), "language.yml")).getFileConfiguration();
|
||||
setDefaultItem(CompatibleMaterial.BLACK_STAINED_GLASS_PANE.getItem());
|
||||
setTitle(TextUtils.formatText("Bans"));
|
||||
paint();
|
||||
}
|
||||
|
||||
public void paint() {
|
||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(languageLoad.getString("Menu.Bank.Item.Exit.Displayname"))), (event) -> {
|
||||
CompatibleSound.BLOCK_CHEST_CLOSE.play(event.player);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
||||
TextUtils.formatText(languageLoad.getString("Menu.Bank.Item.Exit.Displayname"))), (event) -> {
|
||||
CompatibleSound.BLOCK_CHEST_CLOSE.play(event.player);
|
||||
event.player.closeInventory();
|
||||
});
|
||||
|
||||
for(int i=9; i<18; i++){
|
||||
setItem(i, CompatibleMaterial.BLACK_STAINED_GLASS_PANE.getItem());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user