AnimalTame
This event is fired to determine if an animal is going to be tamed. If canceled, the tame does not succeed. Otherwise, it simply serves as a notification of the tame taking place.
Event Class
You will need to cast the event in the function header as this class:
crafttweaker.event.AnimalTameEvent
You can, of course, also import the class before and use that name then.
Event interface extensions
AnimalTame Events implement the following interfaces and are able to call all of their methods/getters/setters as well:
ZenGetters/ZenSetters
The following information can be retrieved/set during the event:
ZenGetter | ZenSetter | Type |
---|---|---|
ZenGetter animal | ZenSetter | Type IEntityAnimal |
ZenGetter player | ZenSetter | Type IPlayer |
ZenGetters/ZenSetters/ZenMethods from extensions
ZenGetter | ZenSetter | Type |
---|---|---|
ZenGetter canceled | ZenSetter canceled | Type bool |
ZenMethodes
event.cancel();
Method, returns void (nothing). Can cancel the event and stop something from happening