// Is VIPHide installed?
if(!Bukkit.getPluginManager().isPluginEnabled("VIPHide")) {
 return;
}
Player p;
// Load API
VIPHide api = (VIPHide) Bukkit.getPluginManager().getPlugin("VIPHide");
// Is the player nicked?
boolean nicked = api.isDisguised(p);
// Nick player
api.disguise(p);
// Unnick player
api.undisguise(p);
// Get nickname
String name = api.getName(p);

// Player nicks himself
@EventHandler
public void onNick(VIPNickEvent e) {
 Player p = e.getPlayer(); // Player
 String name = e.getHideName(); // Nickname
 e.setHideName("SpielerName"); // Set Nickname
 e.setCancelled(true); // Cancel event
}
// Player unnicks himself
@EventHandler
public void onNick(VIPUnnickEvent e) {
 Player p = e.getPlayer(); // Player
 String name = e.getHideName(); // Nickname
 e.setCancelled(true); // Cancel event
}
Helpful?
% of people found this helpful.