aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0021-Hook-into-CB-plugin-rewrites.patch')
-rw-r--r--patches/server/0021-Hook-into-CB-plugin-rewrites.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
index 036deead6e..4b98c18cbf 100644
--- a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
+++ b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
@@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
debugging in an IDE pre-relocate.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390cb9129cd 100644
+index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b89f56a10 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -12,6 +12,7 @@ import java.util.Arrays;
@@ -27,7 +27,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
-@@ -123,6 +125,40 @@ public class Commodore {
+@@ -126,6 +128,40 @@ public class Commodore {
return this.reroutes;
}
@@ -68,7 +68,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390
public static void main(String[] args) {
OptionParser parser = new OptionParser();
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
-@@ -278,9 +314,49 @@ public class Commodore {
+@@ -281,9 +317,49 @@ public class Commodore {
}
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
@@ -118,7 +118,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390
name = FieldRename.rename(pluginVersion, owner, name);
if (modern) {
-@@ -393,6 +469,13 @@ public class Commodore {
+@@ -396,6 +472,13 @@ public class Commodore {
return;
}
@@ -132,7 +132,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390
if (modern) {
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
switch (name) {
-@@ -489,6 +572,13 @@ public class Commodore {
+@@ -492,6 +575,13 @@ public class Commodore {
@Override
public void visitLdcInsn(Object value) {
@@ -146,7 +146,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
return;
-@@ -499,6 +589,14 @@ public class Commodore {
+@@ -502,6 +592,14 @@ public class Commodore {
@Override
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
@@ -161,7 +161,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
Type samMethodType = (Type) bootstrapMethodArguments[0];
-@@ -515,7 +613,7 @@ public class Commodore {
+@@ -518,7 +616,7 @@ public class Commodore {
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
methodArgs.add(newInstantiated);
@@ -170,7 +170,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
return;
}
-@@ -566,6 +664,12 @@ public class Commodore {
+@@ -569,6 +667,12 @@ public class Commodore {
@Override
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {