18 Zeilen
674 B
Java
18 Zeilen
674 B
Java
|
package de.steamwar.bausystem.region;
|
||
|
|
||
|
import de.steamwar.bausystem.region.utils.RegionExtensionType;
|
||
|
import de.steamwar.bausystem.region.utils.RegionType;
|
||
|
import lombok.experimental.UtilityClass;
|
||
|
import net.md_5.bungee.api.ChatMessageType;
|
||
|
import net.md_5.bungee.api.chat.TextComponent;
|
||
|
import org.bukkit.Bukkit;
|
||
|
|
||
|
@UtilityClass
|
||
|
public class RegionUtils {
|
||
|
|
||
|
public void actionBar(Region region, String s) {
|
||
|
Bukkit.getOnlinePlayers().stream().filter(player -> region.inRegion(player.getLocation(), RegionType.NORMAL, RegionExtensionType.NORMAL)).forEach(player -> player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(s)));
|
||
|
}
|
||
|
|
||
|
}
|