mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-12-30 19:37:38 +00:00
Update Paper
This commit is contained in:
parent
b697c4be94
commit
6015aa70b7
@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
|
||||
version=1.20.1-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.20.1
|
||||
paperRef=a3c760e6af1e8c7244ef75c6da6e6df278a79e14
|
||||
paperRef=de3f149185a3b654eaf9af1144f4c85b8ef2f9bc
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fixes the Blank SkullOwner exploit
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||
index deed77a3d44bc55681483d7f47f148b5220135f2..f927156d6d7b75ff9a1c437478ae3e200962398c 100644
|
||||
index 47c8148e6413c51ffdd30082bfb37a7fb8a73a71..48fce864be2a92c9665b9eeb85e3193eaed4133d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
@ -16,12 +16,12 @@ index deed77a3d44bc55681483d7f47f148b5220135f2..f927156d6d7b75ff9a1c437478ae3e20
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
@@ -73,7 +74,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
||||
|
||||
@@ -74,7 +75,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
||||
try { // Paper - Ignore invalid game profiles
|
||||
if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
|
||||
this.setProfile(NbtUtils.readGameProfile(tag.getCompound(SKULL_OWNER.NBT)));
|
||||
- } else if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_STRING) && !tag.getString(SKULL_OWNER.NBT).isEmpty()) {
|
||||
+ } else if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_STRING) && !StringUtils.isBlank(tag.getString(SKULL_OWNER.NBT))) { // Scissors
|
||||
this.setProfile(new GameProfile(null, tag.getString(SKULL_OWNER.NBT)));
|
||||
}
|
||||
|
||||
} catch (Exception ignored) {} // Paper
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Removes useless spammy error logging
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 1481c8ca684eddca3eb5db3aceac4877043b9fcd..db7d7e2ab25f8559247e2496a54807161e24a203 100644
|
||||
index 076e06908a0cf97f86a64a15ca0231c5b0f06fec..3903ca3970db787d96053f8b40044c1dac2c909b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -1800,8 +1800,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1807,8 +1807,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
resource = CraftNamespacedKey.fromMinecraft(key);
|
||||
}
|
||||
} catch (IllegalArgumentException ex) {
|
||||
|
@ -1,29 +0,0 @@
|
||||
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..2eb3705e1efdd62fa176bf4a1ec126181d083505 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
|
||||
@@ -68,10 +68,15 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
|
||||
CompoundTag trimCompound = tag.getCompound(TRIM.NBT);
|
||||
|
||||
if (trimCompound.contains(TRIM_MATERIAL.NBT, net.minecraft.nbt.Tag.TAG_STRING) && trimCompound.contains(TRIM_PATTERN.NBT, net.minecraft.nbt.Tag.TAG_STRING)) { // Paper - for now, ignore inline definitions of trim material & pattern
|
||||
- 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)));
|
||||
+ // Scissors start
|
||||
+ NamespacedKey trimMaterialKey = NamespacedKey.fromString(trimCompound.getString(TRIM_MATERIAL.NBT));
|
||||
+ NamespacedKey trimPatternKey = NamespacedKey.fromString(trimCompound.getString(TRIM_PATTERN.NBT));
|
||||
|
||||
- this.trim = new ArmorTrim(trimMaterial, trimPattern);
|
||||
+ TrimMaterial trimMaterial = trimMaterialKey != null ? Registry.TRIM_MATERIAL.get(trimMaterialKey) : null;
|
||||
+ TrimPattern trimPattern = trimPatternKey != null ? Registry.TRIM_PATTERN.get(trimPatternKey) : null;
|
||||
+
|
||||
+ if (trimMaterial != null && trimPattern != null) this.trim = new ArmorTrim(trimMaterial, trimPattern);
|
||||
+ // Scissors end
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix packet-related lag exploits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index fbc247d364d3cdee94b04b1108c99d2909b1773a..17faa1416b1e4145a81a0fff5726c6672abf008b 100644
|
||||
index e6ca11d556cd284bd9124111ddcec87fa2175a09..c4ba1bd493db96fd894c432aa6b416f3ccd00b3f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -965,7 +965,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
Loading…
Reference in New Issue
Block a user