ClassCastException
Type casting broke: most often this is a version conflict between plugin and core, or two plugins fighting over the same system.
Updated August 13, 2026
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer
cannot be cast to class com.example.CustomPlayer
The code expected one type of object but received another.
Common causes
- The plugin version doesn't match the core. The
v1_20_R3classes in the error text are a direct sign of version binding — Compatibility. - Two plugins override the same system (for example, both interfere with player entities).
- Hybrid core: a mod and a plugin handle the same object differently — Hybrids.
What to do
- Update the plugin for your core version.
- Identify the second plugin working with the same system and remove one of them — Plugin breaks the server.
- On a hybrid, check whether a mod analogue of the plugin exists.
If the error occurs at startup
The plugin won't load at all. If it occurs on a player action, some functions won't work and the log will keep growing.
Minecraft hostingYour server runs while you are offlineCreate server
