Hey um i am making a simple town plugin and i need to know how to make it so when someone in game types /rcreate it acctually claims land thats the only thing i dont have: package ca.shaw.mrc1.RealmsMessage; import org.bukkit.command.Command; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; public class RealmsMessage extends JavaPlugin{ public static void main(String args[]){ } @Override public void onEnable(){ reloadConfig(); } public void onDisable(){ } @Override public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){ if(commandLabel.equalsIgnoreCase("rcreate")){ int senderY, senderX, senderZ; if(sender instanceof Player){ if(args.length == 1){ String name = args[0]; sender.sendMessage(ChatColor.GREEN + "You have created the town " + name); return true; } else { sender.sendMessage(ChatColor.RED + "/rcreate [TownName]"); return false; } } } else { sender.sendMessage(ChatColor.RED + "Only players can use this!"); return false; } return false; } Location senderLoc = ((Player)sender).getLocation(); senderX = senderLoc.getBlockX(); senderY = senderLoc.getBlockY(); senderZ = sennderLoc.getBlockY(); } }
"claiming" is a function of another plugins, i think you refer to towny here. you need to define your own "claiming", so you need for example get the chunk your block is in, save it to a file and then create listeners which do something with the chunk or denies other player doing something etc...