Free Plugins

Status
This thread has been locked.

TheEpicPotato

Java Developer
Feedback score
0
Posts
131
Reactions
84
Resources
0
Doing a free plugin or two this weekend, comment for a copy then PM me the details, I'll reply on this thread if I accept it.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

moon10k

| Trailer Maker |
Supreme
Feedback score
24
Posts
3,734
Reactions
2,949
Resources
0
Mah
 

TheEpicPotato

Java Developer
Feedback score
0
Posts
131
Reactions
84
Resources
0

Shattered

old-timer
Supreme
Feedback score
5
Posts
3,486
Reactions
2,059
Resources
0
I need a villager NPC (cant move and never die) which when right clicked will say in chat 'Hello there'
 

TheEpicPotato

Java Developer
Feedback score
0
Posts
131
Reactions
84
Resources
0

TheEpicPotato

Java Developer
Feedback score
0
Posts
131
Reactions
84
Resources
0

TheEpicPotato

Java Developer
Feedback score
0
Posts
131
Reactions
84
Resources
0
I am looking for the code so I can use it in a custom plugin.

I am having issues with NMS which spawns in NPC
I would create a villager entity with the spigot api and give it a custom name. Look through it's methods and I think theirs an indestructible method or invincible, either way check the javadocs and it'll tell you. Then you just have to make a listener that cancels any click event when you click on an entity with that specific name and also runs whatever other code you need ran such as sending the player a message "Hello there".
 

user7089

I deleted discord. Clones are scams.
Premium
Feedback score
5
Posts
137
Reactions
112
Resources
0
TheEpicPotato - psss.. NoAI value and use reflection to make it cross-version
 

user7089

I deleted discord. Clones are scams.
Premium
Feedback score
5
Posts
137
Reactions
112
Resources
0
or ya know, just make a custom entity.. NMS is not hard at all ._.
Code:
Witch w = (Witch) p.getWorld().spawnEntity(p.getLocation(), EntityType.WITCH);
                        w.setCustomName(nColor.convert("&5&lWitch Shop"));
                        try {
                            Object NMS_WITCH = w.getClass().getMethod("getHandle").invoke(w);
                            Object tag = NMS_WITCH.getClass().getMethod("getNBTTag").invoke(NMS_WITCH);
                            if (tag == null) tag = getNMSClass("NBTTagCompound").newInstance();
                            NMS_WITCH.getClass().getMethod("c", getNMSClass("NBTTagCompound")).invoke(NMS_WITCH, tag);
                            tag.getClass().getMethod("setInt", String.class, int.class).invoke(tag, "NoAI", 1);
                            NMS_WITCH.getClass().getMethod("f", getNMSClass("NBTTagCompound")).invoke(NMS_WITCH, tag);
                        } catch (Exception e) {
                            e.printStackTrace();
                            sender.send("&4&lFAILED TO SET NOAI VARIABLE");
                            w.remove();
                            return;
                        }
+ cross-version
vs
Code:
import net.minecraft.server.v1_8_R3.*;

public class Witch extends EntityWitch {
    public Witch(World world) {
        super(world);
    }

    @Override
    public void move(double d0, double d1, double d2) {
       
    }

    @Override
    public void setOnFire(int i) {
       
    }

    @Override
    protected boolean d(DamageSource damagesource, float f) {
        return false;
    }

    @Override
    public boolean a(EntityHuman entityhuman, Vec3D vec3d) {
        return false;
    }
}
You can't make this cross-version PLUS you need to register it so that's another 10 lines
 
Status
This thread has been locked.
Top