MobArena icon indicating copy to clipboard operation
MobArena copied to clipboard

Feature Request: New Setting: remove-empty-bottles

Open Nesseley opened this issue 3 years ago • 4 comments

Feature request

Short description Empty bottles from potions are annoying, lets remove them after a player drinks them!

Implementation details Adds a new arena setting: remove-empty-bottles: true/false Default state should be false The setting should remove the potion right after the player drinks it, in both main hand and off hand slot.

Additional info Mule is great!

Nesseley avatar May 29 '22 18:05 Nesseley

I'm not sure how viable this is. From what I recall, there's an ordering issue in terms of when a player drinks a potion and that potion changing to a water bottle. Definitely requires a bit of experimentation. We'd only want to remove empty water bottles that are "created" as the result of drinking a potion and not pre-existing water bottles that a player may be holding in their inventory.

garbagemule avatar Jun 21 '22 19:06 garbagemule

I am already using a plugin which has this exact functionality, so it is possible :)

Nesseley avatar Jun 21 '22 19:06 Nesseley

Yes, of course it's possible, but that doesn't mean it's viable. We've never worked from an "any means necessary" perspective. The question is whether it can be done in a clear, reasonable, predictable, and maintainable way, or if we need to implement a set of heuristics. There's no AddWaterBottleToInventoryAfterPotionDrinkEvent to cancel, so some investigation is necessary to figure out what the moving parts are and in which order they play out between a player consuming a potion and a water bottle spawning in their inventory.

But if there already is a plugin that does this, why do we need to implement it here as well?

garbagemule avatar Jun 21 '22 20:06 garbagemule

But if there already is a plugin that does this, why do we need to implement it here as well?

Because the plugin is outdated and doesn't support offhand potions. And this feature is something I know people have asked for in the past, and something I've thought about everytime I play 😅

I think the plugin listened for some potiondrink event, then ran a remove item if glass bottle or something after

Nesseley avatar Jun 21 '22 20:06 Nesseley