Hello Minecraft Forum community! I'm here to bring a new land protection / management plugin. Townships is a plugin where players need to build structure to claim land. The structure works as shops, mines, farms and factories, allowing the production of the most variable items, the only limit is your imagination with this plugin. If you can imagine it, the plugin can do. You can create custom effects to customize your server even more.
Almost every option of Townships can be toggled to on or off. Don't like a feature? No problem! Just disable it.
1: Unzip Townships.zip in your plugins folder.
2: Restart your server
3: (Optional) Choose a pre-made config from inside Townships folder.
If you need more information on config files, check out the Townships Wiki.
Performance:
This plugin runs very quickly, but has some features that can cause lag on servers exceeding 100 players. All of those features can be disabled. EffectWarehouse.jar is the first one to disable. EffectConveyor.jar is the next one with the most lag potential. Finally, if you're still having issues, you can disable player in region checks in config.yml. Those checks are used for a number of effects like arrow turrets and animal farms (anything that requires you stand somewhere). This plugin has been tested with 40 players and 1500 regions and runs fine with all features.
Warning! DO NOT reload the plugin, it will cause towns to duplicate and other bugs. If you want to apply changes, restart the server.
Features:
* Create any number of unique towns with their own building requirements and perks.
* Includes a menu for buying blueprints or constructing new buildings
* Town chat and prefixes
* Manage player membership per building
* Manage player ownership, permissions, and taxes in town
* Towns can have population limits determined by housing
* Towns can require money daily.
* Towns can require power which can be depleted through killing in war.
* Town power can be depleted with TNT
* Town power can be depleted with automatic TNT teleporters
* Towns can be raided with random destination teleporters
* Players can create teleporters
* Players can create any farms, factories, or shops
* Buildings can create and consume custom items
* Buildings can evolve into other buildings after a set number of uses
* Buildings can be remade into other buildings
* Towns can impose potion effects at random on members if the town is missing structures
* Arrowturrets can shoot arrows at non-member players automatically
* Artillery can shoot tnt using a remote controller to hit precise targets
* Proximity landmines can detonate on non-member players
* Buildings can be disabled if abandoned for a set time
* Buildings can move items by minecart automatically to other buildings
* Warehouses can move items to buildings as needed automatically
* Buildings can spawn animals
* Buildings can be limited to specific biomes
* Towns can limit which buildings you can build based on what buildings you have already built
*Excelent for PvP servers with the war system enabled
* Excelent for PvE servers with the creative config
* Excelent for servers that are focused on survival, with the help of Townships you'll be able to create an unique experience for your players
Permissions:
* townships.create.all lets you create any township
* townships.create.<type> lets you create a township of that type
* townships.admin lets you bypass townships ownership checks
* townships.join lets a player join a super-region
* townships.unlock lets a player unlock blueprints in the blueprint shop
* townships.group.<group> gives a player access to a group you specify in groups.yml
Note: the premade configs will automatically assign permissions when you run the plugin for the first time.
Commands
* /to menu
* /to
* A ton more that you can find in the Player's Guide.
Contact Information:
Need any help with the plugin? Just send me a message and I'll do my best to help you.
Skype: Luis-HL (a.k.a Louis Blumiere)
Video Tutorial:
Developer API:
Do you want your own features? Change the available ones? Sure! We got an example of Region "Effect" for you to build your own effects!
package multitallented.plugins.townships.effects;
import java.util.HashMap;
import java.util.HashSet;
import multitallented.redcastlemedia.bukkit.townships.Townships;
import multitallented.redcastlemedia.bukkit.townships.effect.Effect;
import multitallented.redcastlemedia.bukkit.townships.events.ToPlayerEnterSRegionEvent;
import multitallented.redcastlemedia.bukkit.townships.events.ToPlayerExitSRegionEvent;
import multitallented.redcastlemedia.bukkit.townships.region.RegionManager;
import multitallented.redcastlemedia.bukkit.townships.region.SuperRegion;
import multitallented.redcastlemedia.bukkit.townships.region.SuperRegionType;
import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
/**
*
* @author Multitallented
*/
public class EffectMessage extends Effect {
private final Townships plugin;
public EffectMessage(Townships plugin) {
super(plugin);
this.plugin = plugin;
registerEvent(new IntruderListener(this));
}
@Override
public void init(Townships plugin) {
super.init(plugin);
}
public class IntruderListener implements Listener {
private final EffectMessage effect;
public IntruderListener(EffectMessage effect) {
this.effect = effect;
}
@EventHandler
public void onSRegionEnter(ToPlayerEnterSRegionEvent event) {
RegionManager rm = getPlugin().getRegionManager();
SuperRegion sr = rm.getSuperRegion(event.getName());
if (sr == null) {
return;
}
SuperRegionType srt = rm.getSuperRegionType(sr.getType());
if (srt == null) {
return;
}
if (!hasMessage(srt)) {
return;
}
event.getPlayer().sendMessage(ChatColor.WHITE + "[Townships] You have entered " + ChatColor.RED + sr.getName());
}
@EventHandler
public void onSRegionExit(ToPlayerExitSRegionEvent event) {
if (event.getLoggingOut()) {
return;
}
RegionManager rm = getPlugin().getRegionManager();
SuperRegion sr = rm.getSuperRegion(event.getName());
if (sr == null) {
return;
}
SuperRegionType srt = rm.getSuperRegionType(sr.getType());
if (srt == null) {
return;
}
if (!hasMessage(srt)) {
return;
}
event.getPlayer().sendMessage(ChatColor.WHITE + "[Townships] You have exited " + ChatColor.RED + sr.getName());
}
private boolean hasMessage(SuperRegionType srt) {
for (String s : srt.getEffects()) {
if (s.startsWith("message")) {
return true;
}
}
return false;
}
}
}
Notes:
Dom_Luis_III (me) is NOT the creator of this plugin, I'm only helping the developer to share the plugin. I got permission to post here from him!
I'm back with a basic Effect.
I modified one of the existing ones to create this, so, credits to @Multitallented for the original Effect!
About the effect: It gives you speed for 50 seconds when you enter the region, you guys might have an use for this little new feature.
package theroyaltyonly.louisblumiere.townships;
import multitallented.redcastlemedia.bukkit.townships.Townships;
import multitallented.redcastlemedia.bukkit.townships.effect.Effect;
import multitallented.redcastlemedia.bukkit.townships.events.ToPlayerInRegionEvent;
import multitallented.redcastlemedia.bukkit.townships.region.Region;
import multitallented.redcastlemedia.bukkit.townships.region.RegionManager;
import multitallented.redcastlemedia.bukkit.townships.region.RegionType;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
/**
*
* @author Multitallented
* @editor Louis Blumiere
*
*/
public class EffectAlchemist extends Effect {
public final Townships aPlugin;
public EffectAlchemist(Townships plugin) {
super(plugin);
this.aPlugin = plugin;
registerEvent(new IntruderListener(this));
}
@Override
public void init(Townships plugin) {
super.init(plugin);
}
public class IntruderListener implements Listener {
private final EffectAlchemist effect;
public IntruderListener(EffectAlchemist effect) {
this.effect = effect;
}
@EventHandler
public void onCustomEvent(ToPlayerInRegionEvent event) {
Player player = event.getPlayer();
Location l = event.getLocation();
RegionManager rm = effect.getPlugin().getRegionManager();
Region r = rm.getRegion(l);
RegionType rt = rm.getRegionType(r.getType());
//Sets the Townships value flag.
int addSpeed = effect.regionHasEffect(rt.getEffects(), "gain_speed");
if (addSpeed == 0) {
return;
}
//Check if the players is an owner or a member of the region.
if (!effect.isOwnerOfRegion(player, l) && !effect.isMemberOfRegion(player, l)) {
return;
}
//Check to see if the Townships has enough reagents.
if (!effect.hasReagents(l)) {
return;
}
effect.forceUpkeep(event);
//Feel free to change this line to another potion effect.
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 1000, 1));
}
}
}
At the end, you only need to change the PotionEffectType.X to any potion that you want.
We already have a post at Spigot, we are just trying to increase the popularity of the plugin. Sorry if I was rude with the last post, didn't mean that.
No idea but afaik there's no (or barely any) spigot plugins around here. Maybe the tags were taken from the modded client support section or something.
2: Restart your server
* Create any number of unique towns with their own building requirements and perks.
* Includes a menu for buying blueprints or constructing new buildings
* Town chat and prefixes
* Manage player membership per building
* Manage player ownership, permissions, and taxes in town
* Towns can have population limits determined by housing
* Towns can require money daily.
* Towns can require power which can be depleted through killing in war.
* Town power can be depleted with TNT
* Town power can be depleted with automatic TNT teleporters
* Towns can be raided with random destination teleporters
* Players can create teleporters
* Players can create any farms, factories, or shops
* Buildings can create and consume custom items
* Buildings can evolve into other buildings after a set number of uses
* Buildings can be remade into other buildings
* Towns can impose potion effects at random on members if the town is missing structures
* Arrowturrets can shoot arrows at non-member players automatically
* Artillery can shoot tnt using a remote controller to hit precise targets
* Proximity landmines can detonate on non-member players
* Buildings can be disabled if abandoned for a set time
* Buildings can move items by minecart automatically to other buildings
* Warehouses can move items to buildings as needed automatically
* Buildings can spawn animals
* Buildings can be limited to specific biomes
* Towns can limit which buildings you can build based on what buildings you have already built
*Excelent for PvP servers with the war system enabled
* Excelent for PvE servers with the creative config
* Excelent for servers that are focused on survival, with the help of Townships you'll be able to create an unique experience for your players
* townships.create.<type> lets you create a township of that type
* townships.admin lets you bypass townships ownership checks
* townships.join lets a player join a super-region
* townships.unlock lets a player unlock blueprints in the blueprint shop
* townships.group.<group> gives a player access to a group you specify in groups.yml
Note: the premade configs will automatically assign permissions when you run the plugin for the first time.
* /to
* A ton more that you can find in the Player's Guide.
Hey! That's my plugin
Thanks for putting this together.
Yeah Townships!
Updated the topic!
Changes:
- Added a few extra tags.
- Added EffectMessage.jar example.
Updated Thread Title.
Also, I'm learning about the Custom Effects of the plugin. I'll be sharing some of my code in this thread.
Thanks for reading! If you need any help, add my skype: Luis-HL (Louis Blumiere)
What custom effects are you planning on making?
Yeah Townships!
Hello friends!
I'm back with a basic Effect.
I modified one of the existing ones to create this, so, credits to @Multitallented for the original Effect!
About the effect: It gives you speed for 50 seconds when you enter the region, you guys might have an use for this little new feature.
At the end, you only need to change the PotionEffectType.X to any potion that you want.
WAit is this a spigot plugin? I don't think this is the correct forum to release it in :/
Shame, I was interested in the turrets..
Yes it is the correct section.
There are tags for Spigot at the creation of topic.
It's not. This forum is used for forge mods, spigot plugins go into the spigot forums.
Why would you want to post your plugin here when everyone else post theirs somewhere else?
So why there are tags for Bukkit and Spigot?
We already have a post at Spigot, we are just trying to increase the popularity of the plugin. Sorry if I was rude with the last post, didn't mean that.
No idea but afaik there's no (or barely any) spigot plugins around here. Maybe the tags were taken from the modded client support section or something.
Yes, did not see any other Spigot plugins here.
I think I should ask a mod to close down this thread then.