resurrection/src/net/brysonsteck/Resurrection/commands/CommandAbout.java

51 lines
2.9 KiB
Java
Raw Normal View History

2021-06-06 11:49:01 -06:00
package net.brysonsteck.Resurrection.commands;
2021-07-04 00:15:56 -06:00
import org.bukkit.ChatColor;
2021-06-06 11:49:01 -06:00
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CommandAbout implements CommandExecutor {
2021-07-04 00:15:56 -06:00
String currentVersion;
2021-07-04 00:53:34 -06:00
boolean outdated;
2021-07-04 00:15:56 -06:00
2021-09-13 15:31:29 -06:00
public CommandAbout(String debug, String currentVersion, boolean outdated) {
2021-07-04 00:15:56 -06:00
this.currentVersion = currentVersion;
2021-07-04 00:53:34 -06:00
this.outdated = outdated;
2021-07-04 00:15:56 -06:00
}
2021-06-06 11:49:01 -06:00
@Override
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
2021-07-04 00:15:56 -06:00
2021-06-06 11:49:01 -06:00
if (commandSender instanceof Player) {
Player p = (Player) commandSender;
p.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "--- Resurrection ---" + ChatColor.RESET);
p.sendMessage(ChatColor.YELLOW + "Resurrection is a Spigot Minecraft plugin that forces players to wait a certain amount of time before respawning.");
2021-07-04 00:53:34 -06:00
p.sendMessage(ChatColor.YELLOW + "This server is running version " + ChatColor.AQUA + currentVersion + ChatColor.YELLOW + " of Resurrection.");
if (outdated) {
p.sendMessage(ChatColor.RED + "HOWEVER, A newer version of this plugin is available. Please notify a server admin to update this plugin for new features and/or stability improvements.");
2021-07-04 00:53:34 -06:00
}
p.sendMessage("---");
p.sendMessage(ChatColor.YELLOW + "This plugin is licensed under the GNU Affero General Public License v3.0. For more info, run " + ChatColor.AQUA + "/source");
2021-08-25 00:34:27 -06:00
p.sendMessage(ChatColor.YELLOW + "For more info on this plugin or to download it, visit the GitHub repository at " + ChatColor.AQUA + "https://github.com/brysonsteck/resurrection");
2021-07-04 00:53:34 -06:00
p.sendMessage(ChatColor.YELLOW + "\u00a9 2021 Bryson Steck");
2021-06-06 11:49:01 -06:00
} else {
System.out.println("[Resurrection] --- Resurrection ---");
System.out.println("[Resurrection]");
System.out.println("[Resurrection] Resurrection is a Spigot Minecraft plugin that forces players to wait a certain amount of time before respawning.");
System.out.println("[Resurrection] This server is running version " + currentVersion + " of Resurrection.");
if (outdated) {
System.out.println("[Resurrection] HOWEVER, a newer version of Resurrection is available. Please check the updater on startup for more information.");
}
System.out.println("[Resurrection]");
System.out.println("[Resurrection] This plugin is licensed under the GNU Affero General Public License v3.0. For more info, run /source");
System.out.println("[Resurrection] Since you're the admin, you probably know where to download it lmao. Here's the link anyway: https://github.com/brysonsteck/resurrection");
2021-08-25 00:41:04 -06:00
System.out.println("[Resurrection] Copyright 2021 Bryson Steck");
2021-06-06 11:49:01 -06:00
}
return true;
}
}