SHARE
TWEET

Untitled

a guest Oct 21st, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.Fabi.prefix.chat;
  2.  
  3. import me.Fabi.prefix.main.Main;
  4. import org.bukkit.entity.Player;
  5. import org.bukkit.event.EventHandler;
  6. import org.bukkit.event.Listener;
  7. import org.bukkit.event.player.AsyncPlayerChatEvent;
  8.  
  9.  
  10. public class Chat
  11.   implements Listener
  12. {
  13.   @EventHandler
  14.   public void onChat(AsyncPlayerChatEvent e) {
  15.     Player p = e.getPlayer();
  16.    
  17.     String R1 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  18.     String R2 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  19.     String R3 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  20.     String R4 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  21.     String R5 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  22.     String R6 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  23.     String R7 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  24.     String R8 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  25.     String R9 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  26.     String R10 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  27.     String R11 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  28.     String R12 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  29.     String R13 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  30.     String R14 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  31.     String R15 = Main.getPlugin().getConfig().getString("Plugin.Prefix.Prefix1.Chat").replaceAll("&", "�").replaceAll(">>", "�").replaceAll("**", "�").replace("{player}", p.getName()).replace("{message}", e.getMessage());
  32.    
  33.     if (p.hasPermission("rang.1")) {
  34.       e.setFormat(R1);
  35.     } else if (p.hasPermission("rang.2")) {
  36.       e.setFormat(R2);
  37.     } else if (p.hasPermission("rang.3")) {
  38.       e.setFormat(R3);
  39.     } else if (p.hasPermission("rang.4")) {
  40.       e.setFormat(R4);
  41.     } else if (p.hasPermission("rang.5")) {
  42.       e.setFormat(R5);
  43.     } else if (p.hasPermission("rang.6")) {
  44.       e.setFormat(R6);
  45.     } else if (p.hasPermission("rang.7")) {
  46.       e.setFormat(R7);
  47.     } else if (p.hasPermission("rang.8")) {
  48.       e.setFormat(R8);
  49.     } else if (p.hasPermission("rang.9")) {
  50.       e.setFormat(R9);
  51.     } else if (p.hasPermission("rang.10")) {
  52.       e.setFormat(R10);
  53.     } else if (p.hasPermission("rang.11")) {
  54.       e.setFormat(R11);
  55.     } else if (p.hasPermission("rang.12")) {
  56.       e.setFormat(R12);
  57.     } else if (p.hasPermission("rang.13")) {
  58.       e.setFormat(R13);
  59.     } else if (p.hasPermission("rang.14")) {
  60.       e.setFormat(R14);
  61.     } else {
  62.       e.setFormat(R15);
  63.     }
  64.   }
  65. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top