Merge branch 'development'

This commit is contained in:
Brianna 2021-03-22 16:14:10 -05:00
commit d7ca994610
2 changed files with 2 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId>
<artifactId>UltimateKits</artifactId>
<modelVersion>4.0.0</modelVersion>
<version>2.6.15</version>
<version>2.6.16</version>
<build>
<defaultGoal>clean install</defaultGoal>
<finalName>UltimateKits-${project.version}</finalName>

View File

@ -298,9 +298,7 @@ public class Kit implements Cloneable {
// Amount of items from the kit to give to the player.
if (kitAnimation == KitAnimation.ROULETTE)
itemAmount = 1; //TODO how about kitAmount > 1? generateRandomItem() will only give 1 random item instead of kitAmount
System.out.println("itemAmount" + ": " + itemAmount);
int itemGiveAmount = kitAmount > 0 ? itemAmount * kitAmount : kitAmount;
System.out.println(itemGiveAmount + " : " + kitAmount + " : " + itemAmount);
int itemGiveAmount = kitAmount > 0 ? itemAmount * kitAmount : itemAmount;
if (Settings.NO_REDEEM_WHEN_FULL.getBoolean() && !hasRoom(player, itemGiveAmount)) {
plugin.getLocale().getMessage("event.claim.full").sendPrefixedMessage(player);
@ -321,7 +319,6 @@ public class Kit implements Cloneable {
if (itemGiveAmount <= 0 && itemGivenAmount != 0) break;
double ch = item.getChance() == 0 ? 100 : item.getChance();
double rand = Math.random() * 100;
System.out.println("We tryin here [" + ch + ":" + rand + "]");
itemGiveAmount--;
if (rand < ch || ch == 100) {
itemGivenAmount++;