int x = r.nextInt(10) if(x == 3 || x == 5 || x == 10){ //Do stuff } That should work, I'd prefer to explain it, but I must be off
You need to create an integer variable to store the integer returned by r.nextInt(10). Then, using that integer, you can check to see if it's...
Hello, as the title suggests, I am looking for a way to efficiently get a mobs NBT, modifying it, then setting it back to the mob. I haven't had...
Wingzzz alright, thanks a bunch! Its really not that important, its just misleading as when they consume the "potion" in my plugin, they are not...
Hello, I've recently come across a slight annoyance in a plugin I created. I would access the PotionMeta of a potion (by casting its ItemMeta to...
Could I see the whole Commands class please?
Using "instanceof" will compare the classes that make up that entity directly. When you use getEntity(), an instance of the class of the entity in...
Yep, you can. It just prints the text without a plugin tag.
Rather than checking for the Entity type, check for the instance of the entity. For example: public void onDamage(EntityDamageByEntityEvent e)...
molenzwiebel I'll have you know that I've spent the last 2 hours searching. I appreciate the attempted help, however having already tried that, I...
I was wondering whether there was a way to put a player to sleep (probably using packets) without them having to right click a bed? Any help is...
I'm pretty sure most of the plugins that say "you have an update" or something have that feature built in. However, if I'm mistaken, they must...
Have an array of locations, and get the array of online players, as jtjj222 said. Using a for loop, loop through both arrays, teleporting each...
What would you like explained more? The whole thing in general or the fast arrow shooting?
You could create a new ItemStack that would represent the minigun, create a custom crafting recipe to craft this new itemstack, then using an...
Separate names with a comma.