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

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

     
  1. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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
    

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





    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:


    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

    This post has been edited 1 time. It was last edited by Streammz Jul 31, 2011.
  2.  
  3. Offline

    AS1LV3RN1NJA

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Great plugin, working well. Any chance you could add the option of making the arch 2 wide? I'm using it before a portal to PVP, so the detector is blocking half the portal.

    Also the option to remove any items a person is wearing (armour) would be great. Thanks.
  4. Offline

    deathhorn

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    the plugin SHOULD remove the item in the complet inventory (inventory+armor)...
    i think its buged. =D
  5. Offline

    Devian50

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You should have an option to remove any actual weapons so it isnt as difficult to write out each item code
  6. Offline

    Lachesis580

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hi can you make a Other Plugin like this but with the Feature "Can only enter if are this or this Item in the Bag"
    or Add it to this Plugin?
  7. Offline

    Devian50

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    if they have the listed items they are sort of reflected back out
  8. Offline

    neoconker

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Getting this problem when i make the Frame i keep getting "Make Framework First" which i have done exactly as your video said to, and ive tried using different materials and different torches and etc.
  9. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The gate doesn't support other torches then the regular torch (ID 50).
    Can you maybe send me a screenshot of how your gate looks like?
  10. Offline

    blacknedvertigo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    you can make a video how to do the trap with controller block and detector?
  11. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've made an option to make a pitfall build-in:
    Code:
    [detector]
    1,2,3,4#pit
    
    replace 1,2,3,4 with the itemID's you want to detect
  12. Offline

    valdark

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I love this concept. I will be using it as an alternative to multiworld inventories by placing gates before portals and making them all out of bedrock.
  13. Offline

    seajay1221

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    #remove@all isn't doing anything for me in 0.9.1. The torches turn to redstone, but nothing is removed. Do I need to configure anything in permissions to make this work?
  14. Offline

    Maxis010

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Same, not sure about seajay1221 but I know I have - -itemdetector.ignore.* and I know it's working as I'm affected by #block
  15. Offline

    Deminetix

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Could i please have a link to your source code for this plugin? I am trying to incorporate checking for an empty inventory into the plugin i am creating
  16. Offline

    blacknedvertigo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Sh*t this is the best pluggin for minecraft.
    Tanks!
  17. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Code:
    Player player = //your player variable
    boolean isEmpty = true;
    for (ItemStack s : player.getInventory().getContents()) {
        if (s == null) { continue; }
        if (s.getAmount() >= 1) { isEmpty = false; break; }
    }
    if (!isEmpty) {
    ///rest of the script
    }
    
    if you still want the source code, i'll upload it if you want
  18. Offline

    Acromantula1

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    is it possible to, instead of listing each item individually activate the gate for items between 2 numbers. IE
    [detector]
    267,268,272,276,283,298-317#pit
    so this would activate on all swords and armor.
  19. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Acromantula1
    Thats actually an good idea :)
    i'll add that in 1.0
  20. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  21. Offline

    Maxis010

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can you also add kit support
    as in entering k:armor will detect all items specified in the kit defined in filename.ext
    left the name and ext to you, that or you could make it a alterable file, would be good for people like me that use other kit based plugins like supplySign...that said formatting will be a problem if you went that way
    Work in support for different kit formats?


    The above post appears to have been made in a train of thought style, if it's unreadable I'll rewrite it
  22. Offline

    airsoftinva

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    #remove doesn't work at all for me...
  23. Offline

    deathhorn

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    you have to add the - -itemdetector.ignore.* permission to your permissions =D
  24. Offline

    Maxis010

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I can't speak for everyone else but I know I have, remove doesn't work
    It's not a permissions problem as the permissions file loads fine and #block works at the least
  25. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  26. Offline

    Maxis010

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'll send you my server details

    EDIT: Sent, as I said in the message you can use the admin world as a testing ground
  27. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Me and Maxis010 have tried to fix the bug with the ignore stuff for an hour, and it seems permission doesn't support wildcards in their "remove" tag: '-itemdetector.ignore.*'
    a workaround will be made for 1.0, for now, use inviduals.
  28. Offline

    Maxis010

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    For those 2 lazy to write that out it's
    Code:
                - -itemdetector.ignore.remove
                - -itemdetector.ignore.kill
                - -itemdetector.ignore.fire
                - -itemdetector.ignore.damage
                - -itemdetector.ignore.anticheat
    And it's not just ItemDetector, it's ALL permissions, so if you have any wildcard permission removal rewrite it ASAP
    I've put a post in the permissions thread, I'll pass on the reply(s)
  29. Offline

    zajrik

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Would love to be able to edit the message output. I'm currently really only using this plugin to remove snowballs upon entering my base because I get tired of them cluttering my inventory, and I'd like to edit it to something related to melting when using #remove332.

    Edit: For the sake of impatience, i've edited the playerlistener class myself to have it display "The warmth of the building melts all your snowballs." Not a problem, since I only use the #remove for snowballs, but it'd be awesome to be able to have customized messages based on the item removed, with a default for non-specified messages if there are none assigned to any specific item id.

    I'm fairly unsatisfied with colonizing a tundra biome. It never snowed in 1.4. I had no idea it was tundra. Hate snow. it rained once when 1.5 was released, and has only ever snowed since. :/ Speaking of which, if anyone knows some way to edit the classification of my biome so I can be rid of this snow, let me know. I hate clearing it every day.
  30. Offline

    neoconker

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    No worries figured it out my sign was pointing the wrong way apparantly, may wanna check up on that =/
  31. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Message support done for 1.0 ;)
  32. Offline

    Streammz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Any last-minute suggestions that isn't on the TODO(first post) already?
    if your lucky you have it added :cool:

Share This Page