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

    Shade

    Towny
    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 'towny.town.claim' 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: http://www.xshade.ca/towny/news-archives


    ~ 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.

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

    • 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.
    • towny.town.new : User is able to create a town (only is use when TOWN_CREATION_ADMIN_ONLY is on)
    • towny.town.claim : User is able to expand his town with /town claim
    • towny.nation.new : 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.build
    • 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.



    Economy:
    • 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.

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

    PRICE_NEW_TOWN
    PRICE_NEW_NATION
    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.

    PRICE_CLAIM_TOWNBLOCK
    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.

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

    DEATH_PRICE
    WARTIME_DEATH_PRICE
    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.

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

    PRICE_NATION_NEUTRALITY
    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: http://ci.bukkit.org/job/dev-CraftBukkit/promotion/]
    • 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 towny.town.claim 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:
    v0.55:
    	Fixed reloading the towny config.
    	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.
    	World names are now filtered like the other objects in the universe, worlds with / are no longer just using the last token.
    	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.
    	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.
    	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.
    	Added allow_resident_plots to enable/disable plot commands, essentially freezing the plot system.
    	Fixed admin add command (you couldnt add if you werent a mayor/assistant of any town).
    	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.
    v0.56:
    	Fixed default setting for regex.
    v0.57:
    	Removed debug statements.
    v0.58:
    	Fixed default regex settings.
    
    ~ FAQ (Read this)

    What is a town?
    A town is a collection of residents (or just one resident) with one resident as the mayor. A town also has a bank which the mayor can withdraw from. A mayor can also have assistants who have the same powers as him/herself. Towns can have taxes that will be taken at the end of each day interval.

    How long is a day interval?
    Default is 24 hours. You can change this in the configuration.

    How do I start a town?
    Read the Brief Tutorial.

    Can someone belong to or own more than one town?
    No. You can claim outposts if you want to protect somewhere not connected to your borders.

    What is an outpost?
    An outpost is a type of claiming aspect that a town can do. Claiming an outpost will not limit you to your towns borders, allowing you to start a protected area some else, even another world.

    What is a nation?
    A nation is a collection of towns (or just one town) with one town as the capital. The mayor of that capital is the king. A nation can join the war event, as well as ally other nations. A nation also has it's own bank. It can also tax the towns that belong to it.

    Is MySql or another database format supported?
    No. Only flatfile, and loading flatfile-hmod is supported.

    How do I set up the maximum town blocks?
    http://towny.xshade.ca/help/setting-up-maximum-town-blocks

    Can I select a small cuboid, not attached to the grid for (my town/plot)?
    No. Towny is not cuboid, and depends on the grid system.

    Can I limit Town/Nation creation?
    Yes with town_creation_admin_only and similarly, nation_creation_admin_only.

    People can't build in the wild!
    The default for towny is to force a player to make a town before building, after gathering resources from the ignore item ids. You can turn this feature off with unclaimed_zone_ options in the config. You can also set specific permissions per world for the wild with the /townyworld command.

    What are the permissions?
    [​IMG]
    Each town and resident has his own permissions. For residents, the permissions are used for his/her residential plots. For towns, it affects all townblocks within the town that are unowned.
    • Switch permissions are for items like levers and buttons.
    • Item Use permissions are for letting people use items like buckets and lighters.
    • Resident plot permissions use the "resident" permission level a little different, as he/she doesn't control any residents. Instead, this permission is used for his/her friends list.
    Permissions are shown in your status with B=rao D=rao S=rao I=rao, where r = resident, a = ally, and o = outsider. The capital B= denotes the build permission. The minus symbol "-" is used to show that your are denying permission to the specific permission.


    To edit your permissions ingame, use the "/[res/town] set perm" command. Further examples of the commands can be found on the Master Command List.

    What are taxes?
    Taxes are an automatic method of keeping a town's economy, as well as slowly killing off town's that are inactive.

    Any player can view the taxing personal to them with /towny prices.

    Town Collection
    The following are taxes that a town's mayor can set. The taxes are deposited into the town bank. The mayor himself, as well as his staff (assistants) are exempt from these taxes.
    • Resident tax: Each resident in the town has to pay this. Failure to do so will kick you from the town. Mayors can set with /town set taxes [$].
    • Residential plot tax: Each resident who owns a plot in town will be charged this amount for each plot they own in that town. Failure to do so will have the resident losing ownership over the plot. This is charged before residential taxes. Mayors can set with /town set plottax [$].
    Nation Collection


    The following are taxes that a nation's king can set. The taxes are deposited into the nation's bank.
    • Town tax: Each town in the nation has to pay this except for the capital town. Kings can set with /nation set taxes [$].
    Server Imposed Taxes


    The following are taxes that the administrator must set in the configuration. These are global taxes intended to slowly kill off inactive towns/nations.
    • Town tax: Each town in the world pays this. Failure to pay will destroy the town.
    • Nation tax: Each nation in the world pays this. Failure to pay will destroy the nation.
    How do I configure the wilderness?

    Towny has a few options for this. The default being that you cannot edit in the wild at all. Forcing players to make towns to begin construction. You can turn this option off globally in the configuration (unclaimed_zone_[permission]). You can also change it for a particular world with the /townyworld (/tw) command. Anything to do with the wild globally can be set per world.

    Towny also has the ability to ignore certain blocks in the wild. Such as logs and leaves (in the default). These block ids can be set with in the UNCLAIMED_ZONE_IGNORE variable in the config. The default has it so that you can edit ores, glowstone, ladders, torches and minetracks in the wild.

    You can also change the name of the wild that pops up when you leave a town. Setting this per world would make the "wilderness" be more personal to that specific world. Eg: Setting the name to "Hell" for a nether type world would create a nice note when transitioning world to world.

    What are the "modes" a player can have?
    Each player has the ability to change how Towny interacts with him/her. The most common are for popup displays that show up as the player moves around in the world. They can be set with the /resident set mode [mode] ... [mode]. The modes are as follows:
    • map: Equivalent to typing "/towny map" as you walk between townblocks.
    • townclaim: Equivalent to typing "/town claim" as you walk between townblocks.
    • townunclaim: Equivalent to typing "/town unclaim" as you walk between townblocks.
    • tc: Your main chat output is to the town channel.
    • nc: Your main chat output is to the nation channel.
    Why are the cells off by 1 in the negative planes? and why is the plots 15x16 or 15x15 near origin?
    Read this post here. It's a simple fix, however, it would shift 3/4 of existing plots on every server currently using Towny, so I'm not changing this.

    How can I make it so resident can only build in their own plots?
    If you want this as default for every town on your server, be sure to change the default permissions in the config with default_town_perm_ to false. Now only the mayor + assistants have permission for newly created towns. If you want this for existing towns, or you only want your town to act in this way, you need to use /town set perm off.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  2. Offline

    lordsyca

    I hope you'll make it so we can own more than one town so I can make a bunch of towns under my nation. Since I don't really want others owning them.
     
  3. Offline

    Gilden00

    Hey i think it would be cooler if instead of having it globally set, make it so that each town/nation decides if mobs get removed in the area. Of course it would take up more space so make it an option if they can or not.
     
  4. Offline

    Phantom Index

    Yeah and updating it to 550 build so protection will finally work <_>
     
    M1sT3rM4n likes this.
  5. Offline

    M1sT3rM4n

    I've posted that problem here numerous times but he seems to ignore it every time instead of responding *shrugs*
     
  6. Offline

    Phantom Index

    MAGICAL
     
  7. Dude, CB 550 is no recommended build so devs should NOT build against that! Use the recommended build if you want to use actual plugins. As simple as that.... I wouldnt waste my time with ignorant and demanding folks, too...
     
  8. Offline

    M1sT3rM4n

    What do you think I've been using derp.
     
  9. Offline

    AnjoCaido

    I wrote a piece of code that mark chunks with Coloured WOOL in the corners... So its easier for users to see where are the boundaries when they buy plots... the code is this:
    Code:
    public void markChunk(Player player, DyeColor color){
            int x,y,z;
            Block b;
            Wool w = new Wool(Material.WOOL);
            w.setColor(color);
            Chunk c = player.getWorld().getChunkAt(player.getLocation());
            //CORNER A
            x = 0;
            z = 0;
            y = getHighestOverGround(c, x, z);
            b = c.getBlock(x, y, z);
            b.setTypeId(w.getItemTypeId());
            b.setData(w.getData());
            //CORNER B
            x = 0;
            z = 15;
            y = getHighestOverGround(c, x, z);
            b = c.getBlock(x, y, z);
            b.setTypeId(w.getItemTypeId());
            b.setData(w.getData());
            //CORNER C
            x = 15;
            z = 0;
            y = getHighestOverGround(c, x, z);
            b = c.getBlock(x, y, z);
            b.setTypeId(w.getItemTypeId());
            b.setData(w.getData());
            //CORNER D
            x = 15;
            z = 15;
            y = getHighestOverGround(c, x, z);
            b = c.getBlock(x, y, z);
            b.setTypeId(w.getItemTypeId());
            b.setData(w.getData());
        }
    Im following the Bukkit API wich says X and Z are 0 - 15 (16 different values). So it is supposed to place a woolblock to the over the ground on the four corners of it.

    Everything seems OK ingame... It creates 4 WOOL in corners... making a 16x16 area.

    The problem is that Towny boundaries doesn't seem to follow correctly this. It's like the boundaries happen always with coordinate x-1 and z+1.
    I mean that the two WOOL blocks placed on NORHERN side of Chunk(wich have same X) are considered the NEXT TownBlock by towny... instead being the same.

    Is my code wrong or is the towny boundaries wrong?

    Here is an example:
    Screen shot 2011-03-16 at 20.57.32.png

    The red wool mark is made by my plugin using the code above.
    The white wool is a mark I made using Towny Map Mode to see in which chunk I am.
     
  10. Offline

    HanzoSanada

    I was wondering how you set plot prices. It doesn't say in the config, and the plots are ALWAYS $0 in game.
     
  11. Offline

    AnjoCaido

    You can change that with /t set plotprice I think....
     
  12. Offline

    Spiritax

    can you update the log method to keep log after restart? when the server restart it reset le log.
     
  13. Offline

    HanzoSanada

    That is configuring all the plots. Is there a way to make 1 each cost a differnet amount?

    TY btw.
     
  14. Offline

    AnjoCaido

    Probably not... every plot has same 16x16 size. But I get what you mean. It could be useful in some cases.
     
  15. Offline

    Raspberry

    The Mayor (or assistants) of a town sets the plot prices...

    I'm pretty sure I've set different plot prices within a city based on my subjective value of the plots (scenic view, minerals, waterfront, et al)
     
  16. Offline

    Shade

    It's negative values that fudge it. I won't be changing it unless I plan on shifting 3/4 of plots on every server.
    http://forums.bukkit.org/threads/se...based-protection-531.3358/page-20#post-104000

    Because no one has said "In this expliced case, people can bypass permissions." The fact I can't duplicate this isn't helping. I'm not responding as I have no further input on the matter other than I don't know. Which I tend not to do, but as you keep repeating yourself...

    Multiple towns = never. Fake mayors = eventually.

    No you can't. Why would you want to disable it?

    What exactly isnt working?

    My main focus was on letting the players manage themselves, thus admin control was a bit in the lacking.

    When the server starts up, do the extra worlds load before towny does?

    Towny/data/towns/Camelot.txt
    You should have folders for that contain the data files per town/nation/etc.
    There's a possible bug that might happen in theory (in my head) that if a server stops or reloads or something while a file is in the process of writing it's updated data, then it could xnay the town when it loads back up.

    There could be another explanation too, it's just the only one I've thought up so far. The answer would be to create a temp file, then move it after the writing to it has been done.

    use_item is used for anything that uses the right click event. In the case of doors, they item in the inventory is different than the actual block id, so it's not sent to build. Add the id for door items and other things like that to item_use_ids.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
    rosedragon likes this.
  17. Offline

    Raspberry

    yup...

    Code:
    21:20:07 [INFO] [Towny] Database: [Load] flatfile [Save] flatfile
    21:20:08 [INFO] [Towny] Using: Permissions, iConomy
    21:20:08 [INFO] [Towny] Version: 0.53 - Mod Enabled
    21:20:08 [INFO] Big Catch version 0.4 is enabled!
    21:20:08 [INFO] [iGrow : 2.0] Enabled!
    21:20:08 [INFO] [iGrow : 2.0] Loaded 4 recipes!
    21:20:08 [INFO] properTime 1.8.1 initialized
    21:20:08 [INFO] properTime reading from config at /home/minecraft/server/plugins/properTime/properTime.conf
    21:20:08 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    21:20:08 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    21:20:08 [INFO] Loading renderer 'org.dynmap.kzedmap.CaveTileRenderer'...
    21:20:08 [INFO] Activated world 'world' in Dynmap.
    21:20:08 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    21:20:08 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    21:20:08 [INFO] Loading renderer 'org.dynmap.kzedmap.CaveTileRenderer'...
    21:20:08 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    21:20:08 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    21:20:08 [INFO] Dynmap WebServer started on null:8123
    21:20:08 [INFO] MobileAdmin: Starting server...
    21:20:08 [INFO] MobileAdminBukkit version 2.4 is enabled!
    21:20:08 [INFO] [INFORMANT]version 1.6 is enabled
    21:20:08 [INFO] [INFORMANT]Loading Settings
    21:20:08 [INFO] [INFORMANT]Loading Previous Players
    21:20:08 [INFO] Snowballz has been enabled with the following options:
    21:20:08 [INFO]     Snow damage: 1
    21:20:08 [INFO]     Snow range: 10
    21:20:08 [INFO]     Snow douses fire: true
    21:20:08 [INFO]     Snow makes ice: true
    21:20:08 [INFO] [MultiVerse] Permissions Found
    21:20:08 [INFO] MobileAdmin: Server listening on *:5839
    21:20:08 [INFO] [MultiVerse] - Version 1.5 (Permissions 2.1+) Enabled
    21:20:08 [INFO] [MultiVerse] Found iConomy, enabling payments.
    21:20:08 [INFO] [MultiVerse] Loading World & Settings - 'world' - NORMAL
    21:20:08 [INFO] [MultiVerse] Loading World & Settings - 'nether' - NETHER
    21:20:08 [INFO] Activated world 'nether' in Dynmap.
    21:20:08 [INFO] Activated world 'nether' in Dynmap.
    21:20:08 [INFO] [MultiVerse] Loading World & Settings - 'world-classic' - NORMAL
    21:20:08 [INFO] Activated world 'world-classic' in Dynmap.
    21:20:09 [INFO] Activated world 'world-classic' in Dynmap.
    21:20:09 [INFO] [MultiVerse] 3 - World(s) loaded.
    21:20:09 [INFO] [MultiVerse] Loading Portals
    21:20:09 [INFO] [MultiVerse] 4 - Portal(s) loaded.
    21:20:09 [INFO] HelpPages version 1.0 is enabled!
    21:20:09 [INFO] Done (0.231s)! For help, type "help" or "?"
    
     
  18. Offline

    Shade

    Think of it instead as 3 levels of permissions.
    Level 1, Level 2, Level 3

    For resident plots
    Level 1 - friends
    Level 2 - plot owner's allies (if the plot owner belongs to the town, then this would include the residents of that town)
    Level 3 - non allies of the owner.

    For town area
    Level 1 - residents
    Level 2 - town allies (other towns in nation, nation's allies)
    Level 3 - outsiders (non allies)

    The way i have it set up codewise was that I copied alot of stuff from town permissions and am using alot of code for plot permissions that was origionally for towns permissions.
     
  19. Offline

    AnjoCaido

    Thank you for your answer.

    Your plugin rocks!... I feel bad that this error happens... but I can live with it.

    I'll try to take a look at the code... and maybe I fork it, to solve the error, if I find it easy... because I just installed Towny, so it won't be a big loss for me.

    I agree that is easier to deal with a minor problem now that everyone is used to it.
     
  20. Offline

    jarland

    Alright that makes sense. Much appreciated!
     
  21. Offline

    Shade

    You sure? Can you send me the console statements with debug mode on?
     
  22. Offline

    sillyrosster

    I redownloaded it and updated craftbukkit and it seems to be working so far. Hopefully nothing happens if I do /t spawn in the other world. If something does I'll tell you.
     
  23. Offline

    M1sT3rM4n

    @Shade well you could have at least told me that 10 pages ago :p. I am not a developer so I can't delve into more coded detail than what I can see with my eyes.
     
  24. Offline

    AnjoCaido

    I figure out the error. I fixed the math for negative values. But now I used some bukkit properties to even not use any math in some cases. (parseCoord with Locations, Entities and Blocks)
    So it might even have little better performance for BIG servers.

    Anyone who wants the fix, just replace some code of ca.xshade.bukkit.towny.object.Coord.java... with this code....
    Code:
        public static Coord parseCoord(int x, int z) {
            int xresult = x / getCellSize();
            int zresult = z / getCellSize();
            boolean xneedfix = ((x % getCellSize())!=0);
            boolean zneedfix = ((z % getCellSize())!=0);
            return new Coord(xresult - ((x < 0 && xneedfix) ? 1 : 0),
                    zresult - ((z < 0 && zneedfix) ? 1 : 0));
        }
    
        public static Coord parseCoord(Entity entity) {
            Chunk c = entity.getWorld().getChunkAt(entity.getLocation());
            return new Coord(c.getX(), c.getZ());
        }
    
        public static Coord parseCoord(Location loc) {
            Chunk c = loc.getWorld().getChunkAt(loc);
            return new Coord(c.getX(), c.getZ());
        }
    
        public static Coord parseCoord(Block block) {
            Chunk c = block.getWorld().getChunkAt(block.getLocation());
            return new Coord(c.getX(), c.getZ());
        }
    Anyone interested in the fixed version:
    https://github.com/downloads/gmcouto/Towny/TownyFix.jar
    https://github.com/gmcouto/Towny

    I really changed only this file... and Ill keep the repository up-to-date with official Towny, only changing this file. If someday Shade is interested in fixing, I'll be honored if he merge this.

    ---
    BTW... I'm really loving your plugin. Keep it up!
     
  25. Offline

    NotYetRated

    Yeah the torches are not coming back. I have tested this with a few different users all of different town/nation status.

    Thanks for the quick replies and awesome plugin!
     
  26. Offline

    HanzoSanada

    If you can, HOW is what I meant.
     
  27. Offline

    M1sT3rM4n

    Can you tell me how this fix applies to the plugin? IE what happens to negative values of money or blocks claimed etc? I am code-blind :p
     
  28. Offline

    Shade

    When inside his town, use /town here to check:
    B=ra0 ...
    Make sure all of those have the letter a. This is the respective permission to let your allies use the permissions.
    Have him use /town set perm ally on

    Oh god.

    yes. Anyone with towny.wild.block.17.destroy should be able to destroy logs in the wild, but not build. If you get anything otherwise, tell me.

    What was the name of the town? If the name isn't in towns.txt, reloading the plugin should work.

    There is not.

    I think you can add them. Not 100%. If that doesn't work, then no, I am not going to attempt at what other plugins do better.

    Hmmm good point.


    What happens beforehand? Was it after the town was taxed (after a new day)?

    I'm changing the way it's done in v54. Tell me if it fixes this.
     
  29. Offline

    AnjoCaido

    It only affects the TownBlock coodinates...
     
  30. Offline

    Shade

    I wouldn't mind, so long as I knew people wouldn't get pissed off if all plots in those negative planes (3/4 of worldspace) shifted by 1 block. So, i'll put it in the news. If anyone responds that it's a terrible idea, I won't.
     
  31. Offline

    AnjoCaido

    I just did it to use my custom plugin... which marks chunks boundaries with wool. Somehow, it sounded easier to fix that object than making my plugin to understand what your plugin did... to place the wool on the right spot.
     
Thread Status:
Not open for further replies.

Share This Page