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

Delete illegal items #34

Open
jugendhacker opened this issue Feb 5, 2021 · 2 comments
Open

Delete illegal items #34

jugendhacker opened this issue Feb 5, 2021 · 2 comments
Labels
Enhancement Suggest a new feature or change

Comments

@jugendhacker
Copy link

Is your feature request related to a problem?
No I don't think so

The suggestion
Currently if you disable enchanted golden apples for example people are still able to get them via chest they found in mines or so. I know they are not able to use them, but I think it would be nice if they directly get removed from their inventory.

Alternatives
They maybe could be already removed if a chest is opened or so, but this might nor work very well if you get them via a hopper etc. A second alternative would be to remove all of them when a chunk is loaded, but this will have huge performance impacts as far as I know.

@jugendhacker jugendhacker added the Enhancement Suggest a new feature or change label Feb 5, 2021
@AlexanderRitter02
Copy link
Owner

Greetings and thanks,
it is interesting to see that my plugin is used by someone else. You'll propably be able to find a lot more issues, as in a lot of cases the plugin expects the administrator to exactly know what to do (a result of being made for personal use) ¯\_(ツ)_/¯

Now regarding your suggestion:
My original thought process was that all players read the rules, and thereby know not to use enchanted golden apples.
Just in case someone tries, it'll be prevented.

That's why I discarded removing unusable items, as it is seemingly unnecessary.

Of course if you think this would be useful or should be added, I can just add it.


As you already mentioned, on chunk load or on chest open have their problems.
In this case easier ≙ better.

  1. The easiest way to remove the item would be just on inventory update (new item added/removed). This does happen often, but actually has very little performance impact.
  2. Alternatively when the player opens their inventory. This will however allow them to have it in there until they open it the next time.

I'll likely go for 1) if this happens, as 2) might confuse players.

@jugendhacker
Copy link
Author

Greetings and thanks,
it is interesting to see that my plugin is used by someone else. You'll propably be able to find a lot more issues, as in a lot of cases the plugin expects the administrator to exactly know what to do (a result of being made for personal use) ¯_(ツ)_/¯

Yeah, but luckily I'm able to read Java code and don't need that much documentation. But I'm willing to write some docs for other people if you want.

Now regarding your suggestion:
My original thought process was that all players read the rules, and thereby know not to use enchanted golden apples.
Just in case someone tries, it'll be prevented.

That's why I discarded removing unusable items, as it is seemingly unnecessary.

Of course if you think this would be useful or should be added, I can just add it.

As you already mentioned, on chunk load or on chest open have their problems.
In this case easier ≙ better.

  1. The easiest way to remove the item would be just on inventory update (new item added/removed). This does happen often, but actually has very little performance impact.

  2. Alternatively when the player opens their inventory. This will however allow them to have it in there until they open it the next time.

I'll likely go for 1) if this happens, as 2) might confuse players.

Yeah I would also go for 1). I'll maybe try to implement this in the next days and submit a PR if you want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Suggest a new feature or change
Projects
None yet
Development

No branches or pull requests

2 participants