Permissions API

Permissions/Groups API specification, minecraft/forge patches and default implementation by me and @AbrarSyed

This is a repull for pull request #1122 , with Lex's suggestions implemented.

Feel free to comment if there's anything else.
Have a machine that does trading automatically? Great, use one if the other methods and pass in your info via contexts. You don't need to pass in a player.

On July 25, 2014 7:30:41 AM CDT, Jadran Kotnik <notifications@github.com> wrote:
>> +    public static boolean checkPerm(EntityPlayer player, String
>node)
>> +    {
>> +        return FACTORY.checkPerm(player, node, null);
>> +    }
>> +    
>> +    /**
>> +     * Check a permission with contexts
>> +     * @param player
>> +     * @param node
>> +     * @param contextInfo
>> +     * @return
>> +     */
>> +    public static boolean checkPerm(EntityPlayer player, String
>node, Map<String, IContext> contextInfo)
>> +    {
>> +        if (player instanceof FakePlayer)
>> +            throw new IllegalArgumentException("You cannot check
>permissions with a fake player. Use PermManager.getPerm(username,
>node)");
>
>The problem is that anyone can just make their own ``FakePlayer``
>class. The Forge fake player is fine for most things, but there are
>special cases where you need your own implementation with callbacks
>(played around with auto-villager-trading a bit in 1.6, never released
>the thing though).
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/MinecraftForge/MinecraftForge/pull/1220/files#r15398199

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.