1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Bug Issue with custom teloportation plugin.

Discussion in 'Bugs & Feature Requests' started by Luke, Jun 12, 2013.

  1. Hello, I really want to switch to spigot, I enjoy how it integrates with bungee proxies to filer ips etc. Well, I have a portal plugin which works fine with craftbukkit but when I use spigot I get an error when you teleport more than 100-200 blocks away. I get this error from console:

    Code (Text):

    20:56:10 [SEVERE] Exception in thread "Thread-11"
    20:56:10 [SEVERE] java.lang.IllegalStateException: Asynchronous chunk load!
    20:56:10 [SEVERE]       at org.bukkit.craftbukkit.v1_5_R3.CraftWorld.loadChunk(CraftWorld.java:362)
    20:56:10 [SEVERE]       at org.bukkit.craftbukkit.v1_5_R3.CraftWorld.loadChunk(CraftWorld.java:263)
    20:56:10 [SEVERE]       at PPPlayerListener.PortalSafeTeleporter.run(PortalSafeTeleporter.java:40)
     
    Does anyone know how I could fix this? If something needed to be added to the plugin would it be too hard? (I am not the developer, and the developer is inactive, however it's coded pretty well.. It hasn't been touched since MC 1.2.5 and still works flawlessly except with spigot, This is a pretty big deal considering my whole server relies some on this. Not that it's required it would just be a hassle trying to convert everything to a new system.
     

  2. The portal plugin your using looks like its not using the main thread to preload the chunk and is instead using the an async thread when you teleport to it.

    That's my guess anyway
     
  3. Do you know of a way I could fix this?
     
  4. You are messing with the Bukkit API using an Async task. Shame on you.

    Fix? The part that is actually teleporting the player, use Bukkit.getScheduler().scheduelSyncDelayedTask(Plugin, new Runnable(){
    public void run(){​
    pl.teleport(HERE);​
    }​
    });

    Should solve it.
     
    • Like Like x 1
  5. Heh, thanks. I'll try this.
     
  6. Alright, like I said. I'm no developer and can't really figure this out. The developer of this plugin isn't really active. But the source code can be found here. Thanks.
     
  7. You're using a *really* bloody old version of that plugin, the version you have used a thread to do a "safe" teleport; to do that it'll get the top y block at a given x and z coordinate which may cause a chunk to be loaded. Accessing any Bukkit API from a thread is asking for trouble.

    Seems the "latest" (still freaking ancient) source uses the standard mechanism to teleport players.

    Upgrade, my man, upgrade. Or get a different plugin that has seen some activity, the one you use hasn't been touched for over 9 months.
     
  8. I know.. It actually hasn't been touched in a year.. :p But I'm not going to be switching seeing as most of the server depends on this. Might I also mention.. It's not extremely well done because it's not "technically" a public plugin, although the source is on github.
     
  9. At least upgrade to the most recent version that uses teleport() :)
     
  10. Well..uhm, There isn't a latest version that uses teleport()
     
  11. joehot200

    Supporter

    I would guess it would be pretty easy to add into the code.
     
  12. Download the source from Github and use maven to build the latest version.