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

Updating for Velocity 3.0.0 #183

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

benfoster04
Copy link

Good morning! I've been working on minor fixes for the Velocity portion of Buycraft. I've tested these changes locally by self-building, to which worked as expected. At this time, the current version of Buycraft for Velocity is non-functional under Velocity 3.0.0 conditions, these changes should solve this.

The main changes are as follows

  • Changing the imports to Kyori Adventure API, see the Velocity Migration Guide, section Removal of legacy dependencies
  • Changing all instances of TextComponent.of to Component.text (TextComponent is deprecated in favour of Component.text)
  • Changing all instances of TextColor to NamedTextColor (TextColor is now an RGB class and the old stuff was moved to NamedTextColor)

Many thanks :)

- Changed imports to adventure
- Changed TextComponent.of to Component.text
- Changed TextColor to NamedTextColor
- Changed imports to adventure
- Changed previous TextComponent.of to Component.text
- Changed TextColor to NamedTextColor
- Changed imports to adventure
- Changed previous TextComponent.of to Component.text
- Changed TextColor to NamedTextColor
- Changed imports to adventure
- Changed previous TextComponent.of to Component.text
- Changed TextColor to NamedTextColor
- Changed imports to adventure
- Changed previous TextComponent.of to Component.text
- Changed TextColor to NamedTextColor
- Changed imports to adventure
- Changed previous TextComponent.of to Component.text
- Changed TextColor to NamedTextColor
- Changed imports to adventure
- Changed previous TextComponent.of to Component.text
- Changed TextColor to NamedTextColor
Added additional variables to work around old code
@benfoster04
Copy link
Author

benfoster04 commented Jul 21, 2021

Noticed that the BuycraftCommand file also needed a change from Command to SimpleCommand, along with a change to the passed values in the execute function so that it worked with the API. To work with the old code, two variables are also created to fill in what it used to use. See commits 3d2485c and 80e2a09 for that.

@Xernium
Copy link

Xernium commented Nov 12, 2021

Whoops I should have looked. This already exists, closing #188

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.

2 participants