Code: name: MyFirstPlugin main: me.nanerz_123 version: 1.5.2 commands: pinfo: description: Tells info about you. usage: /<pinfo> Code:java package me.nanerz_123; import org.bukkit.Bukkit;import org.bukkit.Location;import org.bukkit.command.Command;import org.bukkit.command.CommandSender;import org.bukkit.entity.HumanEntity;import org.bukkit.entity.Player;import org.bukkit.inventory.PlayerInventory;import org.bukkit.plugin.java.JavaPlugin; /* This gives the player a whole list of info! */ public class MyFirstPlugin extends JavaPlugin { public void onEnable() { } public void onDisable() { } public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { // Uses equalsIgnoreCase() over equals() to accept "pinfo" or "pInFo" if (cmd.getName().equalsIgnoreCase("pinfo")) { // Make sure that the player specified exactly one argument (the// name of the player to pinfo). if (args.length != 1) { // When onCommand() returns false, the help message associated// with that command is displayed. return false; } // Make sure the sender is a player. if (!(sender instanceof Player)) { sender.sendMessage("Only players can see other players info ingame"); return true; } // Get the player who you should get the info about. Remember that// indecies start with 0, not 1. Player target = Bukkit.getServer().getPlayer(args[0]); // Make sure the player is online. if (target == null) { sender.sendMessage(args[0] + " is not currently online."); return true; } // The thing that you make happen, in this case send the sender the// player's info. Use target for the argument for example// target.setFireTicks(1000); Location playerspawnloc = ((Player) sender).getBedSpawnLocation(); Location playersloc = ((Player) sender).getLocation(); PlayerInventory playersinvent = ((HumanEntity) sender).getInventory(); sender.sendMessage("Your spawn X Coordinates : " + playerspawnloc.getX()); sender.sendMessage("Your spawn Y Coordinates : " + playerspawnloc.getY()); sender.sendMessage("Your spawn Z Coordinates : " + playerspawnloc.getZ()); sender.sendMessage("Your x cord is : " + playersloc.getX()); sender.sendMessage("Your y cord is : " + playersloc.getY()); sender.sendMessage("Your z cord is : " + playersloc.getZ()); sender.sendMessage("Your world is : " + playersloc.getWorld()); sender.sendMessage("Your direction is : "+ playersloc.getDirection()); sender.sendMessage("The chunk you are in is : " + playersloc.getChunk()); sender.sendMessage("Your Pitch is : " + playersloc.getPitch()); sender.sendMessage("You have this helment : " + playersinvent.getHelmet()); sender.sendMessage("You have this chestplate : " + playersinvent.getChestplate()); sender.sendMessage("You have these leggings : " + playersinvent.getLeggings()); sender.sendMessage("You have these boots : " + playersinvent.getBoots()); return true; } return false; } } (1.5.2 server and craftbukkit) Can someone please help me, I made this plugin, however it wont work, nor show up if I do /plugins. Thanks in advance!
Locked. Unofficial builds are not supported here (http://forums.bukkit.org/threads/server-ram-needed.240838/#post-2308262)