mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-15 23:20:44 +00:00
Added a command to display the current version of the plugin
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
name: Citadel
|
||||
main: com.untamedears.citadel.Citadel
|
||||
version: 0.1
|
||||
version: 1.2
|
||||
description: Reinforce your structures!
|
||||
author: cxschx
|
||||
author: cxschx, chrisrico, jonnyd
|
||||
database: false
|
||||
commands:
|
||||
ctmaterials:
|
||||
@@ -60,4 +60,7 @@ commands:
|
||||
usage: /ctdisallow (or /ctd) <player name>
|
||||
ctremovereinforcements:
|
||||
description: Removes all reinforcements from the Citadel database.
|
||||
usage: /ctremovereinforcements
|
||||
usage: /ctremovereinforcements
|
||||
ctversion:
|
||||
description: Displays plugin version
|
||||
usage: /ctversion
|
||||
@@ -25,6 +25,7 @@ public class Citadel extends JavaPlugin {
|
||||
public int flashLength;
|
||||
private boolean verboseLogging;
|
||||
public double redstoneDistance;
|
||||
public double pistonRedstoneDistance;
|
||||
public long autoModeReset;
|
||||
|
||||
public void onEnable() {
|
||||
@@ -77,12 +78,13 @@ public class Citadel extends JavaPlugin {
|
||||
getCommand("ctlist").setExecutor(new ListMembers(this));
|
||||
getCommand("ctallow").setExecutor(new ModifyFaction(this));
|
||||
getCommand("ctdisallow").setExecutor(new ModifyFaction(this));
|
||||
getCommand("ctversion").setExecutor(new ViewCurrentVersion(this));
|
||||
|
||||
getServer().getPluginManager().registerEvents(new BlockListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(new PlayerListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(new EntityListener(this), this);
|
||||
|
||||
log.info("Citadel is now enabled. ( •_•)>⌐■-■ ( ⌐■_■)");
|
||||
log.info("Citadel is now enabled. ( •_•)>âŒ<C3A2>â– -â– ( âŒ<C3A2>â– _â– )");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,7 +100,7 @@ public class Citadel extends JavaPlugin {
|
||||
public void onDisable() {
|
||||
Citadel.instance = null;
|
||||
|
||||
log.info("Citadel is now disabled. (╯ •_•)╯ 彡┻━┻");
|
||||
log.info("Citadel is now disabled. (╯ •_•)╯ 彡┻â”<C3A2>â”»");
|
||||
}
|
||||
|
||||
public void logVerbose(String messageFormat, Object... args) {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.untamedears.citadel.command;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.untamedears.citadel.Citadel;
|
||||
import com.untamedears.citadel.PluginConsumer;
|
||||
|
||||
import static com.untamedears.citadel.Utility.sendMessage;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JonnyD
|
||||
*
|
||||
*/
|
||||
public class ViewCurrentVersion extends PluginConsumer implements CommandExecutor {
|
||||
|
||||
public ViewCurrentVersion(Citadel plugin){
|
||||
super(plugin);
|
||||
}
|
||||
|
||||
public boolean onCommand(CommandSender sender, Command command, String s,
|
||||
String[] args) {
|
||||
String version = plugin.getDescription().getVersion();
|
||||
sendMessage(sender, ChatColor.WHITE, "Current version is: " + version);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user