• Proceed with caution! Unofficial add-on plugins and abilities are not supported by the ProjectKorra staff. We will not provide support for broken add-ons. Download at your own risk.
  • Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server
Whip

Whip v6.3

PhanaticD

Verified Member
Code:
[15:01:04] [Server thread/ERROR]: Error occurred while disabling ProjectKorra v1.8.6 (Is it up to date?)
org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register com.NickC1211.korra.Whip.WhipListener@48a8ce12 while not enabled
    at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager.java:543) ~[patched_1.12.2.jar:git-Paper-1322]
    at com.NickC1211.korra.Whip.Whip.stop(Whip.java:229) ~[?:?]
    at com.projectkorra.projectkorra.GeneralMethods.stopBending(GeneralMethods.java:2098) ~[?:?]
    at com.projectkorra.projectkorra.ProjectKorra.onDisable(ProjectKorra.java:162) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[patched_1.12.2.jar:git-Paper-1322]
    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:344) [patched_1.12.2.jar:git-Paper-1322]
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:425) [patched_1.12.2.jar:git-Paper-1322]
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:418) [patched_1.12.2.jar:git-Paper-1322]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.disablePlugins(CraftServer.java:355) [patched_1.12.2.jar:git-Paper-1322]
    at net.minecraft.server.v1_12_R1.MinecraftServer.stop(MinecraftServer.java:486) [patched_1.12.2.jar:git-Paper-1322]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:701) [patched_1.12.2.jar:git-Paper-1322]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
can you explain why you are registering a listener in the disable method
 

NickC1211

Verified Member
Code:
[15:01:04] [Server thread/ERROR]: Error occurred while disabling ProjectKorra v1.8.6 (Is it up to date?)
org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register com.NickC1211.korra.Whip.WhipListener@48a8ce12 while not enabled
    at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager.java:543) ~[patched_1.12.2.jar:git-Paper-1322]
    at com.NickC1211.korra.Whip.Whip.stop(Whip.java:229) ~[?:?]
    at com.projectkorra.projectkorra.GeneralMethods.stopBending(GeneralMethods.java:2098) ~[?:?]
    at com.projectkorra.projectkorra.ProjectKorra.onDisable(ProjectKorra.java:162) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[patched_1.12.2.jar:git-Paper-1322]
    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:344) [patched_1.12.2.jar:git-Paper-1322]
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:425) [patched_1.12.2.jar:git-Paper-1322]
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:418) [patched_1.12.2.jar:git-Paper-1322]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.disablePlugins(CraftServer.java:355) [patched_1.12.2.jar:git-Paper-1322]
    at net.minecraft.server.v1_12_R1.MinecraftServer.stop(MinecraftServer.java:486) [patched_1.12.2.jar:git-Paper-1322]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:701) [patched_1.12.2.jar:git-Paper-1322]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
can you explain why you are registering a listener in the disable method
No reason just a mistake it’s only meant to be in the load, just fixed it. I’m gonna make sure the projectkorra version and spigot are all up to date then I’ll post another update with these fixes and hopefully that will deal with the warns.
 

PhanaticD

Verified Member
also you are checking for if (entity instanceof Entity) well of course it will be, maybe you meant LivingEntity?
 

PhanaticD

Verified Member
also dont check the canbend in the constructor for the move, it makes no sense, do it in the listener


Code:
public class WhipListener implements Listener
{
    @EventHandler
    public void onLeftClick(final PlayerAnimationEvent event) {
        if (event.isCancelled()) {
            return;
        }
        if (BendingPlayer.getBendingPlayer(event.getPlayer()).canBend(CoreAbility.getAbility("Whip"))) {
            new Whip(event.getPlayer());
        }
    }
}
 

NickC1211

Verified Member
also dont check the canbend in the constructor for the move, it makes no sense, do it in the listener


Code:
public class WhipListener implements Listener
{
    @EventHandler
    public void onLeftClick(final PlayerAnimationEvent event) {
        if (event.isCancelled()) {
            return;
        }
        if (BendingPlayer.getBendingPlayer(event.getPlayer()).canBend(CoreAbility.getAbility("Whip"))) {
            new Whip(event.getPlayer());
        }
    }
}
Ok this is extremely helpful thank you
 
Top