potatolain / TravelPortals

A portal system for Bukkit for Minecraft
BSD 2-Clause "Simplified" License
3 stars 2 forks source link

Error #19

Closed MCFeelBoyYT closed 7 years ago

MCFeelBoyYT commented 7 years ago

Spigot version: 1.11.2 (newest spigot version)

ERROR:

02.02 19:18:33 [Server] WARN [TravelPortals] Task #36 for TravelPortals v2.2.13 generated an exception 02.02 19:18:32 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111] 02.02 19:18:32 [Server] INFO at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:574) [spigot-1.11.2.jar:git-Spigot-b32c8f8-46226d6] 02.02 19:18:32 [Server] INFO at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:675) [spigot-1.11.2.jar:git-Spigot-b32c8f8-46226d6] 02.02 19:18:32 [Server] INFO at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot-1.11.2.jar:git-Spigot-b32c8f8-46226d6] 02.02 19:18:32 [Server] INFO at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:730) [spigot-1.11.2.jar:git-Spigot-b32c8f8-46226d6] 02.02 19:18:32 [Server] INFO at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353) [spigot-1.11.2.jar:git-Spigot-b32c8f8-46226d6] 02.02 19:18:32 [Server] INFO at org.bukkit.craftbukkit.v1_11_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.11.2.jar:git-Spigot-b32c8f8-46226d6] 02.02 19:18:32 [Server] INFO at net.cpprograms.minecraft.TravelPortals.PortalUseTask.run(PortalUseTask.java:101) ~[?:?] 02.02 19:18:32 [Server] INFO java.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()[Lorg/bukkit/entity/Player;

potatolain commented 7 years ago

Easily reproducible on startup when useplayermove is set to false in configuration. Looking into why now.

A workaround is to flip that to true again. (However that may have performance impacts on larger and/or underpowered servers)

potatolain commented 7 years ago

Turns out the fix we put in for a method deprecation didn't quite work the way we had hoped. Getting it to work right was a pretty simple fix, though.

@MCFeelBoyYT You can use the build linked below until we get a new official version out. I just tested it and it seems to resolve your issues. https://ci.minebench.de/view/Various/job/TravelPortals/5/artifact/target/TravelPortals.jar

Here's what I did to fix it, since I embarrassingly forgot to reference the PR number in my commit message: https://github.com/cppchriscpp/TravelPortals/commit/e8c25457f1984bf084b01b49f84092a68f24f5e6

@Phoenix616 - How close are you feeling with 2.3 changes? This bug seems pretty important - if you think that's going to take a while, I can backport this to 2.2.x and throw it on BukkitDev to tide folks over. Thoughts?

Phoenix616 commented 7 years ago

I don't see how this error is possible unless the jar was compiled with an old Bukkit version that still returned an Array instead of a Collection.

potatolain commented 7 years ago

Ugh, that would be what I did. Never mind my fix. 😥

Build above will still work; I'm going to revert my change. I'll make a new version of 2.2.13 built against a not-ancient bukkit version. Thanks for pointing that out.

Update: I've removed the version 2.2.13 released on bukkitdev, and uploaded a new version built against the latest Bukkit version. Once it's approved, that will fix the problem.

Man, I really haven't spent much time in java recently; that's such a rookie mistake. Thanks again for pointing it out.

potatolain commented 7 years ago

I'm going to close this issue, as it seems like the problem has been resolved. If not, feel free to reopen this issue and we can look again.