Use 1.8-friendly User#getItemInHand method in commands

This commit is contained in:
md678685 2019-01-03 20:32:35 +00:00
parent aa6ad271a0
commit e94202c55a
8 changed files with 9 additions and 8 deletions

View file

@ -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")) {