Skip to content

Commit

Permalink
chore(info): Remove info for velocity version
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmJos committed Jan 26, 2025
1 parent e3ef67e commit 66396c0
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package cc.carm.plugin.minesql;

import cc.carm.lib.easyplugin.utils.ColorParser;
import cc.carm.lib.easyplugin.utils.JarResourceUtils;
import cc.carm.plugin.minesql.conf.PluginConfiguration;
import co.aikar.commands.CommandManager;
import co.aikar.commands.VelocityCommandManager;
Expand All @@ -15,19 +13,16 @@
import com.velocitypowered.api.plugin.PluginDescription;
import com.velocitypowered.api.plugin.annotation.DataDirectory;
import com.velocitypowered.api.proxy.ProxyServer;
import net.kyori.adventure.text.Component;
import org.bstats.charts.SimplePie;
import org.bstats.velocity.Metrics;
import org.jetbrains.annotations.NotNull;

import java.io.File;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Optional;
import java.util.logging.Logger;


@Plugin(id = "minesql", name = "MineSQL (EasySQL-Plugin)", version = "1.4.0",
@Plugin(id = "minesql", name = "MineSQL (EasySQL-Plugin)", version = "1.4.2",
description = "EasySQL Plugin For Velocity",
url = "https://github.com/CarmJos/MineSQL",
authors = {"CarmJos", "GhostChu"}
Expand All @@ -52,7 +47,6 @@ public MineSQLVelocity(ProxyServer server, Logger logger,
this.dataFolder = dataDirectory.toFile();
this.metricsFactory = metricsFactory;

outputInfo();
getLogger().info("加载基础核心...");
this.core = new MineSQLCore(this);
}
Expand Down Expand Up @@ -90,7 +84,6 @@ public void onInitialize(ProxyInitializeEvent event) {

@Subscribe(order = PostOrder.LAST)
public void onShutdown(ProxyShutdownEvent event) {
outputInfo();
getLogger().info("终止全部数据库连接...");
this.core.shutdownAll();
}
Expand Down Expand Up @@ -122,11 +115,4 @@ public String getVersion() {
public @NotNull PluginConfiguration getConfiguration() {
return this.core.getConfig();
}

public void outputInfo() {
Optional.ofNullable(JarResourceUtils.readResource(this.getClass().getResourceAsStream("PLUGIN_INFO")))
.map(v -> ColorParser.parse(Arrays.asList(v)))
.ifPresent(list -> list.forEach(s -> getServer().getConsoleCommandSource().sendMessage(Component.text(s))));
}

}

0 comments on commit 66396c0

Please sign in to comment.