Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package titanium.TitanDevanium.plugin.commands;
- 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 srpswCommand implements CommandExecutor {
- public static String password = "";
- String Prefix = ChatColor.GOLD + "[" + ChatColor.GREEN + "RankPlugin" + ChatColor.GOLD + "] ";
- String Enabled = Prefix + ChatColor.GOLD + "StaffChat has been " + ChatColor.GREEN + "Enabled";
- String Disabled = Prefix + ChatColor.GOLD + "StaffChat has been " + ChatColor.RED + "Disabled";
- String NoPerm = Prefix + ChatColor.RED + "You don't have permission to execute this command!";
- @Override
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
- Player p = (Player) sender;
- if(!(p.hasPermission("sr"))){
- sender.sendMessage(ChatColor.RED + "You do not have permission to execute this command!");
- return true;
- }
- if(setrankCommand.isInGame == false) {
- sender.sendMessage(Prefix + ChatColor.RED + "You must be in-game to use this command!");
- return true;
- } else {
- sender.sendMessage(Prefix + ChatColor.WHITE + "You've set the password to: " + ChatColor.GREEN + args);
- password = args[0];
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement