當前位置: 首頁>>代碼示例>>Java>>正文


Java Permission.recalculatePermissibles方法代碼示例

本文整理匯總了Java中org.bukkit.permissions.Permission.recalculatePermissibles方法的典型用法代碼示例。如果您正苦於以下問題:Java Permission.recalculatePermissibles方法的具體用法?Java Permission.recalculatePermissibles怎麽用?Java Permission.recalculatePermissibles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.bukkit.permissions.Permission的用法示例。


在下文中一共展示了Permission.recalculatePermissibles方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerCorePermissions

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
public static void registerCorePermissions() {
    Permission parent = registerPermission(ROOT, "Gives the user the ability to use all CraftBukkit utilities and commands");

    CommandPermissions.registerPermissions(parent);
    BroadcastPermissions.registerPermissions(parent);

    parent.recalculatePermissibles();
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:9,代碼來源:DefaultPermissions.java

示例2: registerWhitelist

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
private static Permission registerWhitelist(Permission parent) {
    Permission whitelist = DefaultPermissions.registerPermission(PREFIX + "whitelist", "Allows the user to modify the server whitelist", PermissionDefault.OP, parent);

    DefaultPermissions.registerPermission(PREFIX + "whitelist.add", "Allows the user to add a player to the server whitelist", whitelist);
    DefaultPermissions.registerPermission(PREFIX + "whitelist.remove", "Allows the user to remove a player from the server whitelist", whitelist);
    DefaultPermissions.registerPermission(PREFIX + "whitelist.reload", "Allows the user to reload the server whitelist", whitelist);
    DefaultPermissions.registerPermission(PREFIX + "whitelist.enable", "Allows the user to enable the server whitelist", whitelist);
    DefaultPermissions.registerPermission(PREFIX + "whitelist.disable", "Allows the user to disable the server whitelist", whitelist);
    DefaultPermissions.registerPermission(PREFIX + "whitelist.list", "Allows the user to list all the users on the server whitelist", whitelist);

    whitelist.recalculatePermissibles();

    return whitelist;
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:15,代碼來源:CommandPermissions.java

示例3: registerSave

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
private static Permission registerSave(Permission parent) {
    Permission save = DefaultPermissions.registerPermission(PREFIX + "save", "Allows the user to save the worlds", PermissionDefault.OP, parent);

    DefaultPermissions.registerPermission(PREFIX + "save.enable", "Allows the user to enable automatic saving", save);
    DefaultPermissions.registerPermission(PREFIX + "save.disable", "Allows the user to disable automatic saving", save);
    DefaultPermissions.registerPermission(PREFIX + "save.perform", "Allows the user to perform a manual save", save);

    save.recalculatePermissibles();

    return save;
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:12,代碼來源:CommandPermissions.java

示例4: registerPermissions

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
public static Permission registerPermissions(Permission parent) {
    Permission commands = DefaultPermissions.registerPermission(ROOT, "Gives the user the ability to use all CraftBukkit commands", parent);

    registerWhitelist(commands);
    registerBan(commands);
    registerUnban(commands);
    registerOp(commands);
    registerSave(commands);
    registerTime(commands);

    DefaultPermissions.registerPermission(PREFIX + "kill", "Allows the user to commit suicide", PermissionDefault.TRUE, commands);
    DefaultPermissions.registerPermission(PREFIX + "me", "Allows the user to perform a chat action", PermissionDefault.TRUE, commands);
    DefaultPermissions.registerPermission(PREFIX + "tell", "Allows the user to privately message another player", PermissionDefault.TRUE, commands);
    DefaultPermissions.registerPermission(PREFIX + "say", "Allows the user to talk as the console", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "give", "Allows the user to give items to players", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "teleport", "Allows the user to teleport players", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "kick", "Allows the user to kick players", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "stop", "Allows the user to stop the server", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "list", "Allows the user to list all online players", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "help", "Allows the user to view the vanilla help menu", PermissionDefault.TRUE, commands);
    DefaultPermissions.registerPermission(PREFIX + "plugins", "Allows the user to view the list of plugins running on this server", PermissionDefault.TRUE, commands);
    DefaultPermissions.registerPermission(PREFIX + "reload", "Allows the user to reload the server settings", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "version", "Allows the user to view the version of the server", PermissionDefault.TRUE, commands);
    DefaultPermissions.registerPermission(PREFIX + "gamemode", "Allows the user to change the gamemode of another player", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "xp", "Allows the user to give themselves or others arbitrary values of experience", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "toggledownfall", "Allows the user to toggle rain on/off for a given world", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "defaultgamemode", "Allows the user to change the default gamemode of the server", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "seed", "Allows the user to view the seed of the world", PermissionDefault.OP, commands);
    DefaultPermissions.registerPermission(PREFIX + "effect", "Allows the user to add/remove effects on players", PermissionDefault.OP, commands);

    commands.recalculatePermissibles();

    return commands;
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:35,代碼來源:CommandPermissions.java

示例5: Initialize

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
@Override
public boolean Initialize()
{
	//TODO------Change all the class instances to use this one instance instead of KitConfig.getInstance()
	instance = KitConfig.getInstance();
	int x = 0;
	ConfigurationSection sec = instance.getKitSection(getInternalName());
	if(sec == null)
	{
		sec = instance.createKitSection(getInternalName());
		x++;
	}
	
	x += ConfigManager.setDefaultIfNotSet(sec, "Name", getInternalName());
	x += ConfigManager.setDefaultIfNotSet(sec, "Kit Description", getDefaultDescription());
	x += ConfigManager.setDefaultIfNotSet(sec, "Disable", false);
	x += ConfigManager.setDefaultIfNotSet(sec, "Free", false);
	x += setDefaults(sec);
	
	if(x > 0)
		instance.saveConfig();
	
	this.isFree = sec.getBoolean("Free");
	
	if(sec.getBoolean("Disable"))
		return false;
	
	loadKitStuff(sec);
	if(instance.useDefaultPermissions())
	{
		Permission perm = new Permission("Anni.Kits."+getName());
		perm.setDefault(PermissionDefault.FALSE);
		Bukkit.getPluginManager().addPermission(perm);
		perm.recalculatePermissibles();
	}
	icon = getIcon();
	setUp();
	this.loadout = getFinalLoadout().addNavCompass().finalizeLoadout();
	return true;
}
 
開發者ID:MrLittleKitty,項目名稱:AnnihilationPro,代碼行數:41,代碼來源:ConfigurableKit.java

示例6: registerArgument

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
public static void registerArgument(AnniArgument argument)
{
	if(argument != null)
	{
		if(argument.getPermission() != null)
		{
			Permission perm = new Permission(argument.getPermission());
			Bukkit.getPluginManager().addPermission(perm);
			perm.recalculatePermissibles();
		}
		arguments.put(argument.getArgumentName().toLowerCase(), argument);
		recalcItemMenu();
	}
}
 
開發者ID:MrLittleKitty,項目名稱:AnnihilationPro,代碼行數:15,代碼來源:AnniCommand.java

示例7: registerPermissions

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
public static Permission registerPermissions(Permission parent) {
    Permission broadcasts = DefaultPermissions.registerPermission(ROOT, "Allows the user to receive all broadcast messages", parent);

    DefaultPermissions.registerPermission(PREFIX + "admin", "Allows the user to receive administrative broadcasts", PermissionDefault.OP, broadcasts);
    DefaultPermissions.registerPermission(PREFIX + "user", "Allows the user to receive user broadcasts", PermissionDefault.TRUE, broadcasts);

    broadcasts.recalculatePermissibles();

    return broadcasts;
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:11,代碼來源:BroadcastPermissions.java

示例8: registerBan

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
private static Permission registerBan(Permission parent) {
    Permission ban = DefaultPermissions.registerPermission(PREFIX + "ban", "Allows the user to ban people", PermissionDefault.OP, parent);

    DefaultPermissions.registerPermission(PREFIX + "ban.player", "Allows the user to ban players", ban);
    DefaultPermissions.registerPermission(PREFIX + "ban.ip", "Allows the user to ban IP addresses", ban);

    ban.recalculatePermissibles();

    return ban;
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:11,代碼來源:CommandPermissions.java

示例9: registerUnban

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
private static Permission registerUnban(Permission parent) {
    Permission unban = DefaultPermissions.registerPermission(PREFIX + "unban", "Allows the user to unban people", PermissionDefault.OP, parent);

    DefaultPermissions.registerPermission(PREFIX + "unban.player", "Allows the user to unban players", unban);
    DefaultPermissions.registerPermission(PREFIX + "unban.ip", "Allows the user to unban IP addresses", unban);

    unban.recalculatePermissibles();

    return unban;
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:11,代碼來源:CommandPermissions.java

示例10: registerOp

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
private static Permission registerOp(Permission parent) {
    Permission op = DefaultPermissions.registerPermission(PREFIX + "op", "Allows the user to change operators", PermissionDefault.OP, parent);

    DefaultPermissions.registerPermission(PREFIX + "op.give", "Allows the user to give a player operator status", op);
    DefaultPermissions.registerPermission(PREFIX + "op.take", "Allows the user to take a players operator status", op);

    op.recalculatePermissibles();

    return op;
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:11,代碼來源:CommandPermissions.java

示例11: registerTime

import org.bukkit.permissions.Permission; //導入方法依賴的package包/類
private static Permission registerTime(Permission parent) {
    Permission time = DefaultPermissions.registerPermission(PREFIX + "time", "Allows the user to alter the time", PermissionDefault.OP, parent);

    DefaultPermissions.registerPermission(PREFIX + "time.add", "Allows the user to fast-forward time", time);
    DefaultPermissions.registerPermission(PREFIX + "time.set", "Allows the user to change the time", time);

    time.recalculatePermissibles();

    return time;
}
 
開發者ID:CyberdyneCC,項目名稱:Thermos-Bukkit,代碼行數:11,代碼來源:CommandPermissions.java


注:本文中的org.bukkit.permissions.Permission.recalculatePermissibles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。