1.8.8 CombatTagPlus plugin source help

Discussion in 'Spigot Plugin Development' started by Strum, Mar 20, 2020.

  1. Hi, so I'm trying to edit the source of a plugin that seems discontinued called "CombatTagPlus", here is there source https://github.com/Byteflux/CombatTagPlus . So basically what i'm trying to change is that when a player logs out currently it spawns an NPC with the player's skin and it's name, the issue is it gives the NPC a random UUID.

    So I dug in the source of the plugin to the current version i'm using (1.8.8) and found this in NpcPlayer:

    Code (Java):
    GameProfile gameProfile = new GameProfile(UUID.randomUUID(), NpcNameGeneratorFactory.getNameGenerator().generate(player));
    I changed it to but it still gave a random UUID to the NPC:

    Code (Java):
    GameProfile gameProfile = new GameProfile(player.getUniqueId(), NpcNameGeneratorFactory.getNameGenerator().generate(player));
    I then tried to just give the NPC the players GameProfile but that always didn't work:

    Code (Java):
    GameProfile gameProfile = ((CraftPlayer) player).getHandle().getProfile();

    So I don't know where the random UUID might come from, maybe i'm not compiling the plugin correctly? Currently I'm compiling "CombatTagPlus" with maven and it puts all the versions in the .jar.
    Thanks for your potential help!
     
  2. So I realised this might be a Maven issue on my part, when compiling the plugin it takes the old SRC of the CombatTagPlusCompat.
    Code (Text):
            <dependency>
                <groupId>net.minelink</groupId>
                <artifactId>CombatTagPlusCompat-v1_8_R3</artifactId>
                <version>1.3.2-SNAPSHOT</version>
                <scope>compile</scope>
            </dependency>
    This is the maven, do i maybe need to change the scope?