AcmeProject / WildernessTp

My WildernessTP plugin from spigot
GNU General Public License v3.0
13 stars 16 forks source link

warmups being terminated immediately #83

Closed AdenGames closed 4 years ago

AdenGames commented 4 years ago

I gave the users the basic perms to /wild it gets stuck with the progress bar at the top not moving and the tp not doing anything. If I have admin perms it will work instantly and I can tp.

RoboMWM commented 4 years ago

what does debug mode say

x1p commented 4 years ago

Same for me, version 2.20 says WAIT_MSG and won't teleport player. Paper 1.15.2 Debug:

[11:48:52 INFO]: [WildTP] Wild command called by CraftPlayer{name=Player123abc}
[11:48:52 INFO]: [WildTP] Cooldown check requested for uuid_blah_blah
[11:48:52 INFO]: [WildTP] Player not in cooldown
[11:48:52 INFO]: [WildTP] Wild teleport called for Player123abc for world world
[11:48:52 INFO]: [WildTP] Player123abc called /wild args 0
[11:48:52 INFO]: [WildTP] Cooldown check requested for uuid_blah_blah
[11:48:52 INFO]: [WildTP] Player not in cooldown
[11:48:53 INFO]: [WildTP] am chekin
[11:48:53 INFO]: [WildTP] Location{world=CraftWorld{name=world},x=32.0,y=68.0,z=8021.0,pitch=0.0,yaw=0.0}
[11:48:53 INFO]: [WildTP] Calling preTeleportEvent
[11:48:53 INFO]: [WildTP] Called preWildTeleportEvent
[11:48:53 INFO]: [WildTP] preping 2 port 2 Location{world=CraftWorld{name=world},x=32.0,y=69.0,z=8021.0,pitch=0.0,yaw=0.0}
[11:48:53 INFO]: [WildTP] Player needs to wait more: 60
[11:48:53 INFO]: [WildTP] microwave stop
RoboMWM commented 4 years ago

Ah ok So that method controls warmup, now I recall...

I'm not sure if the PRs refactored how this worked, but I guess it's because every teleport assumes there's a warmup. If there is no warmup, then microwave isn't being called immediately after teleport appropriately, and the player is permanently stuck in a "pending" state until relog as per https://github.com/AcmeProject/WildernessTp/issues/82#issuecomment-653641619

I'll try to see what's up with this warmup logic. I personally have warmups disabled, and I think when I was debugging this last I had to set a warmup to reproduce... so time to look into this again... guess this is what happens when only a certain conditions are tested, and makes it worse when it's not me who made those changes erghadfkajsdf;

RoboMWM commented 4 years ago

ok, so I'm not sure how the "fix" I did for that referenced issue worked... logic is messed up somewhere I guess - probably would've been ideal to get debug logs from him. I've undid what I did there so... @roadhog360 @x1p can you test https://ci.appveyor.com/project/RoboMWM39862/wildernesstp/builds/34004654/artifacts to see if this works, and regardless if it works or not can you please paste debug logs, so I can follow the logic for both configurations?

x1p commented 4 years ago

This version works

[15:07:14 INFO]: [WildTP] Wild command called by CraftPlayer{name=Player123abc}
[15:07:14 INFO]: [WildTP] Cooldown check requested for 0123-uuid-whatever
[15:07:14 INFO]: [WildTP] Player has bypass perms
[15:07:14 INFO]: [WildTP] Wild teleport called for Player123abc for world world
[15:07:14 INFO]: [WildTP] Player123abc called /wild args 0
[15:07:14 INFO]: [WildTP] Cooldown check requested for 0123-uuid-whatever
[15:07:14 INFO]: [WildTP] Player has bypass perms
[15:07:14 INFO]: [WildTP] am chekin
[15:07:14 INFO]: [WildTP] Location{world=CraftWorld{name=world},x=-145.0,y=3.0,z=-253.0,pitch=0.0,yaw=0.0}
[15:07:14 INFO]: [WildTP] Calling preTeleportEvent
[15:07:14 INFO]: [WildTP] Called preWildTeleportEvent
[15:07:14 INFO]: [WildTP] preping 2 port 2 Location{world=CraftWorld{name=world},x=-145.0,y=4.0,z=-253.0,pitch=0.0,yaw=0.0}
[15:07:14 INFO]: [WildTP] Teleporting Player123abcLocation{world=CraftWorld{name=world},x=-145.0,y=4.0,z=-253.0,pitch=0.0,yaw=0.0}
[15:07:14 INFO]: [WildTP] Player123abc Teleported to Location{world=CraftWorld{name=world},x=-144.5,y=4.5,z=-252.5,pitch=0.0,yaw=-175.76576}
RoboMWM commented 4 years ago

If @Roadhog360 doesn't get to test it can you test with wait set to 0? (I could try as well but I think his particular issue probably is best tested by him, since his skyblock world has a lot of cases of unsafe teleportation areas which are more likely to cause the "failed to find a valid location" issue.)

RoboMWM commented 4 years ago

Hmm, ok, you tested with bypass perms so there was no warmup (nor cooldown checks) in your particular test @x1p so does it work when you do have a warmup too?

x1p commented 4 years ago

You're right, tested with an op player. This should be better:

[19:34:27 INFO]: [WildTP] am chekin
[19:34:27 INFO]: [WildTP] Location{world=CraftWorld{name=world},x=-122.0,y=3.0,z=-52.0,pitch=0.0,yaw=0.0}
[19:34:27 INFO]: [WildTP] Calling preTeleportEvent
[19:34:27 INFO]: [WildTP] Called preWildTeleportEvent
[19:34:27 INFO]: [WildTP] preping 2 port 2 Location{world=CraftWorld{name=world},x=-122.0,y=4.0,z=-52.0,pitch=0.0,yaw=0.0}
[19:34:27 INFO]: [WildTP] Player needs to wait more: 60
[19:34:30 INFO]: [WildTP] isCancelled: false
[19:34:30 INFO]: [WildTP] microwave stop
[19:34:30 INFO]: [WildTP] Teleporting Player123absLocation{world=CraftWorld{name=world},x=-122.0,y=4.0,z=-52.0,pitch=0.0,yaw=0.0}
[19:34:30 INFO]: [WildTP] Player123abs Teleported to Location{world=CraftWorld{name=world},x=-121.5,y=4.5,z=-51.5,pitch=0.0,yaw=-76.35001}
[19:34:30 INFO]: [WildTP] Player123abs Adding to cooldown
[19:34:30 INFO]: [WildTP] Adding cooldown for 00000000-0000-0000-0000-000000000000
[19:34:30 INFO]: [WildTP] Added to cooldown 00000000-0000-0000-0000-000000000000
hvrry commented 4 years ago

I had this issue as well,

Tested with latest Paper 1.6.1 & the jar you gave (& the latest on Spigot)

I gave default users the permission to bypass the warmup and the issue still occured, but works for OP users

Roadhog360 commented 4 years ago

Hey, sorry I didn't see this, I don't check GitHub that much. Do you still need me to test it?

RoboMWM commented 4 years ago

@hvrry what issue specifically, as multiple people have chimed in with various information and variations of the issue. And, please include debug logs in your response as well as output of /version wild

@Roadhog360 Yes if you could test this new version (link above, but I believe I also released it as version 2.21) which effectively reverts the logic I added to "fix" the issue where players on your server couldn't teleport despite it saying "Teleporting...". Your configuration and world type is different than the users here, and I wasn't able to reproduce your issue with your configuration (but I don't have a skyblock world to test). TL;dr see if this version still works on your server.

Roadhog360 commented 4 years ago

If you add my Discord at Roadhog360#7777 I can provide the world and plugin privately to help you test with me. It's a premium plugin so I cannot share it publicly.

RoboMWM commented 4 years ago

Eh, well if you're not experiencing any issues then I guess I'll consider this good, since at least my quick reviews of the convoluted logic suggest that this shouldn't cause issues.