Inactive [MECH/FUN] ItemDetector v1.2 - An Item-detecting gate [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Streammz, Apr 25, 2011.

  1. ItemDetector - Gates which detect items
    Version: v1.2

    With this plugin, you can make item detecting gates, just like at the airports.
    It uses redstone, so combined with other plugins you can make traps, falls etc.
    On the end of this post there is an detailed instruction on how to create them.
    This uses NO commands.

    Features:
    • Creating gates which can be used to detect items
    • Redstone support by changing torches into redstone torches.
    • Detect multiple items (good for an pvp-zone to detect swords/bows etc)
    • Block people from entering with specific items
    • Minecart support
    • Clearing inventory's
    • Permission support
    • Message / kit support
    Download:

    V1.1 - Download
    V1.2 - Download
    Addon kit - Download
    ItemDetector is open source! (NO RE-RELEASES WITHOUT PERMISSION)

    Known bugs:
    If itemdetector is loaded before multiworlds, it will get a nullpointer and lose all data, to fix this rename the multiworld plugin to "aaaMultiWorld" and bukkit will load this plugin as first of all your plugin, this should also fix all other problems with other plugins
    Thanks to @Maxis010 for that

    How to create a gate:
    [torch][wood][torch] What you see to the left of here, is the framework of an gate
    [mossy][mossy] [mossy] The wood block left, is an sign with on the first line [detector],
    [mossy] -- [mossy] and on the second/third/fourth line should be the itemID's
    [mossy] -- [mossy] seperated by comma's.
    The script sees these lines as 1 line, so you should think its 1 line of 45 letters.

    How the #block (and future similair options) work:
    When you enter item id's on the 2nd/3th/4th line, it'll take those 3 lines and make it 1.
    If you enter the #block, the script will ignore that and make the gate blocking stuff.
    Here an quick example of what i mean (first is input, second is what script reads):
    Code:
    What you write on sign --- What script reads for item ID's
    
    #block1,2,3,4,5,6,7     -   1,2,3,4,5,6,7
    1,2,3#block,4,5,6,7     -   1,2,3,4,5,6,7
    1,2,3,4,5,6,7#block     -   1,2,3,4,5,6,7
    
    List of current #options (open)

    @all - Makes the detector detect all blocks in mc
    @None - Makes the detector detect empty inventory's
    @hold - Makes the detector only detect your item in-hand
    @always - Makes the detector detect nothing, but instead always goes on whenever a player passes
    @limit - limits the blocks to these (you can't have any others then this)

    #block - blocks the entrace when activated
    #remove - removes the block from your inventory (Thinking about creating this to be OP-only)
    #pit - Creates a 3x3 pit for pitfall's
    #damage - Damages a player with 1 hearth
    #launch - Speeds up the player by 10x
    #kill - Kills the player
    #fire - Puts the player on fire
    #heal - Heals the player and puts out fire
    #repair - Repairs any tools which the gate detects
    #thunder - Makes thunder in the gate

    instead of using itemID's like in 1,2,3,4 (example), you can also use this:
    1-4 - Loads the ID 1-4
    kit:kitname - Loads the ID's provided in kitname.kit in the itemdetector directory

    To make the gate send a message, use the same method as kit, but use this instead:
    msg:filename - Sends a message provided in filename.message file in the itemdetector folder.




    Permission nodes (open)

    itemdetector.create.block
    itemdetector.create.remove
    itemdetector.create.pit
    itemdetector.create.damage
    itemdetector.create.launch
    itemdetector.create.fire
    itemdetector.create.kill
    itemdetector.create.heal
    itemdetector.create.repair
    itemdetector.create.thunder


    Video of it in action + how-to


    Changelog:

    Show Spoiler

    Version 1.2:
    • Fixed new blocks with the gates from 1.7 (pistons, shears etc) and 1.6 (trapdoors etc)
    • Tweaked pitfall to stay 0.5 seconds longer (laggy servers can be bitchy)
    Version 1.1:
    • Fixed blocks changing (wood slab -> stone slab, red wool -> white wool, etc)
    • Fixed msg:filename when the gate rotation was wrong
    • Fixed launch from acting wierd sometimes
    Version 1.0:
    • Fixed permission bugs
    • Added support for 1-10 as itemID on the sign
    • Added support for personal kits (kit:filename) (look at the #options spoiler)
    • Added support for messages being send (msg:filename) (look at the #options spoiler)
    • Added support for configurable messages (not neceserry, but being able to)
    • made #block & #launch support minecarts
    • Fixed the anticheat perfectly now (no ignore node though anymore)
    Version 0.91:
    • Fixed #remove@always
    Version 0.9:

    • Tweaked anticheat
    • changed #limit into @limit (doesn't affect existing signs)
    • added @hold to just check the item in the hand
    • added @None to check for an empty inventory
    • added @always to make the gate always go on whenever a player passes
    • added #thunder to strike a thunder in the gate (itemdetector.create.thunder)
    • fixed the destroying of gates
    Version 0.81:

    • Fixed permissions
    Version 0.8:

    • Added an anticheat function, so you can't throw items through the gate, open chests or place blocks trough it. (itemdetector.ignore.anticheat)
    • #repair (itemdetector.create.repair)
    • #heal (itemdetector.create.heal)
    • New permission nodes (so you can do itemdetector.create.* now
    Version 0.7:

    • Permissions support (if not found permissions, will default to OP's instead)
    • added #kill
    • added #fire
    Version 0.61:

    • Changed the #launch so it works.
    Version 0.6:


    • Added @all to indicate that you want to detect all blocks in minecraft
    • added #damage to give 1 hearth damage to the enterer
    • added a test version of #launch, to speed movenement by 10x for a short period (note this is glitchy atm, i'm working on a fix, but some people may like it now)
    Version 0.5:


    • Added #pit
    • Minecart support for any #option that isn't #block
    Version 0.42:


    • Fixed something really stupid of me (it didn't cancle the create if it failed)
    Version 0.41:


    • Fixed incompatiable #options
    • Sign given back now, if creating fails
    Version 0.4:


    • Added #limit + #remove, see post for description
    • Made support for armour contents
    Version 0.3:


    • Added #block to prevent players entering the gate
    • If a broken data file is found, it'll now try to fix as much as possible and load them.
    Version 0.2:


    • Fixed the redstone torch to stay for minimal 1 second.
    • Probably fixed a lot of similar bugs.
    Version 0.1:


    • Initial release
     
  2. Offline

    Cognito guy

    Can you add something so that when you walk through the gate it will take items but when you walk back it gives the taken items back? Or is there already an option for this?
     
  3. Offline

    Maxis010

    ItemDetector is a dumb plugin, it doesn't remember what it takes
    EDIT: I don't mean dumb offensively, I mean it literally, it does what it is told when it is told and nothing more
     
  4. Offline

    Cognito guy

    do you know a plugin that does this?

    What does the addon-kit do?

    when I have #block @all and I walk in with items it blocks me from entering, but it puts me in the gate and the moment I move it puts me inside the gate again getting me stuck there. And crashes up the my player kicking me and not letting me join again. It also gives an error in the server console:

    Code:
    18:09:46 [SEVERE] java.lang.NullPointerException
    18:09:46 [SEVERE]       at net.minecraft.server.World.a(World.java:1630)
    18:09:46 [SEVERE]       at net.minecraft.server.World.a(World.java:1604)
    18:09:46 [SEVERE]       at net.minecraft.server.World.a(World.java:576)
    18:09:46 [SEVERE]       at net.minecraft.server.MetadataChunkBlock.a(SourceFile:
    108)
    18:09:46 [SEVERE]       at net.minecraft.server.World.doLighting(World.java:1592
    )
    18:09:46 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServe
    r.java:443)
    18:09:46 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:361)
    18:09:46 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    18:09:46 [SEVERE] Unexpected exception
    java.lang.NullPointerException
            at net.minecraft.server.World.a(World.java:1630)
            at net.minecraft.server.World.a(World.java:1604)
            at net.minecraft.server.World.a(World.java:576)
            at net.minecraft.server.MetadataChunkBlock.a(SourceFile:108)
            at net.minecraft.server.World.doLighting(World.java:1592)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:443)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    EDIT: Also the gates do not remove armor (#remove), can you add this?

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

    Maxis010

    Only for different worlds, I just use chests when I need something like this
     
  6. Offline

    Cognito guy

    The gates do not remove armor (#remove), can you add this?
     
  7. Offline

    matthewpipie

    when will u update????????????????
     
  8. Offline

    deathhorn

    Please update your plugins i really need/like/love it :D
     
  9. Offline

    Cognito guy

    Maybe he's on vacation...?
     
  10. Offline

    zauberstuhl y33

    can you update your plugin.yml if possible :) thanks
     
  11. I think this is the really best thing I saw to do this. I love your work.
     
  12. Offline

    Endolog

    I found a bug, pls try it on your server first!

    If i create a detector like this:

    [detector]
    @all
    #remove all

    everything in the inventory is removed, but sticky pistons not!!
     
  13. Offline

    zenyl

    Man, i love this plugin! :D
    But, what about adding economy support, so it costs you X money to go through? ;)
     
  14. Offline

    EMOberger

    could you make it a 10x10 pit, all someone has to do with your pit is jump -.-
     
  15. Offline

    joeyismusic

    UPDATE THIS

    i also tried #remove1-3000
    it doesnt remove pistons

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  16. @joeyismusic @Endolog @zauberstuhly33 @cognitoguy @matthewpipie @deathhorn

    SORRY GUYS, Somehow the alerts of this watched thread didn't go through, and thats why I got no messages from this plugin at all! D:

    I'll update this plugin ASAP

    edit: Updated
     
  17. Offline

    joeyismusic

    [post consolidation, sorry for random or trailing thoughts]

    downloaded, installed 1.2...

    says i have version 1.0 and it doesnt remove pistons or hatches

    will try again in a moment and report back (in case something went wrong along the line)

    ok the problem is, old detector signs wont destroy pistons, but new signs will.

    hmm
    you need to do something with how this saves data
    a lot of my signs keep going dead, allowing players to cheat in my world.

    a crash will prevent detector from saving at all (as im assuming it saves on server shutdown)
    my server uptime is like 23 hours. a lot is done in that amount of time... and if something happens at the end of that time and the data isnt saved... we have to go back and remake all the signs.

    ok some of the problems might have come from the fact that i was accidentally running the plugin twice on my server (hopefully i haven't stressed you out haha).

    i changed the name to xItemDetector so it would load last, when i uploaded the new version, i named it xxItemDetector. I think both were running and all of my detector signs died.

    you should still try to enforce a better saving method, and update the version reported at runtime. =D
     
  18. Yeah, I forgot to update the version thing in the script itself, but I don't take responsibility for servers crashing, unless my plugin is the CAUSE of it.
    If you lose data a lot, you might want to think of an auto-restarter plugin for the server

    edit:
    Also, could you edit your posts in the future, instead of adding them?
    I don't like double post, and specifically 4 posts after eachother
     
  19. Offline

    joeyismusic

    no worries and sorry

    i am suggesting a schedule save. the data your plugin creates doesn't save unless the server shuts down.
    you should at least add an instant save as soon as a detector sign is created. these are just suggestions... if you don't agree with them, its your plugin. i'm just a user of your creation offering feedback.
     
  20. Offline

    EMOberger

    Only problem i have with your plugin is that it does not remove equip items or at least
    Code:
    [DETECTOR]
    @[URL='http://forums.bukkit.org/members/all.63788/']all[/URL]
    #remove
    
    doesn't remove equip items

    (wont let me just do @all xD)
     
  21. Offline

    zenyl

    Someone mind tell me exactly how to make it give you a kit?
     
  22. Note that the kit function isn't like /kit (so it won't give you items)
    its more like an shortcut in case the ID's you must type doesn't fit on the sign
     
  23. Offline

    sebbe1337

    Could you make so you can choose between door sizes by doing like this ?
    If so please imploment it :)
    S = sign
    O = block
    i = torch
    (IGNORE the "____" )

    I__S__I_____I S S S I
    OOOOO OR __OOOOO
    O____O____O____O
    O____O____O____O
    .OOOOO__.__OOOOO

    So on the left example you write like normal,
    but on the right exmple
    you have 3 signs
    in the middle you write
    [detector]
    #mid
    and then block ids,or kit,
    and on the othertwo you write
    [detector]
    #left or #right (depends on what side)
    and then more ids, so they are linked ,
    well so you can create more bigger detector doors :)
     
  24. Offline

    zenyl

    Oh, okay... Could you then add a from of "/kit"? :D
     
  25. Offline

    Aina

    I want to delete armor too, it stay when I cross a @all,#remove door !
     
  26. Offline

    belk

    @Streammz Getting this same issue after your update. Instead of an exception, it continually resets the players' position to under the gate getting them stuck. Did you change how you handled #block? It was fine before imo.
     
  27. The only way this could happen is, if somehow the sign is removed, rotated diagonally, or being unable to read...
    I'll take a look
     
  28. Offline

    joeyismusic

    this plugin is confusing worlds with other worlds. especially on the x / z axis coords (0, 1, 0+)

    if there is an item detector in one world, another world will also have that item detector at the same coords (but won't appear in the data file)
     
  29. found the problem and releasing an fix ASAP
     
  30. Offline

    skeletonofchaos

    Is there a way to check if the player is holding an item and if not activate the gate?

    Also the #block keeps me in place it doesn't let me move backwards...

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

    najd1103

    Awesome plugin!!! I was just wondering if you could make a gate that removes items and then returns them when you pass through again - don't know if that'll be too hard.
     

Share This Page