Inactive [TP/MECH] WorldWrap v2.5 - Dont fall! [1.2.4-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by Gravity, Nov 17, 2011.

  1. Offline

    Gravity

    [​IMG]
    World Wrap is a multi-functional teleportation plugin. There are numerous scenarious in which you would want to use World Wrap in order to manage your server's land.
    Bottom/Top syncing:
    • You can teleport a player who goes too far down up to the top of the map, and either choose to drop them from that height, creating the illusion of a "wrapped" world, or just set them on a block of glass in the sky.
    • The same goes with the top of the map, if a player climbs too high into the sky, they are sent down to the bottom of the map into a cavern.
    Edge syncing:
    • Simulate a round world! You can specify a radius of the world, and then if a player walks too far from spawn, they are teleported to the other side of the virtual circle you have created.
    • World Wrap will always find the safest place for the player. Unlike other plugins that bury you underground, World Wrap finds a safe place for you on the surface of the land, and change your Y position to that when you are teleported.
    More options than you can imagine:

    • Make mobs and animals also follow teleportation rules
    • Customize how far a user falls from
    • Customize how far a user is placed underground went sent to the bottom of the map
    • Define your own limits to the map. Don't want players to dig down at all? Fine. Want to change the building limit from 127 to 100? Go for it.
    • Set your own radius for the map. Let players venture far out before being synced to the other side, or keep them close at hand.
    • Customize messages when a player is teleported.... orrr don't send them at all.
    • Multi-world support. Use edge syncing in one, top syncing in another, and then both top and bottom syncing in another. Or all three. It's all your choice :)
    • Change randomness of teleportation, this is useful if a player has fallen into a hole, you wouldn't want them to fall from the sky right back into it.
    • If you don't want a player to be sent to the top or bottom of the world, you can choose to send them to a specific set of coordinates, to the spawn, or even to another world. Want a player to be teleported into the nether when they jump through bedrock? Be sent to the sky world when they get to the top of the map? The choice is yours.
    • Keep the players coordinates when they are sent to a new world
    Still don't believe me? Check out configuration.
    Check this video out!
    (Slightly out of date)​
    Configuration:
     
    locutus likes this.
  2. Offline

    Windwaker

    So it's like a continuation of Inception? Cool :D
     
    h31ix likes this.
  3. Offline

    gameswereus

    EffectsDude79! Yay!
     
  4. Does it have an API for plugins like Movecraft or WStone? @Lihad was writing an API for Inception and 1.04dev0.7 had all the functions I needed but he never released it to the public. :(

    BTW: GPLv3? Sources, please. :)
     
  5. Offline

    Gravity

    No, there is no API as of now, I don't really understand why you would need an API for a plugin like this, can you explain how that would be helpful?

    Also I didnt realize Inception was a plugin that you were mentioning. :p

    Source is always avalible for my plugins via my github
     
  6. A plugin like Moveraft could use it to teleport the planes between world when they fly to high/low. An awesome example would be that + BananaSpace. ;)

    WStone could use it to make transmitts between worlds possible (your plugin links the world to one big worlds). Right now it's only possible to transmitt between worlds with active Stargates or Wormhole X-Treme gates. :D
     
  7. Offline

    Gravity

    Hm. Alright, well the code for porting a player to a new world isn't too intricate, you can see it in the source and use it to your need, but I can look into making an API later if you wish.

    EDIT: Actually I re-read that and understand why that would be helpful. I'll definitely take a look later.
     
  8. An API would be great. :)
    For better understanding here a video. It shows the latest dev build of WStone with optional Inception support (which will be replaced with WorldWrap support... ;)):

    And here are the sources with did that:
    In OnEnable()
    Code:java
    1. Worldwrap ww = (Worldwrap)pm.getPlugin("WorldWrap");
    2. if(ww != null)
    3. {
    4. //TODO: WorldWrap support.
    5. } //TODO: Removed.
    6. /*Plugin ince = pm.getPlugin("Inception");
    7.   if(ince != null)
    8.   {
    9.   try
    10.   {
    11.   Double iv = Double.parseDouble(ince.getDescription().getVersion());
    12.   if(iv >= 1.05D)
    13.   {
    14.   info2log("Inception "+iv+" found! Using");
    15.   inception = true;
    16.   }
    17.   else
    18.   {
    19.   info2log("Inception "+iv+" found, >= 1.05 needed");
    20.   }
    21.   }
    22.   catch(NumberFormatException e)
    23.   {
    24.   String inv = ince.getDescription().getVersion();
    25.   boolean sf = false;
    26.   int c;
    27.   for(c = 0; c < inv.length(); c++)
    28.   {
    29.   if(!inv.substring(c, c + 1).matches("[0-9]|\\."))
    30.   {
    31.   sf = true;
    32.   break;
    33.   }
    34.   }
    35.   if(sf)
    36.   {
    37.   double ver = Double.parseDouble(inv.substring(0, c + 1));
    38.   if(ver >= 1.04D)
    39.   {
    40.   info2log("Inception "+inv+" found! Using");
    41.   inception = true;
    42.   }
    43.   else
    44.   {
    45.   info2log("Inception "+inv+" found, >= 1.05 needed");
    46.   }
    47.   }
    48.   else
    49.   {
    50.   info2log("Can't detect Inception version");
    51.   info2log("This could be a bug!");
    52.   }
    53.   }
    54.   }*/

    In the listener
    Code:java
    1. //TODO -- Replace with WorldWrap
    2. /* private int incept(WirelessStone transmitter, String recWorld, int recY)
    3.   {
    4.   int out = 99999; // Set the output very high.
    5.   if(plugin.inception) //When inception is there start the functions "core". This will overwrite the variable "out".
    6.   {
    7.   // Read from the API:
    8.   int[] uLs = DeveloperAPI.getUpperLimits();
    9.   int[] lLs = DeveloperAPI.getLowerLimits();
    10.   String[] upperWorlds = DeveloperAPI.getUpperWorldNames();
    11.   String[] lowerWorlds = DeveloperAPI.getLowerWorldNames();
    12.  
    13.   //Initialize Variables/Arrays to work with:
    14.   int l = upperWorlds.length + 1;
    15.   int[] upperLimits = new int[l];
    16.   int[] lowerLimits = new int[l];
    17.   String[] worlds = new String[l];
    18.   int c;
    19.  
    20.   //Put the API outputs into Arrays and reformat them for better handling from our task.
    21.   l--;
    22.   upperLimits[0] = 128;
    23.   for(c = 1; c <= l; c++)
    24.   {
    25.   upperLimits[c] = uLs[c - 1];
    26.   }
    27.  
    28.   for(c = 0; c < l; c++)
    29.   {
    30.   lowerLimits[c] = lLs[c];
    31.   }
    32.   lowerLimits[c] = 0;
    33.  
    34.   for(c = 0; c < l; c++)
    35.   {
    36.   worlds[c] = upperWorlds[c];
    37.   }
    38.   worlds[c] = lowerWorlds[c - 1];
    39.   l=c;
    40.   //Start distance calculation for the Y axis and return the result.
    41.   for(c = 0; c < l; c++)
    42.   {
    43.   for(int co = c + 1; co < l; co++)
    44.   {
    45.   if(worlds[c].equals(transmitter.world) &&
    46.   worlds[co].equals(recWorld))
    47.   {
    48.   //Example: transmitter.world = world_skylands
    49.   // recWorld = world_nether
    50.  
    51.   //This is the distance if it's world next to world:
    52.   out = transmitter.y + lowerLimits[c];
    53.   //Example:
    54.   //out = 64 + 0 = 64
    55.  
    56.   if(plugin.getServer().getWorld(transmitter.world).isThundering())
    57.   out = out * 2;
    58.   else if(plugin.getServer().getWorld(transmitter.world).hasStorm())
    59.   out += out / 3 * 2;
    60.   int foo = upperLimits[co] - recY;
    61.   if(plugin.getServer().getWorld(recWorld).isThundering())
    62.   foo+= foo * 2;
    63.   else if(plugin.getServer().getWorld(recWorld).hasStorm())
    64.   foo += foo / 3 * 2;
    65.   out += foo;
    66.  
    67.   //Now add the distance for all the worlds between:
    68.   for(int cou = c + 1; cou < co; cou++)
    69.   {
    70.   foo = upperLimits[cou] - lowerLimits[cou];
    71.   if(plugin.getServer().getWorld(worlds[cou]).isThundering())
    72.   foo += (upperLimits[cou] - lowerLimits[cou]) * 2;
    73.   else if(plugin.getServer().getWorld(worlds[cou]).hasStorm())
    74.   foo = upperLimits[cou] - lowerLimits[cou] + (foo * 2);
    75.   out += foo;
    76.   }
    77.   //Example: Only one world between: world
    78.   //with upperLimit = 128
    79.   //and lowerLimit = 0
    80.  
    81.   //out + upperLimit + lowerLimit =
    82.   //64 + 128 - 0 =
    83.   //192
    84.   // This would be the return.
    85.   return out;
    86.   }
    87.   else if(worlds[co].equals(transmitter.world) &&
    88.   worlds[c].equals(recWorld))
    89.   {
    90.   //Example: transmitter.world = world_nether
    91.   // recWorld = world_skylands
    92.  
    93.   out = recY + lowerLimits[co] + upperLimits[c] - transmitter.y;
    94.   int foo;
    95.   for(int cou = co - 1; cou > c; cou--)
    96.   {
    97.   foo = upperLimits[cou] - lowerLimits[cou];
    98.   if(plugin.getServer().getWorld(worlds[cou]).isThundering())
    99.   foo += (upperLimits[cou] - lowerLimits[cou]) * 2;
    100.   else if(plugin.getServer().getWorld(worlds[cou]).hasStorm())
    101.   foo = upperLimits[cou] - lowerLimits[cou] + (foo * 2);
    102.   out += foo;
    103.   }
    104.   return out;
    105.   }
    106.   }
    107.   }
    108.   }
    109.   return out;
    110.   }*/
     
  9. Offline

    Atomic3kk

    I do not think this is really a warp plugin, as it does not fit it's name. You can name it "AvoidVoid- Forget about falling into the bottom of the world again!" Or something XD

    Changed- Reason: Lack of reading
     
  10. Offline

    Gravity

    The name of the plugin is WorldWRAP not WorldWARP.
    It is not a warp plugin.
     
  11. Offline

    Atomic3kk

    Oops, I must have missed that :D Sorry for misunderstanding.
     
  12. Offline

    UltraFaceguy

    Is it at all possible to set an X and Y of teleport into a new world? What I'm thinking of is dropping players within 100 blocks of our spawn but when we upgraded to 1.0.0 we made a "new" server. In reality I just shifted the spawn 5000 blocks and made the city look like ruins so they'll eventually stumble upon it. Currently, If they fall off the skylands at 0,0 they'll end up at 0,0 in the mainworld which is far too far away from our village and far too close to the old one. So that's my long story of why setting X and Y of the drop would be awesome.
     
  13. Offline

    Gravity

    Yeah. I'll add this in with a few other updates.

    Here ya go.
    http://dev.bukkit.org/server-mods/worldwrap/files/3-world-wrap-v1-2/
    Remember to set the coordinates in the config file and also set Teleport to coordinates: 'true'
    And set the world that you want it to drop in on Drop world name: world
    If you set the teleport to coordinates to true, it will ignore almost all the other settings and only do that teleporting, not including of course the drop height teleport height, of course. If you have any glitches please report :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  14. Offline

    UltraFaceguy

    Hell yes! Now that's what I call support! New update in 28 minutes flat! Testing as we speak...

    Okay it seems to be working great and I can totally use this now! Doesn't seem to be any bugs!

    Though there is one thing. Could you make an option for the randomness of drop to work with the teleport coordinates=true? I can finally drop them near the new town (actually an island) and rather than having them fall into the same spot and killing them I'd like to make it so they might fall onto a building or into some water.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
    h31ix likes this.
  15. Offline

    Gravity

    Done
    http://dev.bukkit.org/server-mods/worldwrap/files/4-world-wrap-v1-2-1/
     
  16. Offline

    UltraFaceguy

    It seems as if we've reached an impasse.
    Code:
    2011-12-15 19:54:31 [SEVERE] Could not pass event PLAYER_MOVE to WorldWrap
    java.lang.NumberFormatException: For input string: "1194357.0"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at net.h31ix.worldwrap.WorldwrapPlayerListener.onPlayerMove(WorldwrapPlayerListener.java:48)
        at org.bukkit.plugin.java.JavaPluginLoader$7.execute(JavaPluginLoader.java:307)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:182)
        at net.minecraft.server.Packet10Flying.a(SourceFile:126)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    
     
  17. Offline

    Gravity

    Whoops. Forgot about that, one second.

    Actually tested this one, sorry about that.
    http://dev.bukkit.org/server-mods/worldwrap/files/5-world-wrap-v1-2-2/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  18. Offline

    UltraFaceguy

    Exquisite! The random feature is almost perfect! My only gripe is that the horizontal coords are changed by the same amount resulting in an error only somebody as OCD as me would have revealed (I recorded my teleport destinations). That being said, I can only be dropped randomly anywhere on a Y=X line. Nobody on my server would ever notice this, but you may want to consider using two random generators.

    Also it may be worth to note in the config that the randomization works by adding the randomization number to the teleport coordinates. It is not a center-point, and there is nothing wrong with that XD

    This is for your progress thus far! http://gifs.gifbin.com/1233928590_citizen kane clapping.gif
     
  19. Offline

    Gravity

    I do agree with you on that first part, I'm planning to redo this plugin and make it a bit more useful and clear cut, and I'll probably add that then.

    The randomization actually defines how random the random generator will be. If you set it to 20, the random generate will generator a number between 1-20, if you set it to 15 it will be 1-15, and so on and so forth. And then yes, that is added to the coordinates you specified or is otherwise specified by the other options. So it is random, but yes there should probably be one generator for X, one for Z, and also the ability to either subtract that amount or add it, for which this version currently lacks. I will be adding stuff like that whenever I have a chance to redo this.

    And also I can totally relate with you about the OCD xD
     
  20. Offline

    UltraFaceguy

    The functionality is perfect for the unobservant citizens of my server and what you have brought to the table will MORE than suffice. Still though, I eagerly await the update XD
     
  21. Offline

    Gravity

    Alright, well glad you like it, I'll get that done ASAP.
     
  22. Offline

    md_5

    Approved
     
  23. Offline

    aviator14

    when i found this i was thinking it was kind of like worldborder, but with teleporting to make it seem like the world is round. or is that already an option? i don't seem much use for teleporting people based on their Y location
     
  24. Offline

    Gravity

  25. Offline

    Gravity

    I've *Finally* had time to get some work done, so here is the update that I hope fixes both of your requests.
    http://dev.bukkit.org/server-mods/worldwrap/files/6-world-wrap-v2-0/
    Version 2.0 is available there, you will need to delete your config and have it re-make the file before it properly starts.
    As always any requests/bugs you can always report here.
     
  26. But still no API? :(
     
  27. Offline

    Gravity

    Oh hell, that was a long time ago, haha.
    Well, tell me like what kind of functions you would want available, what kind of tools you would need to make it work like you want.
     
  28. But that was just an example. Basically I need to know the limits. ;)
     
  29. Offline

    Gravity

    Yeah, I looked through your example, I didn't quite understand what the listener part was doing, though.
    I'm just hoping you are not mistaking what the plugin does. It does not actually link worlds together, or have "upper" or "lower" worlds for that matter, if you take a look at the source its more of a "is the player past where they should be? they are? ok, now find where they need to go and send them there" and its a bit simplistic in that regard.

    I'm not quite sure how to fire events, (could probably figure it out), but if I did I could give you a way to make like a WorldWrapListener, with onPlayerReachXZ or onPlayerReachY fired when their respective boundaries are hit, as well as giving you returns for the player involved with the event I guess.. And then some kind of an object, like maybe a WorldWrapManager, that could give you access to executing whatever kind of teleportation is defined the in the config on a certain player.

    Hope that made sense, but I dont think there is TOO much to this plugin that is hard to implement quite easily into your own code without an API of any sorts, and that mayybeee your making this out to be something it is really not.
     
  30. I see and I was mistaking. Sorry about that. :(
     

Share This Page