mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 15:12:13 -07:00
Improve ServerGUI
- Added logo to server frame - Show tps in the server stats
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
--- a/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
+++ b/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
@@ -95,8 +95,8 @@
|
||||
@@ -59,6 +59,15 @@
|
||||
jframe.pack();
|
||||
jframe.setLocationRelativeTo((Component) null);
|
||||
jframe.setVisible(true);
|
||||
+ jframe.setName("Minecraft server"); // Paper - Improve ServerGUI
|
||||
+
|
||||
+ // Paper start - Improve ServerGUI
|
||||
+ try {
|
||||
+ jframe.setIconImage(javax.imageio.ImageIO.read(Objects.requireNonNull(MinecraftServerGui.class.getClassLoader().getResourceAsStream("logo.png"))));
|
||||
+ } catch (java.io.IOException ignore) {
|
||||
+ }
|
||||
+ // Paper end - Improve ServerGUI
|
||||
+
|
||||
jframe.addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent windowevent) {
|
||||
if (!servergui.isClosing.getAndSet(true)) {
|
||||
@@ -95,8 +104,8 @@
|
||||
|
||||
private JComponent buildInfoPanel() {
|
||||
JPanel jpanel = new JPanel(new BorderLayout());
|
||||
@@ -11,7 +27,7 @@
|
||||
|
||||
Objects.requireNonNull(guistatscomponent);
|
||||
collection.add(guistatscomponent::close);
|
||||
@@ -132,7 +132,7 @@
|
||||
@@ -132,7 +141,7 @@
|
||||
|
||||
jtextfield.setText("");
|
||||
});
|
||||
@@ -20,7 +36,7 @@
|
||||
public void focusGained(FocusEvent focusevent) {}
|
||||
});
|
||||
jpanel.add(jscrollpane, "Center");
|
||||
@@ -166,6 +166,7 @@
|
||||
@@ -166,6 +175,7 @@
|
||||
this.finalizers.forEach(Runnable::run);
|
||||
}
|
||||
|
||||
@@ -28,7 +44,7 @@
|
||||
public void print(JTextArea textArea, JScrollPane scrollPane, String message) {
|
||||
if (!SwingUtilities.isEventDispatchThread()) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
@@ -181,7 +182,7 @@
|
||||
@@ -181,7 +191,7 @@
|
||||
}
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user