gomint / gomint/gomint

Events have not good implementations of equals(), hashCode() and toString()

Open
#719 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.