Skip to content

Commit

Permalink
fix: Whoops, forgot to change this constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
FixedDev committed Jan 4, 2024
1 parent 713bb7a commit 16e22b4
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import team.unnamed.commandflow.Namespace;
import team.unnamed.commandflow.SimpleCommandContext;
import team.unnamed.commandflow.bukkit.BukkitCommandManager;
import team.unnamed.commandflow.bukkit.BukkitCommonConstants;
import team.unnamed.commandflow.exception.CommandException;
import team.unnamed.commandflow.translator.Translator;
import net.kyori.adventure.text.Component;
Expand Down Expand Up @@ -59,7 +60,7 @@ public boolean execute(CommandSender commandSender, String label, String[] args)

Namespace namespace = Namespace.create();

namespace.setObject(CommandSender.class, BukkitMapCommandManager.SENDER_NAMESPACE, commandSender);
namespace.setObject(CommandSender.class, BukkitCommonConstants.SENDER_NAMESPACE, commandSender);
namespace.setObject(String.class, "label", label);


Expand Down Expand Up @@ -88,7 +89,7 @@ public List<String> tabComplete(CommandSender sender, String alias, String[] arg
argumentLine.add(0, alias);

Namespace namespace = Namespace.create();
namespace.setObject(CommandSender.class, BukkitMapCommandManager.SENDER_NAMESPACE, sender);
namespace.setObject(CommandSender.class, BukkitCommonConstants.SENDER_NAMESPACE, sender);

return commandManager.getSuggestions(namespace, argumentLine);
}
Expand All @@ -97,7 +98,7 @@ public List<String> tabComplete(CommandSender sender, String alias, String[] arg
public boolean testPermission(@NotNull CommandSender target) {
if (!testPermissionSilent(target)) {
Namespace namespace = Namespace.create();
namespace.setObject(CommandSender.class, BukkitMapCommandManager.SENDER_NAMESPACE, target);
namespace.setObject(CommandSender.class, BukkitCommonConstants.SENDER_NAMESPACE, target);

Component translatedPermissionMessage = translator.translate(permissionMessage, namespace);

Expand All @@ -115,7 +116,7 @@ public boolean testPermissionSilent(CommandSender target) {
Authorizer authorizer = commandManager.getAuthorizer();

Namespace namespace = Namespace.create();
namespace.setObject(CommandSender.class, BukkitMapCommandManager.SENDER_NAMESPACE, target);
namespace.setObject(CommandSender.class, BukkitCommonConstants.SENDER_NAMESPACE, target);

return authorizer.isAuthorized(namespace, getPermission());
}
Expand Down

0 comments on commit 16e22b4

Please sign in to comment.