summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/ConfigPermissionsHandler.java
blob: 200aa34f8b174cb8e6b4b04790d387bdf231975e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.earth2me.essentials;

import org.bukkit.entity.Player;


public class ConfigPermissionsHandler implements IPermissionsHandler
{
	private final transient IEssentials ess;

	public ConfigPermissionsHandler(final IEssentials ess)
	{
		this.ess = ess;
	}

	public String getGroup(final Player base)
	{
		return "default";
	}

	public boolean canBuild(final Player base, final String group)
	{
		return true;
	}

	public boolean inGroup(final Player base, final String group)
	{
		return false;
	}

	public boolean hasPermission(final Player base, final String node)
	{
		final String[] cmds = node.split("\\.", 2);
		return !ess.getSettings().isCommandRestricted(cmds[cmds.length - 1]) 
				&& ess.getSettings().isPlayerCommand(cmds[cmds.length - 1]);
	}

	public String getPrefix(final Player base)
	{
		return "";
	}

	public String getSuffix(final Player base)
	{
		return "";
	}
}