Package net.aufdemrand.denizen.utilities.nbt

Examples of net.aufdemrand.denizen.utilities.nbt.ImprovedOfflinePlayer


        if (InventoryScriptHelper.notableInventories.containsKey(inventory.getTitle()))
            return InventoryScriptHelper.notableInventories.get(inventory.getTitle());
        // Iterate through offline player inventories
        for (Map.Entry<UUID, PlayerInventory> inv : InventoryScriptHelper.offlineInventories.entrySet()) {
            if (((CraftInventory) inv.getValue()).getInventory().equals(((CraftInventory) inventory).getInventory()))
                return new dInventory(new ImprovedOfflinePlayer(inv.getKey()));
        }

        return new dInventory(inventory);
    }
View Full Code Here


                .registerEvents(this, DenizenAPI.getCurrentInstance());
    }

    public static void _savePlayerInventories() {
        for (Map.Entry<UUID, PlayerInventory> offlineInv : offlineInventories.entrySet())
            new ImprovedOfflinePlayer(offlineInv.getKey()).setInventory(offlineInv.getValue());
        for (Map.Entry<UUID, Inventory> offlineEnderChest : offlineEnderChests.entrySet())
            new ImprovedOfflinePlayer(offlineEnderChest.getKey()).setEnderChest(offlineEnderChest.getValue());
    }
View Full Code Here

    @EventHandler
    public void onPlayerLogin(PlayerLoginEvent event) {
        UUID uuid = event.getPlayer().getUniqueId();
        if (offlineInventories.containsKey(uuid)) {
            new ImprovedOfflinePlayer(uuid).setInventory(offlineInventories.get(uuid));
            offlineInventories.remove(uuid);
        }
        if (offlineEnderChests.containsKey(uuid)) {
            new ImprovedOfflinePlayer(uuid).setEnderChest(offlineEnderChests.get(uuid));
            offlineEnderChests.remove(uuid);
        }
    }
View Full Code Here

    public OfflinePlayer getOfflinePlayer() {
        return offlinePlayer;
    }

    public ImprovedOfflinePlayer getNBTEditor() {
        return new ImprovedOfflinePlayer(getOfflinePlayer());
    }
View Full Code Here

TOP

Related Classes of net.aufdemrand.denizen.utilities.nbt.ImprovedOfflinePlayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.