Inactive [SEC/FUN/INFO] Towny v0.59 - Resident/Town/Nation hierarchy + Grid Based Protection [531]

Discussion in 'Inactive/Unsupported Plugins' started by Shade, Feb 4, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    Towny is a plugin for Bukkit (originally from but discontinued from hMod) that allows players to create towns and nations, along with simple alliance controls. The world is broken up into a grid using 16x16 grid cells as default (for those familiar it's broken up into chunks). Each town is given a certain number of these cells and gains more as the town holds more players. These cells can be controlled by a town's mayor to set build/destroy permissions, define the town as PvP zone, and put plots up for sale using iConomy. Once a town joins a nation, it's residents can then start building in it's allied towns, but joining a nation makes you susceptible to losing your towns protection when the world is at war.

    Sec: Block permissions + Allies can't attack each other. Mob removal within towns. World PvP options.
    Chat: Town + Nation chat.
    Econ: Extension for iConomy that has a daily upkeep for towns and nations.
    Fun: War event.
    Info: Remembers when player last logged in as well as when they first registered.
    Tp: Town spawns and teleportation as well as onDeath that uses the town spawn.

    ~ News (Read this; it's usually of your interests)
    Add the node '' if you're using permissions. No one can expand their towns without it.

    March 24: I added a filtering system on names. Some people were getting some serious breakage when people used special characters for town names. If you installed one of the versions before 58, you will need to make sure this config value is correct name_check_regex=^[a-zA-Z0-9]+[a-zA-Z0-9._-]*$ or you'll get errors or worse for anything with underscores, dashes and periods. If you want to add to this, brush up on regular expressions or try this ^[^\s]+$ expression (1 character or more of any character but space). Be forwarned, I'm not sure that'll work as I'm rather new to them myself. You might want to make sure of this before updating, as your town names should be filtered accordingly. I also changed how world names were calculated, any worlds with / in it (to represent a subfolder) will probably have their world data reset (actually it's just starting a new file with a new name, so you could probably copy over you data in Towny/data/worlds).

    I also updated my website, so some links will probably break. Pretty much all them actually. In other news, the configuration page documentation is pretty!

    Old News:

    ~ Required Plugins
    This plugin isn't 100% required for Towny to run, but it eliminates gaping imbalance.
    • Questioner: link - Used to give confirmation to things like adding a player to a town, or asking the town's mayor/assistants to join a town. Towny will also use the polling feature to create elections, opt in wars, and other such things that require confirmation from both parties to not cause crazy imbalance. (Not all features in this description have been added as of yet).
    ~ Optional Plugin Extensibility

    These plugins are NOT required to be installed, and Towny should be 100% functional without them. If you notice a bug with them installed, post it.

    • Essentials: link - Used to check teleport cooldown and costs when using the /town spawn command. Requires EssentialsTele to be installed as well.

    • Permissions: link - Used to decipher if a player is a towny admin using the node 'towny.admin'. Otherwise, only operators will have the ability to use the admin commands.
    • Permissions 2.1 by Niji:link - No longer compiled against, but probably will continue to work.
    • GroupManager:link - Alternative to Permissions. Requires "fake" Permissions. Rename the fake plugin to "Permissions".
    Permission Nodes (open)

    • towny.admin : User is able to use /townyadmin, as well as the ability to build/destroy anywhere. User can also able to make towns or nations when set to admin only.
    • : User is able to create a town (only is use when TOWN_CREATION_ADMIN_ONLY is on)
    • : User is able to expand his town with /town claim
    • : User is able to create a nation (only is use when NATION_CREATION_ADMIN_ONLY is on)
    • towny.wild.* : User is able to build/destroy in wild regardless if the config says no.
    • towny.wild.destroy
    • towny.wild.switch
    • towny.wild.item_use
    • towny.wild.block.[block id] : User is able to edit [block id] in the wild.
    • towny.spawntp : Use /town spawn when allow_town_spawn=false
    • towny.publicspawntp : Use "/town spawn [town]" (teleport to other towns) when allow_town_spawn_travel=false.

    • iConomy: link - Used for a large amount of functionality like taxes, cost to start a town or nation, and selling plots. Towns and nations have their own bank account, used to deposit and withdraw during the daily upkeep. War brings in a another addition with stealing a bit of gold when you kill an opponent, and bankrupting towns in order to kick them from the event.
    Read this if your using iConomy (open)

    Balance. The default install of Towny cannot and will not balance it perfectly for every single server. This is where you, the admin, comes in. Also, just because you can put a price on it, doesn't mean you should.

    If you do not want to use iConomy with Towny, then turn this off.

    These, a the building blocks towny. They are what separate a user from being a hobo in the street to a fine war vet puffing on a cigar in his manor's den. Set the town to be a reasonable price. Either set this price low, so anyone can start a town, or set it high forcing a band of players to group together the funds. Same with nation. If you desire each and every town to have it's own nation, then set it low. If you desire only two or three nations over the land, then set it high. Remember that nations are used to let people build in other cities, so it shouldn't be unreasonable. If you want only a set amount of nations, make the creation of nations admin only.

    Do not make this price unreasonable. It will prevent a town from expanding unreasonably, but in doing so, also makes towns a very hard thing to establish. Big areas, or projects because very hard for users to protect, and you shouldn't deterr people from big projects as they will make your server more interesting.
    This price should probably scale on the lower side if you plan for towns to claim very large areas (or lots of town plots). In fact, since there are other ways to limit the size of towns (max town blocks) you should even consider expanding to be free.

    This is the server's own tax on the towns. It should kill off the inactive towns on your server.

    Makes dieing more fun, and more of a hassle even when your inventory is empty. The focus of the second, for during war, is to bankrupt a town. Since when a player runs out of funds, it's taken from his town, and when the town runs out of funds, the town is eliminated. Make the price zero if you do not wish for that.

    Same with the death price, but more direct towards the town.

    Don't charge a fee for this unless you have to.

    ~ Useful Links
    New Website
    Old Website
    Other Links
    ~ FAQ (Read This If You Have Questions)

    I've answered some common questions in the second post of this thread. Be sure to check it out.

    ~ Bugs
    If you notice a bug. First make sure you are up to date with the latest version of Towny. You can find out the version with the command /version Towny.

    Before posting the bug, please check the last page or two to check for if others have posted it. If you have anything to add to it, then quote that particular post. Checking my posts is usually a good idea as I tend to answer 5+ posts at once.

    Also be sure to check my Known Bugs & To Do List.

    Things that are useful to add to you posts:
    • Describe what you did right before the bug appeared. Describe the situation.
    • Error in the console (ca.xshade.bukkit.towny...). Paste the entire thing, use code tags.
    • Most logic has debugging messages. If your skilled at problem solving, try turning on debug mode (/ta set debugmode on) and read the console output during the time of the bug. This might not always apply to every bug possible.
    • If you notice any bugs in block protection going awry. Post the cache messages shown in debug mode. They help tell what towny is thinking during.
    ~ Spread The Love

    Donate! Donating keeps me interested in the project and more susceptible to implementing your outrageous demands! I'll more 'n likely add them anyways though, but the love is appreciated!
    For those wonderful people donating 1 cent. Save your money. Paypal takes 5% of transactions, rounded up to the nearest cent. One cent of one cent is, well let Jayne give you the idea. Your thoughts are appreciated though.

    Awesome Peeps: Hawkheart, Nameless 1¢ donator, Dharrk! Cool guy from Germany. Legionarius. Another 1¢ donator... The Quezo Collective. Rockstar04! ShatteredBeam. KHobbits, ! Janb !

    ~ Latest Version - Download Here
    [Usually Tested with:]
    • Install Notes:
      Place Towny.jar in the plugins folder that should be created when you launch the CraftBukkit server. Then run the server. If you're using permissions, be sure to add or users will not be able to expand their towns. Check the other permission nodes as well. After getting Towny running, configure it. Towny has lots of options allowing it to run in many different ways. The default setup is doubtful to be perfect for your server.
    Remember, remember, to back up your members. (Make a backup when updating)

    Note: v0.17 onwards will automatically backup the data folder in "plugin/Towny/backup/" as the server boots, and each daily interval.

    ~ Old Versions
    Show Spoiler

    ~ Change Log
    Change Log for past versions
    Code (Text):
    2. v0.55:
    3.     Fixed reloading the towny config.
    4.     Added regex check for all names. Names must be alphanumeric with the exception of underscores in place of spaces. Old names with invalid characters will be filtered appropriately.
    5.     World names are now filtered like the other objects in the universe, worlds with / are no longer just using the last token.
    6.     Reworded errors when making new towns. "You" was hardcoded, and didn't take into account admins making towns for others. To clarify, money is taken from the new mayor's bank account.
    7.     Added new config option save_on_load. It's defaulted to off (which is opposite to what it was before). It will no longer to a giant save on startup which assured that what's in memory = saved in file. This should speed up startup of particular large db.
    8.     Files are deleted when the object is deleted. It will not delete existing files, so files deleted outside of towny's regular actions will remain.
    9.     Added allow_resident_plots to enable/disable plot commands, essentially freezing the plot system.
    10.     Fixed admin add command (you couldnt add if you werent a mayor/assistant of any town).
    11.     The admin set mayor command will now add the person to town if he/she isn't already. The npc part of this command now works as well.
    12. v0.56:
    13.     Fixed default setting for regex.
    14. v0.57:
    15.     Removed debug statements.
    16. v0.58:
    17.     Fixed default regex settings.
  2. Offline


    Ya same error here.
  3. Offline


    How do i disable towns form being listed in /money top.
  4. Offline


    You guys are using the CB670 version?
  5. Offline


    How do i disable towns form being listed in /money top.
  6. Offline


    im running latest CB etc but get a crash when /towny top money is ran
  7. Offline


    Dont know how to disable towns from being listed, ill look into why towny top money is crashing tonight.
  8. Offline


    I am running CB 670 yep
  9. Offline


    I tried the release by FuzzeWuzze for 617 and although it worked, everything was slowed down. All commands where slow. Upon further investigation, the plugin was causing 100% load on the server. I removed it, and back down to under 10% load. I am not sure what's going on with development of this plugin, but I hope Shade does something soon to come out with an actual stable version of this plugin.
  10. Offline


    Yes. Would be great if you could update.

  11. Offline


    Yes it is a very high load laggy plugin
  12. Offline


    @FuzzeWuzze if you find the bug or need my config files message me but im in the UK so i'll be on later
  13. Offline


    Theres no reason for this, i literally have done nothing to the plugin but rename a few functions and change how a few block placement functions are forwarded, ive modified maybe 5 lines out of his thousands of lines of code, and almost all of those are conditional if statements. And your the only one to post this issue so i dont think its just the code.
  14. Offline


    Its related to iConomy changing over to their new dumb(imo) h2 database i think, ill see what i can figure out.
  15. Offline


    I just wanted to verify is this the error you guys see that starts it all?

    [INFO] [iConomy] Failed to set balance: org.h2.jdbc.JdbcSQLException: NULL not allowed for column "ID"; SQL statement:

    For some reason one of my Towns on my database has a Null Iconomy account? notsurewtf?
    I just wanna make sure thats actually what your seeing and not just my database being screwed up.

    Also do any of your towns have Abnormally long names? The town thats erroring out for me is 17 characters long
  16. Offline


    I know you got your plate full Fuzze, I really appreciate the work you have been doing. I would recommend splitting off your code into it's own plugin and thread at the very list until Shade gets back. Also, i'm having a comparability issue and I'm not sure if it is something that needs fixed in this plugin or the other so I'll be posting in both threads. I'm using this plugin dev-gen-menumetamod-v0-5-1-client-menu-framework. I have setup the config file for it so that it would do a few town commands from the menu. Simple things like /map and /town list. However everytime I try to do a command from this plugin that towny should handle, I get unknown command. Other ones for say essentials and such work fine (/warp /playerlist) Just towny that is having the issue getting it's commands from here. Not sure if it's just not "listing" the same way as others or what. I know this is low priority but I figured I would post it anyway.
  17. Offline


    On Bootup
    CB 670

    Code (Text):
    1. 20:33:28 [INFO] [Towny] Database: [Load] flatfile [Save] flatfile
    2. 20:33:28 [INFO] [Towny] Using: Permissions, iConomy
    3. 20:33:28 [SEVERE] PLAYER_ITEM loading Towny v0.6 (Is it up to date?)
    4. java.lang.NoSuchFieldError: PLAYER_ITEM
    5.         at ca.xshade.bukkit.towny.Towny.registerEvents(
    6.         at ca.xshade.bukkit.towny.Towny.onEnable(
    7.         at
    8.         at
    9. .java:578)
    10.         at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    12.         at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    13.         at org.bukkit.craftbukkit.CraftServer.loadPlugins(
    14.         at net.minecraft.server.MinecraftServer.e(
    15.         at net.minecraft.server.MinecraftServer.a(
    16.         at net.minecraft.server.MinecraftServer.d(
    17.         at
    18.         at
    19. 20:33:28 [INFO] Vanish 1.5.2 loaded.
  18. I have a town on denyAll for outsiders and they can still destroy stuff
  19. Offline


    JDD, i am having the same problems, any solutions?
  20. Offline


    I dont know how this is possible its failing to even load properly. Can you post your entire server startup log and datestamp on your Towny jar?
  21. Offline


    Or, just give Shade time to get back? Wasn't he only gone 1 week and everyone can't live without Towny?

    We just whitelisted the server for now and can wait a bit. New update will be out next week anyway, probably breaking mods again.
  22. Offline


    Could you please add support for BOSEconomy? Would be forever grateful
  23. Offline


    Well hes been over a week, and hes logged into the forums multiple times but never posted, so take that for what you will.

    FWIW my version is working more or less perfectly on my CB670 server with my old towny files that were created with CB531. There are still some permissions problems i think here and there, but it loads and people are joining and leaving towns fine.

    Not sure why other people are having issues.
  24. Offline


    I am running build 670 and am getting 'odd' behavior with Towny. Great Work FuzzeWuzze, but I think unless this plugin gets some attention soon its going to have to replaced by something else :(
  25. Offline


    yep, but what else ?
    My server is using this plugin, the "grid" of towny is used for every town....

    Do you know any other plugin working like this one ? Specially with taxes / resident and / plot ?

    For the moment I always run the old craftbukkit on my side... I use some unofficial version to allow 1.4 clients to connect. But apparently the 1.5 will be soon out... I don't know how many we could wait for Towny...

    This mod is very important on my server, all the cities are based on...

    I think I will use the Fuzze update this week end and see what will happen.
  26. Offline


    Fuzze, I'd just like to thank you on behalf of my community for fixing this for us. We all thank you.
  27. Offline


    On 670
    Code (Text):
    1. 13:05:02 [SEVERE] PLAYER_ITEM loading Towny v0.6 (Is it up to date?)
    2. java.lang.NoSuchFieldError: PLAYER_ITEM
    3.         at ca.xshade.bukkit.towny.Towny.registerEvents(
    4.         at ca.xshade.bukkit.towny.Towny.onEnable(
    5.         at
    6.         at
    7. .java:578)
    8.         at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    10.         at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    11.         at org.bukkit.craftbukkit.CraftServer.loadPlugins(
    12.         at net.minecraft.server.MinecraftServer.e(
    13.         at net.minecraft.server.MinecraftServer.a(
    14.         at net.minecraft.server.MinecraftServer.d(
    15.         at
    16.         at
  28. Offline


    2011-04-09 07:32:02 [SEVERE] Could not pass event PLAYER_MOVE to Towny
    at ca.xshade.bukkit.towny.event.TownyPlayerListener.onPlayerMove(
    at org.bukkit.plugin.RegisteredListener.callEvent(
    at org.bukkit.plugin.SimplePluginManager.callEvent(
    at net.minecraft.server.NetServerHandler.a(
    at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    at net.minecraft.server.NetworkManager.a(
    at net.minecraft.server.NetServerHandler.a(
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(

    thats what i get when uploading Fuzze's CB670 towny?
  29. Offline


    Cant use the 617 version. Caused so much lag that arrows would stop mid flight and hang in mid air. It was absolute crazy. The moment i uninstall-ed Fuzze's 617 Towny .61 version the arrows fell to the ground and then could be shot normally. Lag was gone.
  30. Offline

    Lord Chaos

    I would love to see a feature where towns could buy resources from players, buy offering money for XX amount of resource. Like:

    Town X wants 50 coal for 50 coins each
    Town Y wants 5 diamond for 1000 coins each
    Town Y wants 10 Iron for 200 coins each

    Then a player could sell for instance 20 coal to Town X for 1000 coins total. Then Town X would only be buying 30 coal afterwards.

    And so on. The resources bought would be put in a town chest or in the mayors inventory.
  31. Offline


    Yeah I'm getting the NoSuchFieldError: PLAYER_ITEM too.

    Code (Text):
    1. 09:51:36 [INFO] [Towny] Database: [Load] flatfile [Save] flatfile
    2. 09:51:36 [INFO] [Towny] Using: Permissions, iConomy
    3. 09:51:36 [SEVERE] PLAYER_ITEM loading Towny v0.6 (Is it up to date?)
    4. java.lang.NoSuchFieldError: PLAYER_ITEM
    5.         at ca.xshade.bukkit.towny.Towny.registerEvents(
    6.         at ca.xshade.bukkit.towny.Towny.onEnable(
    7.         at
    8.         at
    9. .java:578)
    10.         at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    12.         at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    13.         at org.bukkit.craftbukkit.CraftServer.loadPlugins(
    14.         at net.minecraft.server.MinecraftServer.e(
    15.         at net.minecraft.server.MinecraftServer.a(
    16.         at net.minecraft.server.MinecraftServer.d(
    17.         at
    18.         at
    Using CB 670. Update plox?
Thread Status:
Not open for further replies.

Share This Page