New config format, usage of new apis #95
@ -84,8 +84,6 @@ public class CheckSchemType15 implements CheckSchemType.ICheckSchemType {
|
|||||||
Material.GOLDEN_HORSE_ARMOR,
|
Material.GOLDEN_HORSE_ARMOR,
|
||||||
Material.HONEY_BOTTLE);
|
Material.HONEY_BOTTLE);
|
||||||
|
|
||||||
private CheckSchemType15(){}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autoCheck(AutoCheckResult result, Clipboard clipboard) {
|
public void autoCheck(AutoCheckResult result, Clipboard clipboard) {
|
||||||
BlockVector3 dimensions = clipboard.getDimensions();
|
BlockVector3 dimensions = clipboard.getDimensions();
|
||||||
|
@ -68,8 +68,6 @@ public class CheckSchemType8 implements CheckSchemType.ICheckSchemType {
|
|||||||
FLOWERS = flowers;
|
FLOWERS = flowers;
|
||||||
}
|
}
|
||||||
|
|
||||||
private CheckSchemType8(){}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autoCheck(AutoCheckResult result, Clipboard clipboard) {
|
public void autoCheck(AutoCheckResult result, Clipboard clipboard) {
|
||||||
Vector dimensions = clipboard.getDimensions();
|
Vector dimensions = clipboard.getDimensions();
|
||||||
|
@ -55,8 +55,6 @@ public class CheckSchemType {
|
|||||||
maxDispenserItems = section.getInt("Schematic.MaxDispenserItems", 128);
|
maxDispenserItems = section.getInt("Schematic.MaxDispenserItems", 128);
|
||||||
maxBlocks = section.getInt("Schematic.MaxBlocks", 0);
|
maxBlocks = section.getInt("Schematic.MaxBlocks", 0);
|
||||||
|
|
||||||
//TODO: Materials in Config required in style of 1.8-1.12 and 1.13-1.15
|
|
||||||
|
|
||||||
limits = new HashMap<>();
|
limits = new HashMap<>();
|
||||||
for(Map<?, ?> entry : section.getMapList("Schematic.Limited")) {
|
for(Map<?, ?> entry : section.getMapList("Schematic.Limited")) {
|
||||||
int amount = (Integer) entry.get("Amount");
|
int amount = (Integer) entry.get("Amount");
|
||||||
@ -78,7 +76,7 @@ public class CheckSchemType {
|
|||||||
if(folder.exists()) {
|
if(folder.exists()) {
|
||||||
for(File configFile : folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))) {
|
for(File configFile : folder.listFiles((file, name) -> name.endsWith(".yml") && !name.endsWith(".kits.yml"))) {
|
||||||
YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile);
|
YamlConfiguration config = YamlConfiguration.loadConfiguration(configFile);
|
||||||
if (!config.isConfigurationSection("CheckQuestions"))
|
if (!config.isList("CheckQuestions"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
new CheckSchemType(config);
|
new CheckSchemType(config);
|
||||||
|
@ -60,12 +60,6 @@ class GUI {
|
|||||||
inv.setItem(0, SWItem.getDye(1), (byte) 1, "§eLöschen", click -> {
|
inv.setItem(0, SWItem.getDye(1), (byte) 1, "§eLöschen", click -> {
|
||||||
schem.remove();
|
schem.remove();
|
||||||
|
|
||||||
List<CheckedSchematic> checkedSchematics = CheckedSchematic.getLastDeclined(p.getUniqueId());
|
|
||||||
for(CheckedSchematic checkedSchematic : checkedSchematics) {
|
|
||||||
if(checkedSchematic.getSchemOwner() == schem.getSchemOwner() &&
|
|
||||||
checkedSchematic.getSchemName().equals(schem.getSchemName()))
|
|
||||||
checkedSchematic.remove();
|
|
||||||
}
|
|
||||||
p.sendMessage(SchematicSystem.PREFIX + "Schematic §e" + schem.getSchemName() + " §7gelöscht");
|
p.sendMessage(SchematicSystem.PREFIX + "Schematic §e" + schem.getSchemName() + " §7gelöscht");
|
||||||
p.closeInventory();
|
p.closeInventory();
|
||||||
});
|
});
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren