mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-09-29 23:17:26 +02:00
Material not Materials.
This commit is contained in:
parent
431338f84a
commit
7d4fcb6568
@ -8,9 +8,9 @@ public interface Structure {
|
||||
|
||||
String getName();
|
||||
|
||||
CompatibleMaterial getMaterials();
|
||||
CompatibleMaterial getMaterial();
|
||||
|
||||
void setMaterials(CompatibleMaterial materials);
|
||||
void setMaterial(CompatibleMaterial material);
|
||||
|
||||
String getOverworldFile();
|
||||
|
||||
|
@ -101,7 +101,7 @@ public class Creator {
|
||||
ItemStack is = event.getItem();
|
||||
|
||||
for (Structure structureList : skyblock.getStructureManager().getStructures()) {
|
||||
if ((is.getType() == structureList.getMaterials().getMaterial()) && (is.hasItemMeta())
|
||||
if ((is.getType() == structureList.getMaterial().getMaterial()) && (is.hasItemMeta())
|
||||
&& (is.getItemMeta().getDisplayName()
|
||||
.equals(ChatColor.translateAlternateColorCodes('&', configLoad
|
||||
.getString("Menu.Creator.Selector.Item.Island.Displayname")
|
||||
@ -229,7 +229,7 @@ public class Creator {
|
||||
}
|
||||
}
|
||||
|
||||
nInv.addItem(nInv.createItem(structure.getMaterials().getItem(),
|
||||
nInv.addItem(nInv.createItem(structure.getMaterial().getItem(),
|
||||
ChatColor.translateAlternateColorCodes('&',
|
||||
configLoad.getString("Menu.Creator.Selector.Item.Island.Displayname")
|
||||
.replace("%displayname", structure.getDisplayname())),
|
||||
|
@ -106,7 +106,7 @@ public class Creator implements Listener {
|
||||
inventorySlot++;
|
||||
|
||||
Structure structure = structures.get(index);
|
||||
nInv.addItem(nInv.createItem(structure.getMaterials().getItem(),
|
||||
nInv.addItem(nInv.createItem(structure.getMaterial().getItem(),
|
||||
ChatColor.translateAlternateColorCodes('&',
|
||||
configLoad.getString("Menu.Admin.Creator.Browse.Item.Structure.Displayname")
|
||||
.replace("%structure", structure.getName())),
|
||||
@ -235,7 +235,7 @@ public class Creator implements Listener {
|
||||
nInv.addItem(nInv.createItem(new ItemStack(CompatibleMaterial.DIAMOND.getMaterial()),
|
||||
configLoad.getString("Menu.Admin.Creator.Options.Item.Item.Displayname"),
|
||||
configLoad.getStringList("Menu.Admin.Creator.Options.Item.Item.Lore"),
|
||||
new Placeholder[]{new Placeholder("%material", structure.getMaterials().name())}, null, null),
|
||||
new Placeholder[]{new Placeholder("%material", structure.getMaterial().name())}, null, null),
|
||||
6);
|
||||
nInv.addItem(nInv.createItem(new ItemStack(CompatibleMaterial.GOLD_NUGGET.getMaterial()),
|
||||
configLoad.getString("Menu.Admin.Creator.Options.Item.DeletionCost.Displayname"),
|
||||
@ -1148,7 +1148,7 @@ public class Creator implements Listener {
|
||||
materials.getItem().setData(event.getCurrentItem().getData());
|
||||
|
||||
if (materials != null) {
|
||||
structure.setMaterials(materials);
|
||||
structure.setMaterial(materials);
|
||||
|
||||
Bukkit.getServer().getScheduler().runTaskAsynchronously(skyblock, () -> {
|
||||
Config config113 = fileManager
|
||||
@ -1156,7 +1156,7 @@ public class Creator implements Listener {
|
||||
FileConfiguration configLoad113 = config113.getFileConfiguration();
|
||||
|
||||
configLoad113.set("Structures." + structure.getName() + ".Item.Material",
|
||||
structure.getMaterials().name());
|
||||
structure.getMaterial().name());
|
||||
|
||||
try {
|
||||
configLoad113.save(config113.getFile());
|
||||
@ -1193,7 +1193,7 @@ public class Creator implements Listener {
|
||||
|
||||
if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) {
|
||||
for (Structure structureList : structureManager.getStructures()) {
|
||||
if (event.getCurrentItem().getType() == structureList.getMaterials().getMaterial()
|
||||
if (event.getCurrentItem().getType() == structureList.getMaterial().getMaterial()
|
||||
&& ChatColor.stripColor(is.getItemMeta().getDisplayName())
|
||||
.equals(structureList.getName())) {
|
||||
if (event.getClick() == ClickType.LEFT) {
|
||||
|
@ -8,7 +8,7 @@ import java.util.List;
|
||||
|
||||
public class Structure implements com.songoda.skyblock.api.structure.Structure {
|
||||
|
||||
private CompatibleMaterial materials;
|
||||
private CompatibleMaterial material;
|
||||
|
||||
private String name;
|
||||
private String overworldFile;
|
||||
@ -23,11 +23,11 @@ public class Structure implements com.songoda.skyblock.api.structure.Structure {
|
||||
|
||||
private double deletionCost;
|
||||
|
||||
public Structure(String name, CompatibleMaterial materials, String overworldFile, String netherFile, String endFile,
|
||||
public Structure(String name, CompatibleMaterial material, String overworldFile, String netherFile, String endFile,
|
||||
String displayName, boolean permission, List<String> description, List<String> commands,
|
||||
double deletionCost) {
|
||||
this.name = name;
|
||||
this.materials = materials;
|
||||
this.material = material;
|
||||
this.overworldFile = overworldFile;
|
||||
this.netherFile = netherFile;
|
||||
this.endFile = endFile;
|
||||
@ -42,12 +42,12 @@ public class Structure implements com.songoda.skyblock.api.structure.Structure {
|
||||
return name;
|
||||
}
|
||||
|
||||
public CompatibleMaterial getMaterials() {
|
||||
return materials;
|
||||
public CompatibleMaterial getMaterial() {
|
||||
return material;
|
||||
}
|
||||
|
||||
public void setMaterials(CompatibleMaterial materials) {
|
||||
this.materials = materials;
|
||||
public void setMaterial(CompatibleMaterial material) {
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
public String getOverworldFile() {
|
||||
|
Loading…
Reference in New Issue
Block a user