[SEC/FUN/INFO] Towny v0.68 Fuzze Edition [818]

Discussion in 'Inactive/Unsupported Plugins' started by FuzzeWuzze, Apr 10, 2011.

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

    FuzzeWuzze

    Towny_FuzzeEdition:
    Version: v0.68

    Moderator Edit: Please direct your attention here for an updated version. This thread is now closed due to people spamming random things about how its not working.

    So this has been asked for many times so i decided to finally make this thread.
    This is related to Shade's brilliant Plugin Towny

    Since Shade has been MIA for a while now, and we dont know if hes coming back i've been trying to keep Towny afloat as best i can in hopes he does come back as i dont really have the RL schedule to much of anything other than maintain it to be usable.

    I hope in June once i have more free time if Shade still isnt back :'( to actually do a formal Github Fork and continue the project. So until then, dont bother asking for new features, as time allows the only thing i'll try to do is fix large glaring bugs that effect the mod. This is a very large plugin and Shade has spent a lot of time on it, so even when/if i do fork it will take some time to get fully up to speed on everything. For now i just have a basic understanding of how everything is interacting and enough debug skills to track down most bugs ;)

    How it works/Features
    -See Original Towny Page for Instructions on how to setup and Permissions.
    http://towny.xshade.ca/

    Read this page to learn what everything in the config does!
    http://towny.xshade.ca/configuration/config-values

    READ ME BEFORE POSTING BUGS OR ISSUES
    KNOWN "ISSUES" AND FIXES
    When reporting bugs, please use /townyadmin set debugmode on. Then perform the action and post or send me the log from your server. This will assist me in being able to fix the issue 10 faster, just simply saying "People can do X in my town when they shouldnt be able too" doesnt really help me at all and is impossible to replicate.
    • Permission cache errors
      • You didnt install Permissions properly, it creates a RENAMEME.yml file or something of the like when first started. This must be renamed to match your world name(for most people world.yml). Also you CANNOT have spaces in your world name. Test World is not an acceptable folder name, TestWorld is. Both towny and permissions dont like the Permissions YML file to have spaces.
    • /town top money causes exception
      • Your iConomy database is likely setup to still use sqlite. Ensure that your iConomy config file is setup to use database Type: H2SQL. A lot of people had issues with the sqlite to H2 conversion, if you still experience this error with it set properly your db may be corrupt. Back up your iConomy db and configs, then delete them all and allow iConomy to recreate them and see if it still happens. If it doesnt, your going to have to manually regrant people cash somehow as your iConomy database was corrupt.
    Permissions
    • 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.
    GitHub
    https://github.com/fuzzewuzze/Towny

    IMPORTANT INFORMATION-READ ME BEFORE UPDATING PAST .63
    All versions .64 and after will require iConomy 5.0 and higher. When making this initial transition it is HEAVILY advised that you back up your h2 and MySQL database's. I tested as well as i could with various functionality within Towny and it seemed to be working as expected. Also note that a ton of plugins that use iConomy are still broken, so unless they ALL work i wouldnt suggest updating. You've been warned. Dont cry if something bad happens and you dont have a backup of your iConomy database ...
    • PLUGINS COMPILED/TESTED AGAINST(Recommended Versions)
      • Essentials 2.2
      • Permissions 2.7.4(DO NOT USE 3.X!)
      • iConomy 5.01
    • (JAR ONLY) Latest Build(.68) HERE
    IMPORTANT INFORMATION-READ ME BEFORE UPDATING PAST .63
    • V.61
    TODO:


    • Fix /towny top money from crashing towny
    • Investigate potential issues with build/destroy permissions.
    BUGS:

    • /town spawn will not charge players
    • DO NOT GIVE PLAYERS TOWNY.WILD.* permissions. Give players permissions by editing your config file by editing these. If players have wild permissions they can do funny business to get permission to build in other peoples towns.
      unclaimed_zone_build=false
      unclaimed_zone_destroy=false
      unclaimed_zone_item_use=false
      unclaimed_zone_switch=true
    • Some people are reporting a lot of [SEVERE] warnings related to Player_Item and Player_Move, i believe these are being triggered by other mods. If you are having this issue please list your other plugins.
    Changelog:

    Version .68
    • Compiled for CB818 (Minecraft 1.6.6)
    • Disabled town renaming (finally)
    • Do not use Permissions 3.0.x with Towny yet, there are still some MAJOR issues with the rework they are doing and a ton of people are nerd raging on their thread. I couldnt even get it to create my config or default files they were always blank, and i guess a ton of other people are having the same issues. Still didnt work when following instructions on how to make the file yourself. Because 2.7.4 works perfectly fine with CB818 im not in a rush to upgrade until they figure out their issues. Sorry if this causes plugin conflicts if some require Permissions 3.x but i doubt it will as not many mods are moving to it in its badly broken state. Because Towny is so heavily dependent on a lot of Permissions nodes being read properly i decided to stick with 2.7.4 for now. Ill work on a 3.x permissions build as soon as i feel its functioning properly.
    Version .66
    • Compiled for CB766
    • Players no longer need to /town set spawn, when a player does /town spawn they automatically go back to their town. Need to figure out how to re-implement the essentials teleport timer cooldown they changed their API
    Version .64
    • Updated to use iConomy 5.0+, BACKUP YOUR DATABASE FILES BEFORE UPGRADING.
    Version .63
    • Really fixed /town spawn!
    Version .62
    • First Official Release by Fuzze!
    • Fixed /town spawn INVESTIGATING
    • Fixed /towny map
    • Verified all permissions are working properly. I ran it on my test server and tested resident build/destroy/switch and outsider build/destroy/switch by using /town set perm and turning them on and off and trying them out. ALL the permissions acted as they should. This should put to rest a lot of bugs people are having with people building. This doesnt mean Towny is using the default_town_build=false config lines properly for new towns, thats next. It does mean if your mayor sets the options manually it works.
    Version .061R6
    • Disabled /towny top money for towns/nations until able to fix bug related to null iConomy accounts, I have a feeling its related to iConomy databases that were SQLite and transitioned to H2 like my own. It *should* work fine for Residents, so far i havent seen null resident returns.
    Version 0.61R5


    • Updated to work with CB670
     
  2. Offline

    MacDizzy0

    how do you get the lord title to show up while chattin on the server
    cause i saw on different servers tht when u make a town u become lord
    n i was wondering is there a type of permissions node to do tht
    cause im stump on how to do tht for my server
     
  3. Offline

    SwearWord

    Should be automatic unless you're using some other chat plugin.
     
  4. Offline

    jayri

    actually i think it depends on the size of the town and if your the head of a small nation. or something to that effect
     
  5. Offline

    MacDizzy0

    im using ichat plugin
    n my town im using is jus a town i made for my spawn so no one will break the stuff
    r those ny of the reason?
     
  6. Offline

    jayri

    um what? I didn't understand a word you said.
     
  7. Offline

    MacDizzy0

    Sorry for my bad grammar.
    The chat plugin i'm using right now is ichat and could that be the problem.
    And
    I made a tiny town just for my spawn so randoms won't break.
    so could that be that my town is just too small for me to get that titlle
     
  8. Offline

    jayri

    yeah, its too small
     
  9. Offline

    MacDizzy0

    rly
    aww o well
    is ichat the problem too
    srry for the other post my computer lagg up n didnt show it so i had to repost
    but then found out tht it did post
     
  10. Offline

    jayri

    like i said its probably too small, and i dont have any experience with i chat
     
  11. Offline

    MacDizzy0

    any ways ty for your help
    o well it dont matter nyway i was trying to make sure tht it wasnt ny of my plugins tht was meesin wit it
    its jus the fact tht my town is too small
    well
    ill make a new town
    ty
     
  12. Offline

    jayri

    no prob. and try to work on that grammar. >v>
     
  13. Offline

    MacDizzy0

    LoL,
    OkeyDokey Artichoke
     
  14. Offline

    croxis

    @SwearWord I'm trying to track down the towny.wild.* permission issues. It seems like the issue is that entering the town does not flip the being in wild flag correctly in the player cache. When a player logs in another town they are unable to build, but if they leave and reenter they are. I'm going to add more debug code tomorrow to see if I can have a better understanding of what is going on.
     
  15. Can someone explain this wild flag issue in a bit of detail? Perhaps steps to recreate it?

    If it's simply having the wild.* flag allowing you to build anywhere in the wild, then that looks to be by design as you are giving ALL wild.block.blockID.action permisisons.
     
  16. Offline

    SwearWord

    @ElgarL @croxis

    This statement is returning true when it shouldn't:
    Code:
    if (status == TownBlockStatus.UNCLAIMED_ZONE && plugin.hasWildOverride(worldCoord.getWorld(), player, event.getBlock().getTypeId(), TownyPermission.ActionType.DESTROY))
    The first part status = TownBlockStatus.UNCLAIMED_ZONE should be returning false. I'm tracing it back now to see why it's returning true. I would compile this but my server uses Towny and I already make my users deal with enough plugin testing. I'll setup a local server later and test but I think we can figure this out just by looking at the code.

    Also this isn't a good place to do this, @croxis should start something in the development section.
     
  17. How do yo mena it's returnign incorrectly? I've looked over that code adn the functions it depends on.

    I need a real world example of this bug so I can replicate it.
     
  18. Offline

    SwearWord

    @ElgarL
    As croxis explained if you have the Permissions to build in wild and walk from a town into the wild, then walk back into the town, the plugin thinks you're still in the wild and gives you free reign. I haven't even tried to replicate it but I take his word that this is the problem.

    I figured out a quick fix, we can just manually update "status" with plugin.getStatusCache(player,worldCoord) before the above if statement. It completely undoes the efficiency written into the code but it should work for now.

    EDIT:
    I've replicated it, and in the process of fixing.

    More Info:
    References to cache refer to the cached variable of townblockstatus:
    The cache only updates when you break a block, etc. Walking into the wilderness and walking into a town will not trigger the bug since the cache is not updated. Walking into the wilderness and breaking a block will trigger a cache update saying the status of the current blocks is wilderness. Then when you walk back into a town and break a block the cache is not getting reset and using the old value.
     
  19. the odd thing is it should be going off the blocks location for permissions not the players (by the looks).
     
  20. Offline

    SwearWord

    @ElgarL
    I fixed it lol. ONE line of code to change. Here are the changes and the new compiled jar.

    In PlayerCache.java add the line: townBlockStatus = null;
    So it looks like this
    Code:
    private void reset() {
            lastTownBlock = null;
            buildPermission = null;
            destroyPermission = null;
            townBlockStatus = null;
            switchPermission = null;
            itemUsePermission = null;
            blockErrMsg = null;
        }
    I'm submitting a pull request to Croxis.
    FIXED WILD PERMISSION GLITCH: http://dl.dropbox.com/u/525461/Towny.jar

    You're using my NoEscape plugin. Denies teleporting in enemy towns. You're lucky I randomly saw this post.

    And don't worry I'm planning on making sure Towny stays alive, it's too beautifully made to let die.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 17, 2016
  21. I was going to say the error will be in this section not resttting the cache, but the null does it simpler :)

    public boolean updateCoord(WorldCoord pos) {
    if (!getLastTownBlock().equals(pos)) {
    setLastTownBlock(pos);
    return true;
    } else
    return false;
    }
     
  22. Offline

    SwearWord

    @ElgarL
    That does return true. The setLastTownBlock(pos) calls the reset() method up there. Glad it was an easy fix.
     
  23. Offline

    fatmarley

    @SwearWord

    Actually if you remember i couldnt get your plugin to work. The issue was the old towny suddenly stop loading permissions.

    Since the new quickfixes have come out, things are moving along.

    Nonetheless good to see you are contributing here. Maybe it will inspire you to go back to your jail mode.
     
  24. Good news, it also fixes the water/lava bucket and lighter bug.
     
  25. Offline

    Ryanc360

    I'm guessing towny still works with all the updated bukkit builds, aswell as the permissions update to go with it?
     
  26. Offline

    SwearWord

    @Ryanc360
    Croxis has added Permissions 3.0 and I have fixed the wilderness bugs. The "latest" version is a few posts above this, I posted a link.
     
  27. Offline

    croxis

    Last edited by a moderator: Jul 17, 2016
  28. Offline

    Ryanc360

    you gentlemen are amazing
     
  29. Offline

    Craig1690

    Hey this error is always in the console im on bukkit 953

    Code:
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            at java.lang.String.substring(String.java:1949)
            at ca.xshade.bukkit.towny.event.TownyPlayerListener.onPlayerChat(TownyPlayerListener.java:96)
            at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.java:279)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:681)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  30. Offline

    croxis

    please head over to the current thread
     
  31. Offline

    Dagumboss

    Hey, I just got this plugin for my server, but apparently only admins can delete towns. I've gone all over the config and permissions and read the FAQ and some posts here, but still can't find an answer.

    Help?
     
Thread Status:
Not open for further replies.

Share This Page