Essentials problem with /back with another plugin

Discussion in 'Bukkit Help' started by ti07shadow, Feb 14, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    ti07shadow

    To note ive tried the essentials IRC they didnt even try to help unfortunately. but maybe someone can shed a little light here please.


    Alright... I have a plugin that you can lease a warp basically. Well if you warp to this location and say teleport somewhere else, the /back will not bring you back to the warped location but back to a previous teleport location. As if it ignores the teleportation to the warp itself.


    this is the code used to get the player the p. part
    Code:
       Player p = (Player)sender;
       String playerName = p.getName();
    
    This is the string command in the code used to teleport
    Code:
    String s = args[0];
    File WarpFolder = new File(getDataFolder(), "");
    WarpFolder.mkdir();
    File Warp = new File(WarpFolder, "warps.yml");
    FileConfiguration warpConf = YamlConfiguration.loadConfiguration(Warp);
    if (warpConf.getString("Warps." + args[0]) != null)
     {
        int x = Integer.parseInt(warpConf.getString("Warps." + args[0] + ".X"));
        int y = Integer.parseInt(warpConf.getString("Warps." + args[0] + ".Y"));
        int z = Integer.parseInt(warpConf.getString("Warps." + args[0] + ".Z"));
    
       Location warp= new Location(Bukkit.getServer().getWorld(warpConf.getString("Warps." + args[0] + ".World")), x, y, z);
        
      warp.setPitch(warpConf.getInt("Warps." + args[0] + ".Pitch"));
      warp.setYaw(warpConf.getInt("Warps." + args[0] + ".Yaw"));
      p.teleport(warp);
      p.sendMessage(ChatColor.WHITE + "-> Welcome to " + ChatColor.AQUA + "" + args[0] + ChatColor.WHITE + "!");
    }
    else
    {
         p.sendMessage(ChatColor.RED + "That Warp Doesnt Exist! ");
    }
    
     
  2. Offline

    SnowHiro

    When using the /back command you teleport to the last place you warped from or was teleported from.
     
  3. Offline

    ti07shadow

    Alright let me make sure im clear on this.

    okay lets say this

    Im stading on a redstone block. I teleport to "-655 5 -119" okay I /back
    now Im on the redstone block
    I use the plugin to warp to a test location (on a diamond block)
    Well I /back and end up at "-655 5 -119" Not the redstone block. If I /back I end up at the diamond block where the warp is..
     
  4. Offline

    SnowHiro

    What is the plugin?
     
  5. Offline

    ti07shadow

    its custom made. I'm trying to figure out why. Now I teleport to location B using TP from locartion A, then warp to location c when i /back I end up at location A, ut if I warp from location A to C then /back goes to location C and is stuck there. I mean if need be ill post of the code for it to be checked and find the issue. I want it to work with /back

    edit: solved it. essentials config thing XD
     
    Last edited: Feb 14, 2015
  6. Offline

    SnowHiro

    @ti07shadow
    If its custom made you may have to contact the creator. As he/she would have the best understanding.
     
  7. Offline

    ti07shadow

    EDIT:
    omg i feel like a nub. Essentials had a config option to set to true for tracking teleports from other plugins, it was on false. Now it works >.<
     
    Last edited: Feb 14, 2015
Thread Status:
Not open for further replies.

Share This Page