Skip to content

dimension change #54

@mishacekov

Description

@mishacekov

Describe the bug
when u switch dimensions your health goes back to 10 hearths
plase fix it

@eventhandler
public void onWorldSwitch(PlayerChangedWorldEvent event) {
Player player = event.getPlayer();
World fromWorld = event.getFrom();
World toWorld = player.getLocation().getWorld();

    List<String> worldWhitelist = plugin.getConfig().getStringList("worlds");

    if (worldWhitelist.contains(toWorld.getName())) {
        handleWhitelistedWorld(player, fromWorld, worldWhitelist);
    } else {
        **LifeStealZ.setMaxHealth(player, 20.0);**
    }
}

Expected behavior
when u go to a difrent dimension hp goes back to 10 full hearths

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions