Add Getter for Entity Invulnerability

This commit is contained in:
DerFlash 2013-08-03 19:54:36 +10:00 committed by md_5
parent 5a237b8e57
commit edd0d42995
7 changed files with 93 additions and 12 deletions

View File

@ -1,11 +1,11 @@
From 3d516b27d9367638b399b7f0ee038bca72bdba2f Mon Sep 17 00:00:00 2001
From d7c8f70a489cad01a1194e49861173e0089f955a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:20:49 +1000
Subject: [PATCH] BungeeCord Support
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d492790..8402be7 100644
index d492790..115103b 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -705,4 +705,23 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
@ -14,7 +14,7 @@ index d492790..8402be7 100644
public double getHealthScale();
+
+ // Spigot start
+ public class Spigot
+ public class Spigot extends Entity.Spigot
+ {
+
+ /**

View File

@ -1,11 +1,11 @@
From ba11438ff1ded708c6ddd33fbb14b2c1785dec19 Mon Sep 17 00:00:00 2001
From 3e5b2a2802c4739be6592fa013aa2ab5d0f91157 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:08:24 +1000
Subject: [PATCH] Add Arrow API
diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java
index 26d3473..df177bc 100644
index 26d3473..676fe2b 100644
--- a/src/main/java/org/bukkit/entity/Arrow.java
+++ b/src/main/java/org/bukkit/entity/Arrow.java
@@ -3,4 +3,22 @@ package org.bukkit.entity;
@ -16,7 +16,7 @@ index 26d3473..df177bc 100644
+public interface Arrow extends Projectile
+{
+
+ public class Spigot
+ public class Spigot extends Entity.Spigot
+ {
+
+ public double getDamage()

View File

@ -1,5 +1,5 @@
From 358d6030f9f6bfa6f0d79d2166bfe37067ceea71 Mon Sep 17 00:00:00 2001
From: Alex Bennett <me@alexben.net>
From eff7918f5154d1394004f40e5f3a74f99793a177 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:42:16 +1000
Subject: [PATCH] Expand Boolean Prompt Values

View File

@ -0,0 +1,36 @@
From f71dbed41b95b2db2780fc240a9788736f6e19ab Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:49:36 +1000
Subject: [PATCH] Add Getter for Entity Invulnerability
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 72af4fa..a5b2100 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -280,4 +280,22 @@ public interface Entity extends Metadatable {
* @return The current vehicle.
*/
public Entity getVehicle();
+
+ // Spigot Start
+ public class Spigot
+ {
+
+ /**
+ * Returns whether this entity is invulnerable.
+ *
+ * @return True if the entity is invulnerable.
+ */
+ public boolean isInvulnerable()
+ {
+ throw new UnsupportedOperationException( "Not supported yet." );
+ }
+ }
+
+ Spigot spigot();
+ // Spigot End
}
--
1.8.1.2

View File

@ -1,4 +1,4 @@
From 7b618f9868a803abda53983e73d886de6e67987d Mon Sep 17 00:00:00 2001
From 44b8f77d9f563c6ed5482428d75865c97a657613 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 15:10:56 +1000
Subject: [PATCH] Skeleton API Implementations
@ -40,6 +40,26 @@ index b46b9c4..c91b12c 100644
+ {
+ return spigot;
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 8e2e5cd..b1f86a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -397,4 +397,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return getHandle().vehicle.getBukkitEntity();
}
+
+ // Spigot start
+ private final Spigot spigot = new Spigot()
+ {
+ };
+
+ public Spigot spigot()
+ {
+ return spigot;
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java

View File

@ -1,4 +1,4 @@
From 8afe6c5a3f1b0947603f8e00c6806627e5b95118 Mon Sep 17 00:00:00 2001
From d7c99359b50c44a382c6238dc1934574b0a4d5a8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Feb 2013 05:10:21 -0500
Subject: [PATCH] Entity Activation Range
@ -146,10 +146,10 @@ index 6206167..211127b 100644
entity.V = entity.locY;
entity.W = entity.locZ;
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
index f6e507e..4328ecf 100644
index 8340c13..541dfe4 100644
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
@@ -29,6 +29,9 @@ public class SpigotTimings {
@@ -30,6 +30,9 @@ public class SpigotTimings {
public static final CustomTimingsHandler playerCommandTimer = new CustomTimingsHandler("** playerCommand");

View File

@ -0,0 +1,25 @@
From a6a3d75d0771ece044c7fa466bccaeed0d98435e Mon Sep 17 00:00:00 2001
From: DerFlash <bte@freenet.de>
Date: Sat, 3 Aug 2013 19:53:48 +1000
Subject: [PATCH] Add Getter for Entity Invulnerability
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index b1f86a0..79febb8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -401,6 +401,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
// Spigot start
private final Spigot spigot = new Spigot()
{
+ @Override
+ public boolean isInvulnerable()
+ {
+ return getHandle().isInvulnerable();
+ }
};
public Spigot spigot()
--
1.8.1.2