mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-30 04:09:15 +00:00
Fixes #24
This commit is contained in:
@@ -4,6 +4,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class RegionsEnterEvent extends Event {
|
||||
@@ -19,6 +20,12 @@ public class RegionsEnterEvent extends Event {
|
||||
this.hasChanged = hasChanged;
|
||||
}
|
||||
|
||||
public RegionsEnterEvent(Player player, String region, boolean hasChanged) {
|
||||
this.player = player;
|
||||
this.regions = Collections.singletonList(region);
|
||||
this.hasChanged = hasChanged;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
@@ -27,6 +34,10 @@ public class RegionsEnterEvent extends Event {
|
||||
return regions;
|
||||
}
|
||||
|
||||
public String getPriority() {
|
||||
return regions.get(0);
|
||||
}
|
||||
|
||||
public boolean hasChanged() {
|
||||
return hasChanged;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user