diff --git a/plugins/citadel-paper/plugin.yml b/plugins/citadel-paper/plugin.yml index a5e716e5a..cbc448df4 100644 --- a/plugins/citadel-paper/plugin.yml +++ b/plugins/citadel-paper/plugin.yml @@ -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) ctremovereinforcements: description: Removes all reinforcements from the Citadel database. - usage: /ctremovereinforcements \ No newline at end of file + usage: /ctremovereinforcements + ctversion: + description: Displays plugin version + usage: /ctversion \ No newline at end of file diff --git a/plugins/citadel-paper/src/com/untamedears/citadel/Citadel.java b/plugins/citadel-paper/src/com/untamedears/citadel/Citadel.java index 42a55c358..f0dfed1ce 100644 --- a/plugins/citadel-paper/src/com/untamedears/citadel/Citadel.java +++ b/plugins/citadel-paper/src/com/untamedears/citadel/Citadel.java @@ -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. ( •_•)>âŒ�â– -â–  ( âŒ�â– _â– )"); } @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. (╯ •_•)╯ 彡┻â”�â”»"); } public void logVerbose(String messageFormat, Object... args) { diff --git a/plugins/citadel-paper/src/com/untamedears/citadel/command/ViewCurrentVersion.java b/plugins/citadel-paper/src/com/untamedears/citadel/command/ViewCurrentVersion.java new file mode 100644 index 000000000..c9a8e7192 --- /dev/null +++ b/plugins/citadel-paper/src/com/untamedears/citadel/command/ViewCurrentVersion.java @@ -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; + } + + +}