Magic

Magic

190k Downloads

NoSuchMethodError

sargunv opened this issue ยท 2 comments

commented

When using the Blob, Platform, or Shell spell, I get the following error:

[05:10:41 ERROR]: Could not pass event PlayerInteractEvent to Magic v6.3
org.bukkit.event.EventException
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[server.jar:git-Spigot-16c940b-0b154b1]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-16c940b-0b154b1]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [server.jar:git-Spigot-16c940b-0b154b1]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [server.jar:git-Spigot-16c940b-0b154b1]
	at org.bukkit.craftbukkit.v1_11_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:231) [server.jar:git-Spigot-16c940b-0b154b1]
	at org.bukkit.craftbukkit.v1_11_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:198) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.PlayerInteractManager.a(PlayerInteractManager.java:110) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:821) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.PacketPlayInBlockDig.a(SourceFile:40) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.PacketPlayInBlockDig.a(SourceFile:10) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13) [server.jar:git-Spigot-16c940b-0b154b1]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_112]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_112]
	at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:739) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:675) [server.jar:git-Spigot-16c940b-0b154b1]
	at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:574) [server.jar:git-Spigot-16c940b-0b154b1]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
Caused by: java.lang.NoSuchMethodError: org.bukkit.DyeColor.getData()B
	at com.elmakers.mine.bukkit.utility.DeprecatedUtils.getData(DeprecatedUtils.java:47) ~[?:?]
	at com.elmakers.mine.bukkit.spell.BrushSpell.processParameters(BrushSpell.java:83) ~[?:?]
	at com.elmakers.mine.bukkit.spell.ActionSpell.processParameters(ActionSpell.java:90) ~[?:?]
	at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:1013) ~[?:?]
	at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:947) ~[?:?]
	at com.elmakers.mine.bukkit.spell.BaseSpell.cast(BaseSpell.java:1716) ~[?:?]
	at com.elmakers.mine.bukkit.wand.Wand.cast(Wand.java:3839) ~[?:?]
	at com.elmakers.mine.bukkit.wand.Wand.cast(Wand.java:3821) ~[?:?]
	at com.elmakers.mine.bukkit.wand.Wand.performAction(Wand.java:5070) ~[?:?]
	at com.elmakers.mine.bukkit.magic.listener.PlayerController.onPlayerInteract(PlayerController.java:472) ~[?:?]
	at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[server.jar:git-Spigot-16c940b-0b154b1]
	... 18 more

I'm using the latest 1.11 Craftbukkit as of this post.

commented

That method was removed in 1.11 Bukkit.
Previously it was:

    /**
     * Gets the associated (wool) data value representing this color.
     *
     * @return A byte containing the (wool) data value of this color
     * @deprecated The name is misleading. It would imply {@link
     *     Material#INK_SACK} but uses {@link Material#WOOL}
     * @see #getWoolData()
     * @see #getDyeData()
     */
    @Deprecated
    public byte getData() {
        return getWoolData();
    }

    /**
     * Gets the associated wool data value representing this color.
     *
     * @return A byte containing the wool data value of this color
     * @see #getDyeData()
     * @deprecated Magic value
     */
    @Deprecated
    public byte getWoolData() {
        return woolData;
    }

Anyways, it should be fixed in the latest snapshot: http://jenkins.elmakers.com/job/MagicPlugin/1756/com.elmakers.mine.bukkit.plugins$Magic/

commented

Thank you, @killme!