Skip to content

Commit

Permalink
Add support for minecraft 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
EpiCanard committed Aug 2, 2022
1 parent 0458480 commit 2fe5880
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ public class ServerSignsConfig implements IServerSignsConfig {
Material.getMaterial("WARPED_WALL_SIGN")
));
}
if (Version.isHigherOrEqualsTo(Version.V1_19)) {
this.blocks.addAll(EnumSet.of(
Material.getMaterial("MANGROVE_SIGN"),
Material.getMaterial("MANGROVE_WALL_SIGN")
));
}
}

public EnumSet<Material> getBlocks() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,15 @@ public PlayerListener(ServerSignsPlugin instance) {
}
if (Version.isHigherOrEqualsTo(Version.V1_16)) {
PLATE_MATERIALS.addAll(EnumSet.of(
Material.getMaterial("POLISHED_BLACKSTONE_PRESSURE_PLATE"),
Material.getMaterial("CRIMSON_PRESSURE_PLATE"),
Material.getMaterial("WARPED_PRESSURE_PLATE")
));
}
if (Version.isHigherOrEqualsTo(Version.V1_19)) {
PLATE_MATERIALS.add(Material.getMaterial("MANGROVE_PRESSURE_PLATE"));
}

}

@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/de/czymm/serversigns/utils/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public enum Version {
V1_14(1, 14),
V1_15(1, 15),
V1_16(1, 16),
V1_17(1, 17);
V1_17(1, 17),
V1_18(1, 18),
V1_19(1, 19);

private int major;
private int minor;
Expand Down

0 comments on commit 2fe5880

Please sign in to comment.