CrateReloaded icon indicating copy to clipboard operation
CrateReloaded copied to clipboard

When a player trys to "Claim" a key when offline, it deletes it and gives them nothing.

Open TomLewis opened this issue 7 years ago • 7 comments

CrateReloaded version 2.0.0-alpha5 Paper version git-Paper-1533 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)

This is a major issue. When you /crate claim, and try and click the key, it does nothing. Try and drag it, and it actually registers they are trying to claim the key. But the player gets nothing, nothing is set to the player. Then you try and do it again and it says its already been claimed. Re-open the window and its gone!

TomLewis avatar Aug 09 '18 13:08 TomLewis

Hi @FrozenBeard

I'm unable to replicate this issue. It should register clicks, not drags. (Does minecraft support dragging?)

When you mention that the player gets nothing, could you try giving an "offline" player a key and post your claims file here?

imWillX avatar Aug 14 '18 04:08 imWillX

I did try with offline and online, the entire "claim" system just does not work. when they click the key it gives them nothing, there isn't a "claims file", its a folder, shouldn't this be mysql? I have 2 uuid file names and the contents are blank. Sent myself a key to myself offline:

'1535580124634':
- chance:(0.0), display:(GOLDEN_CARROT 5 name:&b[&6Easter_Basket_Key&b] lore:&bRight_click_the_&aEaster_Basket_&bto_find_out_what_the_easter_bunny_brought_you!),
  cmd:(/cr give to GodsDead EasterBasket 5)

/crate claim in game gives me: screenshot 2018-08-29 23 04 14

I know why now, when you run the command, you DO NOT check if it run properly. /cr is used by another plugin for me, there is no visual feedback you have clicked it in-game, there is no message, there is no console log, there is no thought into this at all. There is no check the command run. Ok, how do I tell it to set the correct command when they are claiming a key?

  • [x] if /cr is taken by another plugin, it wont work! /cr is taken by ChestRestock plugin, I use /crate as its a crate plugin.
  • [x] How do we customize the command that is run when a key is to be "claimed".
  • [ ] you need to CHECK the command actually runs.
  • [x] Visual feedback needs to happen when a key is pressed in the GUI, they need to know its "gone through"
  • [x] A message needs to be sent to them in-game saying its run.
  • [x] A message needs to be sent to console to say its happened.
  • [ ] These keys need an option to be stored in MySQL instead of just flat files.

TomLewis avatar Aug 29 '18 21:08 TomLewis

Hi @FrozenBeard

These are all valid points and you're absolutely right: there could've been more thought into these but I'm human -- I make mistakes. With all these compatibility issues across versions, there are a million things to do. Nevertheless, I'll fix the issues though!

Point 4 is already addressed: https://i.imgur.com/nU9BzO5.png

  1. There will be a configuration setting to change this setting.
  2. Read: 1
  3. todo
  4. Already addressed
  5. Sure thing
  6. This is already addressed if you enable the logger.
  7. todo

imWillX avatar Sep 01 '18 00:09 imWillX

Awesome, thanks man.

TomLewis avatar Sep 01 '18 00:09 TomLewis

Right I have just updated my crate version, Going back to that visual feedback where it says "claimed" on the item when they click it, people just do not notice that its added "claimed" to its lore, is there anther way we could make this visual work? could we just remove the item from the GUI once they have claimed it? so it disappears and makes a sound? Or replaces the item with a Green Stained Glass Pane with CLAIMED so they can physically see they have clicked it and its claimed.

TomLewis avatar Sep 09 '18 15:09 TomLewis

#306 @Klugemonkey had a really good suggestion of adding sounds to items. This'd require some time to implement the item wrapper but I think it's a really nice idea.

For now, I could implement replacing it with a green stained glass pane and garnish feedback from other users. alpha10

imWillX avatar Sep 16 '18 07:09 imWillX

"Does minecraft support dragging?"

Yes, you should handle both InventoryClickEvent and also InventoryDragEvent when a user clicks on an item in the inventory of a container.

klugemonkey avatar Sep 16 '18 09:09 klugemonkey