spenk

Untitled

Apr 15th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.87 KB | None | 0 0
  1. package com.topicarp.spenk.customgui;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandSender;
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7.  
  8. public class CustomGui extends JavaPlugin {
  9.     public String name = "CustomGui";
  10.     public String author = "Spenk";
  11.     public String version = "1.0";
  12.  
  13.     public void onEnable() {
  14.         getServer().getMessenger().registerOutgoingPluginChannel(this, "CustomGui");
  15.     }
  16.  
  17.     public void onDisable() {
  18.     }
  19.  
  20.     public boolean onCommand(CommandSender sender, Command cmd,
  21.             String commandLabel, String[] args) {
  22.         if (commandLabel.equalsIgnoreCase("gui")) {
  23.             if ((sender instanceof Player)) {
  24.                 Player player = (Player) sender;
  25.                 player.sendPluginMessage(this, "CustomGui", "OpenGui".getBytes());
  26.                 player.sendMessage("packet send");
  27.                 return true;
  28.             }
  29.         }
  30.         return false;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment