Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playervault open item #316

Open
Flavourized opened this issue Jan 1, 2018 · 6 comments
Open

Playervault open item #316

Flavourized opened this issue Jan 1, 2018 · 6 comments

Comments

@Flavourized
Copy link

Flavourized commented Jan 1, 2018

This feature adds the option to open the PVX

Some servers (like mine) have playervault set up in a way where they can only be accessed through the PV sign. This means that the player has to go to the designated area, where the PV signs are, to open a vault.

This feature will allow players to open their PV with this item regardless of where they are. PVX will give the player this item* which they will hold in their hand. The player will then right click with the item in hand. PVX will then remove the item* and then open the PV GUI, where the player can pick which vault to open.

I don't think I need to elaborate on the GUI; from the discord server, I think we all have a good idea how the GUI will function.

*ITEM
This item should have settings in config.yml. i would like the ability to set:

  • material_name or item_name
  • item_data
  • name of the item
  • lore lines
  • Endless item**
  • Enchant on the item
  • message when item is successfully consumed
  • a cooldown time between using this item 2 times in a row
  • Region/World blacklist to deny using this item

** Endless item means there is a version of this item which has unlimited uses; the item should remain in the inventory even after the player has used it. This should not be a default option.

There should be an argument where the server owner can specify if they want the item to be endless or not.

I know you are asking yourself "Why add endles version?? It is the damn thing as using the command". So, with the idea of opening PVs using signs only, having this item would be somewhat rare, and people should be able to get it if another player dies, or drops it, etc.


Settings example:

PVItem:
Material: 'stick'
Data: 0
Enchants:
- '34:10' # unbreaking 10
- 'silk_touch:1' #idk why someone would use 2 enchants but the option should be there anyways
CustomName: "&c&lplayervault express"
Lore:
- 'lore line 1'
- 'lore line X'
onOpenMessage: "(cool server) you opened the vaults"
onCloseMessage: "(hot server) you close the vaults"

There would need to be another copy of the settings so you can handle the endless version of the item separately


Commands example, [optional]

/pv giveitem <Endless? (True/false>

/pv giveitem Flavour 1 true - gives endless item
/pv giveitem Flavour 1 false - gives consumable

--
I know i probably don't need to say it, but for server with 99 vaults, there would need to be pages in the GUI. Pages means there will need to be buttons like Next, Last, close, etc. I wanted to say that these should customizable so we can manipulate the GUI how we want it. Basically let us choose what buttons go where (or if we want to disable a button type)

@Flavourized
Copy link
Author

Also forgot mention adding permissions to use these!

playervaults.openitem.use
playervaults.openitem.endless.use
playervault.openitem.give

  1. permission needed for player to use an item. If they don't have this item, return a no perms msg
  2. same thing except for endless version if the item
  3. item give - for admins

@drtshock
Copy link
Owner

drtshock commented Jan 1, 2018

Thank you for the detail! Anyone else want to comment on this implementation?

@FlippantCactus
Copy link

IMHO this should be an addon because currently the plugin is good because it doesn't have these features. Lots of servers wouldn't use this, mine included and I feel that having it as a module/addon would be much better.

@Flavourized
Copy link
Author

Flavourized commented Jan 2, 2018

having it as a module/addon would be much better.

not trying to be mean or anything, but what difference would it make if it was a separate jar, or baked into the 1 jar. If you're not going to use it (and no part of your server uses it), then it wouldnt take resources, unless im mistaken? Isn't this what lazy loading is ? :L

Baking it into 1 jar allows easier updating whenever there are major changes, and simply put: convenience to both server owner and developer

@drtshock
Copy link
Owner

drtshock commented Jan 2, 2018

Yeah anything like this wouldn't be loaded if you wanted it disabled. I would just have a config option to make it like it doesn't exist, which is what it would default to.

@Flavourized
Copy link
Author

Flavourized commented Feb 22, 2018

Lax implemented this feature into his PlayerVaultsGUI plugin. see here: AwesomePowered/PlayerVaultsGUI#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants