本文整理汇总了Java中ru.tehkode.permissions.PermissionUser.setOption方法的典型用法代码示例。如果您正苦于以下问题:Java PermissionUser.setOption方法的具体用法?Java PermissionUser.setOption怎么用?Java PermissionUser.setOption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ru.tehkode.permissions.PermissionUser
的用法示例。
在下文中一共展示了PermissionUser.setOption方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onJoin
import ru.tehkode.permissions.PermissionUser; //导入方法依赖的package包/类
@EventHandler
public void onJoin(PlayerJoinEvent event)
{
Player player = event.getPlayer();
PermissionUser user = PermissionsEx.getUser(player);
if(!user.getOption("displayname").equals(""))
{
player.setDisplayName(user.getOption("displayname"));
}
if(!user.getOption("joinmessage").equals(""))
{
event.setJoinMessage(ChatUtil.formatMessage(event.getPlayer(), user.getOption("joinmessage")));
}
else
{
user.setOption("joinmessage", "&6%player &6has entered the fringe.");
event.setJoinMessage(ChatUtil.formatMessage(event.getPlayer(), user.getOption("joinmessage")));
}
}
示例2: setPlayerInfoInteger
import ru.tehkode.permissions.PermissionUser; //导入方法依赖的package包/类
@Override
public void setPlayerInfoInteger(String world, String playerName, String node, int value) {
PermissionUser user = PermissionsEx.getPermissionManager().getUser(playerName);
if (user != null) {
user.setOption(node, String.valueOf(value), world);
}
}
示例3: setPlayerInfoDouble
import ru.tehkode.permissions.PermissionUser; //导入方法依赖的package包/类
@Override
public void setPlayerInfoDouble(String world, String playerName, String node, double value) {
PermissionUser user = PermissionsEx.getPermissionManager().getUser(playerName);
if (user != null) {
user.setOption(node, String.valueOf(value), world);
}
}
示例4: setPlayerInfoBoolean
import ru.tehkode.permissions.PermissionUser; //导入方法依赖的package包/类
@Override
public void setPlayerInfoBoolean(String world, String playerName, String node, boolean value) {
PermissionUser user = PermissionsEx.getPermissionManager().getUser(playerName);
if (user != null) {
user.setOption(node, String.valueOf(value), world);
}
}
示例5: setPlayerInfoString
import ru.tehkode.permissions.PermissionUser; //导入方法依赖的package包/类
@Override
public void setPlayerInfoString(String world, String playerName, String node, String value) {
PermissionUser user = PermissionsEx.getPermissionManager().getUser(playerName);
if (user != null) {
user.setOption(node, String.valueOf(value), world);
}
}