From fbb90cec8f1160728bec3839b0665cae6423b3c7 Mon Sep 17 00:00:00 2001 From: Boosik Date: Fri, 29 Mar 2013 19:04:13 +0100 Subject: [PATCH] Changed prices to use double instead of int, this allows decimals in prices. --- .../boosCooldown/boosConfigManager.class | Bin 18584 -> 18837 bytes .../boosCooldown/boosCoolDownListener.class | Bin 11933 -> 12021 bytes .../boosCooldown/boosPriceManager.class | Bin 1862 -> 1858 bytes .../boosCooldown/boosConfigManager.java | 42 +++++++++--------- .../boosCooldown/boosCoolDownListener.java | 12 ++--- .../boosik/boosCooldown/boosPriceManager.java | 2 +- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/bin/cz/boosik/boosCooldown/boosConfigManager.class b/bin/cz/boosik/boosCooldown/boosConfigManager.class index a5c43a9fd73bea7c886626eeb2acf3cee57f8da2..6cbfcfa0e68648cd975e911c848d049491fe84e1 100644 GIT binary patch delta 4357 zcmai133waD6`nV{me#Uj%UaozCCgW2OTMJ|%3(W>Lmb;V?BFwB>A}Kq1i5(u+bVM?*sUW~H?@_16!7pEdvc z=gph9|9dkl9oh#67#N=W>fsZFkZL+IZg|qd9y40S771pt7c4nB22u&tMyP>WAgKd^ zXiH>tLnr_wn{_#4M@wl7kd&d}U>{O|n7f?I&1%+}>Xak4Y1Huh9j5p=VcB$=Jc znq^-DM2-wagOTuvcQhP~j(9gkMu*XVEo;dx$~_PBJ9~OC7#@uV(BT4hb+)VSqG=8z zfxd{c;|6@ngb^35$3Hx{dPsr*do#NRf-J*Y4k7%sv(?s2h;U@C^#Ue&{C=fT>r?asS(R-*>0O8UIt_ydqP*jPT1y%F(9SNOkR#oyb6d< znd!{QgB|Q-re(%9OeGi|SU-yCe2eYPS?l|@k?4uUTVaM z_PfQ~F*uv!Xw}_mguCGT>>7tRb~g|mPlzY;LliBJQQ~`XA`~3Nsz`uR96?j*!w~}k z7&pQ#Bwd1|C~jY(%w7o|#3sd_IR+2uVGWwAiNFl zu=KnY@UGI9Tk~>je{Y08zzGcR@9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Hpvc!_8U%&))?NGi6DKwPhS9*VKwr z!bilqZ5+qNx_un)`^r8u<_WT&z@JevFZK{r@l{KXmhW$fvUW*R_}dB8@OmBY(cuep zc%2R})ZxuK9M|DXrNp!Yx`;YSVg{?&t|#(jor$<}$@o+h*D;N?JFLa6qPPKRzG(kc zJ{MX035ooz8?5K1m@BLuDYRR~gGs0&-HAV@vAAAoOnvfB8ds@!D2c6CSg%TR6%|b> z?jh@YDKuaWr%=S2hzcnBijK8{g3++Ja>>I4OY$&5(GF8PqW3KGr;kX*zgS9i)ZZ*V z9reCtgO2*Z(x;<7%4KAjpw<@0tKvT`CY|&XD*3eN(~}$?ImyL;PIB?zlU#hRxtQMO z3l)#2yfIK26F5PxnXEEHTA=8|U?xl6OdQOt_sp{Oo|#4OnORTr%<^>EumVf}%$^Bm zw=~X>tjID;M-^x2h!T~RrlWN0aD@(6s?0|^h9_ZrucWf-?q15Rw!1e&W&Z9pqRym*b*M^l=oDb4Th(v;fkl1dt}NM%dXj+d!yMG~ink=7X7_R{|oA2h&hn#E$B zPqSF8%Wwz%eEgh#_iYs`%b!>n35%4(!zv>s=*vWeBn7Urk=)X4=bkdR%hUM^=1vX?b!Pwf!Q z5`&O+uud^h39V$SXiPS1&&c&OQ5U4176!{xPYc82X(=~#KaM?SvFKkF#Nb==nJrbqvy WmLk5svoUAAHusU8NkKDq*8c&?fGg_& diff --git a/bin/cz/boosik/boosCooldown/boosCoolDownListener.class b/bin/cz/boosik/boosCooldown/boosCoolDownListener.class index d8ee3577bd1af4626893d263fa879c06607f3fc3..a5c89a7a55a3fe5bd2db772ee69033dfe6f36a99 100644 GIT binary patch delta 4224 zcmbVPdwdkt75>iL*`3+V>?6C`><$S5Ye*oQB@$qP2vi`vB)mjSMG!-bAtof41RoW< zYPDFUtuXZgDoUkBffjif5+6vZVoSw};``NB@vUI1qGF-vPIk$LAN+o8|CpU~&pqe+ z&TH<>-ZSs3dG0+&AKd|m8b=@alvT3$G~4Oo#3vmX`Ncr(o$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yOBuQ>Bh8RUrmxpWiQ@U_TfF{ z0QM^f@xJm6J`gHC6kZ$ zF%#d2IXEop@vVsAJJHJTmH1vtP3L?`m;?ZjNs#c}x} zzyeONfRT<`aW4&FqQg1xLDjs zC5(KyR9sJCMt;P_dOW}=6RX5pEMpYFYO#hQjDpxE7SJ#njx2PGIdl@oGx@Fv(+Jjv zD4Wru9(d7F;kzj$b|IHarJ*>KLO6+=V{l)3dNqPa&HP-80s42y)$o*tb(1v8a~;8Y zWNRP|m$TG9GGw5W&wGtV+69FLakq9Dm2R#77`IkfSUB?i;ScNv&b(nVvY2dTVTL{-LP%N^k$jq9TE?HFx2BH?bDv;nRXwTq@~<#BgD zE@@AVi&-EynaZ2Y5i!*rbgI3-aDK_@T%-f1Qx*42;psY+rZEy+{NzNxRqpe+#N<2d z=Ana^lqJ$$#|4iCyaD#P25UHmy!k)o1tJrj7T$^53FQt`?Z8CNaeCtN-+<9!c>@G# z2H$gh56jyvsmTd*PL`vaX3E<<9O24 zKPaASKR;1C|0X4ie~hPFe%e)*1nJz=2OTfF^R}>HL7JdO3KpdaE|7wTG(qDQ_G_{a z7oSN5_Q7z0;J+?=WyvNU<%J8*3zcU| zu3!jZ@MmCQ5M@YW2xSOkU}f-R5Ml@iim@@|GjKpz5kQrk3``t<7=qXtlo%KpB7p)- G3{e37wJ(zZ delta 244 zcmX@acZ^Tq)W2Q(7#J9g7-HBNm>3z* zfeGXahEN8724)6Ph9rhChHwTJ22Tbdh6tb-D?>g52b2{FRLRM}#PNqAh@C-+fsr8! JD8R%J4FJO}FoXaA diff --git a/src/cz/boosik/boosCooldown/boosConfigManager.java b/src/cz/boosik/boosCooldown/boosConfigManager.java index 1e1f59f..4f72653 100644 --- a/src/cz/boosik/boosCooldown/boosConfigManager.java +++ b/src/cz/boosik/boosCooldown/boosConfigManager.java @@ -272,38 +272,38 @@ public class boosConfigManager { "Price of &command& was %s and you now have %s"); } - public static int getPrice(String pre) { - int price = 0; + public static double getPrice(String pre) { + double price = 0.0; pre = pre.toLowerCase(); - price = conf.getInt("commands.prices.price." + pre, price); + price = conf.getDouble("commands.prices.price." + pre, price); return price; } - public static int getPrice2(String pre) { - int price = 0; + public static double getPrice2(String pre) { + double price = 0.0; pre = pre.toLowerCase(); - price = conf.getInt("commands.prices.price2." + pre, price); + price = conf.getDouble("commands.prices.price2." + pre, price); return price; } - public static int getPrice3(String pre) { - int price = 0; + public static double getPrice3(String pre) { + double price = 0.0; pre = pre.toLowerCase(); - price = conf.getInt("commands.prices.price3." + pre, price); + price = conf.getDouble("commands.prices.price3." + pre, price); return price; } - public static int getPrice4(String pre) { - int price = 0; + public static double getPrice4(String pre) { + double price = 0.0; pre = pre.toLowerCase(); - price = conf.getInt("commands.prices.price4." + pre, price); + price = conf.getDouble("commands.prices.price4." + pre, price); return price; } - public static int getPrice5(String pre) { - int price = 0; + public static double getPrice5(String pre) { + Double price = 0.0; pre = pre.toLowerCase(); - price = conf.getInt("commands.prices.price5." + pre, price); + price = conf.getDouble("commands.prices.price5." + pre, price); return price; } @@ -530,12 +530,12 @@ public class boosConfigManager { conf.addDefault( "commands.warmupPotionEffects.howto2", "#After effect add @number, for example WEAKNESS@3 will apply weakness III to player for the duration of warmup."); - conf.addDefault("commands.prices.price./spawn", 10); - conf.addDefault("commands.prices.price./home", 20); - conf.addDefault("commands.prices.price2./home", 40); - conf.addDefault("commands.prices.price3./home", 90); - conf.addDefault("commands.prices.price4./home", 99); - conf.addDefault("commands.prices.price5./home", 542); + conf.addDefault("commands.prices.price./spawn", 10.0); + conf.addDefault("commands.prices.price./home", 20.0); + conf.addDefault("commands.prices.price2./home", 40.0); + conf.addDefault("commands.prices.price3./home", 90.0); + conf.addDefault("commands.prices.price4./home", 99.0); + conf.addDefault("commands.prices.price5./home", 542.0); conf.addDefault("commands.limits.limit./example", 0); conf.addDefault("commands.limits.limit2./example", 100); conf.addDefault("commands.limits.limit3./command", 50); diff --git a/src/cz/boosik/boosCooldown/boosCoolDownListener.java b/src/cz/boosik/boosCooldown/boosCoolDownListener.java index d631245..b89f948 100644 --- a/src/cz/boosik/boosCooldown/boosCoolDownListener.java +++ b/src/cz/boosik/boosCooldown/boosCoolDownListener.java @@ -77,7 +77,7 @@ public class boosCoolDownListener implements Listener { // Returns true if the command is on cooldown, false otherwise private void checkCooldown(PlayerCommandPreprocessEvent event, Player player, String pre, String message, int warmUpSeconds, - int price) { + double price) { if (!blocked) { if (warmUpSeconds > 0) { if (!player.hasPermission("booscooldowns.nowarmup") @@ -158,7 +158,7 @@ public class boosCoolDownListener implements Listener { int preSubCheck = -1; int preSubCheck2 = -1; int preSubCheck3 = -1; - int price = 0; + double price = 0; int limit = 0; int cd = 0; playerloc.put(player, player.getLocation()); @@ -281,7 +281,7 @@ public class boosCoolDownListener implements Listener { private void onPlayerChat(AsyncPlayerChatEvent event) { String chatMessage = event.getMessage(); String temp = "globalchat"; - int price = 0; + double price = 0; Player player = event.getPlayer(); if (chatMessage.startsWith("!")) { if (!boosCoolDownManager.checkCoolDownOK(player, temp, chatMessage)) { @@ -299,7 +299,7 @@ public class boosCoolDownListener implements Listener { } private void payForCommand(PlayerCommandPreprocessEvent event, - Player player, String pre, int price) { + Player player, String pre, double price) { String name = player.getName(); if (price > 0) { if (!player.hasPermission("booscooldowns.noprice") @@ -316,7 +316,7 @@ public class boosCoolDownListener implements Listener { } private void payForCommand2(AsyncPlayerChatEvent event, Player player, - String pre, int price) { + String pre, double price) { String name = player.getName(); if (price > 0) { if (!player.hasPermission("booscooldowns.noprice") @@ -360,7 +360,7 @@ public class boosCoolDownListener implements Listener { } } - private int prePriceCheck(Player player, String preSub) { + private double prePriceCheck(Player player, String preSub) { if (player.hasPermission("booscooldowns.price2")) { return boosConfigManager.getPrice2(preSub); } else if (player.hasPermission("booscooldowns.price3")) { diff --git a/src/cz/boosik/boosCooldown/boosPriceManager.java b/src/cz/boosik/boosCooldown/boosPriceManager.java index a476d9c..ea68f54 100644 --- a/src/cz/boosik/boosCooldown/boosPriceManager.java +++ b/src/cz/boosik/boosCooldown/boosPriceManager.java @@ -10,7 +10,7 @@ import util.boosChat; public class boosPriceManager { private static Economy economy = boosCoolDown.getEconomy(); - public static boolean payForCommand(Player player, String pre, int price, + public static boolean payForCommand(Player player, String pre, double price, String name) { if (economy == null) { return true;