Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.Zayn.zFirst;
- 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 First extends JavaPlugin {
- public void onEnable() {
- Bukkit.getServer().getLogger().info(ChatColor.RED + "FirstPlugin enabled!");
- }
- public void onDisable() {
- Bukkit.getServer().getLogger().info(ChatColor.RED + "FirstPlugin disabled!");
- }
- public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
- if (!(sender instanceof Player)) {
- sender.sendMessage(ChatColor.RED + ("The console cannot use the command!"));
- return true;
- }
- Player player = (Player) sender;
- if(player.isBlocking());
- player.setHealth(2.0);
- player.sendMessage("You have been healed!");
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement