예제 #1
0
 public boolean isAdmin(CommandSender s) {
   if (!plugin.PermissionUse && s.isOp()) return true;
   if (!plugin.PermissionUse) return false;
   if (s instanceof Player) {
     if (plugin.PermissionH.has((Player) s, "lc.admin")) return true;
   } else {
     return false;
   }
   return false;
 }
예제 #2
0
 public static boolean hasLevelExp(Player s, Plugin p) {
   if (plugin.UseClasses) {
     String Level = plugin.LevelNames.get(p);
     String PlayersClass = plugin.Class.DefaultClass;
     if (plugin.Class.isInValidClass(s.getName())) {
       PlayersClass = plugin.Class.getClass(s.getName());
     }
     String[] Levels = plugin.Class.getLevelableLevels(PlayersClass);
     for (int i = 0; i < Levels.length; i++) {
       // plugin.logger.info(Levels[i]);
       if (Levels[i].equalsIgnoreCase(Level) || Levels[i].equalsIgnoreCase("*")) return true;
     }
     return false;
   }
   if (!plugin.PermissionUse) return true;
   if (plugin.PermissionH.has(
       s, "lc.level." + plugin.LevelNames.get(p).toLowerCase() + ".allowlevel")) return true;
   return false;
 }
예제 #3
0
 public static boolean hasLevel(Player s, Plugin p) {
   // Because LvlDefense crash in this
   if (plugin.UseClasses) {
     String Level = plugin.LevelNames.get(p);
     String PlayersClass = plugin.Class.DefaultClass;
     if (plugin.Class.isInValidClass(s.getName())) {
       PlayersClass = plugin.Class.getClass(s.getName());
     }
     String[] Levels = plugin.Class.getUnLevelableLevels(PlayersClass);
     for (int i = 0; i < Levels.length; i++) {
       if (Levels[i].equalsIgnoreCase(Level) || Levels[i].equalsIgnoreCase("*")) return true;
     }
     return false;
   }
   try {
     if (!plugin.PermissionUse) return true;
     if (plugin.PermissionH.has(s, "lc.level." + plugin.LevelNames.get(p).toLowerCase()))
       return true; // Line !
     return false;
   } catch (Exception e) {
     return false;
   }
 }
예제 #4
0
 public boolean canShout(CommandSender s) {
   if (!plugin.PermissionUse) return true;
   if (plugin.PermissionH.has((Player) s, "lc.shout")) return true;
   return false;
 }