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

getLocation regex erorr #42

Open
matvejs16 opened this issue Dec 24, 2021 · 7 comments
Open

getLocation regex erorr #42

matvejs16 opened this issue Dec 24, 2021 · 7 comments

Comments

@matvejs16
Copy link

Node script crashes when using server.rconConnection.util.getLocation(event.player)
image

@matvejs16
Copy link
Author

Same problem and same error with server.rconConnection.util.getEntityData()

@matvejs16
Copy link
Author

Forgot, minecraft version: 1.12.2
Forge 1.12.2 Server

@garrettjoecox
Copy link
Owner

Well for one the node process shouldn’t crash from invalid regex, so I’ll need to debug and fix that one,

but I’m assuming the regex will also need to be altered from the default to accommodate for it being forge, I’ll try and respond with a fix tonight or tomorrow

@matvejs16
Copy link
Author

The problem is with /data command, that command added to minecraft in 1.13 version

@garrettjoecox
Copy link
Owner

Ah right, there was a way to obtain xyz coords before 1.13, I’ll have to check the git history

@matvejs16
Copy link
Author

Don't forget about server.rconConnection.util.getEntityData()
That uses /data command too

@iojanis
Copy link

iojanis commented Apr 27, 2022

I have somewhat the same problem with vanilla 1.18.2
Trying to get playerData aaaand... crash:

2022-04-27 13:29:13 error: uncaughtException: Cannot read properties of null (reading '2')
TypeError: Cannot read properties of null (reading '2')
at Object. (/Users/j/Developer/Production/creaft3/node_modules/@scriptserver/util/src/useUtil.ts:72:89)
at Generator.next ()
at fulfilled (/Users/j/Developer/Production/creaft3/node_modules/@scriptserver/util/dist/useUtil.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

using:

server.rconConnection.util.getEntityData(event.player).then(entityData => {
  console.log(entityData);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants