Package org.mctourney.autoreferee.AutoRefMatch

Examples of org.mctourney.autoreferee.AutoRefMatch.Role.atLeast()


    {
      Player player = (Player) sender;
      AutoRefMatch match = AutoReferee.getInstance().getMatch(player.getWorld());
      Role role = match == null ? AutoRefMatch.Role.NONE : match.getRole(player);

      if (!role.atLeast(permissions.role()))
        throw new CommandPermissionException(command, match == null
          ? "Command available only within an AutoReferee match"
          : ("Command not available to " + role.toString().toLowerCase()));

      for (String node : permissions.nodes()) if (!player.hasPermission(node))
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.