Movecraft icon indicating copy to clipboard operation
Movecraft copied to clipboard

Fix exception preventing ship movement

Open galacticwarrior9 opened this issue 3 years ago • 0 comments

Describe in detail what your pull request accomplishes

For some reason, possibly due to Paper's recent Adventure update, sign.getLines() was returning something different each time it was called for the same sign. This caused an NPE at Line 305 that stopped ship movement.

To fix this, we call the method once and save the result to a variable.

Tested and confirmed as working on CCNet.

Related issues:

  • Fixes #101

Checklist

  • [x] Unit tests
  • [x] Proper internationalization
  • [x] Compiled/tested (on a fork of the last release)

galacticwarrior9 avatar Mar 01 '21 12:03 galacticwarrior9