Skip to content

Commit afc58ef

Browse files
committed
Fix subclasses of AbstractCommandSender in sets
1 parent c227733 commit afc58ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spark-common/src/main/java/me/lucko/spark/common/command/sender/AbstractCommandSender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected Object getObjectForComparison() {
3434
@Override
3535
public boolean equals(Object o) {
3636
if (this == o) return true;
37-
if (o == null || getClass() != o.getClass()) return false;
37+
if (!(o instanceof AbstractCommandSender)) return false;
3838
AbstractCommandSender<?> that = (AbstractCommandSender<?>) o;
3939
return this.getObjectForComparison().equals(that.getObjectForComparison());
4040
}

0 commit comments

Comments
 (0)