Let's first test against Material.matchMaterial for material matching (:

Also update some dependencies
This commit is contained in:
dordsor21 2019-06-27 15:18:54 +01:00
parent 3074e45d2c
commit 246845607f
3 changed files with 9 additions and 5 deletions

View file

@ -11,10 +11,10 @@ repositories {
dependencies {
implementation project(':Core')
compile project(':Core')
compile 'com.destroystokyo.paper:paper-api:1.14.1-R0.1-SNAPSHOT'
compile 'com.destroystokyo.paper:paper-api:1.14.3-R0.1-SNAPSHOT'
//implementation 'com.onarandombox.multiversecore:Multiverse-Core:3.0.0-SNAPSHOT'
implementation 'org.spigotmc:spigot-api:1.14.1-R0.1-SNAPSHOT'
compile(group: 'com.sk89q.worldedit', name: 'worldedit-bukkit', version: '7.0.0-SNAPSHOT')
implementation 'org.spigotmc:spigot-api:1.14.3-R0.1-SNAPSHOT'
compile(group: 'com.sk89q.worldedit', name: 'worldedit-bukkit', version: '7.0.0')
compile("net.milkbowl.vault:VaultAPI:1.7") {
exclude module: 'bukkit'
}

View file

@ -7,6 +7,7 @@ import com.github.intellectualsites.plotsquared.plot.object.PlotBlock;
import com.github.intellectualsites.plotsquared.plot.object.StringPlotBlock;
import com.github.intellectualsites.plotsquared.plot.util.LegacyMappings;
import com.github.intellectualsites.plotsquared.plot.util.StringComparison;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -15,6 +16,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
@ -769,7 +771,9 @@ public final class BukkitLegacyMappings extends LegacyMappings {
idDataPair = new IdDataPair(Integer.parseInt(string), 0);
}
PlotBlock plotBlock;
if (NEW_STRING_TO_LEGACY_PLOT_BLOCK.keySet().contains(workingString.toLowerCase())) {
if (Material.matchMaterial(workingString) != null) {
return PlotBlock.get(workingString);
} else if (NEW_STRING_TO_LEGACY_PLOT_BLOCK.keySet().contains(workingString.toLowerCase())) {
return PlotBlock.get(workingString);
} else if ((plotBlock = fromLegacyToString(idDataPair)) != null) {
return plotBlock;

View file

@ -62,7 +62,7 @@ subprojects {
}
dependencies {
implementation('com.sk89q.worldedit:worldedit-core:7.0.0-SNAPSHOT') {
implementation('com.sk89q.worldedit:worldedit-core:7.0.0') {
exclude(module: 'bukkit-classloader-check')
exclude(module: 'mockito-core')
exclude(module: 'dummypermscompat')