Public Brewing Stations

Discussion in 'Archived: Plugin Requests' started by RyanDev, Jul 10, 2014.

  1. Offline

    RyanDev

    Plugin category: General/Misc

    Suggested name: Public Brewing Stations

    What I want:

    Hello internet humans of Bukkit. I'm requesting a plugin for the spawn of my factions server. I have a utility area in spawn for players to use (such as crafting tables, anvils etc.)

    I am wanting a plugin which only allows one player to use a Brewing stand at once. This is mainly to prevent players using the brewing stands to brew potions, and other players taking what they have brewed, which really does not work well.

    So I came up with this idea for players to use the spawn brewing stands but other players cannot interact with them for a certain period of time after the player has first opened up the brewing stand. Which allows the player to brew his potions in peace, and still be able to move away from the brewing stand to do something else while he/she is still "occupying" it.

    I would also like a config to edit ALL chat messages (so I can customise them to my liking)

    Any other details or info you need feel free to give me an "@" mention and i'll reply asap.
    Please read the Ideas sections below which explains further into the features and ideas I would like included in this plugin.

    Thanks.

    Kind Regards,
    - Ryan


    Ideas for commands:

    When looking at a Brewing Stand type:
    - /pbs toggle
    chatMessageToPlayer: [PBS] This brewing stand has been enabled/disabled


    Ideas for interaction:

    When player opens a "non-occupied" Brewing Station:
    chatMessageToPlayer: [PBS] This brewing stand is now yours to use for 10 minutes!

    When player interacts with an "occupied" Brewing Station:
    chatMessageToPlayer: [PBS] Sorry, but {player} is using this brewing station!

    When player's "10 minutes" using a stand runs out
    chatMessageToPlayer: [PBS] Time's up! Your brewing station has become unoccupied for another player to use!

    When player WITHOUT permission tries to USE a stand
    chatMessageToPlayer: [PBS] Sorry, you cannot use this utility!

    When player WITHOUT permission tries to TOGGLE a stand
    chatMessageToPlayer: Sorry you do not have permission!


    Ideas for permissions:

    pbs.admin - Can toggle whether a brewing stand is enabled/disabled with PBS (mainly for admins)
    pbs.bypass - Can open a brewing stand which is occupied by a player (mainly for admins)
    pbs.use - Can use a PBS enabled brewing stand

    When I'd like it by: Within the next couple of weeks if possible. But I don't really have a major deadline for the completion of this plugin.
     
  2. Offline

    TheMcScavenger

    RyanDev Seems like a nifty plugin. I'll make my own version of it, and put it out here. If you like it & want to use it, be my guest.
     
    RyanDev likes this.
  3. Offline

    RyanDev


    Fantastic, thanks for making this. Pretty suprised somone hasn't come up with this sort of thing already. Thanks again.

    If you're going to submit the plugin would you mind putting "Original idea from RyanDev - VerseMC.com"

    Thanks :)
     
  4. Offline

    TheMcScavenger

    RyanDev I haven't actually been able to test it properly, as I don't have multiple accounts, but here's how it should (and most likely will) work:

    You can set per inventory (chest, trapped chest, furnace, brewing stand) whether a player is able to access it or not, when another player is accessing it. If a player tries to access it, while someone else is already looking in it, that player is notified that he / she can't access it (unless he / she has the permissionn: secureusage.exempt). So, if a player were to be smelting something, as long as he / she doesn't close the inventory, it's safe from other players. That way, there's no 10 minute timer if someone just wants to smelt one piece of iron ;)

    Per your request; all messages are defined in the configuration file, colour codes are supported. There are no commands, and no more than one permission. The plugin only listens to one event, and stops the checks as soon as possible, to keep it as lightweight as possible.

    I hope this plugin does what it needs to do, feel free to contact me if it lacks any functions / if it doesn't work.

    Download Link: http://mcscavenger.com/downloads/plugins/SecureUsage.jar
     
    RyanDev likes this.
  5. Offline

    RyanDev

    Absolutely fantastic, even though not exactly what I wanted this is still somewhat equivalent.

    Much thanks,

    Regards.


    EDIT: Forgot to mention, just tested it and all seems good. I'll give you a shout if I have any known issues. Thanks again for your help. TheMcScavenger

    TheMcScavenger
    Just had another idea for some more blocktypes you could add which would be quite handy, could you add these if you get chance?:

    - Hopper
    - Dropper
    - Dispenser
    - Minecart with Chest
    - Minecart with Furnace
    - Minecart with Hopper
    - Beacon

    Some others too which would be nice just in case I ever wanted to add them for some reason:

    - Enderchest
    - Anvil
    - Enchantment Table
    - Crafting Table
    - Jukebox
    - Noteblock



    Also another cool idea, players cannot access/getinto Boats or Minecarts if another player is using/on it.

    - Boat
    - Minecart

    If you add any of these please remember to add the messages to edit in the config.yml
    Also, any chance of an /sureload to reload the config in game once i've edited the file?

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

    TheMcScavenger

    Good! I'm glad to hear that :)

    Hoppers, Droppers, Dispensers, and the Minecarts all have shared inventories (does the furnace cart even have an inventory? I thought it was just an engine....), so it doesn't really matter seeing as everyone can access them. I'd have no problem adding them in, just seems a waste of time.

    An enderchest has its own inventory per player, so players don't actually see the items others are placing into it. An anvil, enchantment table, and crafting table each have different inventories per player, so players don't see what others are using it for, the jukebox is only one inventory slot, which can be emptied by everyone, and the note block doesn't have an inventory, therefor can't be protected in the way I am doing it. I could add timers for each of them, but it doesn't seem useful to add a 10 minute timer to a note block..

    I thought it was a vanilla feature that players can't enter vehicles if other players are already in it...
     

Share This Page