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

org.bukkit.material.MaterialData cannot be cast to org.bukkit.material.Tree #27

Open
bog500 opened this issue Dec 7, 2015 · 7 comments

Comments

@bog500
Copy link

bog500 commented Dec 7, 2015

Got this error today. I can't give more details, I'm not the player who generated it.

[21:37:31] [Server thread/WARN]: [TreeAssist] Task #65300 for TreeAssist v5.8.89 generated an exception
java.lang.ClassCastException: org.bukkit.material.MaterialData cannot be cast to org.bukkit.material.Tree
at me.itsatacoshop247.TreeAssist.TreeAssistReplant.run(TreeAssistReplant.java:42) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8.8.jar:git-Spigot-76236cb-c373061]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8.8.jar:git-Spigot-76236cb-c373061]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [spigot-1.8.8.jar:git-Spigot-76236cb-c373061]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-76236cb-c373061]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-76236cb-c373061]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-76236cb-c373061]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_60]

@slipcor
Copy link
Collaborator

slipcor commented Dec 17, 2015

hmmm maybe they broke something? Try running the purge command, it removes invalid "no more logs", maybe you have used worldedit and the plugin thinks there are logs where there are no logs atm?

@bog500
Copy link
Author

bog500 commented Dec 17, 2015

Worldedit is not installed on this server. nor any other plugin that use the axe as a special tool.

@slipcor
Copy link
Collaborator

slipcor commented Dec 17, 2015

Hm yeah I was not talking about the tool part, but rather about "something" removing logs while the plugin didnt notice (and thus not clean up) :)

try

/treeassist purge [worldname]

or

/treeassist purge global

@bog500
Copy link
Author

bog500 commented Dec 18, 2015

Ok, well no I don't have any plugin that would do that either.

It only happened once. Could it be because two persons were cutting the same log at the same time ?

@slipcor
Copy link
Collaborator

slipcor commented Dec 18, 2015

Hmm technically, yes! But there are so many plugins that might have altered blocks, so just doing this command every now and then will not hurt :)

After all, MY plugin could actually MISS legit block removals for whatever reasons and that could cause this NPE too :) no system is flawless ;)

@Fam-of3
Copy link

Fam-of3 commented Jun 18, 2016

We use Worldedit and get the same messages, cause a bit of lag when this happens...
18.06 14:51:54 [Server] WARN [TreeAssist] Task #3798 for TreeAssist v5.8.89 generated an exception 18.06 14:51:54 [Server] INFO java.lang.ClassCastException: org.bukkit.material.Sapling cannot be cast to org.bukkit.material.Tree 18.06 14:51:54 [Server] INFO at me.itsatacoshop247.TreeAssist.TreeAssistReplant.run(TreeAssistReplant.java:42) ~[?:?] 18.06 14:51:54 [Server] INFO at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-latest.jar:git-Spigot-c55900f-9856d8a] 18.06 14:51:54 [Server] INFO at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-latest.jar:git-Spigot-c55900f-9856d8a] 18.06 14:51:54 [Server] INFO at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:741) [spigot-latest.jar:git-Spigot-c55900f-9856d8a] 18.06 14:51:54 [Server] INFO at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot-latest.jar:git-Spigot-c55900f-9856d8a] 18.06 14:51:54 [Server] INFO at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) [spigot-latest.jar:git-Spigot-c55900f-9856d8a] 18.06 14:51:54 [Server] INFO at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [spigot-latest.jar:git-Spigot-c55900f-9856d8a] 18.06 14:51:54 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]

could the the warn be from a minor change in bukkit?

@slipcor
Copy link
Collaborator

slipcor commented Jun 18, 2016

I have moved to https://github.com/slipcor/TreeAssist

and furthermore, especially for Spigot, to the spigot page:

https://www.spigotmc.org/resources/treeassist.16941/

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

No branches or pull requests

3 participants