Paper/Spigot-API-Patches/0158-Here-s-Johnny.patch
Shane Freeder 0976d52bbd Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Please note that this build includes changes to meet upstreams
requirements for nullability annotations. While we aim for a level of
accuracy, these might not be 100% correct, if there are any issues,
please speak to us on discord, or open an issue on the tracker to
discuss.

Bukkit Changes:
9a6a1de3 Remove nullability annotations from enum constructors
3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API

CraftBukkit Changes:
8d8475fc SPIGOT-4666: Force parameter in HumanEntity#sleep
8b1588e2 Fix ExplosionPrimeEvent#setFire not working with EnderCrystals
39a287b7 Don't ignore newlines in PlayerListHeader/Footer

Spigot Changes:
cf694d87 Add nullability annotations
2019-03-20 00:31:18 +00:00

46 lines
1.6 KiB
Diff

From 3b65f3403373f14a5e09ef83dc71bdf9ed3b634b Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 12 Oct 2018 01:37:16 -0500
Subject: [PATCH] Here's Johnny!
diff --git a/src/main/java/org/bukkit/entity/Vindicator.java b/src/main/java/org/bukkit/entity/Vindicator.java
index b8ea68a8f..c5d9e76a6 100644
--- a/src/main/java/org/bukkit/entity/Vindicator.java
+++ b/src/main/java/org/bukkit/entity/Vindicator.java
@@ -3,4 +3,30 @@ package org.bukkit.entity;
/**
* Represents a Vindicator.
*/
-public interface Vindicator extends Illager { }
+public interface Vindicator extends Illager {
+ // Paper start
+ /**
+ * Check if this Vindicator is set to Johnny mode.
+ * <p>
+ * When in Johnny mode the Vindicator will be hostile to any kind of mob, except
+ * for evokers, ghasts, illusioners and other vindicators. It will even be hostile
+ * to vexes. All mobs, except for endermites, phantoms, guardians, slimes and
+ * magma cubes, will try to attack the vindicator in return.
+ *
+ * @return True if in Johnny mode
+ */
+ boolean isJohnny();
+
+ /**
+ * Set this Vindicator's Johnny mode.
+ * <p>
+ * When in Johnny mode the Vindicator will be hostile to any kind of mob, except
+ * for evokers, ghasts, illusioners and other vindicators. It will even be hostile
+ * to vexes. All mobs, except for endermites, phantoms, guardians, slimes and
+ * magma cubes, will try to attack the vindicator in return.
+ *
+ * @param johnny True to enable Johnny mode
+ */
+ void setJohnny(boolean johnny);
+ // Paper end
+}
--
2.21.0