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

IslandDeleteEvent doesn't work as expected #790

Closed
YellowZaki opened this issue Jun 26, 2019 · 2 comments
Closed

IslandDeleteEvent doesn't work as expected #790

YellowZaki opened this issue Jun 26, 2019 · 2 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug
Milestone

Comments

@YellowZaki
Copy link
Contributor

YellowZaki commented Jun 26, 2019

I was trying to get IslandDeleteEvent.getPlayerUUID() when a player joins a team and their island is deleted, but it returns null.

Then, I've tried trying to reset the island and it seems the event is called after it has already been deleted. And it can't be cancelled.

However, IslandResetEvent returns everything fine.

This code:

    @EventHandler
    private void onIslandEvent(IslandEvent e) {
        Bukkit.broadcastMessage("Island event " + e.getReason());
        UUID player = e.getPlayerUUID();
        Island is = e.getIsland();
        if (e.getReason() == IslandEvent.Reason.RESET) {
            Bukkit.broadcastMessage("Island going to be resetted. Player UUID " + player + "  ");
        }
        if (e.getReason() == IslandEvent.Reason.DELETE) {
            Bukkit.broadcastMessage("Island going to be deleted. Player UUID " + player + "  ");
        }
    }

Produces:

image

(Creando isla... = Creating Island, Yendo a la isla de YellowTest = Teleporting to YellowTest island)

@YellowZaki YellowZaki added Status: Pending Waiting for a developer to start working on this issue. Type: Bug labels Jun 26, 2019
@tastybento tastybento self-assigned this Jun 27, 2019
@tastybento tastybento added the Status: Under investigation Investigating the interest and the feasability of the issue. label Jun 27, 2019
@tastybento
Copy link
Member

The playerUUID was not being set, that's why it was null. Fixing.

@tastybento tastybento added this to the 1.6.0 milestone Jun 27, 2019
@tastybento
Copy link
Member

This event is called to indicate that the island is going to be removed from the world. If you cancel it, the island blocks will not be removed.

@Poslovitch Poslovitch added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: Pending Waiting for a developer to start working on this issue. Status: Under investigation Investigating the interest and the feasability of the issue. labels Jun 27, 2019
@ZzSnkeX ZzSnkeX mentioned this issue Jan 5, 2025
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: Bug
Projects
None yet
Development

No branches or pull requests

3 participants