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

2531 command button panel #2535

Merged
merged 5 commits into from
Oct 21, 2024
Merged

2531 command button panel #2535

merged 5 commits into from
Oct 21, 2024

Conversation

tastybento
Copy link
Member

No description provided.

Also enhances the customizable panel API by making templates load
dynamically when requested.
@@ -466,16 +464,6 @@ public boolean loadSettings() {
return false;
}

log("Saving default panels...");
Copy link
Member Author

Choose a reason for hiding this comment

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

No longer required because they are loaded from Jar if not found

@@ -346,7 +346,7 @@ private CompositeCommand getCommandFromArgs(String[] args) {
*
* @return IslandsManager
*/
protected IslandsManager getIslands() {
public IslandsManager getIslands() {
Copy link
Member Author

Choose a reason for hiding this comment

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

More useful

@@ -362,9 +362,8 @@ ItemSlot nextItemSlot() {
* this button is present.
*
* @return Map that links button type to amount in the gui.
* @deprecated Use {@link #amount(String)} instead.
* Use {@link #amount(String)} instead.
Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't seem to be deprecated, and is used a lot.

BentoBox.getInstance().logError(file.getAbsolutePath() + " does not exist for panel template");
// Return as file does not exist.
return null;
// Try to get it from the JAR
Copy link
Member Author

Choose a reason for hiding this comment

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

If it's not there, then try and get it from the Jar.

import world.bentobox.bentobox.api.user.User;

/**
* @author tastybento
Copy link
Member Author

Choose a reason for hiding this comment

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

This is for use by all customizable panels.

@@ -0,0 +1,59 @@
/**
*
Copy link
Member Author

Choose a reason for hiding this comment

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

Not used yet. WIP

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll delete this

title: "&2&l Your island homes"
buttons:
# This button is used for displaying islands to teleport to
name: "&l [name]"
Copy link
Member Author

Choose a reason for hiding this comment

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

Keep it simple - just name right now.

Copy link

sonarcloud bot commented Oct 21, 2024

@tastybento tastybento merged commit 801af3d into develop Oct 21, 2024
2 checks passed
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.

1 participant