Events have not good implementations of equals(), hashCode() and toString()
Open
- Dominant language
- Java
- Stars
- 238
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
Many events have neither of the three and a `toString()` call is for example handled by `PlayerEvent` class, which prints `PlayerEvent` and not the actual event subclass. Additionally `CancellablePlayerEvent` and `InventoryTransactionEvent` as examples are ignoring fields from its super class in its `toString()`.
I suggest removing custom equals and hashCode implementations from events as there is no reason to save and compare event instances.
Also toString() methods should be updated and added to all events to include super class fields like player or entity and cancelled.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.