geforkt von Mirrors/Paper
SPIGOT-7953: Item cooldown must be greater than 0
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
475a5576bc
Commit
a768ea0ddf
@ -1488,7 +1488,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
|
||||
@Override
|
||||
public UseCooldownComponent getUseCooldown() {
|
||||
return (this.hasUseCooldown()) ? new CraftUseCooldownComponent(this.useCooldown) : new CraftUseCooldownComponent(new UseCooldown(0));
|
||||
return (this.hasUseCooldown()) ? new CraftUseCooldownComponent(this.useCooldown) : new CraftUseCooldownComponent(new UseCooldown(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -54,10 +54,10 @@ public final class CraftUseCooldownComponent implements UseCooldownComponent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCooldownSeconds(float eatSeconds) {
|
||||
Preconditions.checkArgument(eatSeconds >= 0, "eatSeconds cannot be less than 0");
|
||||
public void setCooldownSeconds(float cooldown) {
|
||||
Preconditions.checkArgument(cooldown > 0, "cooldown must be greater than 0");
|
||||
|
||||
handle = new UseCooldown(eatSeconds, handle.cooldownGroup());
|
||||
handle = new UseCooldown(cooldown, handle.cooldownGroup());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren