Skip to content

Commit

Permalink
Enable Version-Dependent Features for 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo56958 committed Dec 12, 2021
1 parent 82cf882 commit dea4655
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/flo56958/minetinker/MineTinker.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public void onEnable() {
plugin = this;
final String version = Bukkit.getVersion().split("MC: ")[1];
is16compatible = version.startsWith("1.16")
|| version.startsWith("1.17");
is17compatible = version.startsWith("1.17");
|| version.startsWith("1.17") || version.startsWith("1.18");
is17compatible = version.startsWith("1.17") || version.startsWith("1.18");
if (is16compatible) {
ChatWriter.log(false, "1.16 enhanced features activated!");
}
Expand Down
11 changes: 3 additions & 8 deletions src/main/java/de/flo56958/minetinker/modifiers/types/Power.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,11 @@ public void reload() {

blacklist = new ArrayList<>();

List<String> blacklistConfig = config.getStringList("Blacklist");
final List<String> blacklistConfig = config.getStringList("Blacklist");

for (String mat : blacklistConfig) {
for (final String mat : blacklistConfig) {
try {
Material material = Material.valueOf(mat);

if (blacklist == null) {
continue;
}

blacklist.add(material);
} catch (IllegalArgumentException e) {
MineTinker.getPlugin().getLogger()
Expand Down Expand Up @@ -177,7 +172,7 @@ public void effect(WorldSaveEvent e) {
}

/**
* The effect when a Block was brocken
* The effect when a Block was broken
*
* @param event The Event
*/
Expand Down

0 comments on commit dea4655

Please sign in to comment.