Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.DylanPerez.plugin;
- import org.bukkit.ChatColor;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- public class Reload implements CommandExecutor {
- @Override
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
- Player p = (Player) sender;
- if(sender instanceof Player) {
- if(cmd.getName().equalsIgnoreCase("r")) {
- if(p.hasPermission("hhf.reload")) {
- p.performCommand("reload");
- p.sendMessage(ChatColor.DARK_RED + "" + ChatColor.BOLD + "HexigonH" + ChatColor.RED + "" + ChatColor.BOLD + "F" + ChatColor.DARK_RED + ">> " + ChatColor.RED + "The server has " + ChatColor.DARK_RED + "" + ChatColor.BOLD + "Reloaded!");
- } else {
- if(!p.hasPermission("hhf.reload")) {
- p.sendMessage(ChatColor.DARK_RED + "" + ChatColor.BOLD + "HexigonH" + ChatColor.RED + "" + ChatColor.BOLD + "F" + ChatColor.DARK_RED + ">> " + ChatColor.RED + "I'm sorry, but I believe this command is not accessable to you. Please contact the server admin to check if this is an error!");
- } else {
- if(!(sender instanceof Player)) {
- System.out.println("Worked!");
- }
- }
- }
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement