mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-22 18:26:12 +01:00
Merge branch 'development'
This commit is contained in:
commit
e018710208
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateKits</artifactId>
|
||||
<version>2.7.6</version>
|
||||
<version>2.7.7</version>
|
||||
|
||||
<name>UltimateKits</name>
|
||||
<description>Creating and displaying your servers kits has never been easier</description>
|
||||
@ -118,7 +118,7 @@
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>SongodaCore</artifactId>
|
||||
<version>2.6.19</version>
|
||||
<version>2.6.21</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -283,11 +283,27 @@ public class Kit implements Cloneable {
|
||||
}
|
||||
|
||||
private boolean giveKit(Player player, Key key) {
|
||||
return key == null ? giveKit(player) : giveKit(player, key.getAmount(), key.getKitAmount());
|
||||
if (key == null) {
|
||||
return giveKit(player);
|
||||
}
|
||||
|
||||
int amount = key.getAmount();
|
||||
if (amount == -1) {
|
||||
// FIXME: I don't understand how Crates, Keys, etc. actually are supposed to work.
|
||||
// I think the give-algorithms are generally wrongly implemented and confusing naming is making it hard to understand.
|
||||
amount = contents.size();
|
||||
}
|
||||
return giveKit(player, amount, key.getKitAmount());
|
||||
}
|
||||
|
||||
private boolean giveKit(Player player, Crate crate) {
|
||||
return giveKit(player, crate.getAmount(), crate.getKitAmount());
|
||||
int amount = crate.getAmount();
|
||||
if (amount == -1) {
|
||||
// FIXME: I don't understand how Crates, Keys, etc. actually are supposed to work.
|
||||
// I think the give-algorithms are generally wrongly implemented and confusing naming is making it hard to understand.
|
||||
amount = contents.size();
|
||||
}
|
||||
return giveKit(player, amount, crate.getKitAmount());
|
||||
}
|
||||
|
||||
private boolean giveKit(Player player, int itemAmount, int kitAmount) {
|
||||
|
Loading…
Reference in New Issue
Block a user