Make SentientNPC extend LivingEntity

This commit is contained in:
Aikar 2018-06-16 14:28:13 -04:00
parent ed61b2982e
commit 89aa04f9ed
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE
1 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
From 8290a8cef4bf55a6db5d39202d919ef8b1c38d4e Mon Sep 17 00:00:00 2001 From 7c17fe406f21ecc522cc1a3a1b1d86babcdf66ff Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 16 Jun 2018 13:41:00 -0400 Date: Sat, 16 Jun 2018 13:41:00 -0400
Subject: [PATCH] Add SentientNPC Interface to Entities Subject: [PATCH] Add SentientNPC Interface to Entities
@ -14,10 +14,10 @@ This interface lets you identify NPC entities capable of sentience, and able to
diff --git a/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java b/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java diff --git a/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java b/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java
new file mode 100644 new file mode 100644
index 00000000..a0bdf855 index 00000000..231e8af1
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java +++ b/src/main/java/com/destroystokyo/paper/entity/SentientNPC.java
@@ -0,0 +1,37 @@ @@ -0,0 +1,39 @@
+/* +/*
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License + * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
+ * + *
@ -43,6 +43,8 @@ index 00000000..a0bdf855
+ +
+package com.destroystokyo.paper.entity; +package com.destroystokyo.paper.entity;
+ +
+import org.bukkit.entity.LivingEntity;
+
+/** +/**
+ * Used to determine ACTUAL Living NPC's. Spigot mistakenly inversed the conditions for LivingEntity, and + * Used to determine ACTUAL Living NPC's. Spigot mistakenly inversed the conditions for LivingEntity, and
+ * used LivingEntity for Insentient Entities, and named the actual EntityLiving class EntityInsentient. + * used LivingEntity for Insentient Entities, and named the actual EntityLiving class EntityInsentient.
@ -53,7 +55,7 @@ index 00000000..a0bdf855
+ * + *
+ * This interface lets you identify NPC entities capable of sentience, and able to move about and react to the world. + * This interface lets you identify NPC entities capable of sentience, and able to move about and react to the world.
+ */ + */
+public interface SentientNPC { +public interface SentientNPC extends LivingEntity {
+} +}
diff --git a/src/main/java/org/bukkit/entity/Ambient.java b/src/main/java/org/bukkit/entity/Ambient.java diff --git a/src/main/java/org/bukkit/entity/Ambient.java b/src/main/java/org/bukkit/entity/Ambient.java
index 779e3897..ef548fb4 100644 index 779e3897..ef548fb4 100644