Make Itemcase reference an OfflinePlayer as its owner.
Also add more getters.
This commit is contained in:
		@@ -21,6 +21,7 @@ import java.util.UUID;
 | 
				
			|||||||
import org.bukkit.Chunk;
 | 
					import org.bukkit.Chunk;
 | 
				
			||||||
import org.bukkit.Location;
 | 
					import org.bukkit.Location;
 | 
				
			||||||
import org.bukkit.Material;
 | 
					import org.bukkit.Material;
 | 
				
			||||||
 | 
					import org.bukkit.OfflinePlayer;
 | 
				
			||||||
import org.bukkit.World;
 | 
					import org.bukkit.World;
 | 
				
			||||||
import org.bukkit.entity.Entity;
 | 
					import org.bukkit.entity.Entity;
 | 
				
			||||||
import org.bukkit.entity.Item;
 | 
					import org.bukkit.entity.Item;
 | 
				
			||||||
@@ -63,7 +64,7 @@ public final class Itemcase {
 | 
				
			|||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * The owner of this itemcase.
 | 
					     * The owner of this itemcase.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private final Player owner;
 | 
					    private final OfflinePlayer owner;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * This itemcase's task.
 | 
					     * This itemcase's task.
 | 
				
			||||||
@@ -82,7 +83,8 @@ public final class Itemcase {
 | 
				
			|||||||
     * @param location The location of the itemcase.
 | 
					     * @param location The location of the itemcase.
 | 
				
			||||||
     * @param owner The owner of this itemcase.
 | 
					     * @param owner The owner of this itemcase.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public Itemcase(ItemStack itemStack, Location location, Player owner) {
 | 
					    public Itemcase(ItemStack itemStack, Location location,
 | 
				
			||||||
 | 
					            OfflinePlayer owner) {
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        // Set item stack and ensure stack size is 1.
 | 
					        // Set item stack and ensure stack size is 1.
 | 
				
			||||||
        this.itemStack = itemStack.clone();
 | 
					        this.itemStack = itemStack.clone();
 | 
				
			||||||
@@ -187,6 +189,15 @@ public final class Itemcase {
 | 
				
			|||||||
        return displayNameParts[0].equals("com.gmail.bleedobsidian.itemcase");
 | 
					        return displayNameParts[0].equals("com.gmail.bleedobsidian.itemcase");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @return The ItemStack that this itemcase is showing.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public ItemStack getItemStack() {
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        // The ItemStack of this Itemcase.
 | 
				
			||||||
 | 
					        return this.itemStack;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @return The Location of this itemcase.
 | 
					     * @return The Location of this itemcase.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
@@ -196,6 +207,15 @@ public final class Itemcase {
 | 
				
			|||||||
        return this.location;
 | 
					        return this.location;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * @return The owner of this itemcase.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public OfflinePlayer getOwner() {
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        // Owner of this itemcase.
 | 
				
			||||||
 | 
					        return this.owner;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * @return Display item.
 | 
					     * @return Display item.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user