NickAPI | Advanced NickAPI | 1.8 - 1.16 6.1.3

An api to nick player with a lot of features

  1. Haoshoku
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    Contributors:
    NoJokeFNA, HKNGLGN
    460202-Minecraft-shaders.jpg
    Join our community: https://haoshoku.xyz/go/discord
    Javadocs: https://haoshoku.xyz/javadocs/xyz/haoshoku/nick/api/NickAPI.html

    NickAPI 6.0
    The best NickAPI you always want to use

    NickAPI finally reached the version 6.0. We completely recoded this API with a better structure, bugfree experience. Furthermore the NickAPI does no longer need ProtocolLib anymore and it supports from 1.8 up to the latest version. Wow!

    NEW: Maven
    Code (Text):
        <repositories>
            <repository>
                <id>public</id>
                <url>http://haoshoku.xyz:8081/repository/public</url>
            </repository>
        </repositories>
        <!-- Please do not shade the NickAPI into your .jar -->
        <!-- It will not work if you do that. -->
        <dependencies>
            <dependency>
                <groupId>xyz.haoshoku.nick</groupId>
                <artifactId>nickapi</artifactId>
                <version>6.1.2-SNAPSHOT</version>
            </dependency>
        </dependencies>

    What is the NickAPI?
    NickAPI is an API for developers to let easy intergrate the nick mechanism into their server without directly using NMS or anything else.
    NickAPI does not contain any kind of commands for people.

    What does the NickAPI have?

    NickAPI intergrates all the nick methods you need to disguise your player. See the documentation for further information.

    What does the plugin do itself?
    As I said, it is an API for developers. The plugin itself does do nothing. I also made my own implementation of the NickAPI, named HaoNick.
    You can download it here: https://www.spigotmc.org/resources/haonick-advanced-nick-plugin-1-7-1-16.81108/

    Why should I use the NickAPI?
    Our maintain is to have a NickAPI that is free of bugs and we pretty reached it. NickAPI offers a tons of features that will convince you to use it. You may have not seen an NickAPI with this amount of features. Give it a try and you will experience professionality.

    What does it have for features?
    - The most important thing: clientside uuid changing
    - Tag changing
    - Skin changing
    - GameProfile name changing
    - TabComplete changing
    - Bypass possibility (Player X see Y disguised while Z not)
    - intergrated UUIDFetcher
    - intergrated SkinFetcher
    - crack support
    - possibilities to give random skins or own custom skin for people who did not buy minecraft
    - possibilities to give people random skins or own custom skin if peoples name does not belong to a minecraft account

    Is it really worth to use this API?
    Of course it is worth. Why do you want to spend working with NMS or ProtocolLib instead of just using this API? You will not have performance issues or anything else. If you get issues, we will immediately fix it, if you report it to us.

    At last:
    Do you have a question or need to report a bug? Feel free to join our discord server: https://haoshoku.xyz/go/discord
    Please give a fair review!

    Pictures:
    How 'bout giving yourself the uuid of a labymod admin?
    picture 1.png

    or just give yourself the uuid of a labymod admin and tag of AmongUs and the skin of Notch. You are never out of your creativity.
    picture 2.png



    Code (Text):
        @Override
        public boolean onCommand( CommandSender sender, Command command, String label, String[] args ) {

            if ( ! ( sender instanceof Player ) )
                return true;

            Player player = (Player) sender;

            if ( args.length == 0 ) {
                player.sendMessage( ChatColor.YELLOW + "/nick reset" );
                player.sendMessage( ChatColor.YELLOW + "/nick <Name>" );
                return true;
            }

            switch ( args[0].toLowerCase() ) {
                case "reset":
                    NickAPI.resetNick( player );
                    NickAPI.resetSkin( player );
                    NickAPI.resetUniqueId( player );
                    NickAPI.resetGameProfileName( player );
                    NickAPI.refreshPlayer( player );
                    player.sendMessage( ChatColor.DARK_RED + "Successfully reset nick" );
                    break;

                default:
                    String name = args[0];
                    NickAPI.nick( player, name );
                    NickAPI.setSkin( player, name );
                    NickAPI.setUniqueId( player, name );
                    NickAPI.setGameProfileName( player, name );
                    NickAPI.refreshPlayer( player );
                    player.sendMessage( ChatColor.DARK_GREEN + "Successfully set the nickname to " + ChatColor.YELLOW + name );
                    break;
            }

            return true;
        }
    Important information for developers:
    We have removed the instance based NickAPI because we did not see a reason for using instances to access the API methods in the earlier versions. We decided to make the methods within the NickAPI static.
    Furthermore we renamed some of the methods and removed the 1.7 support for that. If you still want to use support 1.7, you may use NickAPI 5.x version.

    Also do NOT forget to add in your plugin.yml
    Code (Text):
    depend: [NickAPI]

    Check out the FAQ for further information:
    Question: I put the plugin in the NickAPI folder but nothing happens. But why?
    Answer: This plugin does not do anything alone. It is just an API to help developers


    Question: Why did you remove 1.7 server support?
    Answer: That's a good question. 1.7 costs for us a lot of effort to implement. It cannot support clientside uuid changing (uuid-spoof), has other imports for specific classes that are mainly used (GameProfile, JSON classes). Furthermore it is a pretty old version that basically no people use it.


    Question: Does this plugin have anything included that should not be there?
    Answer: Like in the previous NickAPI versions, our team will just receive a message on JoinEvent. You do not need to worry about it.


    Question: I have a cracked server. Nothing seems to work?
    Answer: Please download https://www.spigotmc.org/resources/nickapibungee.81107/ and put it into your BungeeCord folder. Furthermore go into NickAPI config and set cracked to true.

    vUYioU8.jpg

    Support: https://discord.gg/uFhUc2W
    Cracked server? Use https://www.spigotmc.org/resources/nickapibungee.81107/
    Want to use a good implementation of this API?
    Use https://www.spigotmc.org/resources/haonick-advanced-nick-plugin-1-7-1-16.81108/

    Are you searching for an API to change nicknames?
    Then you should use this API.

    What is NickAPI?

    NickAPI is an API to make it easier for you to change the name and the skin of the player. It is very recommended to use this API.

    Why should I use this?

    Advantages of NickAPI:
    • Complete-rewrite: Everything has been updated and improved
    "UUID-SPOOF": Nicked players will now have an different uuid, so LabyMod users will not able to detect the player by its uuid (ex: capes)
    (Costed me a lot of time, so have fun)
    • You are separately able to change your nick and change your skin
    • It replaces the old TagAPI everyone used in the past very well

    Yes, nice! I want to use this API. How does it work?

    If you want to use Maven, add these things into your pom.xml:
    // Removed, will be added soon.

    It is pretty easy. Get the instance of the class NickAPI and there you go.
    Do it with:
    Code (Text):
    NickAPI api = NickPlugin.getPlugin().getAPI();
    If you want to change the config through the API, get the NickConfig.java with
    Code (Text):
    NickConfig config = NickPlugin.getPlugin().getNickConfig();
    Example:
    Code (Text):

    void nick( Player player, String toNick );

    void nick( Player player, String toNick, String toUUIDByPlayerName );

    void nick( Player player, String toNick, UUID toUUID );

    List<UUID> getBypassList( Player player );

    void addBypass( Player bypassPlayer, Player nickedPlayer );

    void removeBypass( Player bypassPlayer, Player nickedPlayer );

    void addBypass( Player bypassPlayer, UUID nickedPlayerUUID );

    void removeBypass( Player bypassPlayer, UUID nickedPlayerUUID );

    Player getPlayerOfOriginalName( String name );

    Player getPlayerOfNickedName( String name );

    void clearBypass( Player bypassPlayer );

    boolean nickExists( String name );

    void unnick( Player player );

    boolean isNicked( Player player );

    void setSkin( Player player, String toSkin );

    void setSkin( Player player, String value, String signature );

    void refreshPlayer( Player player );

    void refreshPlayer( Player player, int ticks );

    Map<UUID, String> getNickedPlayers();

    String getNickedName( Player player );

    String getOriginalGameProfileName( Player player );

    String getGameProfileName( Player player );

    void setGameProfileName( Player player, String name );

    void resetGameProfileName( Player player );

    void resetFakeUUID( Player player );

    UUID getFakeUUID( Player player );

    void setFakeUUID( Player player, UUID uuid );

    void setFakeUUID( Player player, String name );

    boolean isCurrentlyRefreshing( Player player );
     
    private boolean skinChanging;
    private boolean preventJoinOnStartup;
    private boolean gameProfileChanges;
    private int tabComplete;
    private boolean queueSystem;
    private boolean mojangAPI;
    private boolean cracked;
    private List<String> defaultNames;
    private boolean texturesEnabled;
    private String defaultValue;
    private String defaultSignature;

    Code (Text):

    private List<String> randomNamesList;
    private NickAPI api;
    private Random random;

    public NickCommand() {
        this.randomNamesList = new ArrayList<>();
        this.api = NickPlugin.getPlugin().getAPI();
        this.random = new Random();
        addRandomNames();
    }

    @Override
    public boolean onCommand( CommandSender sender, Command command, String s, String[] args ) {

        if ( ! ( sender instanceof Player ) )
            return true;

        Player player = (Player) sender;

        if ( args.length == 0 ) {
            player.sendMessage( "/nick list - Information about nicked player" );
            player.sendMessage( "/nick skin <Name> - Change your skin (only)" );
            player.sendMessage( "/nick nick <Name> - Only nick yourself" );
            player.sendMessage( "/nick skinchange - Activate/Deactivate skinchanging for player himself" );
            player.sendMessage( "/nick clear - Completely unnick yourself" );
            player.sendMessage( "/nick <name> - Change your skin, nick and your GameProfile name" );
            player.sendMessage( "/nick random - Nick yourself (with skin etc.)" );
        }

        if ( args.length == 1 ) {
            switch ( args[0].toLowerCase() ) {
                case "skinchange":
                    if ( this.api.isSkinChangingForPlayer() ) {
                        this.api.setSkinChangingForPlayer( false );
                        player.sendMessage( "You deactivated skinchanging for player himself" );
                    } else {
                        this.api.setSkinChangingForPlayer( true );
                        player.sendMessage( "You activated skinchanging for player himself" );
                    }
                    break;

                case "list":
                    player.sendMessage( "Nicked players:" );

                    if ( this.api.getNickedPlayers().size() == 0 ) {
                        player.sendMessage( "No nicked names" );
                        return true;
                    }

                    for ( Map.Entry<UUID, String> entry : this.api.getNickedPlayers().entrySet() )
                       player.sendMessage( this.api.getOriginalGameProfileName( Bukkit.getPlayer( entry.getKey() ) ) + " -> " + entry.getValue() );

                    break;
                case "clear":
                    this.api.unnick( player );
                    this.api.resetGameProfileName( player ); // Important!
                    this.api.refreshPlayer( player );
                    player.setDisplayName( player.getName() ); // Don't recommend using it. Just use the ChatEvent!
                    break;

                case "random":
                    String randomName = this.getRandomName();

                    if ( this.api.nickAlreadyExists( randomName ) ) {
                        player.sendMessage( "Nick: " + randomName + " already exists" );

                        Player user = this.api.getPlayerObjectOfNickedName( randomName );

                        if ( user != null )
                            player.sendMessage( "The player " + this.api.getOriginalGameProfileName( user ) + " is using this nick" );
                        return true;
                    }

                    this.api.nick( player, randomName );
                    this.api.setSkin( player, randomName );
                    this.api.setGameProfileName( player, randomName );
                    this.api.refreshPlayer( player );
                    player.setDisplayName( randomName ); // Don't recommend using it. Just use the ChatEvent!
                    break;

                default:
                    String name = args[0];
                    if ( this.api.nickAlreadyExists( name ) ) {
                        player.sendMessage( "Nick: " + name + " already exists" );
                        Player user = this.api.getPlayerObjectOfNickedName( name );
                        if ( user != null )
                            player.sendMessage( "The player " + this.api.getOriginalGameProfileName( user ) + " is using this nick" );
                        return true;
                    }

                    this.api.nick( player, name );
                    this.api.setSkin( player, name );
                    this.api.setGameProfileName( player, name );
                    this.api.refreshPlayer( player );
                    player.setDisplayName( name ); // Don't recommend using it. Just use the ChatEvent!
                    addNickedNameToScoreboard( name );

                    break;
            }
        }

        if ( args.length == 2 ) {
            String name = args[1];
            switch ( args[0].toLowerCase() ) {
                case "skin":
                    this.api.setSkin( player, name );
                    this.api.refreshPlayer( player );
                    break;

                case "nick":
                    this.api.nick( player, name );
                    this.api.refreshPlayer( player );
                    break;

            }

        }
        return true;
    }

    private void addRandomNames() {
        this.randomNamesList.add( "Notch" );
        this.randomNamesList.add( "Herobrine" );
        this.randomNamesList.add( "PewDiePie" );
    }

    private String getRandomName() {
        return this.randomNamesList.get( this.random.nextInt( this.randomNamesList.size() ) );
    }

    private void addNickedNameToScoreboard( String name ) {
        // Optimize it for your server. This is just an example

        for ( Player online : Bukkit.getOnlinePlayers() ) { // Only tested on 1.8.8
            Scoreboard scoreboard = online.getScoreboard();
            Team team = scoreboard.getTeam( "nickedNames" );

            if ( team == null )
                team = scoreboard.registerNewTeam( "nickedNames" );

            team.setPrefix( "§7" );
            team.addEntry( name );
        }

    }
     
    -1 -> Disable Tab Complete completely on the server
    0 -> Does nothing
    1 -> Removes the original name from tablist
    2 -> Removes the original name from tablist and add the new name

    On 1.13+ servers 1+2 does mean 2, because of the tabcomplete is mostly clientside

    But attention: Setting it to 2-3 will destroy your tab completion to other commands
    Add this in your plugin.yml
    Code (Text):
    depend: [NickAPI]

    This plugin does not work or I have problems with it!
    Don't worry. Join our discord server and feel free to tell us your problems.

    At last:
    Please: If you find bugs, please do not rate this plugin bad. Bugs are always possible. Start a conversation with me first. I would be happy, if you did that or joined our discord server. :)

    Pictures:
    How 'bout nicking into Notch?
    Notch.png
    .. and give a Herobrine skin?
    Herobrine.png

    Sincerely,

    Haoshoku

Recent Reviews

  1. keatinglab713
    keatinglab713
    5/5,
    Version: 6.1.3
    by far the best NickAPI, this works perfectly while others barely work, especially on older versions
  2. josefpeter43
    josefpeter43
    5/5,
    Version: 6.1.3
    Best NickAPI. I love it. Great features. Works perfect. I recommend using this NickAPI.
  3. Minimil2
    Minimil2
    5/5,
    Version: 6.1.2
    A super friendly support that helps directly until everything works. Very good NickAPI with a large number of functions and lots of cool features.
  4. gdalia
    gdalia
    4/5,
    Version: 6.1.2
    Good api but i have one problem i can't type a long name like if i type a long nickname it's cut the nickname majority
    1. Haoshoku
      Author's Response
      Hi, if I do not cut the nickname to 16 letters, all players will be kicked because the limit of a name is 16 letters. If you want to add a prefix or suffix into the nickname, you should use scoreboard teams.
  5. t0206
    t0206
    5/5,
    Version: 6.1.2
    bestest api
    i love it
    because I can code nick plugin 2 easy!
    I love it!!! xD
    :D
  6. WeloveJava
    WeloveJava
    5/5,
    Version: 5.0.4
    Thank you hao for this great plugin.


    Beste Nick API. Am Anfang ging sie nicht aber dieser tolle Support hat es schnell und gut gelöst. Danke Hao für dieses Plugin.
  7. DatDevTho
    DatDevTho
    5/5,
    Version: 4.2-h1
    Excellent API. Works perfect with 1.7 and 1.8, the developer is very kind, helpful and fast with his updates ^^
  8. HKNGLGN
    HKNGLGN
    5/5,
    Version: 4.1
    Nice plugin. It works great with 1.8 and 1.7.
    Very helpful developer cok iyi cok iyi
  9. jfdkjfakdkm
    jfdkjfakdkm
    5/5,
    Version: 4.1
    The plugin doesn't work, it can support essentials and permissionsEx. me
    disable change-displayname of essentials and it still didn't work for me
  10. bestlinuxgamers
    bestlinuxgamers
    5/5,
    Version: 4.0.1
    A strong API that is very customizable and easy to use thanks to its form. In addition to all this, it also has features that make it unique. One example is the uuid spoof. And the best thing: unlike many competitors, it even works perfectly! Thanks!