Skip to content

Refactor#2

Merged
CodfishBender merged 5 commits into
ver/1.21from
ver/1.21-refactor
Jul 25, 2025
Merged

Refactor#2
CodfishBender merged 5 commits into
ver/1.21from
ver/1.21-refactor

Conversation

@CodfishBender
Copy link
Copy Markdown
Contributor

Moved to gradle.
Moved to CommandAPI.
Rewrote a lot of functions, removed redundant functions and classes.

public class PlayerListener implements Listener {

@EventHandler(priority = EventPriority.MONITOR) // Checks if other plugins are using the event
@EventHandler(priority = EventPriority.HIGHEST)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requires to be monitor as if it's on highest, it may override claim plugins

Comment thread build.gradle.kts

dependencies {
compileOnly("de.tr7zw:item-nbt-api-plugin:2.15.1")
compileOnly("dev.jorel:commandapi-bukkit-core:10.0.1")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should be putting all dependencies into the plugin. NBTAPI and COMMANDAPI should be shaded

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These are not shaded for ItemAttributes either, it seems like a waste to shade it in multiple places.

for (String msg : send) {
if (sendInChat) {
ChatUtils.sendMsg(player, SellstickConfig.nothingWorth, true);
ChatUtils.sendMsg(player, msg
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there a reason why all the chat stuff is handled here rather than a Utils class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The chat/action bar handling could fit into ChatUtils but there wasn't enough repetition to justify it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Future possible features?

@CodfishBender CodfishBender merged commit 7fad3ac into ver/1.21 Jul 25, 2025
1 check failed
@CodfishBender CodfishBender deleted the ver/1.21-refactor branch July 25, 2025 07:46
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