mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Fix entity selector permission check to check original source (#8995)
Permission checks should be against the command source and not the target entity, as is done in vanilla. Fixes #8994
This commit is contained in:
1 parent
b5d5855559
commit
d7b137d144
2 files changed
+2
-1
No files matched your search
@@ -1498,7 +1498,7 @@ public class ForgeHooks
|
||||
|
||||
public static boolean canUseEntitySelectors(SharedSuggestionProvider provider)
|
||||
{
|
||||
if (provider instanceof CommandSourceStack source && source.getEntity() instanceof ServerPlayer player)
|
||||
if (provider instanceof CommandSourceStack source && source.source instanceof ServerPlayer player)
|
||||
{
|
||||
return PermissionAPI.getPermission(player, ForgeMod.USE_SELECTORS_PERMISSION);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user