From 109150f3488187610fcbd53a837f4613a00be393 Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 27 Jun 2014 20:09:18 -0700 Subject: [PATCH] Changed CommandPermissionsHandler to use Actor. --- .../internal/command/CommandPermissionsHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/internal/command/CommandPermissionsHandler.java b/src/main/java/com/sk89q/worldedit/internal/command/CommandPermissionsHandler.java index fc36bf1e4..cbf5eb7c5 100644 --- a/src/main/java/com/sk89q/worldedit/internal/command/CommandPermissionsHandler.java +++ b/src/main/java/com/sk89q/worldedit/internal/command/CommandPermissionsHandler.java @@ -20,8 +20,8 @@ package com.sk89q.worldedit.internal.command; import com.sk89q.minecraft.util.commands.CommandContext; +import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.util.command.parametric.PermissionsHandler; -import com.sk89q.worldedit.LocalPlayer; public class CommandPermissionsHandler extends PermissionsHandler { @@ -30,9 +30,9 @@ public class CommandPermissionsHandler extends PermissionsHandler { @Override protected boolean hasPermission(CommandContext context, String permission) { - LocalPlayer sender = context.getLocals().get(LocalPlayer.class); + Actor sender = context.getLocals().get(Actor.class); if (sender == null) { - return true; + throw new RuntimeException("Uh oh! No 'Actor' specified so that we can check permissions"); } else { return sender.hasPermission(permission); }