Jump to content

Time6628

Members
  • Posts

    5
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Time6628's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I saw that but I'm not quite sure about how to go at setting the position.
  2. I'm attempting to make a mod that set's a player's position if they are offline with a command. Here's what I have so far: SaveHandlerMP sh; private List<String> aliases; @Override public String getCommandName() { return "otphere"; } @Override public String getCommandUsage(ICommandSender p_71518_1_) { return "/otphere <player>"; } @Override public List getCommandAliases() { aliases.add("otph"); return aliases; } @Override public void processCommand(ICommandSender sender, String[] args) { if (canCommandSenderUseCommand(sender)) { try { sh = (SaveHandlerMP) sender.getEntityWorld().getSaveHandler(); File playerDir = new File(sh.getWorldDirectory(), "playerdata"); UUID u = UUID.nameUUIDFromBytes(("OfflinePlayer:" + args[0]).getBytes(Charsets.UTF_); File pd = new File(playerDir, u + ".dat"); NBTTagCompound nbt; nbt = CompressedStreamTools.read(pd); //not sure what the values of the postitions are D: nbt.setDouble("posX", sender.getPlayerCoordinates().posX);; } catch (Exception ex) { ex.printStackTrace(); } } }
  3. How would I use it if it wasn't dead though? xP
  4. How would I go about using the @BukkitPluginRef interface?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.