Made the info command not player-only
This commit is contained in:
parent
d481152eb0
commit
1af101c31e
3 changed files with 11 additions and 45 deletions
|
@ -8,13 +8,11 @@ public class MWikiCommand extends TBMCCommandBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] GetHelpText(String alias) {
|
public String[] GetHelpText(String alias) {
|
||||||
return new String[] {
|
return new String[] { "§6---- Minecraft Wiki linker ----", //
|
||||||
"§6---- Minecraft Wiki linker ----",
|
"Use without parameters to get a link to the wiki", //
|
||||||
"Use without parameters to get a link to the wiki",
|
"You can also search the wiki, for example:", //
|
||||||
"You can also search the wiki, for example:",
|
" /" + alias + " beacon - Provides a link that redirects to the beacon's wiki page" //
|
||||||
" /"
|
};
|
||||||
+ alias
|
|
||||||
+ " beacon - Provides a link that redirects to the beacon's wiki page" };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,8 +24,8 @@ public class MWikiCommand extends TBMCCommandBase {
|
||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
sender.sendMessage("§bMinecraft Wiki link: http://minecraft.gamepedia.com/");
|
sender.sendMessage("§bMinecraft Wiki link: http://minecraft.gamepedia.com/");
|
||||||
else
|
else
|
||||||
sender.sendMessage("§bMinecraft Wiki link: http://minecraft.gamepedia.com/index.php?search="
|
sender.sendMessage("§bMinecraft Wiki link: http://minecraft.gamepedia.com/index.php?search=" + query
|
||||||
+ query + "&title=Special%3ASearch&go=Go");
|
+ "&title=Special%3ASearch&go=Go");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,4 +40,8 @@ public class InfoCommand extends UCommandBase {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean GetPlayerOnly() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
package buttondevteam.chat.commands.ucmds;
|
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
|
|
||||||
import buttondevteam.chat.ChatPlayer;
|
|
||||||
import buttondevteam.lib.TBMCPlayer;
|
|
||||||
|
|
||||||
public class NameCommand extends UCommandBase {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] GetHelpText(String alias) {
|
|
||||||
return new String[] { "§6---- Get username ----",
|
|
||||||
"This command allows you to see the Reddit username of a player if they have one associated",
|
|
||||||
"Usage: /u name <playername>" };
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
||||||
if (args.length == 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
ChatPlayer mp = TBMCPlayer.getFromName(args[0]).asPluginPlayer(ChatPlayer.class);
|
|
||||||
if (mp == null) {
|
|
||||||
sender.sendMessage("§cUnknown user: " + args[0]);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
sender.sendMessage("§bUsername of " + args[0] + ": " + mp.getUserName());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String GetUCommandPath() {
|
|
||||||
return "name";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue