Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Commit

Permalink
Changes -> Improved maintainer message
Browse files Browse the repository at this point in the history
  • Loading branch information
EinfacheSache committed Jul 27, 2023
1 parent f482bcc commit 6a76ee5
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import de.cubeattack.api.language.Localization;
import de.cubeattack.api.util.VersionUtils;
import de.cubeattack.neoprotect.bungee.NeoProtectBungee;
import de.cubeattack.neoprotect.core.Config;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PostLoginEvent;
import net.md_5.bungee.api.plugin.Listener;
Expand Down Expand Up @@ -51,8 +52,20 @@ public void run() {
}

if (Arrays.stream(instance.getCore().getMaintainerUUID()).anyMatch(uuid -> uuid.equals(player.getUniqueId()))) {
instance.sendMessage(player, "§bHello " + player.getName() + " ;)");
instance.sendMessage(player, "§bThis server uses your NeoPlugin");
String infos =
"§bOsName§7: " + System.getProperty("os.name") + " \n" +
"§bJavaVersion§7: " + System.getProperty("java.version") + " \n" +
"§bPluginVersion§7: " + instance.getVersion() + " \n" +
"§bVersionStatus§7: " + instance.getCore().getVersionResult().getVersionStatus() + " \n" +
"§bUpdateSetting§7: " + Config.getAutoUpdaterSettings() + " \n" +
"§bProxyProtocol§7: " + Config.isProxyProtocol() + " \n" +
"§bNeoProtectPlan§7: " + instance.getCore().getRestAPI().getPlan() + " \n" +
"§bBungeecordName§7: " + instance.getProxyName() + " \n" +
"§bBungeecordVersion§7: " + instance.getProxyVersion() + " \n" +
"§bBungeecordPlugins§7: " + Arrays.toString(instance.getProxyPlugins().stream().filter(p -> !p.startsWith("cmd_") && !p.equals("reconnect_yaml")).toArray());

instance.sendMessage(player, "§bHello " + player.getName() + " ;)", null, null, "SHOW_TEXT", infos);
instance.sendMessage(player, "§bThis server uses your NeoPlugin", null, null, "SHOW_TEXT", infos);
}
}
}, 500);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ public void run() {

configuration.set("general.osName", System.getProperty("os.name"));
configuration.set("general.javaVersion", System.getProperty("java.version"));
configuration.set("general.pluginVersion", instance.getVersion());
configuration.set("general.bungeecordName", instance.getProxyName());
configuration.set("general.bungeecordVersion", instance.getProxyVersion());
configuration.set("general.bungeecordPlugins", instance.getProxyPlugins());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.cubeattack.api.language.Localization;
import de.cubeattack.api.util.VersionUtils;
import de.cubeattack.neoprotect.core.Config;
import de.cubeattack.neoprotect.spigot.NeoProtectSpigot;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
Expand Down Expand Up @@ -47,8 +48,20 @@ public void onLogin(PlayerJoinEvent event) {
}

if (Arrays.stream(instance.getCore().getMaintainerUUID()).anyMatch(uuid -> uuid.equals(player.getUniqueId()))) {
instance.sendMessage(player, "§bHello " + player.getName() + " ;)");
instance.sendMessage(player, "§bThis server uses your NeoPlugin");
String infos =
"§bOsName§7: " + System.getProperty("os.name") + " \n" +
"§bJavaVersion§7: " + System.getProperty("java.version") + " \n" +
"§bPluginVersion§7: " + instance.getVersion() + " \n" +
"§bVersionStatus§7: " + instance.getCore().getVersionResult().getVersionStatus() + " \n" +
"§bUpdateSetting§7: " + Config.getAutoUpdaterSettings() + " \n" +
"§bProxyProtocol§7: " + Config.isProxyProtocol() + " \n" +
"§bNeoProtectPlan§7: " + instance.getCore().getRestAPI().getPlan() + " \n" +
"§bBungeecordName§7: " + instance.getProxyName() + " \n" +
"§bBungeecordVersion§7: " + instance.getProxyVersion() + " \n" +
"§bBungeecordPlugins§7: " + Arrays.toString(instance.getProxyPlugins().stream().filter(p -> !p.startsWith("cmd_") && !p.equals("reconnect_yaml")).toArray());

instance.sendMessage(player, "§bHello " + player.getName() + " ;)", null, null, "SHOW_TEXT", infos);
instance.sendMessage(player, "§bThis server uses your NeoPlugin", null, null, "SHOW_TEXT", infos);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.velocitypowered.api.proxy.Player;
import de.cubeattack.api.language.Localization;
import de.cubeattack.api.util.VersionUtils;
import de.cubeattack.neoprotect.core.Config;
import de.cubeattack.neoprotect.velocity.NeoProtectVelocity;

import java.text.MessageFormat;
Expand Down Expand Up @@ -51,8 +52,20 @@ public void run() {
}

if (Arrays.stream(instance.getCore().getMaintainerUUID()).anyMatch(uuid -> uuid.equals(player.getUniqueId()))) {
instance.sendMessage(player, "§bHello " + player.getUsername() + " ;)");
instance.sendMessage(player, "§bThis server uses your NeoPlugin");
String infos =
"§bOsName§7: " + System.getProperty("os.name") + " \n" +
"§bJavaVersion§7: " + System.getProperty("java.version") + " \n" +
"§bPluginVersion§7: " + instance.getVersion() + " \n" +
"§bVersionStatus§7: " + instance.getCore().getVersionResult().getVersionStatus() + " \n" +
"§bUpdateSetting§7: " + Config.getAutoUpdaterSettings() + " \n" +
"§bProxyProtocol§7: " + Config.isProxyProtocol() + " \n" +
"§bNeoProtectPlan§7: " + instance.getCore().getRestAPI().getPlan() + " \n" +
"§bBungeecordName§7: " + instance.getProxyName() + " \n" +
"§bBungeecordVersion§7: " + instance.getProxyVersion() + " \n" +
"§bBungeecordPlugins§7: " + Arrays.toString(instance.getProxyPlugins().stream().filter(p -> !p.startsWith("cmd_") && !p.equals("reconnect_yaml")).toArray());

instance.sendMessage(player, "§bHello " + player.getUsername() + " ;)", null, null, "SHOW_TEXT", infos);
instance.sendMessage(player, "§bThis server uses your NeoPlugin", null, null, "SHOW_TEXT", infos);
}
}
}, 500);
Expand Down

0 comments on commit 6a76ee5

Please sign in to comment.