Merge pull request 'Refactor version dependant calls to new System' (#79) from RefactoringVersionDependant into master
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
b74110a4ba
@ -19,12 +19,14 @@
|
|||||||
|
|
||||||
package de.steamwar.schematicsystem;
|
package de.steamwar.schematicsystem;
|
||||||
|
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.VersionedCallable;
|
||||||
import de.steamwar.sql.Schematic;
|
import de.steamwar.sql.Schematic;
|
||||||
import de.steamwar.sql.SchematicType;
|
import de.steamwar.sql.SchematicType;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class CheckSchemType implements ICheckSchemType {
|
public class CheckSchemType implements ICheckSchemType {
|
||||||
|
|
||||||
@ -67,14 +69,10 @@ public class CheckSchemType implements ICheckSchemType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public AutoCheckResult autoCheck(Schematic schematic) {
|
public AutoCheckResult autoCheck(Schematic schematic) {
|
||||||
switch(Core.getVersion()){
|
return VersionedCallable.call(new VersionedCallable<>(AutoCheckResult::new, 8),
|
||||||
case 15:
|
new VersionedCallable<>(() -> CheckSchemType_12.autoCheck(schematic, null), 12),
|
||||||
return CheckSchemType_15.autoCheck(schematic, this);
|
new VersionedCallable<>(AutoCheckResult::new, 13),
|
||||||
case 12:
|
new VersionedCallable<>(() -> CheckSchemType_15.autoCheck(schematic, null), 15));
|
||||||
return CheckSchemType_12.autoCheck(schematic, this);
|
|
||||||
default:
|
|
||||||
return new AutoCheckResult();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren