Fix logic error for item spawn location.

This commit is contained in:
Jesse Prescott 2018-06-06 16:25:17 +01:00
parent 1bcda91d7f
commit 2cf6eda7a6
3 changed files with 7 additions and 4 deletions

View File

@ -158,9 +158,6 @@ public final class Itemcase {
// Set owner.
this.owner = owner;
// Spawn display item for the first time.
this.spawnItem();
}
/**
@ -483,7 +480,7 @@ public final class Itemcase {
// If block is a slab.
if(type == Material.STEP ||
type != Material.STONE_SLAB2 ||
type == Material.STONE_SLAB2 ||
type == Material.WOOD_STEP ||
type == Material.PURPUR_SLAB) {

View File

@ -208,6 +208,9 @@ public final class WorldFile extends ConfigurationFile {
// Create itemcase object.
Itemcase itemcase = new Itemcase(type, itemstack, location, owner);
// Spawn item.
itemcase.spawnItem();
// If itemcase is a shop.
if(type != Type.SHOWCASE) {

View File

@ -144,6 +144,9 @@ public final class ItemcaseManager {
Itemcase itemcase = new Itemcase(Itemcase.Type.SHOWCASE, itemStack,
location, owner);
// Spawn item.
itemcase.spawnItem();
// Add itemcase to the list.
this.itemcases.add(itemcase);