ChatNotifier: pop-up notification
This commit is contained in:
parent
2d6229afa8
commit
d64f9729a5
@ -5,6 +5,8 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
|
||||||
|
import com.connorlinfoot.bountifulapi.BountifulAPI;
|
||||||
|
|
||||||
import cz.marwland.mc.core.MarwCore;
|
import cz.marwland.mc.core.MarwCore;
|
||||||
import cz.marwland.mc.core.features.Feature;
|
import cz.marwland.mc.core.features.Feature;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
@ -22,7 +24,7 @@ public class ChatNotifier extends Feature {
|
|||||||
String msg = e.getMessage();
|
String msg = e.getMessage();
|
||||||
if (e.getMessage().toLowerCase().contains(p.getName().toLowerCase()) && p.getPlayer() != e.getPlayer()) {
|
if (e.getMessage().toLowerCase().contains(p.getName().toLowerCase()) && p.getPlayer() != e.getPlayer()) {
|
||||||
msg = ChatColor.RED + msg;
|
msg = ChatColor.RED + msg;
|
||||||
// ActionBarAPI.sendActionBar(p, ChatColor.RED + "Byl jsi zminen v chatu", 80);
|
BountifulAPI.sendActionBar(p, ChatColor.RED + "Byl jsi zminen v chatu!");
|
||||||
p.playSound(p.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0F, 3.0F);
|
p.playSound(p.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1.0F, 3.0F);
|
||||||
}
|
}
|
||||||
p.sendMessage(String.format(e.getFormat(), e.getPlayer().getDisplayName(), msg));
|
p.sendMessage(String.format(e.getFormat(), e.getPlayer().getDisplayName(), msg));
|
||||||
|
Loading…
Reference in New Issue
Block a user