Search in sources :

Example 1 with District

use of gg.projecteden.nexus.features.events.y2021.pugmas21.models.District in project Nexus by ProjectEdenGG.

the class Pugmas21Command method district.

@Path("district")
@Description("View which district you are currently in")
void district() {
    District district = District.of(location());
    if (district == null)
        error("You must be in Pugmas to run this command");
    send(PREFIX + "You are " + (district == District.UNKNOWN ? "not in a district" : "in the &e" + district.getFullName()));
}
Also used : District(gg.projecteden.nexus.features.events.y2021.pugmas21.models.District) Path(gg.projecteden.nexus.framework.commands.models.annotations.Path) Description(gg.projecteden.nexus.framework.commands.models.annotations.Description)

Example 2 with District

use of gg.projecteden.nexus.features.events.y2021.pugmas21.models.District in project Nexus by ProjectEdenGG.

the class Advent method onDistrictEnter.

@EventHandler
public void onDistrictEnter(PlayerEnteredRegionEvent event) {
    Player player = event.getPlayer();
    if (!Pugmas21.isAtPugmas(player))
        return;
    District district = District.of(player.getLocation());
    if (district != null && district != District.UNKNOWN)
        ActionBarUtils.sendActionBar(player, "&a&lEntering " + district.getFullName());
}
Also used : Player(org.bukkit.entity.Player) District(gg.projecteden.nexus.features.events.y2021.pugmas21.models.District) EventHandler(org.bukkit.event.EventHandler)

Example 3 with District

use of gg.projecteden.nexus.features.events.y2021.pugmas21.models.District in project Nexus by ProjectEdenGG.

the class Advent method onDistrictExit.

@EventHandler
public void onDistrictExit(PlayerLeavingRegionEvent event) {
    Player player = event.getPlayer();
    if (!Pugmas21.isAtPugmas(player))
        return;
    District district = District.of(player.getLocation());
    if (district != null && district != District.UNKNOWN)
        ActionBarUtils.sendActionBar(player, "&c&lExiting " + district.getFullName());
}
Also used : Player(org.bukkit.entity.Player) District(gg.projecteden.nexus.features.events.y2021.pugmas21.models.District) EventHandler(org.bukkit.event.EventHandler)

Aggregations

District (gg.projecteden.nexus.features.events.y2021.pugmas21.models.District)3 Player (org.bukkit.entity.Player)2 EventHandler (org.bukkit.event.EventHandler)2 Description (gg.projecteden.nexus.framework.commands.models.annotations.Description)1 Path (gg.projecteden.nexus.framework.commands.models.annotations.Path)1