Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Librazy committed Dec 8, 2018
1 parent 7d5f22e commit 07d8ed2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/main/java/think/rpgitems/power/impl/PowerParticleTick.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import think.rpgitems.I18n;
import think.rpgitems.power.PowerMeta;
import think.rpgitems.power.PowerResult;
import think.rpgitems.power.PowerTick;
import think.rpgitems.power.Property;
import think.rpgitems.power.*;

import java.util.Collections;
import java.util.Set;

import static think.rpgitems.power.Utils.checkCooldown;

Expand Down Expand Up @@ -43,4 +43,9 @@ public PowerResult<Void> tick(Player player, ItemStack stack) {
spawnParticle(player);
return PowerResult.ok();
}

@Override
public Set<Trigger> getTriggers(){
return Collections.singleton(Trigger.TICK);
}
}
2 changes: 1 addition & 1 deletion src/main/java/think/rpgitems/power/impl/PowerRepair.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public PowerResult<Void> fire(Player player, ItemStack stack) {
}
}
if (removeItem(player.getInventory(), material, amount)) {
getItem().setDurability(stack, Math.max(itemDurability + this.durability, max));
getItem().setDurability(stack, Math.min(itemDurability + this.durability, max));
return abortOnSuccess ? PowerResult.abort() : PowerResult.ok();
} else {
BaseComponent msg = Strings.isNullOrEmpty(customMessage) ?
Expand Down

0 comments on commit 07d8ed2

Please sign in to comment.