/*
 * Copyright (C) 2013-2019 Timothy Baxendale
 * Portions derived from Shops Copyright (c) 2012 Nathan Dinsmore and Sam Lazarus.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 * USA
 */
package org.tbax.baxshops.versioning;

import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;

public final class LegacyPlayerUtil
{
    private LegacyPlayerUtil()
    {
    }

    public static ItemStack getItemInHand(Player player)
    {
        return getItemInHand(player.getInventory());
    }

    public static void setItemInHand(Player player, ItemStack stack)
    {
        setItemInHand(player.getInventory(), stack);
    }

    public static void setItemInHand(PlayerInventory inventory, ItemStack stack)
    {
        inventory.setItemInHand(stack);
    }

    public static ItemStack getItemInHand(PlayerInventory inventory)
    {
        return inventory.getItemInHand();
    }

    public static ItemStack[] getInventoryContents(Player player)
    {
        return player.getInventory().getContents();
    }
}

@@ -16,18 +16,8 @@
  (C)
- 2013-2019
  Tim
@@ -1471,24 +1471,28 @@
 ry.setItemIn
+Main
 Hand(stack);
@@ -1484,32 +1484,32 @@
 ainHand(stack);%0A
-
     %7D%0A%0A    publi
@@ -1604,24 +1604,28 @@
 ry.getItemIn
+Main
 Hand();%0A    
@@ -1691,32 +1691,32 @@
 r player)%0A    %7B%0A
-
         return p
@@ -1739,16 +1739,23 @@
 ry().get
+Storage
 Contents

Update LegacyPlayerUtil for latest version