Added plugin name and version constants, implemented these
This commit is contained in:
parent
7463d123e9
commit
2fcb5f1183
@ -75,6 +75,14 @@ import net.minelink.ctplus.CombatTagPlus;
|
|||||||
|
|
||||||
public class AuthMe extends JavaPlugin {
|
public class AuthMe extends JavaPlugin {
|
||||||
|
|
||||||
|
/** Defines the name of the plugin. */
|
||||||
|
// TODO: Create a getter method for this constant, and make it private
|
||||||
|
public static final String PLUGIN_NAME = "AuthMeReloaded";
|
||||||
|
/** Defines the current AuthMeReloaded version name. */
|
||||||
|
private static final String PLUGIN_VERSION_NAME = "5.1-SNAPSHOT";
|
||||||
|
/** Defines the current AuthMeReloaded version code. */
|
||||||
|
private static final int PLUGIN_VERSION_CODE = 100; // Increase this number by one when an update is released
|
||||||
|
|
||||||
private static AuthMe authme;
|
private static AuthMe authme;
|
||||||
private static Server server;
|
private static Server server;
|
||||||
private Logger authmeLogger;
|
private Logger authmeLogger;
|
||||||
@ -848,4 +856,22 @@ public class AuthMe extends JavaPlugin {
|
|||||||
// Handle the command, return the result
|
// Handle the command, return the result
|
||||||
return commandHandler.onCommand(sender, cmd, commandLabel, args);
|
return commandHandler.onCommand(sender, cmd, commandLabel, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current installed AuthMeReloaded version name.
|
||||||
|
*
|
||||||
|
* @return The version name of the currently installed AuthMeReloaded instance.
|
||||||
|
*/
|
||||||
|
public static String getVersionName() {
|
||||||
|
return PLUGIN_VERSION_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current installed AuthMeReloaded version code.
|
||||||
|
*
|
||||||
|
* @return The version code of the currently installed AuthMeReloaded instance.
|
||||||
|
*/
|
||||||
|
public static int getVersionCode() {
|
||||||
|
return PLUGIN_VERSION_CODE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package fr.xephi.authme.command.executable;
|
package fr.xephi.authme.command.executable;
|
||||||
|
|
||||||
|
import fr.xephi.authme.AuthMe;
|
||||||
import fr.xephi.authme.command.CommandParts;
|
import fr.xephi.authme.command.CommandParts;
|
||||||
import fr.xephi.authme.command.ExecutableCommand;
|
import fr.xephi.authme.command.ExecutableCommand;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -20,7 +21,7 @@ public class AuthMeCommand extends ExecutableCommand {
|
|||||||
public boolean executeCommand(CommandSender sender, CommandParts commandReference, CommandParts commandArguments) {
|
public boolean executeCommand(CommandSender sender, CommandParts commandReference, CommandParts commandArguments) {
|
||||||
// Show some version info
|
// Show some version info
|
||||||
// TODO: Use plugin name and version constants here!
|
// TODO: Use plugin name and version constants here!
|
||||||
sender.sendMessage(ChatColor.GREEN + "This server is running AuthMeReloaded v1.0! " + ChatColor.RED + "<3");
|
sender.sendMessage(ChatColor.GREEN + "This server is running " + AuthMe.PLUGIN_NAME + " v" + AuthMe.getVersionName() + "! " + ChatColor.RED + "<3");
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Use the command " + ChatColor.GOLD + "/" + commandReference.get(0) + " help" + ChatColor.YELLOW + " to view help.");
|
sender.sendMessage(ChatColor.YELLOW + "Use the command " + ChatColor.GOLD + "/" + commandReference.get(0) + " help" + ChatColor.YELLOW + " to view help.");
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Use the command " + ChatColor.GOLD + "/" + commandReference.get(0) + " about" + ChatColor.YELLOW + " to view about.");
|
sender.sendMessage(ChatColor.YELLOW + "Use the command " + ChatColor.GOLD + "/" + commandReference.get(0) + " about" + ChatColor.YELLOW + " to view about.");
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user