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

    Didn't even notice those, since I was looking for Redstone-only Events for the BlockListener. Yes, those would work - I can run a loop to check each switch in the specific world to see if it's powered. There might be a bit of a delay when working with a LOT of switches, but otherwise it should be a pretty quick check. Thank you for the heads up!
     
  3. Offline

    Takel

    Not a problem, just happy to help when I can.
     
  4. Offline

    Professor29

    Just checked with RB 1185. Plugin works, but the config has not been updated to include the new Stone brick options. Feel free to add them in, and I will add them to the default config in the next version, which will allow for redstone support.
     
  5. Offline

    gsgrego

    Thanks for the plugin and nice work. Heh i was just about to ask about redstone support as well.
     
  6. Offline

    Professor29

    Correction: Due to a fallback I put in the config to prevent concealing passages with Diamond Shovels, the new blocks will NOT currently work with the plugin. I will be fixing this post-haste - expect a patch within the hour.

    Sorry about delay - impromptu family plans trumps computer time... patched version is up, but does not include new blocks in its default config - still need to be manually added. Currently determining how to handle redstone power - looks like the best method is going to be adding another variable to the passages, that way I don't have to constantly check the first block to see if it's air or not...

    As far as redstone power goes, do you guys want it to be solid or air when powered? I'm thinking that redstone power should make the passage disappear, and it comes back when it loses power...

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

    Takel

    I think those of us who manage servers are busy putting the fires out after the release of a RB so take your time :p

    Anyhow, I'd say passages should disappear on power since that is supposed to emulate activating the switch in the first place.
     
  8. Offline

    gsgrego

    Power making it go bye bye makes sense.
     
  9. "You are not allowed to activate switches"

    I got spammed with this message each time i try do something (I am Admin with all permissions)

    Thanks in advance :)
     
  10. Offline

    jesse1212

    same here!

    BUMP

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

    Miningdude

    Stupid player base. Oh well. I am back, still haven't tried the plugin, But I am getting a Spout server setup for many things now. Wish me luck!

    Also: GOOD NEWS EVERYONE! *Futurama Theme Starts*

    EDIT: Is the latest version, v1.1? :)
     
  12. Offline

    Professor29

    I'm pretty sure you guys are using the plugin that auto-adds the "all permissions" option, yes? Problem with that: it scans the plugin.yml file and gives you all of them - including the deny access permissions node. Adding a workaround now - will be fast.

    @xenogray @jesse1212 Ok, download v1.1a and you should be good. There's another node added in there that specifically counters the lockout and deny features of the plugin, which should be automatically added if you are using an "all-nodes" plugin for Ops. Sorry about it taking so long for the fix - sadly not privileged enough to have a desk job at the moment...

    @Miningdude v1.1 will work just fine if you aren't using a plugin to add all nodes to Ops. However, considering how much easier they make life whilst running a server, I'd recommend grabbing v1.1a so that you don't have to worry about the issue.

    One word of warning: As stated above, antilockout node cancels out all .deny nodes for the plugin, meaning that anyone who gets access to it will have unrestricted access to any area protected by secret passages. As these should only be Ops, it isn't too concerning...

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

    Miningdude

    Grabbing it now! :D
     
  14. No prob :) Tested it, works like a charm ! Thank you very much !

    Spoke a bit too fast ^^'

    Juste created a passage and i don't have the permission to use it.

    /spass list MyName does list my secret passage but i don't have permission to use it :(

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

    Professor29

    Just got up. Looking into it now... do you use the plugin to give a user all permissions nodes?
     
  16. PermissionsEx, actually. (But have some problems with it, i posted on their forums, hoping to get an answer.. one day.. xD )
     
  17. Offline

    Professor29

    Fair. There's another one I saw in the submission section a week or so ago that gives ops all permissions (similar to using '*'), but works for any permissions system... I mentally flagged it as a concern when I saw it, but promptly forgot about it >_>

    Grab 1.1b - I fixed the logic issues for the permissions nodes, so that you should have unrestricted access, as is normal for Server Admins.
     
  18. Thanks, trying it now :)

    Workd (really xD) like a charm now ! Thank you very much :)

    Now i can hide my diamonds properly xD

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

    Professor29

    Good to hear. Thanks for telling me about the issue - adding logic operators at 1am isn't a good idea it seems...

    Also, I solved my dilemma on how to deal with Redstone, so you guys should be seeing that feature by Friday night...
     
  20. Offline

    jesse1212

    Thanks, it works perfectly now!
     
  21. Offline

    Professor29

    Ok, v1.2 is up, containing initial redstone support. I'm pretty sure I'll need to improve this, but not really sure how... please let me know what you guys think!

    One thing I have noticed though: Server will revert all passages based on their redstone state upon load/reload, but manually activating a switch will flip the passage independent of the redstone (making it so that it appears when powered, disappears when unpowered)... I don't really know of a way to fix this, as I don't see a way to trace the specific line of redstone to a switch block...
     
  22. Offline

    gsgrego

    @Professor29

    i think you make a mistake with the 1.2 upload..
    2011-09-28 17:27:58 [SEVERE] Error occurred while enabling SecretPassage v0.0
    java.lang.NullPointerException
    at me.professor29.secretPassage.Passage.checkPower(Passage.java:143)
    at me.professor29.secretPassage.SecretPassage.setRedstoneStates(SecretPassage.java:406)
    at me.professor29.secretPassage.SecretPassage.onEnable(SecretPassage.java:63)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:920)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  23. Offline

    Professor29

    I think I've fixed the issue - added three new IF statements to prevent more errors like this. One question for you though, do you have passage files for a world that doesn't exist in your folder? Reason I'm asking is because the NullPointerException pointed me to a place where I check the name of the world against the name on the passage, to ensure I'm in the right spot... Only possible situation for it to be Null would be if the world didn't exist, but then it should have thrown an error before then... sorry - I'm rambling.

    Please grab v1.2a, it should solve the current problem... if not, please let me know so I can fix it ASAP... I like squashing bugs. :D

    Also, for anyone interested, it's completely possible to hand-write a .pass file to make a passage outside of minecraft. The layout is as follows:

    First line of the file is the owner of the passage (case-sensitive).
    Second line of the file is the world the passage is in (again, case-sensitive).
    All the following lines are the blocks in the passage that will appear/disappear, listed as follows:
    X,Y,Z,ID,Data

    Choose a name, and save it as a .pass file (example: MyTestPass.pass)

    Same goes for switches for each passage, but the file only stores the location of the switches, not the type or anything. So each line on the switch file is a different block that can activate the passage, like so:
    X,Y,Z

    And then you'd save it in the Switch folder, with the same name (example: MyTestPass.switch)

    @gsgrego One more question: Is it loading before your multi-world managing plugin?

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

    gsgrego

    1.1 is working 1.2 is not. I believe its loading before and no i havent dont anything like make a passage and delete the world.
     
  25. Offline

    Professor29

    I think I know the reason then... I'm pretty sure it's because the system to check redstone power is trying to fire before the worlds themselves are even loaded, which is causing the issue. What plugin are you using for multiple worlds? I can add a line to make it load after that plugin does to see if it solves the issue.

    I'll be adding two things when I have time to code later tonight: A line to the config to determine if it should check power at startup (default:false), as well as the command /spass reset. Reset won't save/load passages, but it will take the place of the current set power at startup, allowing an admin to do a server-wide reset of passages based on their redstone power levels.

    Also, do you guys want there to be a config option to simply disable the redstone entirely? I can add that in pretty easily - literally 2 if statements...

    And I'm looking into adding timers for passages... scheduling is a new concept for me...

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

    tgtopsecret

    i dont mean to be a newb, but this plugin loads and says its enabled, but it never shows its working in game, i dont really know how to use it, and idk if im even using it right
     
  27. Offline

    Professor29

    @tgtopsecret The plugin itself only enables the secret passages, they still have to be built. Here's a step-by-step way to get a passage ready (assuming you didn't change the config settings).

    First, we'll need to pick a name for the passage. Let's call it testPass. Passage names are case-sensitive, so testPass will not be the same as testpass or TeStPaSs. You'll also need some netherrack to build the passage (15 is a good amount), a stone button, and a block of your choosing to disguise the passage with. I'm going to make more assumptions here, and we're going to say that testPass is going to be blocking a cave, so we'll disguise it with plain ol' stone.

    1) Place the netherrack exactly where you want the passage to be (the netherrack will be replaced by the stone later), that way you have the shape of the passage ready to go. Then, place another netherrack nearby, where you want the player to click to turn the passage on/off.
    2) Type "/spass create testPass" into the chat. You should get a message saying "[SecretPassage] You are now working on testPass."
    3) Hold the stone and punch (left-click) the netherrack blocks that are going to make your doorway. Each time you punch one, it should turn into stone, and you should lose one stone from your inventory.
    4) Hold the stone button, and punch the netherrack where the switch is going to be. The button will disappear, and the netherrack will turn into wooden planks as confirmation.
    5) Right-click the planks to make sure that the passage disappears, and then right-click again to bring it back.
    6) Break the wooden planks and replace it with the block that will represent the switch (I like using torches.)
    7) You can place more netherrack to continue shaping the passage if necessary, but it won't appear/disappear until you punch it with another block. You can also make more switches if you want to, such as having one on each side.
    8) When you're satisfied, type /spass to finish working on the passage. If you want to change it later, you can work on it again by typing "/spass create testPass".

    I will add a spoiler of pictures to the instructions later, to make it a bit easier (words aren't good for visual learners...), but that won't be for a couple of hours...
     
  28. Offline

    tgtopsecret

    Before i complain i want to that you, but when i hold the stone and hit the netherrack the netherrack just dissapears, it doesnt get replaced. do i have to do this in survival?
     
  29. Offline

    Professor29

    @tgtopsecret Yes, because I haven't added hooks into creative mode as of yet. To be honest, it hadn't crossed my mind - thank you for the heads up ^_^

    The plugin looks for when a block of netherrack gets damaged in order to replace it. When you're in creative mode, the block is never damaged, it just gets killed instantly. However, I'll see about adding in code to make it so you can build them in creative mode - it wasn't around when the plugin was originally made, so I overlooked it...
     
  30. Offline

    lordkalem

    i would like a proper tutorial and explanation for this plugin. none of the information posted tells me at all how its really done. unless i have to hit every single peace of the structure i want to disappear ???
     
  31. Offline

    Professor29

    @tgtopsecret @lordkalem I've added a video version of the steps underneath them... fair warning though: I really suck at making videos. Going to try to talk a friend into making one for me that is better (and might actually have sound!) We'll see how that goes though.

    Plugin update should be in-bound later tonight... unexpected obligations pushing it back =\
     

Share This Page