コード例 #1
0
 public void setExpandMax(Region r, String region, Player p) {
   if (r == null) {
     p.sendMessage(
         ChatColor.RED
             + "[Regios] The region "
             + ChatColor.BLUE
             + region
             + ChatColor.RED
             + " doesn't exist!");
     return;
   } else {
     if (!super.canModifyMain(r, p)) {
       p.sendMessage(ChatColor.RED + "[Regios] You are not permitted to modify this region!");
       return;
     }
     p.sendMessage(
         ChatColor.GREEN
             + "[Regios] Region "
             + ChatColor.BLUE
             + region
             + ChatColor.GREEN
             + " expanded to max!");
   }
   mutable.editExpandMax(r);
 }
コード例 #2
0
 public void setExpandDown(Region r, String region, String input, Player p) {
   int val;
   try {
     val = Integer.parseInt(input);
   } catch (Exception bfe) {
     p.sendMessage(
         ChatColor.RED + "[Regios] The value for the 2nd paramteter must be an integer!");
     return;
   }
   if (r == null) {
     p.sendMessage(
         ChatColor.RED
             + "[Regios] The region "
             + ChatColor.BLUE
             + region
             + ChatColor.RED
             + " doesn't exist!");
     return;
   } else {
     if (!super.canModifyMain(r, p)) {
       p.sendMessage(ChatColor.RED + "[Regios] You are not permitted to modify this region!");
       return;
     }
     p.sendMessage(
         ChatColor.GREEN
             + "[Regios] Region "
             + ChatColor.BLUE
             + region
             + ChatColor.GREEN
             + " expanded down by : "
             + ChatColor.BLUE
             + val);
   }
   mutable.editExpandDown(r, val);
 }
コード例 #3
0
 public void setDelete(Region r, String region, String input, Player p) {
   if (r == null) {
     p.sendMessage(
         ChatColor.RED
             + "[Regios] The region "
             + ChatColor.BLUE
             + region
             + ChatColor.RED
             + " doesn't exist!");
     return;
   } else {
     if (!super.canModifyMain(r, p)) {
       p.sendMessage(ChatColor.RED + "[Regios] You are not permitted to modify this region!");
       return;
     }
     p.sendMessage(
         ChatColor.GREEN
             + "[Regios] Region "
             + ChatColor.BLUE
             + region
             + ChatColor.GREEN
             + " deleted successfully.");
   }
   MutableModification.editDeleteRegion(r, true, p);
   PingManager.delete();
 }
コード例 #4
0
 public void setModifyPoints(Location l1, Location l2, Player p) {
   if (l1 == null || l2 == null) {
     p.sendMessage(ChatColor.RED + "[Regios] You have not set 2 points!");
     return;
   }
   Region r = CreationCommands.modRegion.get(p);
   if (!super.canModifyMain(r, p)) {
     p.sendMessage(ChatColor.RED + "[Regios] You are not permitted to modify this region!");
     return;
   }
   p.sendMessage(
       ChatColor.GREEN
           + "[Regios] Region "
           + ChatColor.BLUE
           + r.getName()
           + ChatColor.GREEN
           + ", points modified successfully");
   mutable.editModifyPoints(r, l1, l2);
 }
コード例 #5
0
 public void setRename(Region r, String region, String input, Player p) {
   if (GlobalRegionManager.getRegion(input) != null) {
     p.sendMessage(
         ChatColor.RED
             + "[Regios] A Region with name "
             + ChatColor.BLUE
             + input
             + ChatColor.RED
             + " already exists!");
     return;
   }
   if (r == null) {
     p.sendMessage(
         ChatColor.RED
             + "[Regios] The region "
             + ChatColor.BLUE
             + region
             + ChatColor.RED
             + " doesn't exist!");
     return;
   } else {
     if (!super.canModifyMain(r, p)) {
       p.sendMessage(ChatColor.RED + "[Regios] You are not permitted to modify this region!");
       return;
     }
   }
   mutable.editRename(r, input, p);
   p.sendMessage(
       ChatColor.GREEN
           + "[Regios] Region "
           + ChatColor.BLUE
           + region
           + ChatColor.GREEN
           + " renamed to : "
           + ChatColor.BLUE
           + input);
 }