2014-03-09 22:37:28 +01:00
|
|
|
From ca506b151bc56955adad102c6d1bd0d7ab9adc3c Mon Sep 17 00:00:00 2001
|
2013-08-06 03:19:10 +02:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Mon, 5 Aug 2013 20:17:20 +1000
|
|
|
|
Subject: [PATCH] Cap Minimum Player Speed
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-02-12 14:48:26 +01:00
|
|
|
index afbc3d8..2a13ab2 100644
|
2013-08-06 03:19:10 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2014-02-12 14:48:26 +01:00
|
|
|
@@ -1129,7 +1129,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2013-08-06 03:19:10 +02:00
|
|
|
public void setFlySpeed(float value) {
|
|
|
|
validateSpeed(value);
|
|
|
|
EntityPlayer player = getHandle();
|
|
|
|
- player.abilities.flySpeed = value / 2f;
|
|
|
|
+ player.abilities.flySpeed = Math.max( value, 0.0001f ) / 2f; // Spigot
|
|
|
|
player.updateAbilities();
|
|
|
|
|
|
|
|
}
|
2014-02-12 14:48:26 +01:00
|
|
|
@@ -1137,7 +1137,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2013-08-06 03:19:10 +02:00
|
|
|
public void setWalkSpeed(float value) {
|
|
|
|
validateSpeed(value);
|
|
|
|
EntityPlayer player = getHandle();
|
|
|
|
- player.abilities.walkSpeed = value / 2f;
|
|
|
|
+ player.abilities.walkSpeed = Math.max( value, 0.0001f ) / 2f; // Spigot
|
|
|
|
player.updateAbilities();
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2014-03-09 22:37:28 +01:00
|
|
|
1.8.3.2
|
2013-08-06 03:19:10 +02:00
|
|
|
|