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 { dependencies {
implementation project(':Core') implementation project(':Core')
compile 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 'com.onarandombox.multiversecore:Multiverse-Core:3.0.0-SNAPSHOT'
implementation 'org.spigotmc:spigot-api:1.14.1-R0.1-SNAPSHOT' implementation 'org.spigotmc:spigot-api:1.14.3-R0.1-SNAPSHOT'
compile(group: 'com.sk89q.worldedit', name: 'worldedit-bukkit', version: '7.0.0-SNAPSHOT') compile(group: 'com.sk89q.worldedit', name: 'worldedit-bukkit', version: '7.0.0')
compile("net.milkbowl.vault:VaultAPI:1.7") { compile("net.milkbowl.vault:VaultAPI:1.7") {
exclude module: 'bukkit' 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.object.StringPlotBlock;
import com.github.intellectualsites.plotsquared.plot.util.LegacyMappings; import com.github.intellectualsites.plotsquared.plot.util.LegacyMappings;
import com.github.intellectualsites.plotsquared.plot.util.StringComparison; import com.github.intellectualsites.plotsquared.plot.util.StringComparison;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
@ -15,6 +16,7 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
@ -769,7 +771,9 @@ public final class BukkitLegacyMappings extends LegacyMappings {
idDataPair = new IdDataPair(Integer.parseInt(string), 0); idDataPair = new IdDataPair(Integer.parseInt(string), 0);
} }
PlotBlock plotBlock; 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); return PlotBlock.get(workingString);
} else if ((plotBlock = fromLegacyToString(idDataPair)) != null) { } else if ((plotBlock = fromLegacyToString(idDataPair)) != null) {
return plotBlock; return plotBlock;

View File

@ -62,7 +62,7 @@ subprojects {
} }
dependencies { 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: 'bukkit-classloader-check')
exclude(module: 'mockito-core') exclude(module: 'mockito-core')
exclude(module: 'dummypermscompat') exclude(module: 'dummypermscompat')