2014-05-15 09:05:45 +02:00
|
|
|
From d4363413bc30737605f456aedc7a6f1b85e6de7b Mon Sep 17 00:00:00 2001
|
2014-04-12 06:18:37 +02:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Fri, 28 Jun 2013 19:52:54 +1000
|
|
|
|
Subject: [PATCH] Disallow Interaction With Self
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2014-05-15 09:05:45 +02:00
|
|
|
index c581334..662eb5a 100644
|
2014-04-12 06:18:37 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2014-05-15 09:05:45 +02:00
|
|
|
@@ -1056,6 +1056,13 @@ public class PlayerConnection implements PacketPlayInListener {
|
2014-04-12 06:18:37 +02:00
|
|
|
if (this.player.dead) return; // CraftBukkit
|
|
|
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
|
|
|
Entity entity = packetplayinuseentity.a((World) worldserver);
|
|
|
|
+ // Spigot Start
|
|
|
|
+ if ( entity == player )
|
|
|
|
+ {
|
|
|
|
+ disconnect( "Cannot interact with self!" );
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // Spigot End
|
|
|
|
|
|
|
|
this.player.v();
|
|
|
|
if (entity != null) {
|
|
|
|
--
|
2014-04-19 01:15:23 +02:00
|
|
|
1.9.1
|
2014-04-12 06:18:37 +02:00
|
|
|
|