mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-27 07:05:39 +00:00
Fix invalid armor trim exploit (#98)
This commit is contained in:
parent
772d2a7558
commit
e7512f7b6d
19
patches/server/0051-Fix-invalid-armor-trim-exploit.patch
Normal file
19
patches/server/0051-Fix-invalid-armor-trim-exploit.patch
Normal file
@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Luna <lunahatesgogle@gmail.com>
|
||||
Date: Mon, 12 Jun 2023 17:32:04 -0300
|
||||
Subject: [PATCH] Fix invalid armor trim exploit
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
|
||||
index c92981aedebe934cefa1c96a0328fb91fe17acbc..a1e1a94f0eb46b7eb3fe19e416e21e29b33f3e9f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
|
||||
@@ -71,7 +71,7 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
|
||||
TrimMaterial trimMaterial = Registry.TRIM_MATERIAL.get(NamespacedKey.fromString(trimCompound.getString(TRIM_MATERIAL.NBT)));
|
||||
TrimPattern trimPattern = Registry.TRIM_PATTERN.get(NamespacedKey.fromString(trimCompound.getString(TRIM_PATTERN.NBT)));
|
||||
|
||||
- this.trim = new ArmorTrim(trimMaterial, trimPattern);
|
||||
+ if (trimMaterial != null && trimPattern != null) this.trim = new ArmorTrim(trimMaterial, trimPattern); // Scissors
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user