spigot/CraftBukkit-Patches/0025-Player-Collision-API.patch
2019-04-30 21:46:22 +10:00

30 lines
1,009 B
Diff

From 02338921a119e9da5ac40145e3904951db8b2574 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 64c29e015..d63eee812 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1643,6 +1643,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.20.1