Add citizen api to project.

Discussion in 'Plugin Development' started by yrezaie, Nov 22, 2020.

  1. Offline

    yrezaie

    Hi.
    I wanted to compile citizens 2 myself but when I import it source code into my package it need some imports like : net.citizensnpcs.npc
    I dont know how to import them.
    can you help???
    I am new to plugin dev :\
     
  2. Online

    timtower Administrator Administrator Moderator

    @yrezaie Same way as you did with Bukkit
     
  3. Offline

    yrezaie

    @timtower what do you mean?
    as i said im new
     
  4. Online

    timtower Administrator Administrator Moderator

    @yrezaie Did you make a plugin yourself already? Even if it is just a "Hello world"?
     
  5. Offline

    yrezaie

    @timtower yes but it did not work too :/

    Code:
    import org.bukkit.Bukkit;
    import org.bukkit.craftbukkit.v1_16_R3.CraftServer;
    import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity;
    import org.bukkit.craftbukkit.v1_16_R3.entity.CraftMinecartChest;
    import org.bukkit.entity.Minecart;
    import org.bukkit.util.Vector;
    
    import net.citizensnpcs.api.event.NPCPushEvent;
    import net.citizensnpcs.api.npc.NPC;
    import net.citizensnpcs.nms.v1_16_R3.entity.MobEntityController;
    import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl;
    import net.citizensnpcs.npc.CitizensNPC;
    import net.citizensnpcs.npc.ai.NPCHolder;
    import net.citizensnpcs.util.Util;
    import net.minecraft.server.v1_16_R3.EntityMinecartChest;
    import net.minecraft.server.v1_16_R3.EntityTypes;
    import net.minecraft.server.v1_16_R3.NBTTagCompound;
    import net.minecraft.server.v1_16_R3.World;
    @timtower it need this imports .
    Where can i find them?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 22, 2020
  6. Online

    timtower Administrator Administrator Moderator

    Get one working first.
    I can start explaining stuff that you would not understand till you have made something.
     
  7. Offline

    yrezaie

    @timtower I worked java before.
    But not minecraft plugin dev.
    Where can i get these import files?
    I wonder if you explain.
     
  8. Online

    timtower Administrator Administrator Moderator

    @yrezaie CraftBukkit jar, citizensnpcs api
     
  9. Offline

    yrezaie

    Last edited: Nov 22, 2020
  10. Online

    timtower Administrator Administrator Moderator

    @yrezaie That is how it would look like for me.
     
  11. Offline

    yrezaie

    what ?? I did not undrestand???? I am not english :\ @timtower
     
  12. Online

    timtower Administrator Administrator Moderator

    @yrezaie I don't see anything wrong there.
     
  13. Offline

    yrezaie

    may I import them incorrectly??? @timtower
     
  14. Online

    timtower Administrator Administrator Moderator

    I don't know.
     
  15. Offline

    yrezaie

  16. Online

    timtower Administrator Administrator Moderator

    @yrezaie Need to get to a machine with development capabilities for that, will be a couple hours.
    And I need to know where you got everything.

    So question: why do you want to compile it yourself?
     
    Last edited: Nov 23, 2020
  17. Offline

    yrezaie

  18. Online

    timtower Administrator Administrator Moderator

  19. Offline

    yrezaie

    @timtower how can I add it to my aternos server?
     
  20. Online

    timtower Administrator Administrator Moderator

    @yrezaie You download the file and upload it to the server?
     

Share This Page