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

35 lines
1.4 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;
boolean checked = false;
public CommandAbout(String currentVersion) {
this.currentVersion = currentVersion;
}
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
String aboutMessage = ChatColor.GREEN + "" + ChatColor.BOLD + "Resurrection\n\n" + ChatColor.RESET +
"Resurrection is a Spigot Minecraft plugin that forces players to wait 24 hours before respawning.\n" +
"The current version of this plugin is " + currentVersion + ".\n\n" +
"This plugin is licensed under the GNU Affero General Public License v3.0. Read more here: " +
"For more information on this plugin or to download it for yourself, visit the GitHub repository at https://github.com/brysonsteck/resurrection" +
"\u00a9 2021 Bryson Steck.";
2021-06-06 11:49:01 -06:00
if (commandSender instanceof Player) {
Player p = (Player) commandSender;
p.sendMessage(aboutMessage);
} else {
System.out.println(aboutMessage);
}
return true;
}
}