Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Boolean canReceiveFuel(Player player, FuelReceiverType type, String world) {
- if (isWorldBlackListed(world)) return false;
- if (fuelReceiver.get(type) == null) return false;
- PlayerPoints playerPoints = PointsManager.getInstance().getPlayerPoints(player);
- double increment = playerPoints.getPercentageIncrease(ShopType.MACHINE);
- double random = Math.random();
- double chance = fuelReceiver.get(type).chance;
- if (increment > 0) {
- chance+=increment;
- }
- return (random <= chance);
- }
Advertisement
Add Comment
Please, Sign In to add comment