Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ashwin.gui;
- import org.bukkit.Bukkit;
- import org.bukkit.Sound;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.event.Listener;
- import org.bukkit.plugin.java.JavaPlugin;
- public class GuiMain extends JavaPlugin implements Listener{
- private GuiInv gui;
- public void onEnable(){
- gui = new GuiInv(this);
- getLogger().info("enabled");
- Bukkit.getServer().getPluginManager().registerEvents(this, this);
- }
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
- String bold = "§l";
- String obf = "§k";
- String strike = "§m";
- String italic = "§o";
- String r = "§r";
- String dred = "§4";
- String lred = "§c";
- String pink = "§d";
- String purple = "§5";
- String lgreen = "§a";
- String dgreen = "§2";
- String black = "§0";
- String turq = "§3";
- String gold = "§6";
- String lgray = "§7";
- String white = "§f";
- String dgray = "§8";
- String lblue = "§9";
- String dblue = "§1";
- String yellow = "§e";
- String aqua = "§b";
- String sp = pink + "PumpMC" + lred +" | " + yellow;
- if (cmd.getName().equalsIgnoreCase("opt") && sender instanceof Player) {
- Player p = (Player) sender;
- p.sendMessage(sp + "Opening Gui...");
- p.playSound(p.getLocation(), Sound.ORB_PICKUP, 100, 0);
- gui.show(p);
- gui.show(p);
- return true;
- }
- else if (cmd.getName().equalsIgnoreCase("o") && sender instanceof Player) {
- Player p = (Player) sender;
- p.sendMessage(sp + "Opening Gui...");
- p.playSound(p.getLocation(), Sound.ORB_PICKUP, 100, 0);
- gui.show(p);
- gui.show(p);
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement