Discussion in 'Plugin Requests' started by 0ct0berBkkitPlgins, Jul 13, 2015.

Thread Status:
Not open for further replies.
  1. Plugin Category

    Introduction and Significance

    I was originally planning on making this plugin, but then I realized it might be a bit harder than I thought it was (I'm sort of just getting into plugin development). However I decided this is a really important fix for Factions, so I made a request.

    Factions back in 1.2-1.4 was not all about obsidian bases or water walls. Things were still relatively the same, plugin wise, to how they are today, but people were actually building instead of hiding inside little boxes. With how easy and efficient it is to build cannons in 1.8 and how frequently servers sell TNT, a new defense is needed, otherwise all a player will try and do is build a boring, water-walled obsidian box and not expand further. Many, many servers do Factions because it is easy to set up and doesn't require much managing. However factions can end up feeling dull, with every base the same, always the same goal... and those who don't care about just pvp and raids will likely leave out of boredom.

    What the plugin would do

    ObsidianAltars would ideally be a plugin to fix this robotic method of playing Factions. Players would have to create four altars, probably enchantment tables with obsidian around them, and arrange them in a box, with each altar at a corner. There would be a maximum size for this box, and it would ideally cost money or an item based on the size. Any explosion that occurs within the box would be cancelled. The altars themselves would need to be destroyed to get rid of the protection, which could be done with tnt, or if the land is unclaimed, by breaking it. Players could also type commands to see where the altars are located.

    Ideally, this plugin would be fully compatible with Factions and ObsidianDestroyer, and there could be multiple layers of altar boxes, and maybe the regions were 5 blocks away from the altars (so that they can still be destroyed easily).

    How the plugin would actually be useful

    A plugin like this could make room for houses, architecture, farms, etc. by protecting them from explosions. Think of how less boring it would be if those OP/Semi-OP faction servers had this. It would also give key points on a raid that enemies must attack, and the faction must defend.

    Please show this thread in your plugin description if you accept this plugin request and credit me for the request

    Possible (not required) configuration and settings

    All of the below configuration isn’t required, and you can change or modify any of it, but I thought these were good ideas:

    -Different altar structures, maybe configurable with a WorldEdit schematic
    -Cost in $ for setting up the protection depending on the size
    -Explosion reduction instead of no explosions at all in the region
    -Amount of towers out of four that must be destroyed in order to break the protection spell
    -Buffs for ONLY the defending faction if a beacon is present(?)
    -Command to set the defending faction(s) protected by the region
    -Core in the base that when destroyed will shut down all protection
  2. I'll make this simpler, then. Could any of you possibly just set up the regions and show me how to test for them? I can do the rest, that's just the part Iv'e had trouble with
  3. Offline


    Very nice idea, I personally won't make it, but I do like the idea. And you seem interested in making this yourself. So I will tell you a basic structure of how to make the regions and stuff, even though this really isn't the section for it.
    So just to let you know it would be much more complicated to use 4 pillars, so I will tell you how to use 2 pillars for the sake of simplicity. I will also provide code that hooks into World Edit (You will need world edit) because it already has a way to do this called a CuboidSelection to make it even easier for you, though it's fairly simple without WorldEdit.

    With the fact that you already are able to find the 2 pillars' locations with the plugin (if you are unable to do this let me know), I will show you how to make a CuboidSelection out of those 2 points.
    1. Add WorldEdit to your Build Path.

    2. Then simply use this piece of code to create a CuboidSelection (You will probably put this in an entity explode event and check if it's TNT):
    CuboidSelection cs = new CuboidSelection(min.getWorld(), min, max);
    Where min is the location of one of the points and max is the location of the other points (They don't have to be the "real" minimum and maximum's just as long as they are 2 different points in the same world). I also recommend that you force one of the location's Y coordinate to be 0 and the other location's Y to be 256 so it applies to all the verticle area.

    3. When you have that you can do cs.contains(LocationOfExplosion) and if that returns true, then you can cancel the event. The LocationOfExplosion would be in the case of EntityExplodeEvent, the location of the entity.

    4. That's really it...

    If you need to find where they set their alters you could either save the locations to a file and pull them later(Probably would be easiest to use a command) or you could listen to the BlockPlaceEvent and check if it's an enchanting table, then see if it's surrounded by obsidian. Let me know if you are confused or need anything else. I tried not to give it to you directly, but I'm unaware of you past experience.
Thread Status:
Not open for further replies.

Share This Page