mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-06-28 18:20:31 +00:00
Use 1.8-friendly User#getItemInHand method in commands
This commit is contained in:
parent
aa6ad271a0
commit
e94202c55a
8 changed files with 9 additions and 8 deletions
|
@ -44,7 +44,7 @@ public class Commandfirework extends EssentialsCommand {
|
|||
|
||||
@Override
|
||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
|
||||
final ItemStack stack = user.getBase().getInventory().getItemInMainHand();
|
||||
final ItemStack stack = user.getItemInHand();
|
||||
if (MaterialUtil.isFirework(stack.getType())) {
|
||||
if (args.length > 0) {
|
||||
if (args[0].equalsIgnoreCase("clear")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue