Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Listeners;
- import org.bukkit.Sound;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.player.PlayerJoinEvent;
- import org.bukkit.plugin.Plugin;
- import org.bukkit.scheduler.BukkitRunnable;
- import ru.tehkode.permissions.bukkit.PermissionsEx;
- public class Title_onJoin implements Listener{
- private Plugin plugin;
- @EventHandler
- public void onJoin(PlayerJoinEvent e) {
- Player p = e.getPlayer();
- if(PermissionsEx.getUser(p).inGroup("Me")) {
- p.playSound(p.getLocation(), Sound.CAT_PURREOW, 1, 1);
- new BukkitRunnable() {
- public void run() {
- Listeners.Title.sendTitle(p, 15, 60, 5, "§bMoin", "§4" + p.getName());
- p.playSound(p.getLocation(), Sound.IRONGOLEM_DEATH, 1.0F, 1.0F);
- new BukkitRunnable() {
- public void run() {
- Listeners.Title.sendTitle(p, 15, 60, 20, "§bSo eine Schei*e", "§4" + p.getName());
- }
- }.runTaskLater(plugin, 10L);
- }
- }.runTaskLater(plugin, 5L);
- /*}else {
- p.playSound(p.getLocation(), Sound.CAT_HISS, 1, 1);
- Listeners.Title.sendTitle(p, 15, 50, 20, "§bMoin", "§8" + p.getName());*/
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement