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) Download WorldWrapConfiguration:http://dev.bukkit.org/server-mods/worldwrap/pages/configuration/
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.
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. Source is always avalible for my plugins via my github
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.
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.
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 Worldwrap ww = (Worldwrap)pm.getPlugin("WorldWrap"); if(ww != null) { //TODO: WorldWrap support. } //TODO: Removed. /*Plugin ince = pm.getPlugin("Inception"); if(ince != null) { try { Double iv = Double.parseDouble(ince.getDescription().getVersion()); if(iv >= 1.05D) { info2log("Inception "+iv+" found! Using"); inception = true; } else { info2log("Inception "+iv+" found, >= 1.05 needed"); } } catch(NumberFormatException e) { String inv = ince.getDescription().getVersion(); boolean sf = false; int c; for(c = 0; c < inv.length(); c++) { if(!inv.substring(c, c + 1).matches("[0-9]|\\.")) { sf = true; break; } } if(sf) { double ver = Double.parseDouble(inv.substring(0, c + 1)); if(ver >= 1.04D) { info2log("Inception "+inv+" found! Using"); inception = true; } else { info2log("Inception "+inv+" found, >= 1.05 needed"); } } else { info2log("Can't detect Inception version"); info2log("This could be a bug!"); } } }*/ In the listener Code:java //TODO -- Replace with WorldWrap/* private int incept(WirelessStone transmitter, String recWorld, int recY) { int out = 99999; // Set the output very high. if(plugin.inception) //When inception is there start the functions "core". This will overwrite the variable "out". { // Read from the API: int[] uLs = DeveloperAPI.getUpperLimits(); int[] lLs = DeveloperAPI.getLowerLimits(); String[] upperWorlds = DeveloperAPI.getUpperWorldNames(); String[] lowerWorlds = DeveloperAPI.getLowerWorldNames(); //Initialize Variables/Arrays to work with: int l = upperWorlds.length + 1; int[] upperLimits = new int[l]; int[] lowerLimits = new int[l]; String[] worlds = new String[l]; int c; //Put the API outputs into Arrays and reformat them for better handling from our task. l--; upperLimits[0] = 128; for(c = 1; c <= l; c++) { upperLimits[c] = uLs[c - 1]; } for(c = 0; c < l; c++) { lowerLimits[c] = lLs[c]; } lowerLimits[c] = 0; for(c = 0; c < l; c++) { worlds[c] = upperWorlds[c]; } worlds[c] = lowerWorlds[c - 1]; l=c; //Start distance calculation for the Y axis and return the result. for(c = 0; c < l; c++) { for(int co = c + 1; co < l; co++) { if(worlds[c].equals(transmitter.world) && worlds[co].equals(recWorld)) { //Example: transmitter.world = world_skylands // recWorld = world_nether //This is the distance if it's world next to world: out = transmitter.y + lowerLimits[c]; //Example: //out = 64 + 0 = 64 if(plugin.getServer().getWorld(transmitter.world).isThundering()) out = out * 2; else if(plugin.getServer().getWorld(transmitter.world).hasStorm()) out += out / 3 * 2; int foo = upperLimits[co] - recY; if(plugin.getServer().getWorld(recWorld).isThundering()) foo+= foo * 2; else if(plugin.getServer().getWorld(recWorld).hasStorm()) foo += foo / 3 * 2; out += foo; //Now add the distance for all the worlds between: for(int cou = c + 1; cou < co; cou++) { foo = upperLimits[cou] - lowerLimits[cou]; if(plugin.getServer().getWorld(worlds[cou]).isThundering()) foo += (upperLimits[cou] - lowerLimits[cou]) * 2; else if(plugin.getServer().getWorld(worlds[cou]).hasStorm()) foo = upperLimits[cou] - lowerLimits[cou] + (foo * 2); out += foo; } //Example: Only one world between: world //with upperLimit = 128 //and lowerLimit = 0 //out + upperLimit + lowerLimit = //64 + 128 - 0 = //192 // This would be the return. return out; } else if(worlds[co].equals(transmitter.world) && worlds[c].equals(recWorld)) { //Example: transmitter.world = world_nether // recWorld = world_skylands out = recY + lowerLimits[co] + upperLimits[c] - transmitter.y; int foo; for(int cou = co - 1; cou > c; cou--) { foo = upperLimits[cou] - lowerLimits[cou]; if(plugin.getServer().getWorld(worlds[cou]).isThundering()) foo += (upperLimits[cou] - lowerLimits[cou]) * 2; else if(plugin.getServer().getWorld(worlds[cou]).hasStorm()) foo = upperLimits[cou] - lowerLimits[cou] + (foo * 2); out += foo; } return out; } } } } return out; }*/
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
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.
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
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.
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)
Actually tested this one, sorry about that. http://dev.bukkit.org/server-mods/worldwrap/files/5-world-wrap-v1-2-2/
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
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
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
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
Theres already a plugin for that, its a bit outdated, though.. http://forums.bukkit.org/threads/tp-round-world-v6-teleports-players-who-go-off-the-edge-766.17727/ I might contact the dev and include it in World Wrap..
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.
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.