31 lines
982 B
Java
31 lines
982 B
Java
/*
|
|
* Copyright (c) 2017 univento.eu - All rights reserved
|
|
* You are not allowed to use, distribute or modify this code
|
|
*/
|
|
|
|
package eu.univento.core.commands;
|
|
|
|
import eu.univento.commons.player.rank.Rank;
|
|
import eu.univento.core.api.command.Command;
|
|
import eu.univento.core.api.command.CommandArgs;
|
|
import eu.univento.core.api.player.CustomPlayer;
|
|
import eu.univento.core.api.player.NickName;
|
|
|
|
/**
|
|
* @author joethei
|
|
* @version 1.0
|
|
*/
|
|
public class VIPCommands {
|
|
|
|
@Command(name = "nick", description = "nick yourself", usage = "/nick", rank = Rank.VIP, inGameOnly = true)
|
|
public void nick(CommandArgs args) {
|
|
CustomPlayer p = args.getPlayer();
|
|
if(p.getDatabasePlayer().getSettings().isNicked()) {
|
|
p.getDatabasePlayer().getSettings().setNickStatus(false);
|
|
p.removeNickName();
|
|
}else {
|
|
p.getDatabasePlayer().getSettings().setNickStatus(true);
|
|
p.setNickName(NickName.getRandomNick());
|
|
}
|
|
}
|
|
} |