[RPG/MECH] Turnstile v1.9.1 - Charge players money/items to enter an area [953]

Discussion in 'Inactive/Unsupported Plugins' started by Codisimus, Mar 15, 2011.

  1. Offline

    Codisimus

    This page will no longer be updated. Please follow this project at the Bukkit Dev Page

    Turnstile - Charge players money/items to enter an area:
    Version: 1.9.1 (7/16/2011)
    Supports iConomy, BOSEconomy, Essentials, Permissions
    Download Page

    This plugin is used to create a Turnstile to prevent players from entering certain locations without paying money/items.

    The Turnstile is made up of a fence block, this block will disappear when a linked button is clicked. The block will reappear when walked through or after a certain amount of time. Money is deducted from the user when they press the button (or walk through the Turnstile if 'NoFraud' is set to true in the config). All money deducted is given to the owner/bank of the Turnstile.

    Turnstiles can also charge items by linking a chest instead of a button. Put the required item in and punch the chest to open the Turnstile.

    Format of Save file:
    Show Spoiler

    Code:
    DreknorIn;1;4;13;2;scudmaster;Codys_World;-174;55;-102;
    -175:55:-101;-174:55:-99;
    
    [Name];[Price];[Earned];[ItemID.Damage Value];[Amount of item];[Owner];[WorldName][x];[y];[z](of location of Turnstile);
    [x];[y];[z](of location of linked button/chest);[x];[y];[z] (of location of linked button/chest);

    Features:
    • Configurable properties.
    • Custom messages
    • No Fraud mode (Turnstile doesn't charge until walked through)
    • Restrict use of a specific Turnstile to a certain group
    • Make a Turnstile Free or Locked during a certain time of day
    • Autoclose timer
    • Create private Turnstiles only you can use
    • Only owners and admins can destroy Turnstile blocks, buttons, and chests
    • Edit turnstiles easily in game or in the save file
    • Only the owner/bank owner can edit a turnstile
    • Turnstiles can charge specific items instead of money
    • Durability support
    • Turnstiles can also be free to use
    • Charge users money to create turnstiles
    • Set different Turnstiles to unique prices and owners/banks
    • List and locate Turnstiles
    • MultiWorld support
    • Uses iConomy, BOSEconomy or Essentials to charge users money
    • Permissions to limit players from using turnstiles, for all commands (except help), and for admins
    • Included in CraftBukkitUpToDate for easy updating (make sure you come check the changelog if somthing is not working right)
    Commands:
    Commands can be written as /turnstile or /ts
    Show Spoiler

    • /ts make [Name] - Make target fence block into a Turnstile
    • /ts link [Name] - Link target block with Turnstile
    • /ts rename [Name] [NewName] - Renames the Turnstile
    • /ts unlink [Name] - Unlink target block with Turnstile
    • /ts delete [Name] - Delete Turnstile and unlink blocks
    • /ts price [Name] [Price] - Set cost of Turnstile
    • /ts price [Name] [ItemID(.Damage)] [Amount] - Set cost to item
    • /ts access [Name] public - Allow anyone to open the Turnstile
    • /ts access [Name] private - Allow only the owner to open
    • /ts access [Name] [Group] - Allow only specific Group to open
    • /ts free [Name] [TimeStart-TimeEnd] - Free during timespan
    • /ts locked [Name] [TimeStart-TimeEnd] - Locked during timespan
    • /ts earned [Name] - Display money the Turnstile earned
    • /ts collect - Retrieve items from the target Turnstile chest
    • /ts owner [Name] [Player] - Send money for Turnstile to Player
    • /ts bank [Name] [Player] - Send money for Turnstile to Bank
    • /ts list - List all Turnstiles
    • /ts info - Gives info of Turnstile
    • /ts help - Displays Turnstile help page

    Permission Nodes:
    Show Spoiler

    • turnstile.open - Needed to be able to activate Turnstiles
    • turnstile.openfree - Player/Group is not charged to open Turnstiles
    • turnstile.make - Needed to make/link/unlink/delete Turnstiles
    • turnstile.makefree - Player/Group is not charged to make Turnstiles
    • turnstile.set.free - Allows Player/Group to use /ts free
    • turnstile.set.locked - Allows Player/Group to use /ts locked
    • turnstile.set.price - Allows Player/Group to use /ts price
    • turnstile.set.owner - Allows Player/Group to use /ts owner
    • turnstile.set.access - Allows Player/Group to use /ts access
    • turnstile.set.bank - Allows Player/Group to use /ts bank
    • turnstile.earned - Allows Player/Group to use /ts earned
    • turnstile.admin.list - Allows Player/Group to use /ts list
    • turnstile.admin.info - Allows Player/Group to use /ts info
    • turnstile.admin.ignoreowner - Player/Group can edit any Turnstile regardless of being the owner

    Tutorial:
    NOTE: New Tutorial video, Please watch before asking questions.




    ToDo:
    • Send items to owner
    • Add option of using a door instead of a fence block
    • Add pressure plate support
    Changelog:
    Old Versions + ChangeLog can be found at Download Page
    Show Spoiler

    Version 1.9.1 (7/16/2011)
    • Added rename command
    • Now allows multiple Turnstiles per block
    • Fixed Access
    • Added color support for all customizable messages
    Version 1.9 (6/26/2011)
    • Improved OP options
    • Updated Economy support
    • Fixed collect command
    • Added option of door instead of block
    • Added pressure plate support
    Version 1.8 (6/12/2011)
    • Cleaned up code/fixed errors
    • Added /ts collect command to retrieve earned items
    Version 1.7.6 (6/4/2011)
    • Cleaned up errors and added error messages
    Version 1.7.5 (6/3/2011)
    • Various fixes and code cleanup
    Version 1.7.4 (6/3/2011)
    • Added Essentials econ support
    Version 1.7.3 (5/20/2011)
    • Fixed durability support
    Version 1.7.2 (5/20/2011)
    • Added decimal support
    Version 1.7.1 (5/16/2011)
    • Readded the useOpenFreeNode and useMakeFreeNode options in config
    Version 1.7 (5/15/2011)
    • Changed permission nodes
    • Allow right clicking a button to open
    • Made Turnstiles unbreakable
    • Added command to allow group specific Turnstiles
    Version 1.6.1 (5/4/2011)
    • Updated to iConomy 5
    • Few various fixes
    Version 1.6 (4/29/2011)
    • Added durability support
    • Added custom messages
    • Fixed reload issues
    • Added No Fraud mode (Turnstile charges when walked through)
    • Added option to restrict use of a specific Turnstile to a certain group
    • Added option of making a Turnstile Free or Locked during a certain time of day
    • Added autoclose timer
    Version 1.5 (4/15/2011)
    • Improved multiworld support
    • Other various fixes
    Version 1.4.3 (4/4/2011)
    • Fixed isOp() conflicting with Permissions
    Version 1.4.2 (3/31/2011)
    • Few minor fixes
    • Works with build #612
    Version 1.4.1 (3/30/2011)
    • Can now use with left or right hand
    Version 1.4 (3/30/2011)
    • Fixed turnstile creation
    Version 1.3.3 (3/30/2011)
    • Updated to build #602
    • Changed the way you create turnstiles. Now you must target the fence block that will become a Turnstile
    Version 1.3.2 (3/28/2011)
    • Added private Turnstiles, Set price to -808 to make it so only the owner can enter
    Version 1.3.1 (3/28/2011)
    • Fixed error of crashing if owners name is < 5 letters long
    Version 1.3 (3/26/2011)
    • Added protection for Turnstile blocks, buttons, and chests
    Version 1.2.1 (3/24/2011)
    • Various fixes
    Version 1.2 (3/23/2011)
    • Fixed multiworld support
    Version 1.1 (3/23/2011)
    • Fixed paying with items not opening Turnstile
    Version 1.0 (3/23/2011)
    • Added an autoclose timer (set to -1 as default in config file meaning it will stay open until walked through)
    • Added '/ts earned [Name]' command (no permission node)
    • Fixed config
    • Added option of setting price to all (saved as -411 in save file) which will clear a players balance as the cost
    • Fixed error of turnstile opening without enough money
    • Fixed permissions reload
    • Fixed/added lots of other things I can't even remember
    Version 0.9 (3/22/2011)
    • Fixed error of no confirmation messages for iConomy
    • Added a check to make sure the balance has enough money
    • Implemented option of paying with a specific item
    • Added config file with the following options
      • CostToMakeTurnstile=0
      • useIgnorePriceNode=False
      • useIgnoreCostNode=False
    Version 0.8.3 (3/19/2011)
    • Fixed unknown command spamming chat
    • Fixed no Economy message spamming
    • Changed /ts locate to /ts info (turnstile.admin.info)
    Version 0.8.2 (3/19/2011)
    • Added multiworld support (you must rename save files to Turnstile[WorldName].save or turnstiles will not be loaded)
    Version 0.8.1 (3/18/2011)
    • Fixed /ts bank not working
    • Added /ts bank to help page
    • /ts bank now only works with BOSEconomy linked
    Version 0.8 (3/18/2011)
    • Added support for BOSEconomy banks
    • New node turnstile.admin.bank
    • New command /ts bank [Name] [Bank]
    Version 0.7.1 (3/17/2011)
    • Mispelled commands display help screen
    • If owner is set to "server" then money is not added or deducted from the owner
    • Button now only works when turnstile is closed
    Version 0.7 (3/17/2011)
    • Turnstile now closes after being walked through
    • Fixed error of "Turnstile successfully loaded with Permissions!" being displayed multiple times
    Version 0.6.1 (3/16/2011)
    • Fixed error that Permissions was required
    Version 0.6 (3/16/2011)
    • Added support for Permissions
    Version 0.5 (3/16/2011)
    Version 0.4 (3/15/2011)
    • Limited commands to the owner of the turnstile
    • Other various fixes
    Version 0.3 (3/15/2011)
    • Initial Release
     
  2. Offline

    Travis_Hironak

    Ok, thanks :).
     
  3. Offline

    Zaros

    I'm getting a few errors.

    Show Spoiler
    Code:
    14:23:48 [SEVERE] null loading Turnstile v1.0 (Is it up to date?)
    java.lang.NumberFormatException: null
            at java.lang.Integer.parseInt(Unknown Source)
            at java.lang.Integer.parseInt(Unknown Source)
            at turnstile.TurnstileMain.onEnable(TurnstileMain.java:91)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:451)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:217)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:92)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:70)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)


    Plugins:
    Show Spoiler

    • AutoStop
    • Craftbook
    • CraftBukkitUpToDate
    • HeroicDeath
    • HeroicRebuke
    • iChat
    • iConomy
    • iZone
    • MCDocs
    • milkAdmin
    • NoCheatPlugin
    • Permissions
    • PermissionsPlus
    • scrapbukkit
    • Spawnlist
    • Towny
    • Turnstile
    • WorldEdit


    Is my craftbukkit not up to date enough? CraftBukkitUpToDate would have told me, but it hasn't
     
  4. Offline

    Codisimus

    @Zaros
     
  5. Offline

    Zaros

    Config deletion worked like a dream. Sorry about my horrible 'read previous posts before asking' skills.
     
  6. Offline

    Codisimus

    I don't really mind, that usually means ik how to fix it =P
     
  7. Offline

    MationMac

    Purrfect. Was considering just that plugin after askin'!
     
  8. Offline

    Jellifish

    Hmm, this plugin has crashed my server completely! Using Crafbukket 556 with Essentials 2.0.300 it appears that the .save files are being constantly re-written to with the same data over and over again. They have reached 4.4M (163,842 lines long) and I only have 5 turnstiles, and this has brought the server to a complete standstill. I've removed Turnstile.jar and all is fine again. Why are these files getting constantly re-written to with the same information over and over?! Not only that, I have four worlds, and I only am using the turnstiles in my main world, but all the worlds have the .save file, and each of these is also exactly the same, 4.4M and 163,842 lines long!!)
    Is there a conflict with Essentials 2.0.300 because I only just upgraded to this from 2.0.249 and I have only just noticed this problem since (although maybe it just took some time for the files to reach such a huge size)

    I'm also getting this on start up:-

    Code:
    2011-03-23 22:31:29 [SEVERE] null loading Turnstile v1.0 (Is it up to date?)
    java.lang.NumberFormatException: null
            at java.lang.Integer.parseInt(Integer.java:417)
            at java.lang.Integer.parseInt(Integer.java:499)
            at turnstile.TurnstileMain.onEnable(TurnstileMain.java:91)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:92)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:70)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  9. Offline

    Codisimus

    @Jellifish
    can you show me your config file and save files (at least a couple lines each)
     
  10. Offline

    Jellifish

    Erm, config file? Which one? Also I deleted the save files and tried from scratch and I still go the same problems.
     
  11. Offline

    Codisimus

    @Jellifish
    it should be config.properties in the same folder as the save files
     
  12. Offline

    Jellifish

    I noticed something about a config file here, and it says if you don't have one to download it from the downloads page, but I can't see a config file on the downloads page. Are my problems just because I don't have a config file? Does it not auto-generate everything it needs on first run if I remove the old Turnstile directory?
     
  13. Offline

    Codisimus

    @Jellifish
    Version 1.0 will auto generate all the files it needs, if you are using v0.9 then you proly have lost of problems bc that release was a mess
     
  14. Offline

    Jellifish

    I should probably note, I upgraded from 0.83 to v1 directly. I added four lots of 0;0;0;0 to my save files. But when things started going strange, I just stopped the server, removed the Turnstile directory, and started again. It was after that, I still got no config file, and I got this strange looping file appending going on when I tried to add back my turnstiles. I'll try again I think. Maybe it was the order I stopped/started the server and the order I moved and removed files etc. that got things confused.
     
  15. Offline

    Codisimus

    @Jellifish
    umm i believe you were suppose to add 3 as in "0;0;0;" and you must edit the file while the server is down (bc it will save over it when shutting down.)
     
  16. Offline

    Jellifish

    Nope, I'm using version 1, At least...hmmm, now you're making me wonder...I downloaded version 1.00 I'm sure...

    md5sum Turnstile.jar
    1da226e225bfd9f57e1300450328c5aa Turnstile.jar

    It's not creating any config file and it is still giving the above error on start up.

    OK just to clarify. I'm downloading version 1 from your download page, I'm deleting the Turnstile directory (to start over, cos I only have 5 turnstiles anyway and I can recreate them). I'm starting up and getting the above error, and it's generating the directory and four blank .save files (one for each of my worlds) but no config file. I'm stopping, and starting again and it is still not creating the .config file. Do I need to create a turnstile in order for the config file to create? Should I be worried about the error?
    [SEVERE] null loading Turnstile v1.0 (Is it up to date?)
    java.lang.NumberFormatException: null

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

    Codisimus

    hmm it always creates the files fine for me... hold on im gonna give you a different jar to test it
     
  18. Offline

    riuthamus

    Sorry i have been out for the past few days, ill give your plugin a try tonight, and if it works all good, ill make a full tutorial on all the features like we talked about.
     
  19. Offline

    Codisimus

    @Jellifish
    Turnstile.Jar
    Download and install that and show me the error it gives

    thanks that would be great, maybe show editing the save file too? i could explain to you wut each value is

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

    Jellifish

    2011-03-24 00:41:57 [INFO] 0
    2011-03-24 00:41:57 [INFO] 0
    2011-03-24 00:41:57 [INFO] 0
    2011-03-24 00:41:57 [INFO] 0
    2011-03-24 00:41:57 [INFO] 1
    2011-03-24 00:41:57 [INFO] 2
    2011-03-24 00:41:57 [INFO] 3
    2011-03-24 00:41:57 [INFO] 8
    2011-03-24 00:41:57 [INFO] 9
    2011-03-24 00:41:57 [INFO] 10
    2011-03-24 00:41:57 [INFO] 11
    2011-03-24 00:41:57 [SEVERE] null loading Turnstile v1.0 (Is it up to date?)
    java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:417)
    at java.lang.Integer.parseInt(Integer.java:499)
    at turnstile.TurnstileMain.onEnable(TurnstileMain.java:102)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
    at org.bukkit.plugin.SimplePluginM
     
  21. Offline

    Codisimus

    thats with no Turnstile directory?

    config
    try using that. should get rid of errors. and show me if it still is saving the files wrong

    EDIT: make sure you change it to config.properties

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

    riuthamus

    send me a PM on the forum with the value meanings, although I am sure I can figure them out on my own, and ill add that in there. Ill be going over setup, modifying data, creation of portals, and that should be it.
     
  23. Offline

    Codisimus

    Update!
    fixed paying with items
     
  24. Offline

    Jellifish

    Still getting the same error on start up, but so far the save file is working as it should do now.

    And on stop and start, it is generating all my world files with the same info in them. Is that normal behaviour? so turnstilehell.save gets the contents of turnstileworld.save etc.

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

    Codisimus

    @Jellifish
    are you sure its the exact same error after adding the config file. and i dont have multiworld so i cant really test it but ill look at the code
     
  26. Offline

    Jellifish

    This is what I get on start up (with the config file with the correct name etc.)
    Code:
    2011-03-24 01:35:04 [INFO] 9
    2011-03-24 01:35:04 [INFO] 10
    2011-03-24 01:35:04 [INFO] 11
    2011-03-24 01:35:04 [SEVERE] null loading Turnstile v1.0 (Is it up to date?)
    java.lang.NumberFormatException: null
            at java.lang.Integer.parseInt(Integer.java:417)
            at java.lang.Integer.parseInt(Integer.java:499)
            at turnstile.TurnstileMain.onEnable(TurnstileMain.java:102)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:92)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:70)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
     
  27. Offline

    Codisimus

    ok Version 1.2 should be pretty stable, to fix save file look at the spoiler in original post (you now need to add the WorldName) and your save file should be Turnstile.save (no longer a separate file for each world)
     
  28. Offline

    Jellifish

    Hmm, still getting the same error on start up, although the download page says 1.2 the plugin reports 1.1 when starting
     
  29. Offline

    Codisimus

    it is 1.2 just forgot to change the number. are any features not working?
     
  30. Offline

    axebyte

    tried 1.0 1.1 and 1.2 getting the same thing as earlier all on three.
    For me nothing is working at all.
    (i also see no config file)
    If i clean install it (remove everything i error out as above)
    If i leave the files in there (it wipes the turnstileworld.save out to size 0 erased and errors out as above)
    If i put it back in it erases it again, if i do reload all after putting the file in, same thing.

    .9 will still load fine though!! even though i have taken it completely out right now.
    556jnk bukkit <-- i doubled checked :D
     
  31. Offline

    Codisimus

    Install this Jar (delete turnstile folder) and post the error that shows up.
     

Share This Page