Skip to content

Conversation

@cassioamartim
Copy link

No description provided.

Copy link
Member

@LoJoSho LoJoSho left a comment

Choose a reason for hiding this comment

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

I'm just confused at the direction of this PR, please review and modify based on some of the feedback I've left.

import org.jetbrains.annotations.ApiStatus;

public final class HibiscusCommonsPlugin extends HibiscusPlugin {
public final class HibiscusCommonsPlugin extends HibiscusPlugin
Copy link
Member

Choose a reason for hiding this comment

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

Do not change formatting of code.

if (onPaper) {

if (onFolia) {
getLogger().info("Detected Folia by Cássio Martim! Enabling Folia support...");
Copy link
Member

Choose a reason for hiding this comment

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

Why can't it be a generic message? The plugin doesn't go in saying "Detected Paper by LoJoSho!"

getLogger().info("Detected Folia by Cássio Martim! Enabling Folia support...");

foliaTask = new FoliaTaskService(this);
} else if (onPaper) {
Copy link
Member

Choose a reason for hiding this comment

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

Why is this an else if statement? Folia runs on Paper, which means we can use the methods provided by Paper?

Copy link
Member

Choose a reason for hiding this comment

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

Ok, so after looking at some NMSPackets code, it seems your uisng onPaper has a way to differentiate between regular and folia servers? That's not the intended use case, it's for Spigot vs Paper supported forks.


public HibiscusCommonsPlugin() {
@Getter
private static FoliaTaskService foliaTask;
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused why the Folia Task is only for Folia? It would be incredibly annoying for every single task in every single plugin that extrends Hibiscus Commons to be like:

if (onFolia) foliaTask.run
else bukkitTask.run

@LoJoSho LoJoSho added enhancement New feature or request help wanted Extra attention is needed labels Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants