mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Add anvil sounds to Salvage.
This commit is contained in:
parent
3d8aa29b52
commit
c04b14c751
@ -3,6 +3,7 @@ package com.gmail.nossr50.skills.repair;
|
|||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.getspout.spoutapi.SpoutManager;
|
import org.getspout.spoutapi.SpoutManager;
|
||||||
@ -42,11 +43,15 @@ public class Salvage {
|
|||||||
player.setItemInHand(new ItemStack(Material.AIR));
|
player.setItemInHand(new ItemStack(Material.AIR));
|
||||||
location.setY(location.getY() + 1);
|
location.setY(location.getY() + 1);
|
||||||
Misc.dropItem(location, new ItemStack(itemID, salvagedAmount));
|
Misc.dropItem(location, new ItemStack(itemID, salvagedAmount));
|
||||||
|
|
||||||
|
player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.SalvageSuccess"));
|
player.sendMessage(LocaleLoader.getString("Repair.Skills.SalvageSuccess"));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.NotFullDurability"));
|
player.sendMessage(LocaleLoader.getString("Repair.Skills.NotFullDurability"));
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.AdeptSalvage"));
|
player.sendMessage(LocaleLoader.getString("Repair.Skills.AdeptSalvage"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,6 +77,7 @@ public class Salvage {
|
|||||||
player.sendMessage(LocaleLoader.getString("Repair.Listener.Anvil2"));
|
player.sendMessage(LocaleLoader.getString("Repair.Listener.Anvil2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.playSound(player.getLocation(), Sound.ANVIL_LAND, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
|
||||||
profile.togglePlacedSalvageAnvil();
|
profile.togglePlacedSalvageAnvil();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user