Hot Summer Deals are Here!
Celebrate with up to 99% off on 17,100 resources
03
Days
09
Hours
27
Mins
22
Secs

Regions Plugin

Status
This thread has been locked.

Flob

Feedback score
0
Posts
245
Reactions
66
Resources
0
Regions Plugin Features:

~ Region Enter/Leave Messages (Visible on plugin reloads)

~ Region Flags (Building, Item Usage, Crop Fade, Crop Growth, Leaf Decay, Explosions, Buckets, Mob Spawning, Animal Spawning, Command Usage, Mob Despawning, PvP & Enderpearl Usage)

~ Region World Edit Claiming (Regions are claimed using a stick instead of a wooden axe)

~ Region Info

~ Config File (Configurable region edit message)

~ Regions Backup File

~ Java 7 & Java 8 Server Support

>>> Example of Help Page <<<

>>> Proof of Ownership <<<

Price: $20

PM me if you are interested in purchasing this plugin. Transaction will be completed on PayPal.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Skionz

ogminecraft.com
Premium
Feedback score
1
Posts
1,544
Reactions
1,527
Resources
0
This isn't worth $20 as there is already a default plugin that does most of this.
There is no such thing as a default plugin.
 

Skionz

ogminecraft.com
Premium
Feedback score
1
Posts
1,544
Reactions
1,527
Resources
0
I just looked at the 'proof of ownership' and it seems this 'developer' has no regard for naming conventions. If he doesn't use naming conventions, then he probably learned 'Bukkit Coding' from a youtube video. If he learned 'Bukkit Coding' from a youtube video, then he probably writes class oriented code. If he writes class oriented code, then he probably doesn't know Java basics. If he doesn't know Java basics, then you shouldn't expect the plugin to be high quality. Yes, I made all of these assumptions from a single capitalized letter.
 

Young_Explicit

Owner & Lead Developer @ Minerize and MCTeams
Premium
Feedback score
1
Posts
123
Reactions
54
Resources
0
I just looked at the 'proof of ownership' and it seems this 'developer' has no regard for naming conventions. If he doesn't use naming conventions, then he probably learned 'Bukkit Coding' from a youtube video. If he learned 'Bukkit Coding' from a youtube video, then he probably writes class oriented code. If he writes class oriented code, then he probably doesn't know Java basics. If he doesn't know Java basics, then you shouldn't expect the plugin to be high quality. Yes, I made all of these assumptions from a single capitalized letter.


lolll
 

Flob

Feedback score
0
Posts
245
Reactions
66
Resources
0
There are a few differences with this plugin and WorldGuard. Firstly, it does not require WorldEdit to run. Secondly, you can configure the region edit message but in WorldGuard you can't. Thirdly, you can use the variable "%player%" in your region enter/leave message to display the user's name. It also does not use as much server ram to run. Lastly, this is just a simple custom plugin that no other server, besides mine, uses.
 

TheKayDev

Feedback score
0
Posts
179
Reactions
62
Resources
0
WorldGuard.
There are a few differences with this plugin and WorldGuard. Firstly, it does not require WorldEdit to run. Secondly, you can configure the region edit message but in WorldGuard you can't. Thirdly, you can use the variable "%player%" in your region enter/leave message to display the user's name. It also does not use as much server ram to run. Lastly, this is just a simple custom plugin that no other server, besides mine, uses.
 

Flob

Feedback score
0
Posts
245
Reactions
66
Resources
0
Ok heres the command class:
Code:
package me.flobgaming.Regions;

import java.util.ArrayList;
import java.util.List;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import com.google.common.base.Joiner;

public class RegionsCommand {
   
    public static void onCommand(CommandSender sender, Command cmd, String label, String[] args, RegionsPlugin plugin)
    {
        if (sender instanceof Player) {
        if(sender.hasPermission("regions.edit") || sender.isOp())
        {
            if(args.length > 0)
            {
                // find out what command was executed
                if(args[0].equalsIgnoreCase("create"))
                {
                    // /rp create <regionname> command
                    if(args.length == 2)
                    {
                        RegionEdit.CreateRegion((Player) sender, args[1], plugin);
                    }
                    else
                    {
                        // wrong amount of args
                        sender.sendMessage(ChatColor.RED + "ERROR: Too few/many parameters!");
                    }
                }
                else if(args[0].equalsIgnoreCase("delete"))
                {
                    // /rp delete <regionname> command
                    if(args.length == 2)
                    {
                        RegionEdit.DeleteRegion((Player) sender, args[1], plugin);
                    }
                    else
                    {
                        // wrong amount of args
                        sender.sendMessage(ChatColor.RED + "ERROR: Too few/many parameters!");
                    }
                }
                else if(args[0].equalsIgnoreCase("set"))
                {
                    // /rp set <regionname> enter <message> command
                    if(args.length >= 3)
                    {
                        if(args[2].equalsIgnoreCase("enter"))
                        {
                            if(args.length < 4)
                            {
                                // Remove enter message
                                EnterLeaveMessages.setEnterMessage((Player) sender, args[1], "", plugin);
                            }
                            else
                            {
                                // Set enter message
                                StringBuilder builder = new StringBuilder();
                                int num = 0;
                                for (String string : args) {
                                    if(num > 2)
                                    {
                                        if(builder.length() > 0) {
                                            builder.append(" ");
                                        }
                                        builder.append(string);
                                    }
                                    num += 1;
                                }
                                String msg = builder.toString();
                                EnterLeaveMessages.setEnterMessage((Player) sender, args[1], msg, plugin);
                            }
                        }
                        else if(args[2].equalsIgnoreCase("leave"))
                        {
                            if(args.length < 4)
                            {
                                // Remove leave message
                                EnterLeaveMessages.setLeaveMessage((Player) sender, args[1], "", plugin);
                            }
                            else
                            {
                                // Set leave message
                                StringBuilder builder = new StringBuilder();
                                int num = 0;
                                for (String string : args) {
                                    if(num > 2)
                                    {
                                        if(builder.length() > 0) {
                                            builder.append(" ");
                                        }
                                        builder.append(string);
                                    }
                                    num += 1;
                                }
                                String msg = builder.toString();
                                EnterLeaveMessages.setLeaveMessage((Player) sender, args[1], msg, plugin);
                            }
                        }
                        else
                        {
                            // Needs to choose enter/leave
                            sender.sendMessage(ChatColor.RED + "ERROR: You can only set enter and leave messages.");
                        }
                    }
                    else
                    {
                        // wrong amount of args
                        sender.sendMessage(ChatColor.RED + "ERROR: Too few/many parameters!");
                    }
                }
                else if(args[0].equalsIgnoreCase("max"))
                {
                    RegionEdit.MaxOutY((Player) sender);
                }
                else if(args[0].equalsIgnoreCase("flag"))
                {
                    if(args.length != 4)
                    {
                        sender.sendMessage(ChatColor.RED + "ERROR: Too few/many parameters!");
                    }
                    else
                    {
                        // right amount of args
                        String action = args[2];
                        String regionName = args[1];
                        ActiveRegion region = null;
                        String flag = args[3];
                        for (ActiveRegion r : plugin.regions)
                        {
                            if(r.getName().equalsIgnoreCase(regionName))
                            {
                                region = r;
                            }
                        }               
                        if(region == null)
                        {
                            sender.sendMessage(ChatColor.RED + "ERROR: That region does not exist!");
                            return;
                        }
                        if(action.equalsIgnoreCase("add"))
                        {
                            try
                            {
                                region.addFlag(Flags.flagFromString(flag));
                                List<ActiveRegion> regions = new ArrayList<ActiveRegion>();
                                for(ActiveRegion r : plugin.regions)
                                {
                                    if(r.getName().equals(region.getName()))
                                    {
                                        regions.add(region);
                                    }
                                    else
                                    {
                                        regions.add(r);
                                    }
                                }
                                try
                                {
                                RegionLoading.SaveRegions(regions);
                                RegionLoading.LoadRegions();
                                }
                                catch(Exception ex)
                                {
                                    System.out.print(ex.getMessage());
                                }
                                sender.sendMessage(ChatColor.DARK_GREEN + "Region flags updated!");
                            }
                            catch(Exception ex)
                            {
                                sender.sendMessage(ChatColor.RED + "ERROR: That is not one of the supported flags!");
                                sender.sendMessage(ChatColor.YELLOW + "Supported Flags: use, build, burn, fade, grow, leafdecay, explode, bucket, monsterspawning, animalspawning, commands, mobdespawn, pvp, enderpeal");
                            }
                        }
                        else if(action.equalsIgnoreCase("remove"))
                        {
                            try
                            {
                                region.removeFlag(Flags.flagFromString(flag));
                                List<ActiveRegion> regions = new ArrayList<ActiveRegion>();
                                for(ActiveRegion r : plugin.regions)
                                {
                                    if(r.getName().equals(region.getName()))
                                    {
                                        regions.add(region);
                                    }
                                    else
                                    {
                                        regions.add(r);
                                    }
                                }
                                RegionLoading.SaveRegions(regions);
                                RegionLoading.LoadRegions();
                                sender.sendMessage(ChatColor.DARK_GREEN + "Region flags updated!");
                            }
                            catch(Exception ex)
                            {
                                sender.sendMessage(ChatColor.RED + "ERROR: That is not one of the supported flags!");
                                sender.sendMessage(ChatColor.YELLOW + "Supported Flags: use, build, burn, fade, grow, leafdecay, explode, bucket, monsterspawning, animalspawning, commands, mobdespawn, pvp, enderpearl");
                            }
                        }
                        else
                        {
                            sender.sendMessage(ChatColor.RED + "ERROR: Invalid usage! Choose add or remove.");
                            return;
                        }
                    }
                }
                else if(args[0].equalsIgnoreCase("reload"))
                {
                    plugin.reloadConfig();
                    plugin.regions = RegionLoading.LoadRegions();
                    System.out.print("Regions reloaded!");
                    sender.sendMessage(ChatColor.DARK_GREEN + "Regions has been reloaded!");
                }
                else if(args[0].equalsIgnoreCase("info"))
                {
                    boolean inRegion = false;
                    for (ActiveRegion r : plugin.regions)
                    {
                        if(r.isLocationInRegion(((Player) sender).getLocation()))
                        {
                            sender.sendMessage(ChatColor.DARK_GRAY + ">> " + ChatColor.YELLOW.toString() + ChatColor.BOLD + r.getName());
                            sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "Region Flags: '" + Joiner.on(", ").join(r.getFlags()) + "'.");
                            sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "Enter Message: '" + r.getEnterMessage() + "'.");
                            sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "Leave Message: '" + r.getLeaveMessage() + "'.");
                            inRegion = true;
                        }
                    }
                    if(!inRegion)
                    {
                        sender.sendMessage(ChatColor.RED + "ERROR: You are not in any region!");
                    }
                }
                else if(args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("?"))
                {
                    // display help
                    showHelp(sender);
                }
                else
                {
                    sender.sendMessage(ChatColor.RED + "ERROR: This is not a valid Regions command!");
                }
            }
            else
            {
                // display help
                showHelp(sender);
            }
        }
        else
        {
            // user does not have permission
            sender.sendMessage(ChatColor.RED + "ERROR: You do not have permission to use this command!");
        }
    }
    else
    {
     sender.sendMessage(ChatColor.RED + "ERROR: You must be a player to edit Regions regions!");       
    }
    }
   
    public static void showHelp(CommandSender sender)
    {
        sender.sendMessage(ChatColor.DARK_GRAY + ">> " + ChatColor.GOLD.toString() + ChatColor.BOLD + "Regions Help:");
        sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "/rg create <name> " + ChatColor.GOLD + "- " +  ChatColor.YELLOW + "Creates a region from two selected points.");
        sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "/rg delete <name> " + ChatColor.GOLD + "- " + ChatColor.YELLOW + "Deletes a region.");
        sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "/rg max " + ChatColor.GOLD + "- " +  ChatColor.YELLOW + "Maxes the current selection from sky to bedrock.");
        sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "/rg flag <region> <add/remove> <flag> " + ChatColor.GOLD + "- " + ChatColor.YELLOW + "Add or remove flags.");
        sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "/rg set <region> <enter/leave> <message> " + ChatColor.GOLD + "- " + ChatColor.YELLOW + "Sets a regions enter/leave message.");
        sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "/rg info " + ChatColor.GOLD + "- " + ChatColor.YELLOW + "Displays region information.");
        sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "/rg reload " + ChatColor.GOLD + "- " + ChatColor.YELLOW + "Reloads the Regions config file.");
        sender.sendMessage(ChatColor.DARK_GRAY + "> " + ChatColor.DARK_GREEN + "/rg help " + ChatColor.GOLD + "- " + ChatColor.YELLOW + "Displays this message.");
      }
   
    }
 

Skionz

ogminecraft.com
Premium
Feedback score
1
Posts
1,544
Reactions
1,527
Resources
0
I just looked at the 'proof of ownership' and it seems this 'developer' has no regard for naming conventions. If he doesn't use naming conventions, then he probably learned 'Bukkit Coding' from a youtube video. If he learned 'Bukkit Coding' from a youtube video, then he probably writes class oriented code. If he writes class oriented code, then he probably doesn't know Java basics. If he doesn't know Java basics, then you shouldn't expect the plugin to be high quality. Yes, I made all of these assumptions from a single capitalized letter.
After seeing the class, I will go through how correct these assumptions were:

Doesn't use naming conventions: Correct
Learned from shitty videos: Not sure
Writes class oriented code: Correct
Knows Java basics: Understands the syntax, but not concepts, and has some redundant code

I would say I wasn't too far off.
 
Status
This thread has been locked.
Top