mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 09:08:03 +01:00
Added LanguagePanel for testing purposes
This commit is contained in:
parent
dd40faa3b6
commit
0651d7c941
@ -29,6 +29,7 @@ import us.tastybento.bskyblock.api.events.team.TeamEvent.TeamReason;
|
|||||||
import us.tastybento.bskyblock.config.Settings;
|
import us.tastybento.bskyblock.config.Settings;
|
||||||
import us.tastybento.bskyblock.database.managers.island.NewIsland;
|
import us.tastybento.bskyblock.database.managers.island.NewIsland;
|
||||||
import us.tastybento.bskyblock.database.objects.Island;
|
import us.tastybento.bskyblock.database.objects.Island;
|
||||||
|
import us.tastybento.bskyblock.panels.LanguagePanel;
|
||||||
import us.tastybento.bskyblock.schematics.Schematic;
|
import us.tastybento.bskyblock.schematics.Schematic;
|
||||||
import us.tastybento.bskyblock.util.Util;
|
import us.tastybento.bskyblock.util.Util;
|
||||||
import us.tastybento.bskyblock.util.VaultHelper;
|
import us.tastybento.bskyblock.util.VaultHelper;
|
||||||
@ -1490,12 +1491,12 @@ public class IslandCommand extends AbstractCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CanUseResp canUse(CommandSender sender) {
|
public CanUseResp canUse(CommandSender sender) {
|
||||||
return new CanUseResp(false);
|
return new CanUseResp(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
|
LanguagePanel.openPanel((Player) sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
package us.tastybento.bskyblock.panels;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import us.tastybento.bskyblock.BSkyBlock;
|
||||||
|
import us.tastybento.bskyblock.api.panels.ClickType;
|
||||||
|
import us.tastybento.bskyblock.api.panels.Panel;
|
||||||
|
import us.tastybento.bskyblock.api.panels.PanelItem;
|
||||||
|
import us.tastybento.bskyblock.api.panels.builders.PanelBuilder;
|
||||||
|
import us.tastybento.bskyblock.api.panels.builders.PanelItemBuilder;
|
||||||
|
|
||||||
|
public class LanguagePanel {
|
||||||
|
|
||||||
|
public static void openPanel(Player player) {
|
||||||
|
PanelBuilder panelBuilder = new PanelBuilder()
|
||||||
|
.setName(BSkyBlock.getPlugin().getLocale(player).get("panel.languages"));
|
||||||
|
|
||||||
|
PanelItem test = new PanelItemBuilder()
|
||||||
|
.setIcon(new ItemStack(Material.BEDROCK))
|
||||||
|
.setName(BSkyBlock.getPlugin().getLocale(player).get("panel.languages.test.name"))
|
||||||
|
.setDescription(BSkyBlock.getPlugin().getLocale(player).get("panel.languages.test.description"))
|
||||||
|
.setGlow(true)
|
||||||
|
.setClickHandler(new PanelItem.ClickHandler() {
|
||||||
|
@Override
|
||||||
|
public boolean onClick(Player player, ClickType click) {
|
||||||
|
player.sendMessage("Hi!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.build();
|
||||||
|
|
||||||
|
PanelItem something = new PanelItemBuilder()
|
||||||
|
.setIcon(new ItemStack(Material.ANVIL))
|
||||||
|
.setName(BSkyBlock.getPlugin().getLocale(player).get("panel.languages.something.name"))
|
||||||
|
.setDescription(BSkyBlock.getPlugin().getLocale(player).get("panel.languages.something.description"))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
panelBuilder.addItem(1, test);
|
||||||
|
panelBuilder.addItem(3, something);
|
||||||
|
|
||||||
|
Panel panel = panelBuilder.build();
|
||||||
|
|
||||||
|
panel.open(player);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user