Player Warps

Discussion in 'Archived: Plugin Requests' started by _KoGuT_, May 26, 2014.

  1. Offline

    mactown21

    dsouzamatt Seems like that you might need to update java and update your server verson, because im using the latest java atm. But either or you do need them both updated :)
     
  2. Offline

    dsouzamatt

  3. Offline

    _KoGuT_

    dsouzamatt can you change the commands to like /warp and /setwarp /delwarp so /warp to see the list and /warp (name) to warp to a spot etc ONLY do it if it will over power the essentials commands so when i do /warp it will go with the player warps plugin not essentials

    one more thing can you make it so the direction you face the warp is set at not just north east south or west but like facing different direction not just the 4

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  4. Offline

    dsouzamatt

  5. Offline

    _KoGuT_

    dsouzamatt thanks! it works! so just try to make it so every 20 is on a new page and so you are facing in the direction you set it in.

    dsouzamatt the major thing id like you to fix is the direction your facing when you warp. like instead of facing south you face the exact way you faced when you did the cmd

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  6. Offline

    dsouzamatt

    _KoGuT_ I'm not sure why setting the direction of the location to be warped to isn't working. I'll post the code here in case anyone has any ideas:
    Code:java
    1. if(this.getConfig().contains(args[0]))
    2. {
    3. double x = this.getConfig().getDouble(args[0] + ".x");
    4. double y = this.getConfig().getDouble(args[0] + ".y");
    5. double z = this.getConfig().getDouble(args[0] + ".z");
    6. double yawD = this.getConfig().getDouble(args[0] + ".yawD");
    7. float yawF = (float) yawD;
    8. double pitchD = this.getConfig().getDouble(args[0] + ".pitchD");
    9. float pitchF = (float) pitchD;
    10. String nameWorld = this.getConfig().getString(args[0] + ".world");
    11. World theWorld = Bukkit.getWorld(nameWorld);
    12. Location tpLocation = new Location(theWorld, x, y, z, yawF, pitchF);
    13.  
    14. player.teleport(tpLocation);
    15. player.sendMessage("You have been teleported to the location " + ChatColor.GOLD + args[0]);
    16. return false;
    17. }
    18. player.sendMessage(ChatColor.GOLD + args[0] + ChatColor.RED + " is an invalid warp location");
    19. return false;
     
  7. Offline

    _KoGuT_

    timtower any idea whats wrong with the code above to make it so the player will face in the direction they did the command at?
     
  8. Online

    timtower Administrator Administrator Moderator

    dsouzamatt Do the values of the rotation exist in the config?
     
  9. Offline

    dsouzamatt

    timtower Yes, here's an example
    Code:
    dsouzamatt:
      x: 44.94508827386141
      y: 10.866286824038403
      z: 1162.1711377317097
      world: world
      yaw: 10.950010299682617
      pitch: 174.5999755859375
    ...and now I realise that I've been trying to get values from my config that don't exist (yawD instead of just yaw). I'll fix that and upload a new .jar file.

    _KoGuT_ I've fixed that problem with the rotation and here's the download link:
    https://www.dropbox.com/s/fisoacrip67725h/PlayerWarps.jar

    Thanks timtower for the help in sorting that out. I also noticed that the yaw and pitch floats were in the wrong order, so I swapped them around so the entire piece of code now looks like this:
    Code:java
    1. if(this.getConfig().contains(args[0]))
    2. {
    3. double x = this.getConfig().getDouble(args[0] + ".x");
    4. double y = this.getConfig().getDouble(args[0] + ".y");
    5. double z = this.getConfig().getDouble(args[0] + ".z");
    6. double yawD = this.getConfig().getDouble(args[0] + ".yaw");
    7. float yawF = (float) yawD;
    8. double pitchD = this.getConfig().getDouble(args[0] + ".pitch");
    9. float pitchF = (float) pitchD;
    10. String nameWorld = this.getConfig().getString(args[0] + ".world");
    11. World theWorld = Bukkit.getWorld(nameWorld);
    12. Location tpLocation = new Location(theWorld, x, y, z, pitchF, yawF);
    13.  
    14. player.teleport(tpLocation);
    15. player.sendMessage("You have been teleported to the location " + ChatColor.GOLD + args[0]);
    16. return false;
    17. }
    18. player.sendMessage(ChatColor.GOLD + args[0] + ChatColor.RED + " is an invalid warp location");
    19. return false;


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  10. Offline

    mactown21

  11. Offline

    dsouzamatt

    mactown21 I've updated the server to 1.7.9 and my Java is up to date (Java 7, update 60), yet I still get an error:
    Code:
    [18:43:28 ERROR]: Could not load 'plugins/playerwarp.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/legitsoulja/playerwarp/playerwarp : Unsupported major.minor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:355) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.<init>(CraftServer.java:317) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at net.minecraft.server.v1_7_R3.PlayerList.<init>(PlayerList.java:68) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at net.minecraft.server.v1_7_R3.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    Caused by: java.lang.UnsupportedClassVersionError: me/legitsoulja/playerwarp/playerwarp : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.6.0_65]
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) ~[?:1.6.0_65]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621) ~[?:1.6.0_65]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) ~[?:1.6.0_65]
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) ~[?:1.6.0_65]
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58) ~[?:1.6.0_65]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197) ~[?:1.6.0_65]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.6.0_65]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190) ~[?:1.6.0_65]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306) ~[?:1.6.0_65]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ~[?:1.6.0_65]
        at java.lang.Class.forName0(Native Method) ~[?:1.6.0_65]
        at java.lang.Class.forName(Class.java:249) ~[?:1.6.0_65]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
        ... 9 more
    
     
  12. Offline

    mactown21

    dsouzamatt Would you like this plugin to be for 1.7.9? I can change it. I have no clue why its not working for 1.7.9 when it loads perfect and works perfect for me.
     
  13. Offline

    dsouzamatt

    mactown21 No, don't worry, I don't need it for anything. I just wanted to try it out for you.
     
  14. Offline

    mactown21

    @dsouzamatt Oh, well thanks.. It works, i just didnt upload it to bukkit since theres alot of plugins like this. So i just use it personal use on my server.​
    [​IMG]
    JOIN AURAPVP.MCPRO.CO
     
  15. Offline

    _KoGuT_

    dsouzamatt works! so now just try to make multiple pages.
     
  16. Offline

    dsouzamatt

    _KoGuT_ Yeah, I'll try to get that to work over the weekend. I'm pretty busy during the week.
     

Share This Page