Hazebyte / CrateReloaded

Issue tracker for the Bukkit plugin, CrateReloaded
17 stars 19 forks source link

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

Closed TomLewis closed 3 months ago

TomLewis commented 6 years ago

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!

imWillX commented 6 years ago

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?

TomLewis commented 6 years ago

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?

imWillX commented 6 years ago

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
TomLewis commented 6 years ago

Awesome, thanks man.

TomLewis commented 6 years ago

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.

imWillX commented 6 years ago

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

klugemonkey commented 6 years ago

"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.