Removed nullcheck from hashcode, and moved it up the chain.

This commit is contained in:
Starmism 2021-06-30 10:13:12 -06:00
parent 679ef90091
commit 252802dcbe

View File

@ -367,19 +367,4 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
public String getLink() { public String getLink() {
return null; return null;
} }
@Override
public int hashCode() {
if (this.getIdentifier() == null) {
throw new NullPointerException("Identifier must not be null! Error occurred in: " + this.getClass().getName());
}
if (this.getAuthor() == null) {
throw new NullPointerException("Author must not be null! Error occurred in: " + this.getClass().getName());
}
if (this.getVersion() == null) {
throw new NullPointerException("Version must not be null! Error occurred in: " + this.getClass().getName());
}
return super.hashCode();
}
} }