mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-15 11:54:43 +02:00
Bug Fix and Cleanup
This commit is contained in:
@ -57,14 +57,14 @@ public class DefaultTitleManager extends TitleManager {
|
||||
// Send title
|
||||
Object serialized = getMethod(this.nmsChatSerializer, "a", String.class).invoke(null,
|
||||
"{text:\"" + ChatColor.translateAlternateColorCodes('&', this.getTitle()) + "\",color:" + this.titleColor.name().toLowerCase()
|
||||
+ "}");
|
||||
+ '}');
|
||||
packet = this.packetTitle.getConstructor(this.packetActions, this.chatBaseComponent).newInstance(actions[0], serialized);
|
||||
sendPacket.invoke(connection, packet);
|
||||
if (!this.getSubtitle().isEmpty()) {
|
||||
// Send subtitle if present
|
||||
serialized = getMethod(this.nmsChatSerializer, "a", String.class).invoke(null,
|
||||
"{text:\"" + ChatColor.translateAlternateColorCodes('&', this.getSubtitle()) + "\",color:" + this.subtitleColor.name()
|
||||
.toLowerCase() + "}");
|
||||
.toLowerCase() + '}');
|
||||
packet = this.packetTitle.getConstructor(this.packetActions, this.chatBaseComponent).newInstance(actions[1], serialized);
|
||||
sendPacket.invoke(connection, packet);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ public class HackTitleManager extends TitleManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
private Field getField(String name, Class<?> clazz) throws Exception {
|
||||
private Field getField(String name, Class<?> clazz) throws NoSuchFieldException, SecurityException {
|
||||
return clazz.getDeclaredField(name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user