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

Folia Support #720

Closed
wants to merge 6 commits into from
Closed

Folia Support #720

wants to merge 6 commits into from

Conversation

YufiriaMazenta
Copy link

@YufiriaMazenta YufiriaMazenta commented Feb 28, 2024

Added Folia compatibility for plugin
#708

build.gradle.kts Outdated Show resolved Hide resolved
Copy link
Owner

Choose a reason for hiding this comment

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

Why is a whole separate class needed that just wraps other methods? Does folia not provide a better way of doing this?

Copy link
Author

Choose a reason for hiding this comment

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

Folia does not provide a unified API. The method it provides to determine whether it is the folia only exists on the paper above 1.19.4, so there is currently no better way. The purpose of my separate encapsulation is for versatility.

Copy link
Owner

@kernitus kernitus left a comment

Choose a reason for hiding this comment

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

Is there an actual guide with examples on steps needed to support Folia? I couldn't find anything in their documentation

@YufiriaMazenta
Copy link
Author

Is there an actual guide with examples on steps needed to support Folia? I couldn't find anything in their documentation

The adaptation on the folia side mainly lies in thread-related calls, and other APIs are basically implemented in the same way I do.

@YufiriaMazenta YufiriaMazenta requested a review from kernitus March 19, 2024 07:21
Copy link
Owner

@kernitus kernitus left a comment

Choose a reason for hiding this comment

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

Have you build this and tried running it with folia yet?

Comment on lines +68 to +69
// BungeeCord Chat
compileOnly("net.md-5:bungeecord-chat:1.16-R0.4")
Copy link
Owner

Choose a reason for hiding this comment

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

What is bungeecord chat needed for?

compileOnly("org.spigotmc:spigot-api:1.20.3-R0.1-SNAPSHOT")
// compileOnly("org.spigotmc:spigot-api:1.20.3-R0.1-SNAPSHOT")
// Folia
compileOnly("dev.folia:folia-api:1.19.4-R0.1-20230527.192927-40@jar")
Copy link
Owner

Choose a reason for hiding this comment

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

Did you actually manage to get this to build with Java 1.8? The github actions pipeline seems to fails to build this

import org.jetbrains.annotations.NotNull;

/**
* Bukkit平台的调度器
Copy link
Owner

Choose a reason for hiding this comment

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

Could you translate this to english please

import java.util.function.Consumer;

/**
* Folia平台的调度器
Copy link
Owner

Choose a reason for hiding this comment

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

Could you translate this to english please

public interface ITaskWrapper {

/**
* 取消此任务
Copy link
Owner

Choose a reason for hiding this comment

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

Could you translate this to english please

@kernitus
Copy link
Owner

@YufiriaMazenta is there a reason you closed the PR?

@YufiriaMazenta
Copy link
Author

@YufiriaMazenta is there a reason you closed the PR?

I want to use another way to be compatible with folia

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