1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-21 15:41:19 +01:00

Lets prevent slab error

This commit is contained in:
Zrips 2018-10-15 15:51:45 +03:00
parent 6d239bf83d
commit b6589bac2f
2 changed files with 14 additions and 13 deletions

16
pom.xml
View File

@ -154,14 +154,14 @@
<target>1.7</target> <target>1.7</target>
</configuration> </configuration>
</plugin> </plugin>
<!-- <plugin> --> <plugin>
<!-- <groupId>org.apache.maven.plugins</groupId> --> <groupId>org.apache.maven.plugins</groupId>
<!-- <artifactId>maven-jar-plugin</artifactId> --> <artifactId>maven-jar-plugin</artifactId>
<!-- <version>2.3.1</version> --> <version>2.3.1</version>
<!-- <configuration> --> <configuration>
<!-- <outputDirectory>C:\Users\Arte\Desktop\Server 1.13\plugins</outputDirectory> --> <outputDirectory>C:\Users\Arte\Desktop\Server\plugins</outputDirectory>
<!-- </configuration> --> </configuration>
<!-- </plugin> --> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -22,7 +22,6 @@ import org.bukkit.inventory.Recipe;
import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.inventory.meta.SkullMeta;
import com.gamingmesh.jobs.Jobs; import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.stuff.Debug;
import com.gamingmesh.jobs.CMILib.VersionChecker.Version; import com.gamingmesh.jobs.CMILib.VersionChecker.Version;
public class ItemManager { public class ItemManager {
@ -2433,17 +2432,19 @@ public class ItemManager {
if (Version.isCurrentEqualOrHigher(Version.v1_13_R1)) { if (Version.isCurrentEqualOrHigher(Version.v1_13_R1)) {
if (block.getBlockData() instanceof org.bukkit.block.data.type.Slab) { if (block.getBlockData() instanceof org.bukkit.block.data.type.Slab) {
org.bukkit.block.data.type.Slab slab = (org.bukkit.block.data.type.Slab) block.getBlockData(); org.bukkit.block.data.type.Slab slab = (org.bukkit.block.data.type.Slab) block.getBlockData();
switch (slab.getType()) { org.bukkit.block.data.type.Slab.Type t = slab.getType();
case TOP: switch (t.toString()) {
case "TOP":
return SlabType.TOP; return SlabType.TOP;
case BOTTOM: case "BOTTOM":
return SlabType.BOTTOM; return SlabType.BOTTOM;
case DOUBLE: case "DOUBLE":
return SlabType.DOUBLE; return SlabType.DOUBLE;
} }
} }
return SlabType.NOTSLAB; return SlabType.NOTSLAB;
} }
if (block.getType().name().contains("STEP")) { if (block.getType().name().contains("STEP")) {
switch (CMIMaterial.get(block).getLegacyId()) { switch (CMIMaterial.get(block).getLegacyId()) {
case 44: case 44: