Skip to content

Commit

Permalink
Bugfix for version 2.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dniym committed Jul 16, 2024
1 parent ecdb5ba commit b6822e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ tasks.compileJava.configure {
options.release.set(8)
}

version = "2.9.12-SNAPSHOT-01"
version = "2.9.12a"

tasks.named<Copy>("processResources") {
filesMatching("plugin.yml") {
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/main/java/me/dniym/checks/BadPotionCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,17 @@ public static boolean isInvalidPotion(@NotNull Projectile proj) {
if (p != null && Protections.AllowBypass.isEnabled() && p.hasPermission("illegalstack.enchantbypass"))
return false;

PotionMeta potion = null;

if(IllegalStack.isPaperServer())
potion = (PotionMeta) tp.getPotionMeta();
else
potion = (PotionMeta) tp.getItem().getItemMeta();

PotionMeta potion = (PotionMeta) tp.getPotionMeta();
PotionData pd = potion.getBasePotionData();

PotionType pt = null;

if (pd.getType() == PotionType.UNCRAFTABLE || (potion.hasCustomEffects() && !potion
.getCustomEffects()
.isEmpty())) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/main/java/me/dniym/enums/Protections.java
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ public enum Protections {
35,
true,
"Prevent Invalid Potions",
"> 1.11",
"1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19",
"Exploits.Other.PreventInvalidPotions",
"Prevents non-opped players from possessing invalid / uncraftable potions. Typically these are used for malicious purposes on creative servers such as potions of instant death",
"",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/main/java/me/dniym/listeners/fListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public fListener(IllegalStack plugin) {
}
}

if (!ver.contains("v1_14") && !ver.contains("v1_15") && !ver.contains("v1_16") && !ver.contains("v1_17") && !ver.contains("v1_18") && !ver.contains("V1_19") && !ver.contains("v1_20")) {
if (!ver.contains("v1_14") && !ver.contains("v1_15") && !ver.contains("v1_16") && !ver.contains("v1_17") && !ver.contains("v1_18") && !ver.contains("V1_19") && !ver.contains("v1_20") && !ver.contains("V1_21")) {
if (ver.contains("v1_13")) {
LOGGER.info("MC Version 1.13+ detected!");

Expand Down

0 comments on commit b6822e8

Please sign in to comment.