spigot/CraftBukkit-Patches/0035-Player-Collision-API.patch
2017-04-30 09:32:32 +10:00

30 lines
1,007 B
Diff

From 37fd2b08e840fd45609e63e89014a81404a1d1a4 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 27 Mar 2016 20:35:09 +1100
Subject: [PATCH] Player Collision API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 66361318..4da8df00 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1459,6 +1459,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Spigot start
private final Player.Spigot spigot = new Player.Spigot()
{
+
+ @Override
+ public boolean getCollidesWithEntities() {
+ return CraftPlayer.this.isCollidable();
+ }
+
+ @Override
+ public void setCollidesWithEntities(boolean collides) {
+ CraftPlayer.this.setCollidable(collides);
+ }
};
public Player.Spigot spigot()
--
2.11.0