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

    deathhorn

    yeah reading the permissionsnotes you wrote down knowing it by myself now =D

    ohh i thought you fixed it the way that i could use it =D ;)
     
  3. Offline

    Dope

    Hi, first off let me say that I reaaaally love this plugin!
    But I'm getting this error when i just rebooted my server

    Code:
    15:41:58 [SEVERE] null loading ItemDetector v0.9 (Is it up to date?)
    java.lang.NullPointerException
            at net.gamesketch.bukkit.itemdetector.Data.stringToData(Data.java:105)
            at net.gamesketch.bukkit.itemdetector.Data.Load(Data.java:33)
            at net.gamesketch.bukkit.itemdetector.core.onEnable(core.java:39)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:632)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:218)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    And now all of my detectors aren't working anymore.

    Any way to fix this, or am I doing something wrong?

    Thanks!
     
  4. Offline

    deathhorn

    how do i use the @limit-function =? :confused:
     
  5. @Dope
    The error points to a part of the script "world.getBlockAt(x,y,z)"
    so,
    1. your world is corrupt
    2. your world is renamed
    3. some chunks in your world are removed
    I suggest trying to make a few other gates, and then try to reload the plugin
    edit:
    its also possible the sign is somehow removed (creeper?) and therefore can't load that block

    @deathhorn
    the @limit is basicly meant as "You can have these, but NOTHING more"
     
  6. Offline

    deathhorn

    sorry but i don't really get it because a sign like this:
    Code:
    [detector]
    @limit276
    
    don't work for me ...

    could you give me an example
     
  7. Offline

    dekduee

    #remove is still not working for me, BUT for other players do, I guess it's a permissions thing
    anyways, it does his job perfectly, thanks :)
     
  8. Code:
    [detector]
    276@limit#block
    
    this will block you from entrace if you have more items in your inventory then just an diamond sword
     
  9. Offline

    Dope

    I just removed the entire plugin (the jar and map) and added the jar back into the plugin folder after stopping the server.
    It seems to be working fine again now, even though I had to recreate all of the detectors.
    Anyways, Thanks!
     
  10. also guys, thanks for all this positive feedback ^^, I didn't expect this plugin having 1k views per day
     
    deathhorn likes this.
  11. Offline

    deathhorn

    oh that's meant with @limit OK nice! ;D really nice plugin
     
  12. Offline

    glata

    How about you make it so that when someone goes through the gate they are given an item if they don't already have one. I don't know if you were already planing this but I thought I would write it any way.
     
  13. Offline

    Giuseppe

    Allways i get a errror
    Code:
    Make a Framework First
    what is that ?
     
  14. Offline

    Kalais

    Forgot to change it on the first page. :)
     
  15. Offline

    Maxis010

    Your gate MUST have a solid frame AND the 2 torches (I found this out earlier)
     
  16. Offline

    Malzbier

    I have done it and it does not work.

    I tried to recreate the demo video step by step and it fails.
    it always says "Make a Framework First" and deletes the singn.
     
  17. Offline

    dekduee

    Don't know if it could be possible since @always can't work with some other options, but it would be really nice to make an option that blocks the player IF he doesn't have the specified item, just like a train gate, only letting people to pass with a ticket
     
  18. Offline

    deathhorn

    @Malzbier try to restart the complet server .. if it's not working just clean up all blocks around the gate you want to create =D try it
     
  19. Offline

    Maxis010

    Can you make the messages customisable or at the least fix the spelling, I'm testing one of detectors and after recieving the message a few dozen times you can't help but notice that #block denial message reads
    The force of the gate stops you from "continueing" instead of "continuing"
     
  20. Offline

    Giuseppe

    nothing some Error
     
  21. What is the error?

    1.0 will have an hidden configuration file which you can change stuff, i'll add those lines too.

    can you maybe screenshot your frame?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  22. I really don't understand how to make it so that when the gate detects TNT (block id 46). I want it to remove TNT from the inventory of the person walking through. Could someone please post what i should type on the sign.
     
  23. Offline

    deathhorn

    on the sign:
    Code:
    [detector]
    #remove46
     
  24. Offline

    deathhorn

    no problem =D you only have to ask =D
     
  25. 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.
     
  26. Offline

    deathhorn

    the plugin SHOULD remove the item in the complet inventory (inventory+armor)...
    i think its buged. =D
     
  27. Offline

    Devian50

    You should have an option to remove any actual weapons so it isnt as difficult to write out each item code
     
  28. 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?
     
  29. Offline

    Devian50

    if they have the listed items they are sort of reflected back out
     
  30. Offline

    neoconker

    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.
     

Share This Page