mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Auto detect command prefix to return helps.
Former-commit-id: 5dc1a9e0d83937045a5b976bdda4e29051a10d17 [formerly ea8cc7aed121ac929481fbf2530652107b0387da] Former-commit-id: 9109234a06fe132abcae0cd9e9e8d95562ed0db1
This commit is contained in:
1 parent
d4666fbd8e
commit
41493033bc
2 files changed
+19
-19
No files matched your search
@@ -740,11 +740,11 @@ public class QS implements CommandExecutor{
|
||||
}
|
||||
} else {
|
||||
// Invalid arg given
|
||||
sendHelp(sender);
|
||||
sendHelp(sender,commandLabel);
|
||||
return true;
|
||||
}
|
||||
// No args given
|
||||
sendHelp(sender);
|
||||
sendHelp(sender,commandLabel);
|
||||
return true;
|
||||
}
|
||||
private void debug(CommandSender sender, String[] args) {
|
||||
@@ -874,53 +874,53 @@ public class QS implements CommandExecutor{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void sendHelp(CommandSender s) {
|
||||
public void sendHelp(CommandSender s,String commandLabel) {
|
||||
|
||||
s.sendMessage(MsgUtil.getMessage("command.description.title"));
|
||||
if (s.hasPermission("quickshop.unlimited"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs unlimited" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" unlimited" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.unlimited"));
|
||||
if (s.hasPermission("quickshop.setowner"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs setowner <player>" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" setowner <player>" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.setowner"));
|
||||
if (s.hasPermission("quickshop.create.buy"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs buy" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" buy" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.buy"));
|
||||
if (s.hasPermission("quickshop.create.sell")) {
|
||||
s.sendMessage(ChatColor.GREEN + "/qs sell" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" sell" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.sell"));
|
||||
s.sendMessage(ChatColor.GREEN + "/qs create [price]" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" create [price]" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.create"));
|
||||
}
|
||||
if (s.hasPermission("quickshop.create.changeprice"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs price" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" price" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.price"));
|
||||
if (s.hasPermission("quickshop.clean"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs clean" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" clean" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.clean"));
|
||||
if (s.hasPermission("quickshop.find"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs find <item>" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" find <item>" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.find"));
|
||||
if (s.hasPermission("quickshop.refill"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs refill <amount>" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" refill <amount>" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.refill"));
|
||||
if (s.hasPermission("quickshop.empty"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs empty" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" empty" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.empty"));
|
||||
if (s.hasPermission("quickshop.fetchmessage"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs fetchmessage" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" fetchmessage" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.fetchmessage"));
|
||||
if (s.hasPermission("quickshop.info"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs info" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" info" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.info"));
|
||||
if (s.hasPermission("quickshop.debug"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs debug" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" debug" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.debug"));
|
||||
if (s.hasPermission("quickshop.paste"))
|
||||
s.sendMessage(ChatColor.GREEN + "/qs debug" + ChatColor.YELLOW + " - "
|
||||
s.sendMessage(ChatColor.GREEN + commandLabel+" debug" + ChatColor.YELLOW + " - "
|
||||
+ MsgUtil.getMessage("command.description.paste"));
|
||||
// if (s.hasPermission("quickshop.export"))
|
||||
// s.sendMessage(ChatColor.GREEN + "/qs export mysql|sqlite" + ChatColor.YELLOW + " - "
|
||||
// s.sendMessage(ChatColor.GREEN + commandLabel+" export mysql|sqlite" + ChatColor.YELLOW + " - "
|
||||
// + MsgUtil.getMessage("command.description.export"));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
public class Paste {
|
||||
QuickShop plugin;
|
||||
private QuickShop plugin;
|
||||
public Paste(QuickShop plugin){
|
||||
this.plugin=plugin;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user