Deprecate old MACreature constructors for removal.

The new constructor and registration method pair is what other plugins
should be using. They provide a slightly cleaner interface, and we don't
need so many different ways to do the same thing.
This commit is contained in:
Andreas Troelsen 2021-07-29 01:23:08 +02:00
parent 490df61375
commit 72f4d16e6f

View File

@ -47,6 +47,12 @@ public class MACreature
this.name = name;
}
/**
* @deprecated This constructor will be removed in a future update.
* Use {@link #MACreature(EntityType, String)} instead, and register
* with {@link #register(String, MACreature)}.
*/
@Deprecated
public MACreature(String name, String plural, EntityType type) {
this.name = name;
this.plural = (plural != null) ? plural : name;
@ -55,6 +61,12 @@ public class MACreature
register();
}
/**
* @deprecated This constructor will be removed in a future update.
* Use {@link #MACreature(EntityType, String)} instead, and register
* with {@link #register(String, MACreature)}.
*/
@Deprecated
public MACreature(String name, EntityType type) {
this(name, name + "s", type);
}