-
Notifications
You must be signed in to change notification settings - Fork 1
KnockBack Manager Plugin support (Using AI) #1
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| plugins { | ||
| id("java") | ||
| } | ||
|
|
||
| group = "xyz.refinedev.api" | ||
| version = "1.0.0" | ||
|
|
||
| dependencies { | ||
| compileOnly(project(":api")) | ||
| // KnockbackManager API dependency | ||
| compileOnly(files("../../../../../KnockbackManager-1.13.4.jar")) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Jar not included in the commit?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has been corrected in the subsequent submission just now. |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| package xyz.refinedev.api.knockback.knockbackmanager; | ||
|
|
||
| import me.dw1e.kbm.KnockbackManager; | ||
| import me.dw1e.kbm.api.KnockbackManagerAPI; | ||
|
|
||
| import org.bukkit.entity.Player; | ||
|
|
||
| import org.jetbrains.annotations.NotNull; | ||
|
|
||
| import xyz.refinedev.api.knockback.KnockbackHook; | ||
|
|
||
| /** | ||
| * <p> | ||
| * This code is the property of Refine Development.<br> | ||
| * Copyright © 2025, All Rights Reserved.<br> | ||
| * </p> | ||
| * | ||
| * @author Drizzy | ||
| * @version KnockbackAPI | ||
| * @since 9/26/2025 | ||
| */ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Modify the copyright warning to the correct date and author
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has been corrected in the subsequent submission just now. |
||
| public class KnockbackManagerHook implements KnockbackHook { | ||
|
|
||
| @Override | ||
| public String getName() { | ||
| return "KnockbackManager"; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean isApplicable() { | ||
| return applicable; | ||
| } | ||
|
|
||
| @Override | ||
| public void setKnockback(@NotNull Player player, @NotNull String knockbackProfile) { | ||
| KnockbackManagerAPI kbmAPI = KnockbackManager.getInstance().getAPI(); | ||
| kbmAPI.setKBFile(player, knockbackProfile); | ||
| } | ||
|
|
||
| private static boolean applicable; | ||
| static { | ||
| try { | ||
| Class.forName("me.dw1e.kbm.KnockbackManager"); | ||
| applicable = true; | ||
| } catch (ClassNotFoundException e) { | ||
| applicable = false; | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove "- Uses me.dw1e.kbm.KnockbackManager API" for cleaner and more recognizable documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has been corrected in the subsequent submission just now.