From ce759180013ae1d9186586843770708b14f6c11a Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 7 Apr 2014 00:15:47 +1200 Subject: [PATCH] Read desc Added new command LibsDisguises Tells the command user who made the plugin. And if the player who called the command is called by the attractive name 'libraryaddict' then it also tells that curious user the version of the plugin. Worried about it being a exploit? Why? I know of all bugs/exploits and could just try them all out if I didn't know the version. If there was a exploit in the first place anyways. The command is there to give credit to me, and so I can urge servers to update. Against this command? I see you don't like plugin developers getting credit for their work that you use for free. Please move back to disguisecraft. --- plugin.yml | 1 + .../libraryaddict/disguise/LibsDisguises.java | 1 + .../commands/LibsDisguisesCommand.java | 20 +++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java diff --git a/plugin.yml b/plugin.yml index 9afe8525..0247e2fa 100644 --- a/plugin.yml +++ b/plugin.yml @@ -4,6 +4,7 @@ version: ${project.version} author: libraryaddict depend: [ProtocolLib] commands: + libsdisguises: disguise: aliases: [d, dis] disguiseentity: diff --git a/src/me/libraryaddict/disguise/LibsDisguises.java b/src/me/libraryaddict/disguise/LibsDisguises.java index 53c2ba11..d5e713e6 100644 --- a/src/me/libraryaddict/disguise/LibsDisguises.java +++ b/src/me/libraryaddict/disguise/LibsDisguises.java @@ -108,6 +108,7 @@ public class LibsDisguises extends JavaPlugin { getCommand("disguiseradius").setExecutor(new DisguiseRadiusCommand(getConfig().getInt("DisguiseRadiusMax"))); getCommand("undisguiseradius").setExecutor(new UndisguiseRadiusCommand(getConfig().getInt("UndisguiseRadiusMax"))); getCommand("disguisehelp").setExecutor(new DisguiseHelpCommand()); + getCommand("libsdisguises").setExecutor(new LibsDisguisesCommand()); registerValues(); } diff --git a/src/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java b/src/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java new file mode 100644 index 00000000..d77e7bb0 --- /dev/null +++ b/src/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java @@ -0,0 +1,20 @@ +package me.libraryaddict.disguise.commands; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; + +public class LibsDisguisesCommand implements CommandExecutor { + + @Override + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + sender.sendMessage(ChatColor.GOLD + "Lib's Disguises was created by libraryaddict"); + if (sender.getName().equals("libraryaddict")) { + sender.sendMessage(ChatColor.GRAY + "The server is running version " + + Bukkit.getPluginManager().getPlugin("LibsDisguises").getDescription().getVersion()); + } + return true; + } +}