2013-12-14 06:58:22 +00:00
|
|
|
From 9584169bdf6aa8b3c0d06f042d5306ca49a31a21 Mon Sep 17 00:00:00 2001
|
2013-08-06 01:19:10 +00: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
|
2013-12-14 06:58:22 +00:00
|
|
|
index 2492000..627a580 100644
|
2013-08-06 01:19:10 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2013-12-14 06:58:22 +00:00
|
|
|
@@ -1003,7 +1003,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2013-08-06 01:19:10 +00: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();
|
|
|
|
|
|
|
|
}
|
2013-12-14 06:58:22 +00:00
|
|
|
@@ -1011,7 +1011,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2013-08-06 01:19:10 +00: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();
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2013-12-01 03:40:53 +00:00
|
|
|
1.8.3.2
|
2013-08-06 01:19:10 +00:00
|
|
|
|