Skip to content

Commit

Permalink
Fixed some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
IamTheDefender authored Feb 15, 2023
1 parent 32f4ff8 commit 513df62
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.cryptomorin.xseries.XMaterial;
import me.defender.cosmetics.api.categories.Cosmetics;
import me.defender.cosmetics.api.categories.islandtoppers.items.dummy;
import me.defender.cosmetics.api.enums.ConfigType;
import me.defender.cosmetics.api.enums.FieldsType;
import me.defender.cosmetics.api.enums.RarityType;
Expand Down Expand Up @@ -86,9 +87,8 @@ public Object getField(FieldsType fields, Player p){
return islandTopper;
}
}

// This will never return null!
return null;
return new dummy();
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package me.defender.cosmetics.api.categories.islandtoppers.items;

import com.cryptomorin.xseries.XMaterial;
import me.defender.cosmetics.api.categories.islandtoppers.IslandTopper;
import me.defender.cosmetics.api.enums.RarityType;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

import java.util.Arrays;
import java.util.List;

public class dummy extends IslandTopper {
@Override
public ItemStack getItem() {
return XMaterial.BARRIER.parseItem();
}

@Override
public String base64() {
return null;
}

@Override
public String getIdentifier() {
return "disabled";
}

@Override
public String getDisplayName() {
return "DISABLED";
}

@Override
public List<String> getLore() {
return Arrays.asList("Island Toppers are DISABLED for some reason!");
}

@Override
public int getPrice() {
return 0;
}

@Override
public RarityType getRarity() {
return RarityType.NONE;
}

@Override
public void execute(Player player, Location topperLocation, String selected) {

}
}

0 comments on commit 513df62

Please sign in to comment.