Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean VIP(Player p)
- {
- FileConfiguration vipConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "VIP.yml"));
- List<String> vips = vipConfig.getStringList("VIP");
- System.out.println("Checking list for " + p.getName());
- for (String name : vips) {
- System.out.println("Testing " + name);
- if (p.getName().equalsIgnoreCase(name)) {
- return true;
- }
- }
- return false;
- }
- public void onPlayerChat (PlayerChatEvent event) {
- Player p = event.getPlayer();
- String m = event.getMessage();
- if(VIP(p)) {
- event.setMessage("<" + ChatColor.BLUE + p.getName() + ChatColor.WHITE + "> " + m);
- }
- }
Add Comment
Please, Sign In to add comment