Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get past event location from teleport event #5392

Closed
1 task done
NopeProsOnly opened this issue Jan 23, 2023 · 12 comments
Closed
1 task done

Can't get past event location from teleport event #5392

NopeProsOnly opened this issue Jan 23, 2023 · 12 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: high Issues with potentially high impact that could be harmful to users.

Comments

@NopeProsOnly
Copy link

Skript/Server Version

[14:35:14 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[14:35:14 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[14:35:14 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[14:35:14 INFO]: [Skript] Server Version: git-Paper-307 (MC: 1.19.2)
[14:35:14 INFO]: [Skript] Skript Version: 2.6.4
[14:35:14 INFO]: [Skript] Installed Skript Addons:
[14:35:14 INFO]: [Skript]  - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[14:35:14 INFO]: [Skript]  - DiSky v4.8.0
[14:35:14 INFO]: [Skript]  - skript-fishing v1.2.2 (https://github.com/Fusezion/skript-fishing)
[14:35:14 INFO]: [Skript]  - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect)
[14:35:14 INFO]: [Skript]  - SkQuery v4.1.7
[14:35:14 INFO]: [Skript]  - SkBee v2.7.2 (https://github.com/ShaneBeee/SkBee)
[14:35:14 INFO]: [Skript] Installed dependencies:
[14:35:14 INFO]: [Skript]  - Vault v1.7.3-b131
[14:35:14 INFO]: [Skript]  - WorldGuard v7.0.8-beta-01+cbb2ba7

Bug Description

I am unable to get the past event location

it says

There's no location in an on teleport event

Expected Behavior

it should support past event location

Steps to Reproduce

on player teleporting:
  if player is in world "Lobby":
    if world of past event-location is in world "Survival" or world "Lobby_nether" or world "Lobby_the_end":
      set {SurvivalLoc::%player%} to world of past event-location
    if world of past event-location is in world "Creative":
      set {CreativeLoc::%player%} to world of past event-location
    if world of past event-location is in world "Oneblock" or world "Oneblock_Nether":
      set {OneblockLoc::%player%} to world of past event-location
  
  if world of past event-location is in world "Lobby":
    if player is in world "Survival":  
      wait a tick
      teleport player to {SurvivalLoc::%player%}
    if player is in world "Creative":
      wait a tick
      teleport player to {CreativeLoc::%player%}
    if player is in world "Oneblock":
      wait a tick
      teleport player to {OneblockLoc::%player%}
    if player is world "Bedwars":
      wait a tick
      make player execute command "/bw leave"
      clear player's inventory

I am using multiverse core btw

Errors or Screenshots

image

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@Fusezion
Copy link
Contributor

To clarify this isn't really a bug as much as just not supported. PlayerTeleportEvent the class used for this event doesn't have any location methods. In order to achieve location they'd have to use EntityTeleportEvent class.


PlayerTeleportEvent

image

EntityTeleportEvent

image

@colton-boi
Copy link
Contributor

It does have location methods, It inherits them from PlayerMoveEvent
image

@NopeProsOnly
Copy link
Author

I know very little about java...
I do know this tho.
https://skripthub.net/docs/?id=1053
image

@Fusezion

This comment was marked as off-topic.

@colton-boi
Copy link
Contributor

It's on the docs

@NopeProsOnly
Copy link
Author

NopeProsOnly commented Jan 23, 2023

These docs? https://skripthub.net/docs/
Edit -
There's 3 people here. Idk who's talking to who...

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Jan 23, 2023

Pull request changing event location. #4895
Something is wrong with this merged pull request.

I don't know what other event value it's grabbing, but it's not grabbing PlayerMoveEvent. It's grabbing potentially Player from PlayerEvent and grabbing the location from that? Either way it's not PlayerMoveEvent as whatever location it's grabbing does not have a past state.

This pull request should fix the priority #4858

I just need to look into this issue to figure out what it's conflicting with.

@TheLimeGlass TheLimeGlass added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls. PR available Issues which have a yet-to-be merged PR resolving it labels Jan 23, 2023
@TheLimeGlass TheLimeGlass self-assigned this Jan 23, 2023
@TheLimeGlass TheLimeGlass removed the PR available Issues which have a yet-to-be merged PR resolving it label Jan 23, 2023
@TheLimeGlass
Copy link
Collaborator

Removing PR Available until that said pull request adds a fix for this.

@TheLimeGlass
Copy link
Collaborator

This also happens with on portal

@TheLimeGlass TheLimeGlass added priority: high Issues with potentially high impact that could be harmful to users. completed The issue has been fully resolved and the change will be in the next Skript update. and removed priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls. labels Jan 25, 2023
@TheLimeGlass TheLimeGlass removed their assignment Jan 26, 2023
@TheLimeGlass
Copy link
Collaborator

Appears #4895 fixed this for on portal

@NopeProsOnly
Copy link
Author

This issue is still open. So I'm assuming that this is still a issue. Has it been fixed in a pr? If so, then how can I download the pr. (Hopefully in jar version. I don't know how to compile.) I can wait for the next update release.

@TheLimeGlass
Copy link
Collaborator

@NopeProsOnly It's on schedule for 2.7.0-beta1 release. You can download the master branch currently by grabbing a nightly build from any of the ran actions https://github.com/SkriptLang/Skript/actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: high Issues with potentially high impact that could be harmful to users.
Projects
None yet
Development

No branches or pull requests

5 participants