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

feat: toggle warp command #135

Merged
merged 6 commits into from
Jun 22, 2024
Merged

Conversation

TreemanKing
Copy link
Contributor

@TreemanKing TreemanKing commented Jun 21, 2024

closes #6

Probably needs some checking around the code. I couldn't figure out a great way on how to deal with the storage of warpData and changing it completely to newWarpData as you'll see in the code.

The tests for the new commands and such are required to be done but I've tested the following in a live server to make sure it works:

  • Conversion to Map<UUID, PlayerWarp> from a Map<UUID, Location> stored in database (for some reason, it doesn't convert to newWarpData until some edits or makes a new warp which is confusing)
  • Toggling of Warp

If there is any suggestions, please let me know.

Now, I was thinking if there is a way to directly convert it but there isn't because of the way it was structured. This *ISN'T* the best way around things but if someone can find a better way around it, be my guest.
note `line 294` of `warp.java`, I am unsure what this does and whether it should be `getWarpLocation` or not. I will leave it for the time being.
@tastybento tastybento self-assigned this Jun 21, 2024
@tastybento tastybento added the in progress the issue is being worked on label Jun 21, 2024
Copy link
Member

@tastybento tastybento left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, this looks good. I haven't run it yet, just reviewed the code. Need to go to job IRL now, so I'll pick this up over the weekend.

src/main/java/world/bentobox/warps/config/Settings.java Outdated Show resolved Hide resolved
src/main/java/world/bentobox/warps/objects/WarpsData.java Outdated Show resolved Hide resolved
- getToggleCommand is linked to toggleWarpCommand instead of hardcoded
- warpSigns is now null and not empty
@tastybento tastybento merged commit 18b63f4 into BentoBoxWorld:develop Jun 22, 2024
1 check failed
@tastybento
Copy link
Member

Thanks!

@tastybento tastybento removed the in progress the issue is being worked on label Jun 22, 2024
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

Successfully merging this pull request may close these issues.

/is togglewarp - toggle warp on/off
2 participants