mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Fix word all feature
Former-commit-id: 69aca4e488b1303b3678f09ed41d4214d627437d [formerly 03bfd249543d50e83794117b93cefd50b8c65952] Former-commit-id: 6fea185e62d0f83360731a7b523e67709511d1a3
This commit is contained in:
1 parent
75c49942d9
commit
aaae41c89d
3 files changed
+5
-8
No files matched your search
@@ -116,11 +116,9 @@ public class CommandManager implements TabCompleter, CommandExecutor {
|
||||
// if (cmdArg.length == 0)
|
||||
// return rootContainer.getExecutor().onCommand(sender, commandLabel, temp);
|
||||
for (CommandContainer container : cmds) {
|
||||
Util.debugLog("Checking prefix with container: " + container.getPrefix() + " - " + cmdArg[0]);
|
||||
if (!container.getPrefix().toLowerCase().equals(cmdArg[0])) {
|
||||
continue;
|
||||
}
|
||||
Util.debugLog("Checking permission with container: " + container.getPrefix() + " - " + cmdArg[0]);
|
||||
List<String> requirePermissions = container.getPermissions();
|
||||
if (container.getPermissions() != null) {
|
||||
for (String requirePermission : requirePermissions) {
|
||||
@@ -160,11 +158,9 @@ public class CommandManager implements TabCompleter, CommandExecutor {
|
||||
passthroughArgs = new String[cmdArg.length - 1];
|
||||
System.arraycopy(cmdArg, 1, passthroughArgs, 0, passthroughArgs.length);
|
||||
for (CommandContainer container : cmds) {
|
||||
Util.debugLog("Checking prefix with container: " + container.getPrefix() + " - " + cmdArg[0]);
|
||||
if (!container.getPrefix().toLowerCase().startsWith(cmdArg[0])) {
|
||||
continue;
|
||||
}
|
||||
Util.debugLog("Checking permission with container: " + container.getPrefix() + " - " + cmdArg[0]);
|
||||
List<String> requirePermissions = container.getPermissions();
|
||||
if (container.getPermissions() != null) {
|
||||
for (String requirePermission : requirePermissions) {
|
||||
|
||||
@@ -75,8 +75,8 @@ public class PermissionManager {
|
||||
Util.debugLog("Result: " + result);
|
||||
Util.debugLog("Sender: " + container.getSender().getName());
|
||||
Util.debugLog("Permission Node: " + container.getPermission());
|
||||
Util.debugLog("Primary Group: " + container.getGroupName());
|
||||
Util.debugLog("Other infos: " + container.getOtherInfos());
|
||||
// Util.debugLog("Primary Group: " + container.getGroupName());
|
||||
// Util.debugLog("Other infos: " + container.getOtherInfos());
|
||||
} catch (Throwable th) {
|
||||
th.printStackTrace();
|
||||
Util.debugLog("Exception throwed when getting debug messages.");
|
||||
|
||||
@@ -416,7 +416,7 @@ public class ShopManager {
|
||||
amount = Integer.parseInt(message);
|
||||
} catch (NumberFormatException e) {
|
||||
if(message.equalsIgnoreCase(plugin.getConfig().getString("shop.word-for-trade-all-items","all"))){
|
||||
amount = Util.countSpace(((ContainerShop) shop).getInventory(),shop.getItem());
|
||||
amount = Util.countSpace(p.getInventory(),shop.getItem());
|
||||
}else{
|
||||
p.sendMessage(MsgUtil.getMessage("shop-purchase-cancelled",p));
|
||||
Util.debugLog("Receive the chat " + message + " and it format failed: " + e.getMessage());
|
||||
@@ -429,7 +429,7 @@ public class ShopManager {
|
||||
amount = Integer.parseInt(message);
|
||||
} catch (NumberFormatException e) {
|
||||
if(message.equalsIgnoreCase(plugin.getConfig().getString("shop.word-for-trade-all-items","all"))){
|
||||
amount = Util.countSpace(p.getInventory(),shop.getItem());
|
||||
amount = Util.countItems(((ContainerShop) shop).getInventory(),shop.getItem());
|
||||
}else{
|
||||
p.sendMessage(MsgUtil.getMessage("shop-purchase-cancelled",p));
|
||||
Util.debugLog("Receive the chat " + message + " and it format failed: " + e.getMessage());
|
||||
@@ -441,6 +441,7 @@ public class ShopManager {
|
||||
p.sendMessage(MsgUtil.getMessage("shop-purchase-cancelled",p));
|
||||
plugin.getLogger().warning("Shop data broken? Loc:" + shop.getLocation().toString());
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user