SHOW:
|
|
- or go back to the newest paste.
1 | package me.Zixy.zixytest; | |
2 | ||
3 | import org.bukkit.Bukkit; | |
4 | import org.bukkit.ChatColor; | |
5 | import org.bukkit.command.Command; | |
6 | import org.bukkit.command.CommandSender; | |
7 | import org.bukkit.entity.Player; | |
8 | import org.bukkit.plugin.java.JavaPlugin; | |
9 | ||
10 | public class Zixytest extends JavaPlugin { | |
11 | ||
12 | public void onEnable() { | |
13 | Bukkit.getServer().getLogger().info("Daily Plugin Enabled!"); | |
14 | } | |
15 | ||
16 | public void onDisable() { | |
17 | Bukkit.getServer().getLogger().info("Daily Plugin Disabled!"); | |
18 | } | |
19 | ||
20 | public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { | |
21 | - | |
21 | + | if (sender instanceof Player) { |
22 | - | if (!(sender instanceof Player)) { |
22 | + | if (cmd.getName().equalsIgnoreCase("Daily")) { |
23 | - | sender.sendMessage(ChatColor.RED + "The console ran the Daily command!"); |
23 | + | |
24 | - | return true; |
24 | + | return true; |
25 | - | } |
25 | + | } else { |
26 | - | |
26 | + | sender.sendMessage(ChatColor.RED + "The console ran the Daily command!"); |
27 | - | Player player = (Player) sender; |
27 | + | return true; |
28 | - | |
28 | + | |
29 | - | if (cmd.getName().equalsIgnoreCase("Daily")) { |
29 | + | return false; |
30 | } | |
31 | } |