New method take() for Stackable

This commit is contained in:
Fabrizio La Rosa 2020-06-20 03:40:18 +02:00
parent 0496fe629d
commit 8be6bdfe7e

View File

@ -110,6 +110,13 @@ public class Stackable {
this.save();
}
public void take(int n) {
this.size-=n;
this.updateDisplay();
SkyBlock.getInstance().getSoundManager().playSound(this.location, CompatibleSound.ENTITY_ARROW_HIT.getSound(), 1.0F, 1.0F);
this.save();
}
public boolean isMaxSize(){
return size > maxSize;
}