spigot/CraftBukkit-Patches/0025-Player-Collision-API.patch
2020-10-17 17:47:20 +11:00

30 lines
1,009 B
Diff

From ac81d134910bf92894eee7755e245a130ce82698 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 3ae565e84..cc7e79cdc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1722,6 +1722,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.25.1