[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. If i set a cost for a ts and a player uses it he dont lose money.
     
  3. Offline

    ben1996123

    When I try to set the cost, this happens:

    Code:
    
    2011-04-12 01:23:06 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to Turnstile
    java.lang.NoClassDefFoundError: cosine/boseconomy/BOSEconomy
    	at turnstile.TurnstileMain.isBankOwner(TurnstileMain.java:214)
    	at turnstile.Turnstile.isOwner(Turnstile.java:283)
    	at turnstile.TurnstilePlayerListener.onPlayerCommandPreprocess(TurnstilePlayerListener.java:99)
    	at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:228)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
    	at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:588)
    	at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:559)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:553)
    	at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    	at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.ClassNotFoundException: cosine.boseconomy.BOSEconomy
    	at java.net.URLClassLoader$1.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(Unknown Source)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	... 16 more
    EDIT: Using craftbukkit 670
     
  4. Offline

    bfanboy

    CB 670 and user reports no money is transferred and turnstile does not open

    Code:
    15:43:51 [SEVERE] Could not pass event PLAYER_INTERACT to Turnstile
    java.lang.NullPointerException
            at turnstile.TurnstileMain.charge(TurnstileMain.java:163)
            at turnstile.Turnstile.checkBalance(Turnstile.java:84)
            at turnstile.TurnstilePlayerListener.onPlayerInteract(TurnstilePlayerLis
    tener.java:289)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.ja
    va:252)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:208
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:447)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    15:44:02 [INFO] t
    15:44:06 [INFO] money
    15:44:09 [INFO] t
    15:44:28 [INFO] [g] [Fanlandia][Regia][Mayor]Brooks: money didnt go into bank an
    d the turnstile didnt open
    15:44:34 [INFO] t withdraw 100
    15:44:34 [INFO] [Town Msg] Regia: mcsox14 withdrew 100 from the town bank.
    15:44:37 [SEVERE] Could not pass event PLAYER_INTERACT to Turnstile
    java.lang.NullPointerException
            at turnstile.TurnstileMain.charge(TurnstileMain.java:163)
            at turnstile.Turnstile.checkBalance(Turnstile.java:84)
            at turnstile.TurnstilePlayerListener.onPlayerInteract(TurnstilePlayerLis
    tener.java:289)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.ja
    va:252)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:208
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:447)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    15:44:44 [INFO] t
    15:44:50 [INFO] money
    15:44:54 [SEVERE] Could not pass event PLAYER_INTERACT to Turnstile
    java.lang.NullPointerException
            at turnstile.TurnstileMain.charge(TurnstileMain.java:163)
            at turnstile.Turnstile.checkBalance(Turnstile.java:84)
            at turnstile.TurnstilePlayerListener.onPlayerInteract(TurnstilePlayerLis
    tener.java:289)
            at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.ja
    va:252)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:255)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:162)
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:208
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:447)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:198)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:72)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:368)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    
     
  5. Offline

    andrewkm

    Essentials economy support?
     
  6. is it possible to stop people using /jump through the door? or could you make it so you can choose between fence or a door
     
  7. Offline

    Codisimus

    stack two fences?
     
  8. does that work? it wouldnt let me link link two fences to one button? i think i door would be cool but watever just a suggestion, appreciate the plugin
     
  9. Offline

    Codisimus

    i could proly add a door option, or double height fence, or double height glass. but it wont be for at least a couple of days
     
  10. Offline

    Juze

    Please update to latest RB and test it.
     
  11. Offline

    beastsniper

    thank you =) i will try this right now

    Edit: works GREAT just set it up on my server :)
     
  12. Offline

    Gritten

    Why is this plugin listed as inactive now?!?
     
  13. Offline

    Codisimus

    @bfanboy
    @ben1996123
    @iCandyz
    All previous issues should be fixed in latest version

    @Raphnika

    Finally updated


    i tried doing this b4 and couldn't figure it out

    Tested against 677, works and updated.

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

    Travis_Hironak

    Do you intend to add custom messages ? I have a french server so I would like to be able to translate everything for my players.

    I noticed a little problem (not a big deal though), if a player own a turnstile, he will be paid with money if someone uses it, but if it's a chest which is linked to the turnstile and not a button, he won't be paid with items.

    Except that, everything is fine and works perfectly (cb677). Thanks for this plugin. :)

    By the way, nice tutorial island ;).
     
  15. Offline

    Codisimus

    i meant to add the pay with items, ill get around to that. as for the custom messages, im adding therm for some of my other plugins so im sure i can do the same for this one
     
  16. Offline

    Travis_Hironak

    Thanks. :)
     
  17. Offline

    xlilcasper

    Found a bug, I am using Towny mod and I set the bank for the turnstile to the towns bank (town-Lumos) and it started having issues. I couldn't use the turnstile nor could I delete it. Had to go in and remove the .save file. I think it has issues if there is a - in the bank name.

    ***Edit***
    Also, when using essentials /reload command, Turnstile quits working. I'm thinking onDisable is not implimented?
     
  18. Offline

    xlilcasper

    Also if the server is force quit it seems that Turnstiles don't load right. The turnstiles exist but clicking linked buttons no longer works. I have to delete them all and remake them. Here is the save file it has made.

    Code:
    LumosGraveyard;0;0;0;0;xlilcasper;Trinculo;18;71;-398;
    16:72:-397;
    LumosMine;5;0;0;0;bank:test;Trinculo;65;67;-370;
    64:68:-369;
    LumosMineExit;0;0;0;0;xlilcasper;Trinculo;64;67;-371;
    65:67:-372;
    
    Might also suggest a reload command for the plugin? one that would reload the save file?

    Did some more testing, this is not loading right even when I do /stop on the server

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

    Codisimus

    I am fixing this for my PhatLoots plugin and will then be implementing it into all my other plugins. I appreciate the testing you are doing
     
  20. Offline

    xlilcasper

    Great. I use both plugins and eagerly await your update.
     
  21. Offline

    Liger_XT5

    Thought I'd pass some humor to ya. Even though I announced to the members of my server that TurnStiles are partly working, they keep trying to use them and expect me to keep giving them refunds lol.
    CB 70(5?)
     
  22. Offline

    ryguy222

    Yeah same, it takes there money but doesn't let em in xD
     
  23. Offline

    ollyjohnston

    yea same... Build 709
     
  24. Offline

    LucidLethargy

    Can't wait for the 1.5 update (free stiles work, but paid ones do not!) this is definitely one of my essential plugins on my server though, awesome work! :p

    Edit: Working on CB 714! :D
     
  25. Offline

    AngryBird

    I have a little issue here: When other people than me try to use the turnstile, it says something about they dont have permission to do that. How to fix that?
     
  26. Offline

    SoulKnife

    works this with the newest bukkit server version?
     
  27. Offline

    leslieliang

    Works with 705. Using any method to open the Turnstile will open fence, but graphically, the fence is still there. You have to place a block next to it for the fence to disappear. When the fence is gone, after placing a block next to it, you can walk through it, but after you walk through it the fence stays hidden. You have to place a block next to or on top of where the fence should be to see the fence again. I believe this is a fault with 1.5, but maybe there is a fix for it.
     
  28. Offline

    slay_mithos

    I would love to be able to set the price, but only send redstone signal when money is paid, is there any chance for it to be possible?
     
  29. Offline

    Codisimus

    yes I already fixed this, will be in next update
     
  30. Offline

    Funkfoose

    Hey, been using turnstile for quite a while now, love it. Just had a thought that might be cool, not sure if it could be implemented though. I have portal towers around my world that bring the users back to the main city, these towers are only one-way into the city, I'm using a turnstile to charge when leaving the tower, if a player hasn't got the funds to leave, I'd like to be able to take a percentage or fixed amount of health. (Percentage if I'm feeling nice, or fixed amount if I don't mind that a player might die if that haven't got much health).

    Just a thought, cheers again for the excellent work with this and phatloots and dungeons rewards, there all been great to have on my server.
     
  31. Offline

    Codisimus

    There is an option of clearing a users balance when they want to use the turnstile. (perhaps two buttons, one for 100 coins, and one which simply takes all your money in case you can't afford the 100 coins) As for charging health I guess I can look into it but I have to finish updating my plugins to 1.5 first (Turnstile will be updated tonight)
     

Share This Page