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

Placeholders are missing for when you dont have an island #863

Open
PeachesMLG opened this issue Jun 10, 2024 · 4 comments
Open

Placeholders are missing for when you dont have an island #863

PeachesMLG opened this issue Jun 10, 2024 · 4 comments
Assignees
Labels
bug Something isn't working confirmed A verified issue that is worked on high

Comments

@PeachesMLG
Copy link
Member

The Placeholders between when you have an island, and dont have an island is different

https://github.com/Iridium-Development/IridiumSkyblock/blob/master/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java

Extra bonus points if we can think about how to stop this in the future, add some unit tests? recode it somehow?

@PeachesMLG PeachesMLG added bug Something isn't working unconfirmed An issue that needs further investigation labels Jun 10, 2024
@PeachesMLG PeachesMLG added confirmed A verified issue that is worked on and removed unconfirmed An issue that needs further investigation labels Jun 10, 2024
@PeachesMLG
Copy link
Member Author

PeachesMLG commented Jun 10, 2024

Bit of extra info, we call this method here:

    @Override
    public List<Placeholder> getPlaceholders(Optional<Island> optional) {
        return optional.isPresent() ? getPlaceholders(optional.get()) : defaultPlaceholders;
    }

Which then calls two different methods, one with an Island, and the other for if there is no island present. Which means we have two lists to maintain, and these two lists have differences in them now which is the issue.

So if you have a PAPI plugin (e.g. a scoreboard) a placeholder e.g. island_enhancement_size_level would work if I have an island, however if I dont have an island, instead of showing N/A it wont process anything and will stay as %iridiumskyblock_island_enhancement_size_level

@PeachesMLG
Copy link
Member Author

(Also, make sure there are no duplicated Placeholders in this list, e.g. island_visitors, also extra bonus brownie points for how we can prevent this, again maybe unit tests?)

@RasulbekHak1mov
Copy link

i want to add the command "/is go" to my server, if it type the command it should go to the island, if the island doesn't exist then the island should be created

Can you help me

@sh0inx
Copy link
Contributor

sh0inx commented Jun 22, 2024

  1. this is not related to the current issue
  2. if you need help, join our discord server and head to #skyblock, we can help you there
  3. if you do not want to use discord, create a NEW issue and follow the issue guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed A verified issue that is worked on high
Projects
None yet
Development

No branches or pull requests

5 participants