Inactive [EDIT/FUN] SecretPassage v1.6 - Create Structures That Can Disappear [1.2.5-R4.0]

Discussion in 'Inactive/Unsupported Plugins' started by Professor29, Aug 12, 2011.

  1. Offline

    Professor29

    Secret Passage
    Current Version: v1.6
    Old versions available on request - Shoot me a message

    NOTICE: I finally stopped stalling and made a BukkitDev page for this project. All future updates will be posted there, and I check for messages / posts frequently... Hope to see you over there!

    Link -> http://dev.bukkit.org/server-mods/secretpassage/

    Have you ever wanted to create a wall that could disappear at a touch? Or a massive pit to trap your "friends" in? Are pistons just not enough to make the secret door of your dreams? Look no further!



    Credit:
    I did not come up with the original idea of this plugin. During the days of hMod and Alpha, I played on a server called "Kingdom of Strongholds", run by Rockslide. A few weeks before the server was shut down, a plugin similar to this one was added, and it was a blast to use. Sadly, I haven't been able to find anything like this for hMod or Bukkit, so I opted to write my own version from scratch...
    Also, I would like to thank @nisovin for helping me solve an inventory issue.

    How to Install:
    Download the .jar file from the link above (next to "Version:") and place it in your plugins folder. Start the server as normal. Then, stop the server and modify the config.yml file in plugins/SecretPassage/ to your liking. Finally, restart the server.

    How to Use:
    1) Start by building the shape of the structure out of any of the "active materials" you chose in the config. If you didn't change the config, use either Netherrack or Sponge. (I made this for a server with no nether, so netherrack isn't common...)

    2) Type in the command below to create a passage. It's worth noting that you can change the "create" part of the command in the config file, so it may be different based on what you entered.

    3) Hold the block that you want to replace the active material with, and punch it. If the material is allowed (also in config), the active material will absorb the item you're holding, and change to look like it. Repeat this until you have the structure built - you can safely place more active material if you need to, the plugin will only respond if the active material is punched while holding another item. By default, any solid block unaffected by gravity (aside from netherrack and sponge) can be used to decorate a passage.

    3b) If you punch (and activate) the wrong block, you can break it to remove it from the structure. Doing so will not return the active material used, so that will need to be placed again.

    4) Place another active block somewhere that you'll remember, then hold one of the items you chose for creating switches (in config) and punch it. The block will absorb the item and change into another material (chosen in config) to show that it is now a switch block. By default, you use a stone button to make switches, which turn into wooden planks for confirmation.

    5) If desired, break the switch block and replace with another block of your choosing. It must be selectable with a right-click to work (so no water, lava or air).

    6) Right-click the switch to test if the gate is working. If so, all the blocks you placed in step 3 will turn into air. Right-click the switch again to bring the structure back.

    7) Type the command /spass to end the passage construction process. You can always come back and modify it by using the create command again.

    New and Improved Video Version by LiekMudkipzz

    Old Tutorial (open)


    Command List:
    • /spass [Alias: /sp, /secretpassage] The main command for the plugin. Also ends the passage building process.
    • /spass create* (PassageName) - Starts building on the named passage, creating it if necessary.
    • /spass destroy* (PassageName) - Destroys a passage you own (blocks are not removed). You can give a permissions node to let people destroy any passage on the server.
    • /spass destroy* switch - Sets you up so that a switch bound to the next block you right-click on is destroyed.
    • /spass list* - Lists all the passages that you own, in order of creation.
    • /spass list* (PlayerName) - Permissions-based command that lists passages owned by the named player.
    • /spass toggle* (PassageName) - Permissions-based command to toggle a named passage, provided you are in the same world.
    • /spass reset* - Permissions-based command that resets all passages based on redstone power to switches.
    • /spass timer (ticks) - Adds a reset timer to auto-close the passage after a set delay (specifically built to prevent making it accidentally auto-open...)
    • /spass timer 0 - Removes the timer of the passage you are working on.
    • /spass info (Passage Name) - Provides information on the listed passage. If you do not give a passage name, it provides information on the passage you are working on (if any).
    • /spass help - Lists all basic commands you have access to, as well as the proper structure for typing them.
    • /spass access - Lists the commands for working with white or black lists for passages.
    • /spass access allow (Name) (Name) (Name) (Name) - Adds the names included to the whitelist of your current passage, and sets the passage to use a whitelist.**
    • /spass access deny (Name) (Name) (Name) (Name) - Adds the names included to the blacklist of your current passage, and sets the passage to use a blacklist.**
    • /spass access remove (Name) (Name) (Name) (Name) - Removes the name from the whitelist/blacklist of your current passage.**
    • /spass access clear - Removes the access restrictions on your passage, allowing anyone to use it.
    * - Create, Destroy, Toggle, List, and Reset can all be replaced in the config.yml file, to allow for ease of use.
    ** - At the moment, you must use the full name, and the player must have logged in at least once. I am working on a name-finder to allow partial names for any online players, but that is not included yet. Also, ops and anyone with the antilockout permission will be able to bypass any access restrictions, and you cannot modify the passage owner's access.

    Features:
    • Create structures that can disappear.
    • Includes option to prevent blocks in passages from being broken (to stop easy duplication)
    • Includes options to consume resources when decorating passages, as well as the ability to choose what can be used in their creation.
    • Choose your own commands to replace create, destroy, toggle, and list.
    • Includes option so that only the owner of a passage (or an op) can modify it, while anyone can use the switches made by them to toggle the passage.
    • More than one switch can be assigned to a passage, but only one passage can be assigned to a switch.
    • Passages do not have to be continuous, but cannot have blocks on multiple worlds. You could build a disappearing village if you felt so inclined.
    • SuperPerms support (as of v1.0)
    • Preliminary Redstone support (as of v1.2)
    • Ability to have passages close themselves after a set delay (as of v1.4)
    • Provide access on a passage-by-passage basis (as of v1.6)
    • If passage protection is active, pistons will break when trying to push a passage block, and cannot pull out a passage block if sticky (as of v1.6)
    Permissions Nodes:
    • secretpassage.* - Provides all nodes other than lockout and deny (Default: Op)
    • secretpassage.create.other - Allows user to bypass the owner-only protection option if it is enabled
    • secretpassage.destroy.other - Allows user to destroy any passage on server, regardless of owner
    • secretpassage.list.other - Allows user to check passages owned by other players
    • secretpassage.toggle - Provides access to the toggle command
    • secretpassage.reset - Provides access to the reset command.
    • secretpassage.lockout - Prevents user from using any portion of the plugin
    • secretpassage.antilockout - Prevents admin using all-nodes plugins from accidentally barring themselves from using plugin
    A Note on SuperPerms (open)
    I know I stated that I wouldn't add support for any plugins to this, and I stand by that statement. SuperPerms are integrated into Bukkit itself, meaning that I don't have to worry about waiting for it to update to keep my plugin compatible with recommended Bukkit builds.

    You can use this plugin without using SuperPerms (I personally do, strange as that may sound...), as the extra features will default to Op, and everyone by default can create and destroy their own passages. However, it's worth noting that the .lockout node is checked for first, and will restrict access no matter who the person is, or what other nodes they have. This means that the server owner can actually lock other Ops out from their private area, and the plugin won't question it.

    To-Do List:
    • PRIORITY: Add ability to restrict access on a per-passage level. - in v1.6
    • Add saving of block data (for colored wool, logs, torch placement, etc) - in v0.9
    • Refine saving of block data for block orientation.
    • Allow Ops to toggle passages from any world.
    • Add timer options to passages. in v1.4
    • Add option to enable/disable based on redstone current hitting a switch.
    • Improve redstone support.
    • Add option to activate switches on left click.
    • Figure out how to make system accept things like doors and beds during placement (I feel a massive IF structure coming on...)
    Changelog:
    • v1.6 - Pistons will naturally break when they attempt to push a block out of a passage. Sticky pistons cannot pull blocks out of passages. Added the allow/deny options for passages.
    • v1.5a - The .deny permission has been a pain for several versions now, and has been removed. Working on a command-based replacement.
    Old version changelog (open)

    • v1.5 - Cleaned up code for new syntax, as well as (hopefully) squashing the SuperPerms bug (again). Also killed the unintended bug of being able to stack timed reactivations of a passage.
    • v1.4 - Fixed logic bug in SuperPerms support, added timers and building in creative mode.
    • v1.3a - Hopeful fix for accidentally breaking protection plugins.
    • v1.3 - Tried to make redstone more multi-world friendly, added redstone options to config file, provided variable to allow automatic updating of config if needed later.
    • v1.2a - Added code to Redstone enabling process for stability.
    • v1.2 - Preliminary redstone support.
    • v1.1b - Fixed faulty logic from trying to code at 1am.
    • v1.1a - Quick fix to counter accidentally gaining the deny permission
    • v1.1 - Fixed support for new blocks, as well as removing blocks from passages.
    • v1.0 - Added SuperPerms support, putting this at a comfortable "proper release" point.
    • v0.9.1 - Bugfix for NPE in passage construction.
    • v0.9 - Added storage of block data, with legacy support for older passages.
    • v0.8 - Stable release with source included.
    • v0.1-v0.7 - Unstable versions as I destroyed bugs and added features.

    A Note on Other Plugin Support (open)
    While a lot of other plugins are great matches with this plugin (iConomy, etc), I will not be personally adding support for these options. However, the source code is included in the .jar file, so that anyone who wants to make changes can take a crack at it. Sadly, I'm not the greatest at uniform code structure or commenting, so the only assistance you'll find in there is a small comment at the top of each function to describe it.

    If you add a feature that you believe should be shared (such as permissions support), I have a request: add an option to the config.yml file to disable it. If you're willing to do that, then post it here and tag me in the post, that way I can take a look at it. I'll test it and add it as a proper version, making sure to include your name in the credits section.
     
    Xilador and jesse1212 like this.
  2. Offline

    Professor29

    Thanks ^_^ And that tells me that you're running CB 953. I'll look into it ASAP.
     
  3. Offline

    Chadavder101

    Thank You Very Much For Your Time =D
     
  4. Offline

    EmpiricalDepth

    Is this getting updated for
    Recommended Build: 1.0.1-R1​
    ?
     
  5. Offline

    Professor29

    @EmpiricalDepth Yes, and the current version also works (running on my server right now). However, I haven't updated the thread because I found that the permissions checks include a handful of logic errors. Working on fixing those (as well as a permission-less version) before I call this fully compatible...

    @Chadavder101 Not sure if you've upgraded or not, but here is a special copy of v1.4 (so timers included) that bypasses all the new features of Bukkit: SecretPassageNoPerms

    @EmpiricalDepth v1.4 is tested and stable on 1.0.1-R1 Bukkit Release. Highlights are the permissions logic fix when trying to activate Passages, the ability to build passages while in Creative mode for ease-of-use, and my personal favorite: timers.

    The /spass timer (ticks) command lets you set a delay on the passage you are editing before the passage automatically closes itself. The time is measured in server ticks, so 20 ticks = 1 second. The timer kicks in when the passage is opened, and should not allow someone to have the passage rapidly open up behind them, due to location in the code where it fires. There is built-in legacy support that assumes the delay is off on old passages, and you can remove the delay from a passage by typing /spass timer 0.


    PLEASE let me know if you guys have any issues...

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

    mythicshadow

    i make the passage and add the switch and everything and it says that im unable to use the switch. im an op so i have no clue whats going on.. i just downloaded ur no perms one and im gonna try that now..
     
  7. Offline

    Professor29

    @mythicshadow Can you tell me the exact statement it's giving you? Does it say "You are not allowed to activate this passage", or is there another line it tells you? The NoPerms will work for Op, but it's meant for an older build of Bukkit, so it is missing the ability to make passages in creative mode...

    There was a spot of code giving me grief (setting up the .deny permissions), and I just tweaked it again to see if it helps (I'm personally having no issues, so not sure..) If you want to try v1.4a and see if it works for you, I'd appreciate it....
     
  8. Offline

    mythicshadow

    ya id be glad to try it and yes it says you are not allowed to activate this passage. and i dont use any permissions plugin.. and i am the only op lol.
     
  9. Offline

    Professor29

    K, then it's the same segment that was giving me grief before - tweaked it on the newest version... I don't know why, but the issue only seems to be showing up when using default perms without a permissions system. If the problem persists, I might have to break the perms checks into their own setup in the program so that I can control it better...
     
  10. Offline

    mythicshadow

    ok im trying out 1.4a right now and im going to see what happens.

    *ok it lets me open/close passages and works just fine i havent really tried any other features yet. thanks man*
     
  11. Offline

    Professor29

    Awesome. Based on that, Bukkit might have been defaulting my .deny permissions to true.... which is very strange.... very strange indeed....
     
  12. Offline

    mythicshadow

    hmm idk. but thanks for the help, i dont know about the other features but its working fine for me now haha,
     
  13. Offline

    mythicshadow

    hey dude i was building a few new passages.. and u built one in creative and then changed back to survival and it says i am not allowed to use that passage. i was wondering if thats an error? or something that i am doing wrong
     
  14. Offline

    Professor29

    Error. Big time... let me look into it.
     
  15. Offline

    mythicshadow

    ok cuz i didnt think i was doing anything wrong because in my plugins my secretpassage is a copy with a (1) so i thought that mightve been the problem but i guess not.. although that shouldnt matter
     
  16. Lol, awesome, this plugin is able to replace craftbook and falsebook, we can make gates and bridges, and of course, secret passages =P

    edit: i suggest u to add stairs support =), at that way we can do anything with this plugin
     
  17. Offline

    Professor29

    Nope, the (1) simply means its a duplicate, probably due to downloading two so close together. I can't seem to replicate the creative -> survival locking down the passage though... what other plugins are you using? I want to get this stamped out ;P

    I actually haven't looked into either one, but I'll look at em now, see what they're about :D

    As far as stairs, it's currently a "hopeful" feature, due to how I have the replacement system going. I need to figure out how to take the player's orientation in relation to the block, then use that to properly rotate the stair's data before adding it to the passage. Completely doable, but currently beyond my knowledge of Bukkit. I've been looking into it though, same with doors and beds.
     
  18. Offline

    mythicshadow

    well i have quite a few plugins. but it isnt letting me do any of the passages again so i just downloaded the no perms one and it seems to be working just fine.. i can give u a list of my plugins if ud still like to know tho
     
  19. Offline

    Professor29

    Nope, that's all I need to know - I'll be working on splitting the permissions out of the main code and into a secondary class, that way I can add a config option to use permissions. If set to false, it will default to Op like the NoPerms version, that way we can squash this bug once and for all... not sure when it will be done though, but know that it IS being worked on.

    WingedSpear The only reason I'm hesitant to do that is the mental image of using it to build a spiral staircase, which would be quite tedious. I'm going to dig through the WorldEdit code on GitHub and see if I can find his formulas for rotation... wish me luck :D
     
  20. ic, well its still awesome, its too easy make doors and bridges with this, i dont need redstone for find an spot in my building, its like....wireless+craftbook
     
  21. Offline

    mythicshadow

    ok i see. but now the only problem is that since for the most part im on a private server is with the no perms it lets everyone use the switches which can get kind of annoying. but nothing to bad. just gotta hide the switches. thanks for all ur help
     
  22. Offline

    mythicshadow

    hey idk if ud include this in wingedspears suggestion but could u add support for like iron bars and stuff. and glass panes? cuz none of those work for me. i think thatd be amazing
     
  23. Offline

    Professor29

    Those actually work - I just didn't update the config file when they were introduced. All you have to do is add their block IDs to the list of allowed blocks - doesn't have to be in order, so just tack em onto the end. And for your switch idea, I have a question for you and WingedSpear - would you guys like me to add a restrict command while working on the permissions changes? Example:

    After creating a pass, meatHead types "/spass restrict allow TacoMan". Because meatHead is the creator, he can always open his passages, but now only people named TacoMan can open them as well. If he wanted to add someone later, he would go into modifying the passage and type it again. Conversely, he can also type "/spass restrict deny Griefer90210" to block Griefer90210 from ever using the switches for that passage again.

    If I do this, the easiest way is going to be more small files in your plugin/secretpassage folder - I can make another folder that maintains the white/blacklists for each passage. If the passage doesn't have one, it ignores it. If it does, it loads it at startup to prevent using too much memory while running.
     
  24. Offline

    mythicshadow

    ya i like the idea sounds awesome, and ok thanks for the info, and i was wondering if you could also make to where i can place a actual switch on the switch block so u can press it and open the passage so like i can make a gate that people can press the switch to open? you understand what im saying?
     
  25. Offline

    Professor29

    As counter-intuitive as it may sound, it's actually already possible - to a point. It will only function on right click, but you can replace a switch block with anything that you can click, be it a block, button, lever, redstone, even a flower if you want to... as long as you can select it, the plugin can recognize it. I just used solid blocks in the vids to make it easier, but consider that the first vid has a door where the switches should be. As far as placing a button ON the switch block, I'd just recommend moving the switch block out one square and replacing it with the button, or you could even put two switches side-by-side if you'd prefer....

    Not sure if that makes sense, but sadly life has decided to get hectic today - will resume coding tomorrow, and if my description doesn't make sense, I'll gladly post screenshots once I'm back to my comp - just leave a response.
     
  26. Offline

    mythicshadow

    haha no it makes sense. i know it souns retarded haha i come off like that alot ^^ but nah im good dont worry about it ^^ sorry for all the semi-dumb questions haha
     
  27. Ya thats a good one, for a pvp server u can hide ur stuff from enemys, but they are gonna be able to open passages with a lever...
     
  28. Offline

    krix

    dont have permission when im trying to test it, and im op...

    anyway, anyone have a permission bukkit? i need:p
     
  29. Offline

    Toasticuss

    Please make it so you can use this in creative mode!!!!!!!!!!!!!!

    The latest version makes it so you can create the passages in creative mode but the switches fail.

    The permissions fixed version you posted makes it so you can use the switches in creative mode but you cannot create any passages.
     
  30. Offline

    leonofthewind

    so im pretty sure you probably already answered this but maybe one directed at me will help me understand better, but i have downloaded the most recent version and it works great for everyone on my server except ops it wont allow us to activate the passages and we are using Permissions bukkit 1.2 maybe something in there is messing it up? if you could help me out here i'd appreciate it, we are trying to run an RP server and it would be awesome if we could get this up and running for ops, thanks!
     

Share This Page