Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.iMint.mintCMD;
- import java.util.logging.Logger;
- import org.bukkit.ChatColor;
- import org.bukkit.GameMode;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- public class mintCMD extends JavaPlugin {
- Logger log = Logger.getLogger("Minecraft");
- @Override
- public void onEnable(){
- log.info("mintCMD has been enabled in mint condition!");
- }
- @Override
- public void onDisable(){
- log.info("mintCMD has been disabled.");
- }
- public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args, Player player) {
- //COMMENTED ChatColors are colors that are not being used in this plugin yet.
- // ChatColor RED = ChatColor.RED;
- ChatColor WHITE = ChatColor.WHITE;
- ChatColor BLUE = ChatColor.BLUE;
- ChatColor GOLD = ChatColor.GOLD;
- ChatColor PURPLE = ChatColor.DARK_PURPLE;
- ChatColor PINK = ChatColor.LIGHT_PURPLE;
- // ChatColor YELLOW = ChatColor.YELLOW;
- // ChatColor AQUA = ChatColor.AQUA;
- // ChatColor DARKRED = ChatColor.DARK_RED;
- // ChatColor BLACK = ChatColor.BLACK;
- ChatColor GREEN = ChatColor.GREEN;
- // ChatColor DARKGREEN = ChatColor.DARK_GREEN;
- // ChatColor DARKBLUE = ChatColor.DARK_BLUE;
- // ,--, ,------------------------------, ,--,
- // | |====================================| -------- |====================================| |
- // | |====================================| `*~ --- |COMMANDS| --- ~*` |====================================| |
- // | |====================================| -------- |====================================| |
- // '--' '------------------------------' '--'
- // ,-, ,----------------, ,-,
- // | |===========| /mintCMD |===========| |
- // '-' '----------------' '-'
- if(cmd.getName().equalsIgnoreCase("mintCMD")) {
- sender.sendMessage(GOLD +",------------------------");
- // ,-----------------------
- sender.sendMessage(GOLD + "| " + GREEN + "mintCMD Command List:");
- // | mintCMD Command List:
- sender.sendMessage(GOLD + "| " + PINK + "/mintCMD " + WHITE + "- Brings up this Command List");
- // | /mintCMD - Brings up this Command List
- sender.sendMessage(GOLD + "| " + PINK + "/mode " + PURPLE + "[player] " + WHITE + "- Changes " + PURPLE + "(player)" + WHITE + "'s gamemode");
- // | /mode (player) - Changes (player)'s gamemode
- sender.sendMessage(GOLD + "| " + PINK + "/day " + WHITE + "- Sets the time to DAY");
- // | /day - Sets the time to DAY
- sender.sendMessage(GOLD + "| " + PINK + "/night " + WHITE + "- Sets the time to NIGHT");
- // | /night - Sets the time to NIGHT
- sender.sendMessage(GOLD + "| " + PINK + "/kill " + PURPLE + "(player) " + WHITE + "- Kills " + PURPLE + "(player)");
- // | /kill (player) - Kills (player)
- sender.sendMessage(GOLD + "| " + PINK + "/mob " + PURPLE + "(mob) " + BLUE + "[amount] " + WHITE + "- Spawns " + BLUE + "(amount) " + WHITE + "of " + PURPLE + "(mob)");
- // | /mob (mob) [amount] - Spawns [amount] of (mob)
- sender.sendMessage(GOLD + "| " + PINK + "/i " + PURPLE + "(item) " + BLUE + "(amount) " + PURPLE + "[player] " + WHITE + "- Gives " + BLUE + "(amount) " + WHITE + "of " + PURPLE + "(item) " + WHITE + "to " + PURPLE + "[player]");
- // | /i (item) (amount) [player] - Gives (amount) of (item) to [player]
- sender.sendMessage(GOLD + "| " + PINK + "/clearmobs " + BLUE + "(radius) " + WHITE + "- Kills all mobs within " + BLUE + "(radius) " + WHITE + "blocks");
- // | /clearmobs (radius) - Kills all mobs within (radius) blocks
- sender.sendMessage(GOLD + "| " + PINK + "/superkick" + WHITE + "- Kicks all players except you");
- // | /superkick - Kicks all players except you
- sender.sendMessage(GOLD + "| " + PINK + "/superban" + WHITE + "- Bans all players except you");
- // | /superban - Bans all players except you
- sender.sendMessage(GOLD + "| " + PINK + "/tp " + PURPLE + "[player] (destination-player) " + WHITE + "- Teleports " + PURPLE + "(player) " + WHITE + "to " + PURPLE + "(destination-player)");
- // | /tp [player] (destination-player) - Teleports [player] to (destination-player)
- sender.sendMessage(GOLD + "| " + PINK + "/tphere " + PURPLE + "(player) " + WHITE + "- Teleports " + PURPLE + "(player) " + WHITE + "to your location");
- // | /tphere (player) - Teleports (player) to your location
- return true;
- }
- // ,-, ,------------------------, ,-,
- // | |===========| /mode (player) |===========| |
- // '-' '------------------------' '-'
- else if(cmd.getName().equalsIgnoreCase("mode")) {
- if(args[0] == null) {
- if(player.getGameMode() == GameMode.SURVIVAL) {
- player.setGameMode(GameMode.CREATIVE);
- player.sendMessage(GOLD + "You are now in CREATIVE mode.");
- }
- else if(player.getGameMode() == GameMode.CREATIVE) {
- player.setGameMode(GameMode.SURVIVAL);
- player.sendMessage(GOLD + "You are now in SURVIVAL mode.");
- }
- }
- else {
- Player rec = getServer().getPlayer(args[0]);
- if(rec.getGameMode() == GameMode.SURVIVAL) {
- rec.setGameMode(GameMode.CREATIVE);
- rec.sendMessage(GOLD + "You are now in CREATIVE mode.");
- sender.sendMessage(GOLD + args[0] + " is now in CREATIVE mode.");
- }
- else if(rec.getGameMode() == GameMode.CREATIVE) {
- rec.setGameMode(GameMode.SURVIVAL);
- rec.sendMessage(GOLD + "You are now in SURVIVAL mode.");
- sender.sendMessage(GOLD + args[0] + " is now in SURVIVAL mode.");
- }
- }
- return true;
- }
- // ,-, ,------------, ,-,
- // | |===========| /day |===========| |
- // '-' '------------' '-'
- else if(cmd.getName().equalsIgnoreCase("day")) {
- player.getWorld().setTime(0);
- }
- return false;
- }
- }
Add Comment
Please, Sign In to add comment