Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.MrTimmeyyy.test;
- 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;
- publicclass test extends JavaPlugin {
- publicvoid onEnable() {
- Bukkit.getServer().getLogger().info("Test Plugin Enabled!");
- }
- publicvoid onDisable() {
- Bukkit.getServer().getLogger().info("Test Plugin Disabled!");
- }
- publicboolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
- if (!(senderinstanceof Player)) {
- sender.sendMessage(ChatColor.AQUA + "The console ran the test command! Good job!");
- returntrue;
- }
- Player player = (Player) sender;
- if (cmd.getName().equalsIgnoreCase("test")) {
- player.sendMessage(ChatColor.GOLD + "You ran the test command! Good job!");
- }
- returntrue;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement