From 0f38ef008f94aa191278a4e7318a0492bdc01b5c Mon Sep 17 00:00:00 2001 From: Sn0wStorm Date: Sat, 23 Apr 2016 18:51:29 +0200 Subject: [PATCH] Fixed too much drunk-pushing in 1.9 --- src/com/dre/brewery/BPlayer.java | 11 ++++++++--- src/com/dre/brewery/Barrel.java | 4 ++-- src/com/dre/brewery/P.java | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/com/dre/brewery/BPlayer.java b/src/com/dre/brewery/BPlayer.java index c577433..c31a9ec 100644 --- a/src/com/dre/brewery/BPlayer.java +++ b/src/com/dre/brewery/BPlayer.java @@ -229,8 +229,13 @@ public class BPlayer { if (time == 0) { // push him only to the side? or any direction // like now - push.setX(Math.random() - 0.5); - push.setZ(Math.random() - 0.5); + if (P.use1_9) { // Pushing is way stronger in 1.9 + push.setX((Math.random() - 0.5) / 2.0); + push.setZ((Math.random() - 0.5) / 2.0); + } else { + push.setX(Math.random() - 0.5); + push.setZ(Math.random() - 0.5); + } player.setVelocity(push); } else if (time < 0 && time > -10) { // push him some more in the same direction @@ -574,4 +579,4 @@ public class BPlayer { return -getQuality() + 11; } -} \ No newline at end of file +} diff --git a/src/com/dre/brewery/Barrel.java b/src/com/dre/brewery/Barrel.java index 4e79dbc..689b0a9 100644 --- a/src/com/dre/brewery/Barrel.java +++ b/src/com/dre/brewery/Barrel.java @@ -129,7 +129,7 @@ public class Barrel implements InventoryHolder { } } catch (Throwable e) { P.p.errorLog("Failed to Check WorldGuard for Barrel Open Permissions!"); - P.p.errorLog("Brewery was tested with version 5.8 to 6.0 of WorldGuard!"); + P.p.errorLog("Brewery was tested with version 5.8 to 6.1 of WorldGuard!"); P.p.errorLog("Disable the WorldGuard support in the config and do /brew reload"); e.printStackTrace(); P.p.msg(player, "&cError opening Barrel, please report to an Admin!"); @@ -146,7 +146,7 @@ public class Barrel implements InventoryHolder { } } catch (Throwable e) { P.p.errorLog("Failed to Check GriefPrevention for Barrel Open Permissions!"); - P.p.errorLog("Brewery only works with the latest release of GriefPrevention (7.8)"); + P.p.errorLog("Brewery was tested with GriefPrevention 14.5.1"); P.p.errorLog("Disable the GriefPrevention support in the config and do /brew reload"); e.printStackTrace(); P.p.msg(player, "&cError opening Barrel, please report to an Admin!"); diff --git a/src/com/dre/brewery/P.java b/src/com/dre/brewery/P.java index 6afbb95..499a636 100644 --- a/src/com/dre/brewery/P.java +++ b/src/com/dre/brewery/P.java @@ -70,7 +70,7 @@ public class P extends JavaPlugin { useUUID = !v.matches(".*1\\.[0-6].*") && !v.matches(".*1\\.7\\.[0-5].*"); use1_9 = !v.matches(".*1\\.[0-8].*"); if (use1_9) { - log("&cExperimental support for Bukkit 1.9 enabled."); + log("&eExperimental support for Bukkit 1.9 enabled."); } // load the Config