Package org.bukkit.entity

Examples of org.bukkit.entity.Player.saveData()


        try {
            if (!playeruuid.equals(this.player)) {
                Player to = Bukkit.getPlayer(playeruuid);
                Player from = Bukkit.getPlayer(playeruuid);
                if(from != null) {
                    from.saveData();
                }
                Files.copy(this.file, new File(this.file.getParentFile(), playeruuid + ".dat"));
                if(to != null) {
                    to.teleport(from == null ? getLocation() : from.getLocation());
                    to.loadData();
View Full Code Here


                }
            }
            else {
                Player player = Bukkit.getPlayer(playeruuid);
                if(player != null) {
                    player.saveData();
                }
            }
        }
        catch(Exception e) {
            e.printStackTrace();
View Full Code Here

                }
                // If they are currently using the inventory, let's set it...
            } else {
                inventory.loadIntoInventory(giveplayer.getInventory());
                if(offlineplayer) {
                    giveplayer.saveData();
                }
                return true;
            }
            // They aren't in the same world, so let's just save the inventory.
        } else {
View Full Code Here

                if(giveplayer.getInventory().firstEmpty() == -1) {
                    return false;
                }
                giveplayer.getInventory().addItem(itemstack.getItemStack());
                if(offlineplayer) {
                    giveplayer.saveData();
                }
                return true;
            }
            // They aren't in the same world, so let's just save the inventory.
        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.