Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.legit.QCombatPatch;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- public class Patch extends JavaPlugin {
- public void onEnable() {
- Bukkit.getServer().getLogger().info("QCombatLogPatcher Enabled");
- }
- public void onDisable() {
- Bukkit.getServer().getLogger().info("QCombatLogPatcher Disabled");
- }
- public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
- if (!(sender instanceof Player)) {
- sender.sendMessage(ChatColor.DARK_RED + "Silly quick, console doesnt need to quit in combat!");
- return true;
- }
- Player player = (Player) sender;
- if (cmd.getName().equalsIgnoreCase("q")) {
- player.sendMessage(ChatColor.AQUA + "Nice try but /q has been patched by " + ChatColor.GOLD + "Legit_Gaming1");
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement