Backpack plugin

Discussion in 'Plugin Requests' started by tspierer2, May 30, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    tspierer2

    This is similar to player vaults, but I would like a separate plugin purely to concentrate as a backpack.

    What will happen is you have a /backpack command
    and it will open the amount of rows your permission will state
    - kind of like an ender chest.

    Commands:

    /backpack - This will open a GUI as your backpack, with an amount of rows depending on a permission.
    The GUI title is configurable, but if not, I would like it to be
    &1Backpack
    There would be a command warmup of a configurable amount of seconds.
    /backpack (playername) - this is an admin command to edit or view another player's backpack. The GUI title will be changed to: '&1%other%'s Backpack'
    /backpack recover - If you lose your backpack on death, then this is a command to recover your lost backpack items.
    /backpack recover (other) - Admin command to recover another person's backpack.
    /backpack clear - Clear your own backpack. Once this command is executed, it will come up with a message: Are you sure you want to clear your backpack? Type /yes within the next 20 seconds to confirm this. (Once the player types /confirm, it will wipe out his backpack)
    /backpack clear (other) - Admin command to clear another person's backpack.
    /backpack reload - also an admin command. It will reload the config.
    /backpack actionbar on|off|both - If actionbar is enabled in the config, this will toggle whether the warmup msg will show up in the actionbar or in chat. If on, the command warmup will show only in the actionbar. If off, the warmup message will show only in chat and NOT the actionbar. Both will show both chat msg and actionbar.

    Permissions:

    backpack.use - a permission to use the /backpack command
    backpack.rows.# - the number will determine how much rows of inventory the /backpack will have. The max rows is 6. If a player does not have this permission, his default rows will be 6.
    backpack.keep - when having this permission, you will not lose your backpack items on death.
    backpack.recover - gives you permission to recover your lost backpack /backpack recover
    backpack.recover.others - admin command to recover other player's backpacks.
    backpack.others - this is an admin permission to do /backpack (playername) to see or edit another player's backpack.
    backpack.clear - Clear your own backpack.
    backpack.clear.others - Clear other player's backpacks. Admin permission.
    backpack.bypass - this permission will let the player bypass the warmup of the command.
    backpack.reload - permission to use /backpack reload
    backpack.actionbar - permission to use /backpack actionbar on|off|both

    Config
    note - variables I want: %playername% - the player who is doing the command, %other% - the other player username whom is being viewed, %seconds% the configurated amount of seconds of the warmup time , and lastly %secondsleft% which will show the amount of warmup seconds LEFT till the command is executed.

    GuiTitle: '&1Backpack'
    GuiTitleOther: '
    &1%other%'s Backpack'
    WarmupInSeconds:
    3 - note, the warmup is the time in seconds it takes for the command to execute without the player MOVING or being DAMAGED (hit, fire, shot, etc.) There will be an option to set this to 0 for NO cooldown. Also there is going to be a configurable actionbar, which i'll talk about in a few lines.
    CloseGuiWhenTakingDamage: true (this means while you're in the gui and you take damage, it will automatically exit the gui for you)
    LoseBackpackOnDeath: false (If set to true, all the backpack's items will drop on death)
    MessageOnOpen: '&aYou opened your backpack.'
    MessageIfWarmup: '&3
    Your backpack will open in &c3 seconds&3, do not move.'
    MessageOpenOther: '&3You opened &f%other%''s &3backpack.'
    MessageMovedOnWarmup: '&c
    The command was cancelled due to movement or damage.'
    MessagePermissionDenied: '
    &cNo permission.'
    MessageBackpackLostOnDeath: '
    &cYour backpack was lost due to your death.'
    MessageBackpackRecovered: '
    &aYou succesfully recovered your backpack.'
    MessageBackpackRecoveredOther: '
    &aSuccesfully recovered %other%'s backpack.'
    MessageBackpackCleared: '&aYou succesfully cleared your backpack.'
    MessageBackpackClearedOther: '&aSuccesfully cleared %other%'s backpack.'
    MessageBackpackClearConfirm: '
    &3Are you sure you want to delete all the items in your backpack? Type in &f/yes &3within the next 20 seconds to confirm this.'

    ActionBarWarmupCountDown:
    - Enabled:
    true
    - ActionBarMessage: '&3Backpack opening in &c%secondsleft% &3seconds'
    DefaultWarmup: both (This ties back up to this command: /backpack actionbar on|off|both. There are 3 variables you can set this to: on, off, both. This means that on default, the players will see either just the chat message, or the actionbar message, or BOTH of them).

    I created an example to clarify what I mean by action bar with these screenshots: (they are in order of happenings, from first to last).
    http://prntscr.com/bagto1
    http://prntscr.com/bagu82
    http://prntscr.com/bagwpy






    Thank you very much for helping me! I appreciate the hardwork of coding <3

    My server version: Spigot 1.8.3
    When I need it by: Less than a week at least. But take your time if needed.
    Suggested name: LgBackpack

    One last thing. If you could (but not that important), make the config support unicodes, such as ♞
    ☯ ✓ ☢
     
    Last edited: May 30, 2016
  2. Offline

    tspierer2

  3. Offline

    tspierer2

  4. Offline

    flash110

    @tspierer2 Ok, I'll try to make one for you later!
    Is it okay if I use the enderchest so they can also open it with that, or not?
     
  5. Have you looked at any of the existing backpack plugins yet?
     
  6. Hello!

    I've started to create your project.
    I cannot work anymore so i'm gonna give you the first version.
    The problems are:
    • No recover functionality ( due to a duplication glitch )
    • actionbar in-game change is buggy
    • If you are putting " ' " into a config, the plugin crashes.
    • Not sure is everything covered with permissions.
    I'll fix it tomorrow ( i will try ).

    I wanna ask you somenthing. There is a possibility of a duplication glitch if having a backpack recover. If you set in the config that the backpack will be lost on death you said that items that are in the backpack be dropped.

    Now, is it the way that if the configuration for losing items is false, then the items will not drop and the items should be able to be recovered?

    Here is the first version:
    <EDIT by Timtower: redacted mediafire>

    Note:
    I used GroupManager from Essentials for permission testing.
     
    Last edited: Jun 4, 2016
  7. Offline

    I Al Istannen

  8. @tspierer2
    I have made the plugin. ( you will need to un-zip the attached file )
    If you find any bugs, feel free to post it here.
    I'll try to fix it.

    Just a quick note:
    There is no recover funcionality. ( i don't understand that part )
    If you are putting " ' ", you need to put it twice.
    Example:
    Code:
    MessageOpenOther: '&3You opened &f%other%''s &3backpack.'
     
  9. Offline

    tspierer2

    recover meaning when u lose your backpack on death, you can recover your items. Btw thank you so much for the plugin, ill test it out
     
  10. I understand that but if your someone kills you and the items drop because the LoseBackpackOnDeath is true, then when you recover it, it's gonna duplicate the items.
     
Thread Status:
Not open for further replies.

Share This Page