mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 01:17:44 +01:00
9c79dd3214
the first 'major' change in this PR is to cache the generated event executrs from the ASM class, by doing this we only generate a single class for every method that we need an executor for, thus reducing the number of classes that are needed, especially in cases where plugins re/unregister events all the time. The second change is to modify the generated classloader map, generated classloaders are not held against the plugin itself but the classloader that the event is declared in, the implication here is that we cannot drop generated classloaders when a plugin disable, and so we use a guava weak-key'd hashmap, downfall here is that classes won't be GC'd until guava drops the generated classloader, however the first change should deal with most of the grunt.
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 19295da8c04248bdc579640f5931b9818f1a61a2 Mon Sep 17 00:00:00 2001
|
|
From: willies952002 <admin@domnian.com>
|
|
Date: Thu, 20 Jul 2017 18:05:36 -0400
|
|
Subject: [PATCH] Allow Changing of Player Sample in ServerListPingEvent
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
|
index 3c38d857..84de3ce4 100644
|
|
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
|
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
|
@@ -2,6 +2,7 @@ package org.bukkit.event.server;
|
|
|
|
import java.net.InetAddress;
|
|
import java.util.Iterator;
|
|
+import java.util.List;
|
|
|
|
import org.apache.commons.lang.Validate;
|
|
import org.bukkit.entity.Player;
|
|
@@ -145,4 +146,15 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
|
public Iterator<Player> iterator() throws UnsupportedOperationException {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ private java.util.List<String> sample;
|
|
+ public void setSampleText(java.util.List<String> sample) {
|
|
+ this.sample = sample;
|
|
+ }
|
|
+ public java.util.List<String> getSampleText() {
|
|
+ return sample;
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
}
|
|
--
|
|
2.14.1
|
|
|