Cuberite Forum
Permission probleme - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: Permission probleme (/thread-1786.html)



Permission probleme - Infinity-Codeur - 02-16-2015

Hello,

My first plugin advance but i have probleme which permission this my code of Info.lua :

-- Info.lua

-- Implements the g_PluginInfo standard plugin description

g_PluginInfo =
{
	Name = "Position",
	Date = "2015-02-15",
	Description = "Plugin who tp to your position setup",
	
	Commands = {
	["/setpos"] =
		{
			Permissions = "Position.setpos",
			Handler = GetPos,
			HelpString = " Set your  position",
		},
		
	["/tp"] =
		{
			Permissions = "Position.setpos",
			Handler = GetTp,
			HelpString = " Tp to your position",
		},
	}, --Commands
	
	ConsoleCommands = {},
	
	Permissions =
	{
		["Position.setpos"] =
		{
			Description = "Allows the players to setup home.",
			RecommendedGroups = "admins",
		},
	}
}

This code work but everyone can use it, normally only rank admin can use this command but here all rank can use it how to fix that ?


RE: Permission probleme - xoft - 02-16-2015

It should be "Permission" instead of "Permissions".


RE: Permission probleme - Infinity-Codeur - 02-16-2015

Oh my god i'm so sorry for that :/

But i have a other error :p

RecommendedGroups = "vips",

If i put "vip, VIP, vips or VIPS" every time i get this error " you have not permission" but my test player is rank VIP how can fix that ?

Sorry for my answers i'm very new in the lua ^^


RE: Permission probleme - bearbin - 02-16-2015

This should be in plugin discussion, not requests?


RE: Permission probleme - NiLSPACE - 02-16-2015

@bearbin yes you're right Smile


RE: Permission probleme - xoft - 02-16-2015

The RecommendedGroups is just a text that will be displayed in the plugin documentation, MCServer doesn't use that setting for anything. Each server admin needs to grant the specific permissions for their users on their server.


RE: Permission probleme - Infinity-Codeur - 02-16-2015

Sorry for bad Section ^^

Ok but how make a permission level to my plugin without "RecommendedGroups" ?