-
-
Notifications
You must be signed in to change notification settings - Fork 131
/
IslandBanEvent.java
53 lines (44 loc) · 1.41 KB
/
IslandBanEvent.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.bgsoftware.superiorskyblock.api.events;
import com.bgsoftware.superiorskyblock.api.island.Island;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import org.bukkit.event.Cancellable;
/**
* IslandBanEvent is called when a player is banned from his island.
*/
public class IslandBanEvent extends IslandEvent implements Cancellable {
private final SuperiorPlayer superiorPlayer;
private final SuperiorPlayer targetPlayer;
private boolean cancelled;
/**
* The constructor of the event.
*
* @param superiorPlayer The player who banned the other player.
* @param targetPlayer The player that was banned.
* @param island The island that the player was banned from.
*/
public IslandBanEvent(SuperiorPlayer superiorPlayer, SuperiorPlayer targetPlayer, Island island) {
super(island);
this.superiorPlayer = superiorPlayer;
this.targetPlayer = targetPlayer;
}
/**
* Get the player who banned the other player.
*/
public SuperiorPlayer getPlayer() {
return superiorPlayer;
}
/**
* Get the player that was banned.
*/
public SuperiorPlayer getTarget() {
return targetPlayer;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
}