Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.topicarp.spenk.customgui;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- public class CustomGui extends JavaPlugin {
- public String name = "CustomGui";
- public String author = "Spenk";
- public String version = "1.0";
- public void onEnable() {
- getServer().getMessenger().registerOutgoingPluginChannel(this, "CustomGui");
- }
- public void onDisable() {
- }
- public boolean onCommand(CommandSender sender, Command cmd,
- String commandLabel, String[] args) {
- if (commandLabel.equalsIgnoreCase("gui")) {
- if ((sender instanceof Player)) {
- Player player = (Player) sender;
- player.sendPluginMessage(this, "CustomGui", "OpenGui".getBytes());
- player.sendMessage("packet send");
- return true;
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment