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

Reset health, hunger and XP when resetting the island #958

Closed
Aytho opened this issue Sep 28, 2019 · 12 comments
Closed

Reset health, hunger and XP when resetting the island #958

Aytho opened this issue Sep 28, 2019 · 12 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Enhancement Improvement or modification which is usually a new feature.
Milestone

Comments

@Aytho
Copy link

Aytho commented Sep 28, 2019

Description

Describe the bug

When you reset an island, the heal and xp and hunger do not reset. The money does not come at a value we would like

Steps to reproduce the behavior

You just have to reset the island, for example if the player took damage or lost hunger, if he reset his island he will always have his stats on his new island.

Screenshots and videos

Capture1
Capture2

Expected behavior

I do not think this is a bug but a configuration line that is not in my configuration file.

Environment

Server

  • OS: Linux Debian
  • Java version: 1.8.0

Plugins

Plugin (32) : AntiAFK, ArmorStandTools, asCMD, AutoMessage, BentoBox, ChestCommands, ComAytopia, CraftingStore, CrateReloaded, CrazyAuctions, Essentials, EssentialsChat, EssentialsGeoIP, EssentialsSpawn, MineableSpawners, Multiverse-Core, Multiverse-NetherPortals, Multiverse-Portals, Multiverse-Portals, Parkour, PermissionEx, PlaceHolderAPI, Scoreboard-revision, SimplePortals, TAB, TempFly, uShop, Vault, VoidSpawn, Votifier, VotingPlugin, WorldEdit, WorldGuard

BentoBox setup

BentoBox and Addons
Running PAPER 1.14.4.
BentoBox version: 1.6.0
bentobox.version.database
Mondes de jeu chargés:
skytopia (SkyTopia): Overworld, Nether, End
Addons chargés:
BSkyBlock 1.6.0 (ENABLED)
Challenges 0.8.0-SNAPSHOT-#323 (ENABLED)
Level 1.6.0 (ENABLED)
Limits 0.2.2 (ENABLED)
MagicCobblestoneGenerator 1.5.0.1 (ENABLED)
WelcomeWarps 1.6.1 (ENABLED)
Configuration
  • Database: ?

Additional context

@Aytho Aytho changed the title Reset heal, xp, and money Reset heal, hunger, xp, and money Sep 28, 2019
@Poslovitch Poslovitch transferred this issue from BentoBoxWorld/BSkyBlock Sep 28, 2019
@tastybento tastybento added the Status: Under investigation Investigating the interest and the feasability of the issue. label Sep 28, 2019
@tastybento tastybento self-assigned this Sep 28, 2019
@tastybento
Copy link
Member

For xp and health, that would be a feature request - both of those are not reset, no.
For money, it is just a plain release (zero), so that's correct, isn't it?

@tastybento tastybento added Type: Enhancement Improvement or modification which is usually a new feature. and removed Status: Under investigation Investigating the interest and the feasability of the issue. labels Sep 28, 2019
@Aytho
Copy link
Author

Aytho commented Sep 29, 2019

Thanks for the reply,
For the money, I would like that there is a basic money when we reset the island (2000 for example).
And where I can post a feature request for the xp, health and hunger ?

@Poslovitch
Copy link
Member

Poslovitch commented Sep 29, 2019

And where I can post a feature request for the xp, health and hunger ?

You already did. This is the one.

For the money, I would like that there is a basic money when we reset the island (2000 for example).

So you want an option (@tastybento I guess it should be gamemode based?) to specify a default amount of money?

@tastybento This might cause issues with our current implementation, with which we do not support world-specific money, whereas Vault can do. We might need to slightly adapt our VaultHook to suit the needs of this feature request.

@Aytho
Copy link
Author

Aytho commented Sep 29, 2019

Yes exactly ^^ for exemple a line on the configuration file ("starting-money: " for example)

@Poslovitch Poslovitch added the Status: Under investigation Investigating the interest and the feasability of the issue. label Sep 29, 2019
@tastybento
Copy link
Member

We had starting money in ASkyBlock. Let me noodle on this.

@Poslovitch
Copy link
Member

@tastybento So, I guess we're not doing world-based economy support for now? I'll open a ticket then.

@tastybento
Copy link
Member

That's a good point. Unless there is a world-based economy in place, then any setting of money will affect all game modes.
Actually, in terms of xp and health, the InvSwitcher addon handles those between worlds. So, resetting them could be fine.

@Poslovitch
Copy link
Member

Poslovitch commented Sep 29, 2019

Actually, in terms of xp and health, the InvSwitcher addon handles those between worlds. So, resetting them could be fine.

XP, hunger and health sound okay to me.

Unless there is a world-based economy in place, then any setting of money will affect all game modes.

Vault can support that, but I'll definitely open a ticket for it, as it might require some more thoughts.

@Poslovitch Poslovitch changed the title Reset heal, hunger, xp, and money Reset health, hunger and XP when resetting the island Sep 29, 2019
@Poslovitch
Copy link
Member

Another concern of this issue: it will require to add new methods in the WorldSettings, so it might break gamemode addons snapshots, once again ^^'.

I'll also open another issue for the "starter-money" feature request @tastybento.

@tastybento
Copy link
Member

Agreed. 1.8.0 has already crossed that point so it’s okay to do it again. Let’s just time it so that the addons are updated concurrently.

@Poslovitch Poslovitch added this to the 1.8.0 milestone Oct 5, 2019
@Poslovitch Poslovitch assigned Poslovitch and unassigned tastybento Oct 13, 2019
@Poslovitch Poslovitch added Status: In progress Working on the issue. and removed Status: Under investigation Investigating the interest and the feasability of the issue. labels Oct 13, 2019
Poslovitch added a commit that referenced this issue Oct 13, 2019
Implements #958

Added the following methods in WorldSettings and IslandWorldManager:
* #isOnJoinResetHealth()
* #isOnJoinResetHunger()
* #isOnJoinResetXP()
* #isOnLeaveResetHealth()
* #isOnLeaveResetHunger()
* #isOnLeaveResetXP()
@Poslovitch Poslovitch added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. labels Oct 13, 2019
@Poslovitch
Copy link
Member

Poslovitch commented Oct 13, 2019

Gamemode Addons will need to implement the newly added WorldSettings methods.
@tastybento @BONNe

@Poslovitch
Copy link
Member

Implemented.

While working on this, I stumbled upon excessive code duplication. We'll need to address that at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Enhancement Improvement or modification which is usually a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants