mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
Limiting GlobalBlockTimer to positive numbers only
This commit is contained in:
parent
a1d4f2ec00
commit
1fb79f4ba2
@ -40,6 +40,7 @@ import com.gamingmesh.jobs.container.CurrencyType;
|
||||
|
||||
import net.Zrips.CMILib.CMILib;
|
||||
import net.Zrips.CMILib.Container.CMIList;
|
||||
import net.Zrips.CMILib.Container.CMINumber;
|
||||
import net.Zrips.CMILib.Enchants.CMIEnchantment;
|
||||
import net.Zrips.CMILib.Equations.Parser;
|
||||
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
||||
@ -900,7 +901,9 @@ public class GeneralConfigManager {
|
||||
|
||||
c.addComment("ExploitProtections.General.PlaceAndBreak.GlobalBlockTimer", "All blocks will be protected X sec after player places it on ground.");
|
||||
useGlobalTimer = c.get("ExploitProtections.General.PlaceAndBreak.GlobalBlockTimer.Use", c.getC().getBoolean("ExploitProtections.General.GlobalBlockTimer.use", true));
|
||||
c.addComment("ExploitProtections.General.PlaceAndBreak.GlobalBlockTimer.Timer", "Time in seconds. This can only be positive number");
|
||||
globalblocktimer = c.get("ExploitProtections.General.PlaceAndBreak.GlobalBlockTimer.Timer", c.getC().getInt("ExploitProtections.General.GlobalBlockTimer.timer", 3));
|
||||
globalblocktimer = CMINumber.clamp(globalblocktimer, 1, 99999);
|
||||
|
||||
c.addComment("ExploitProtections.General.PlaceAndBreak.SilkTouchProtection", "Enable silk touch protection.",
|
||||
"With this enabled players wont get paid for broken blocks from restrictedblocks list with silk touch tool.");
|
||||
|
@ -260,10 +260,12 @@ public class ShopManager {
|
||||
Jobs.getJobsDAO().savePoints(jPlayer);
|
||||
player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.Paid", "%amount%", item.getPointPrice()));
|
||||
}
|
||||
|
||||
if (item.getVaultPrice() > 0) {
|
||||
jPlayer.withdraw(item.getVaultPrice());
|
||||
player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.Paid", "%amount%", Jobs.getEconomy().getEconomy().format(item.getVaultPrice())));
|
||||
}
|
||||
|
||||
openShopGui(player, page);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user