#help-development

1 messages · Page 1484 of 1

quaint mantle
#

that one is for the spigot api 1.16 something, im not using it

eternal oxide
#

Yep, no getLocation in 1.12

digital plinth
#

is there a way to tell gradle where to put the output file?

paper viper
#

you're going to have to read the world, x, y, z, yaw, and pitch

digital plinth
#

like what you do with artifacts

worldly ingot
#

o.O I'm fairly confident getLocation() existed in 1.12

#

1.8, even

digital plinth
#

should I use artifacts in gradle projects?

quaint mantle
#

wait

#

yeah

#

i dont use gradle much

paper viper
#

actually it wasnt there in 1.12

quaint mantle
eternal oxide
paper viper
#

Yeah

worldly ingot
paper viper
#

this is why you dont use outdated versions

worldly ingot
#

It's serializable at least so you can set(Location) and get() and cast to Location

quaint mantle
#

Can I just mention that the location part can't be the issue? I have the same issue with not being able to use arenaConfig in like every class

digital plinth
#

project.buildDir = '/gen/main/java'

#

build.gradle?

quaint mantle
#

i think

ivory sleet
#

I use libsDirName

eternal oxide
ivory sleet
#

or nvm

#

you probably dont want that

digital plinth
#

where is /gen/main/java tho

quaint mantle
#

change it

digital plinth
#

gradle is confusing

paper viper
#

it has a steep curve for beginners

ivory sleet
#

it really isnt

digital plinth
quaint mantle
#

what you want it to be?

digital plinth
#

C:/blah/blah

paper viper
#

once you understand, its not that bad

ivory sleet
#

maven is arguably as confusing

paper viper
#

and idk how to explain it but if you are using something like kotlin dsl

quaint mantle
#

onBlockBreak where i use this.arenaManager.setChestLocation(event.getPlayer(), event.getBlock().getLocation());

digital plinth
#

i don't see it

eternal oxide
#

um, do you mean you are not sure its even loaded. I thought you said earlier you could access it

paper viper
#

there is very little support

digital plinth
#

in my downlaods

quaint mantle
#

ok probably something with location

#

Yeah it is loaded

ivory sleet
#

well if you understand kotlin then its as trivial as the groovy dsl

quaint mantle
#

it all worked before when I used static on it all but yeah

paper viper
#

do you know what static does?

quaint mantle
#

I know but Im not trynna static abuse like I did

eternal oxide
#

I do notice you are using getInt on your config when its stored as a Double

#

Its probably going to be unhappy about that

quaint mantle
eternal oxide
#

use the Location.deserialize and it will deal with all that

#

good

#

now try adding the deserialize line I gave you and see if that errors

#

I'm going to guess after fixing all that code its the getInt

quaint mantle
#

Looks like it has to be the get int yes

#

but before that, one question

eternal oxide
#

just replace all that code with the deserialize then

quaint mantle
#

Why wouldnt this one work for my other event class?? this.arenaManager.setChestLocation(event.getPlayer(), event.getBlock().getLocation());

#

same situation there

eternal oxide
#

what is setChestLocation ?

quaint mantle
#

other than not using static, the thing is the same and worked then

eternal oxide
#

does it throw an error somewhere?

quaint mantle
#

and line 26 is this.arenaManager.setChestLocation(event.getPlayer(), event.getBlock().getLocation());

eternal oxide
#

does it still error in the same place after all teh changes I told you to make?

digital plinth
#

umm does anyone have any idea on how to stop entity collision when an entity is constantly being teleported to another

quaint mantle
eternal oxide
#

show me your ArenaManager class

#

sec

#

actually show me your listener class with the BlockBreak event in it

quaint mantle
eternal oxide
#

Where do you register that listener? its not in yrou main class

quaint mantle
#

its in the same place

#

pm.registerEvents(new BlockBreak(this, this.arenaManager), this);

eternal oxide
#

same place as this one pm.registerEvents(new PlayerJoinListener(this, this.arenaConfig), this);?

quaint mantle
#

yes

digital plinth
#

omg using gradle is really annoying

ivory sleet
#

lol

#

May I assist?

digital plinth
#

i'd appreciate that

ivory sleet
#

Sure what's the issue

digital plinth
#

first off what is this error

#

did i import the wrong api

ivory sleet
#

no its a warning u can ignore probably

eternal oxide
ivory sleet
#

but basically tells you that you're using deprecated stuff

#

which might not be ideal

digital plinth
#

also i don't think project.builddir works

digital plinth
ivory sleet
#

?paste send ur entire build.gradle

queen dragonBOT
quaint mantle
eternal oxide
ivory sleet
#

@digital plinth

ivory sleet
#

first and foremost you're missing a } at the end, second of all if you wanna set the destination use libsDirName probably

eternal oxide
#
    @Override
    public void onEnable() {

        this.saveDefaultConfig();
        this.arenaConfig = new ArenaConfig();
        StateManager.setState(StateManager.IN_LOBBY);
        this.arenaManager = new ArenaManager(this.arenaConfig);
        registerListeners();
    }```
ivory sleet
#

libsDirName = "C:/Downloads"

#

instead of what u got

digital plinth
#

uhhh

digital plinth
#

i don't think i missed a brackets XD

ivory sleet
#

oh yeah but remove the one at line 45

eternal oxide
quaint mantle
#

thats the second time I've messaged up the ordering

#

it happens I guess

#

Thank you so much for helping me out here, I appreciate it

eternal oxide
#

np

digital plinth
#

updated it

#

but i don't see the jar in my downloads

ivory sleet
#

is that even a valid folder for you? xD

#

isnt it like C:/Users/name/Downloads

digital plinth
#

XD

#

hhhh

#

uhh*

ivory sleet
#

use \\

digital plinth
#

okie i don't think it worked

ivory sleet
#

I mean I can’t tell what folders exist and don’t for you

digital plinth
#

proof

#

i think interllij/gradle might be broken

ivory sleet
#

did u reload ur gradle project btw

digital plinth
#

when i build the project no more logs are created at the bottom section

digital plinth
#

can someone link me to a turotial on blocking the packets without protocallib

#

i just need to block an entity for a specific player

granite stirrup
#

:(

#

who removed atoma apple

#

^ best song

ivory sleet
#

Why do you resend after I deleted it, this channel is for development help related stuff.

granite stirrup
ivory sleet
#

Regardless, this isn't the channel for that

weak mauve
#

hello, i may look stupid but

            for (Entity entity : player.getWorld().getNearbyEntities(player.getLocation().add(player.getLocation().getDirection().multiply(1.0)), 10.0, 10.0, 10.0))

i want to count the entites in this range

#

help pls

ivory sleet
#

Why not use it?

granite stirrup
eternal oxide
#

player.getWorld().getNearbyEntities(player.getLocation().add(player.getLocation().getDirection().multiply(1.0)), 10.0, 10.0, 10.0).size()

ivory sleet
granite stirrup
#

Holly shit

#

i just realised i sent 2204 messages in this channel 👀

#

XD

eternal oxide
#

We got bosses now, so no more malarkey 🙂

eternal oxide
#

I just gave you the code to know how many

digital plinth
#

soooo how can i detect which entity this packet is showing

eternal oxide
#

it will be size or length, I forget what Collection is returned

eternal oxide
#

error?

weak mauve
#

yep

eternal oxide
#

I did say it would be either size or length

weak mauve
#

hmm

eternal oxide
#

size() is correct, its a Collection

#

it will give you an int

digital plinth
#

does spigot support making an entity invisible for one specific player?

ivory sleet
#

yeah

weak mauve
ivory sleet
#

I think it has something like that in the api

digital plinth
ivory sleet
#

hmm or might just be player entities

weak mauve
digital plinth
#

link?

eternal oxide
digital plinth
#

link pls i don't see it anywhere

weak mauve
#

s***

granite stirrup
granite stirrup
#

i believe the api only does hiding and showing players for one player

#

and i dont think it does entitys

young knoll
#

The easiest way to do it with an entity is to just send a PacketPlayOutDestroyEntity

#

I think that’s the name anyway

granite stirrup
digital plinth
#

so how do i send a packet?

granite stirrup
#

i think u have to use nms

young knoll
#

Google it

digital plinth
#
           
             for( Player on : Bukkit.getServer().getOnlinePlayers()) {
                 PacketPlayOutEntityDestroy packet = new PacketPlayOutEntityDestroy(skeleton.getEntityId());
                 ((CraftPlayer) on).getHandle().playerConnection.sendPacket(packet);
             }```?
young knoll
granite stirrup
#
public void hideEntityForPlayer(Player player, LivingEntity entity) {
  PacketPlayOutEntityDestroy packet = new PacketPlayOutEntityDestroy(entity.getEntityId());
  ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}

public void showEntityForPlayer(Player player, LivingEntity entity) {
  PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(entity.getEntityId());
  ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}``` lmao idk if this would work
#

never messed with packets

digital plinth
#

thanks

#

what if I want to hide a player from other players

#

what do i change the enrirt.getentityID to

granite stirrup
#

u would have a player.hidePlayer(anotherPlayer);

digital plinth
#

player.something i suppose

granite stirrup
#

player.showPlayer(anotherPlayer);

digital plinth
#

right

#

XD

#

tysm

granite stirrup
#

it has to be player objects

#

thats the instanceof Player

#

it cant be LivingEntity or whatever

#

or commandsender

#

it has to be a Player

digital plinth
#

okie

weak mauve
#

ummm how i can create big explosion like this
EXPLOSION_LARGE result a smol one

digital plinth
#

player.getWorld().createExplosion(player.getLocation(),7)

floral schooner
#

Guyssss fjafjsjtghskehtg what is the resolution for minecraft server icons???

weak mauve
#

i exploded the entire world

#

i want the particles

#

lol

floral schooner
digital plinth
#

particles?

weak mauve
#

yes

#

not actual explosion

digital plinth
#

oh your talking about firework explosions?

digital plinth
#

its a still picture

weak mauve
#

click in the link

#

open full image

#

im dumbass at animation

digital plinth
#

its a PNG

open vapor
#

eclipse says i need a newer java version to run, but when i use new java, the server says i need old java

weak mauve
digital plinth
#

oh a particle effect

#

ugh packets again

#

i just lost ALL of brain cells from messing with packets

weak mauve
digital plinth
#

now my turn

#

so you launch a wither skull when you right clcik

#

on air OR on a block

#

but when i teste it

#

it spawns TWO skulls when i click on a block

#

and don't spawn any when i right clcik air

#

Y

ornate heart
#

I'm trying to explain to my friend why he should compare player's via UUID instead of doing direct player .equals() comparison but i'm explaining it poorly. What is the reason behind doing UUID comparisons instead of player comparisons

digital plinth
#

player name changes

digital plinth
young knoll
#

That doesn’t matter

#

The player objects name will never change

#

But comparing uuid is likely faster

young knoll
#

And iirc doesn’t fire at all for right clicking air with an empty hand

digital plinth
#

then what is the Action RIGHT_CLICK_AIR for

#

like when you raise a shield you right click air correct?

#

bruh why is there not a right click entity event

weak mauve
#

anyways, is there anyway to increase EXPLOSION_LARGE particles size?

young knoll
digital plinth
young knoll
digital plinth
#

sdbvcjnsafa

#

what if i just need to do something when i right click with nothing

#

on air

young knoll
#

Don’t think the client sends a packet for that anymore

digital plinth
#

well you can hold a shield up with nothin in your main hand

young knoll
#

Yes

#

But that has nothing to do with it

granite stirrup
#

lol

weak mauve
#

any1 have any idea to modify EXPLOSION_LARGE size

sage swift
#

you cant

#

particles are client side

#

but there's explosion_huge

digital plinth
#

OMG

#

when a player is hidden

#

even the plugin can't reach it?

#

also how am i supposed to cancel a runnable like that

#

how 2 find the task ID

#

you close it with task id right?

young knoll
#

Or the task reference

sharp bough
#

so lets say you have 3 players
player 1
player 2
player 3

now you have a plugin that when you run a command it will save your current location(location1), and when you run the same command it will storage the second location(location2) in a hashmap, so you can have as many locations as you want, so now it looks like this

hashmaplocation1:location2

and if you run the same command again it will storage your current location (location3) so you can run the command again and save the second location (location4)

hashmap<[location1:location2],[location3:location4]>

perfect now you have a hashmap with 2 sets of locations, this was all made by Player 1, but lets say you have another player, Player 2 in the same server, same world, same everything, and if Player 2 runs the exact same set of commands, does this create another hashmap for Player 2 or storages this new locations set by Player 2 in the same hashmap as player1?
My main question is: Does each player has his own version of each plugin in the server or do they all share the same plugins and data?

digital plinth
#

hmm is there a way to make plugins access hidden players

sharp bough
young knoll
digital plinth
#

when i try to get a reference of a hiddenplayer

#

it says its null

#

which do not make sense

young knoll
#

Use a custom class to store everything and add that to a map with the players uuid

digital plinth
#

only taskID

young knoll
#

BukkitTask.cancel

digital plinth
#

and whole plugin

#

which is no go

digital plinth
young knoll
#

You can do that too

digital plinth
young knoll
#

Because it’s an instance method

#

Look at the return type for the various run task methods

digital plinth
#

okie

#

bukkittasks

sharp bough
digital plinth
digital plinth
#

wait hold on

#

does that mean

young knoll
digital plinth
#

i have no way of canceling the tasks bc i can't give the task a new name everytime

#

and i won't be able to differentiate them

young knoll
#

Store them in a list

#

Or a map or whatever

sharp bough
young knoll
#

Use a map with their uuid as a key

sharp bough
#

so taking the same example of the commands and locations i did before

#

it would be
hashmap<[KEY= PlayerUUID: [location1, location2]]>

#

so its a list with the player uuid as key

#

?

young knoll
#

Yes

#

Look into multi maps

#

They simplify storing 1 key -> many values

sharp bough
#

so i have a hashmap for each player with the active information

#

instead of rquesting it from the config file

young knoll
#

You have 1 hashmap

#

That stores all the players

sharp bough
#

no yea

#

sorry

#

like

#

a hashmap for each player means a peace of the hashmap with the player uuid for each player in my head

#

lmao

#

as the key*

digital plinth
#

OMG why can the plugin get a reference of a hidden player

#

the plugin is server sided

young knoll
#

You sure you’re doing it right

#

I’ve never tried, but it doesn’t sound like it should be an issue

digital plinth
sharp bough
sharp bough
#

nice

digital plinth
#

that is how half of my erros are found

sharp bough
#

haha

young knoll
#

Rubber duck debugging

weak mauve
#

int Count = player.getWorld().getNearbyEntities(player.getLocation().add(player.getLocation().getDirection().multiply(1.0)), 10.0, 10.0, 10.0).size();
i want to select entities but except items, player and armor stands

#

any help?

#

im ded inside

young knoll
#

I believe you can use a predicate with that method

#

Or you could use a good old for loop with an if statement

weak mauve
young knoll
#

Loop over the collection, if it matches what you want add 1 to a number

weak mauve
#

hm

#

ok

sharp bough
#

how could i have a hashmap like this:
HashMap<UUID, List<Integer>> list = new HashMap<UUID,List<Integer>>();
that everytime you run a command adds a number to the list in the player uuid key, where the value is the next digit in the list for example if the list is [1,2] add 3 to that list so the hashmap is
<playerUUID, [1,2,3]>

#

or just add a string

#

the args 0 of the command

#

so like
<playerUUID, ["string0", "string 1"] etc

waxen plinth
#

So you mean

#

You'd run a command like /thing add String

#

And it would add it to the list?

sharp bough
#

yes to the list inside the hashmap

waxen plinth
#

Ok cool

#

That's very easy

#

First, initialize the map

#
Map<UUID, List<String>> map = new HashMap<>();```
#

You probably want to keep this as a member field

#

Then to add to it in a command:

#
Player player; //Assume this is populated with the command sender
String toAdd; //Assume this is populated with the string to add
map.computeIfAbsent(player.getUniqueId(), k -> new ArrayList<>()).add(toAdd);```
sharp bough
#

oh wow, whats the ->

waxen plinth
#

It's a lambda

#

You know, that might be a bit complex if you don't understand what lambdas are

#

Here's an equivalent

sage swift
#

lumbda

sharp bough
waxen plinth
#
List<String> list = map.get(player.getUniqueId());
if (list == null) {
  list = new ArrayList<>();
  map.put(player.getUniqueId(), list);
}
list.add(toAdd);```
#

This does the same thing

#

But the one-liner is much more elegant

#

computeIfAbsent takes a key and a lambda to generate a value if there isn't one present, and returns the existing or computed value

#

Which you can then call add on to add the string

#

Very handy

#

A lambda is essentially just a function that can be passed around

#

That's the easiest way to think of it

sharp bough
waxen plinth
#

k -> new ArrayList<>() is a lambda which takes one parameter, k, and returns a new ArrayList

waxen plinth
#

It will create a new list if one doesn't already exist

#

Under the hood, a lambda is shorthand for the anonymous class definition of a functional interface

#

In this case the functional interface is Function<K, V>

#

A functional interface is just an interface which only has one (abstract) method

#

In the case of Function it's public V apply(K)

#

So k -> new ArrayList<>() is equivalent to:

#
new Function<String, List<String>>() {

  public List<String> apply(String key) {
    return new ArrayList<>();
  }

}```
#

It's just much much shorter to express the same thing with a lambda

#

Which of course is why lambdas exist

#

Does that make sense?

sharp bough
#

okay thats a lot of information 1 second

#

ok so i got that computeIfAbsent will add the Value if Key is null, where key is the player uuid, and value is
k where k = Key and Key is a new list generated with lamba wich is represented using ->, where -> is a shortcut to the functino that returns the arralist, so you define the arraylist cuz V is null, and then you add the value wich is a String arg0

#

now what im gonna try to do is computeIfAbsent, if its null, else get the arraylist and add the value, where K is player uuid

waxen plinth
#

???

sharp bough
#

fk hell this is starting to hurt somewhere in my brain

waxen plinth
#

computeIfAbsent returns the existing value if there is one

#

Otherwise it uses the function you pass to create a value, inserts that value at the given key, and returns it

sharp bough
#

its the if else you made

#

in a single line

#

right?

waxen plinth
#

Yes

#

It does everything you need in a convenient one-liner

waxen plinth
#

You don't need any if/else with computeIfAbsent

#

If it makes it easier you can do it like this

sharp bough
#

yes but what im trying to do is have a hashmap where K is the uuid, and theres a list of all the args0, not adding it if its null

waxen plinth
#

So you don't want to add a value if it's null

sharp bough
#

cuz once you run this command it will create the key, and once the key is no longer null it wont add the new args0 when you run the command again

sharp bough
#

if its null or not

sharp bough
waxen plinth
#

Then what do you mean "not adding if its null"

#

Ok so if there is no mapping at all for the player already

#

Do you want it to create a new list and add the arg as the first element?

sharp bough
#

yea my problem was getting the list, adding the value and changing the V of the player K

#

but i think that with the help you gave me i got it

waxen plinth
#

So there's no if required and you don't need to handle null

#

computeIfAbsent will put the list in if it was null previously, then return it

#

So you just call add on that list and you're good to go

silent turret
#

I'm having some trouble with research, how do I add a Click Event or Hover Event in a custom book?

#

rather new so if u know how u might need to dumb it down a little

sharp bough
#

thank you @waxen plinth it worked like a charm

waxen plinth
#

👍

silk tusk
#

How can I find what kind of portal an entity went through? The PlayerPortalEvent has a TeleportCause that serves this purpose, but the EntityPortalEvent seems to lack a way to figure this out. I tried testing the block the entity was in, but it appears the entity can teleport without being in the portal block depending on the speed of its movement.

#

I'd like to find the actual block of portal the entity entered anyway.

worn tundra
#

Try a move event maybe?

#

Not sure what exactly you're trying to achieve here

silk tusk
#

I'm trying to modify what happens with portals, to allow players to make portals to specific locations. The portals are going to be specified by in world differences, so I need to be able to find the portal they entered in order to check for that.

#

It looks like the player has to be within 0.3 blocks of the block that is actually the portal in order to contact the portal, so I can check the block locations at ±0.3 in x and z to find the portal.

worn tundra
#

It is called when player is about to teleport

#

Check the players world

silk tusk
#

yes, the issue is the block the player is standing in isn't the portal block, but sometimes the one next to it

worn tundra
#

Theres a location from & to

#

Would that help?

silk tusk
#

I think that gives the players start location.

#

should probably check to be sure though

worn tundra
#

If he isn't standing on the portal block exactly you can always do extra functions to locate the portal

silk tusk
#

The from block does appear to be the same place as the player (and thus not the portal) so I guess I'll just check the blocks slightly offset, that seems to be working

worn tundra
silk tusk
#

interesting, I didn't see that event

worn tundra
#

But yeah

#

this only triggers when entity walks in it

#

not teleporting yet

#

I guess you could cache the block from here

silk tusk
#

yes

worn tundra
#

& later check the distance or smth

#

on the portal event

silk tusk
#

The player should only be able to teleport using a portal they have already touched, so I'm guessing that would always fire first with the correct portal block for the player. (thus ensuring the cache is always correct)

worn tundra
#

Also if you're planning on linking portals

#

you could also look into the portal creation event

silk tusk
#

In my case I'm just going to cancel the event, I don't want there to be a reverse portal.

silk tusk
#

I'm trying to implement something like the dislocators from the mod draconic evolution with a plugin

#

yeah

vale cradle
#

Ohhh wither

tranquil owl
#

What its better? ExploitFixer or SpigotGuard?

vale cradle
# vale cradle Ohhh wither

You need to create a custom wither extending from the EntityWither NMS class and the setup a scheduler to constantly set the head's target entityId to 0

digital plinth
vale cradle
#

I didn't realize you were talking about withers ;p

deft geode
#

Is there a way to give an entity a specific texture based on it's name?
I wanna combine it with my plugin

coral sparrow
deft geode
tribal sparrow
#

is there a way to detect right clicks of entities when extending EntityPlayer?
overriding a(EntityHuman) only is fired when a player left clicks the entity,
protected boolean damageEntity0(final DamageSource damagesource, float f) {} doesn't provide a way to see which entityhuman damaged my entity

would i need to use protocol lib to detect the ENTITY_USE packet or is there another way i can do it without having to depend on protocollib?

opal juniper
#

And then force a resource pack on the client so that they see the custom models

slim kernel
#

I am placing a lot of blocks and I did it like this:

startBlock.getLocation().add(5, 1, 1).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(6, 1, 1).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(4, 1, 2).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(5, 1, 2).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(6, 1, 2).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(3, 1, 3).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(4, 1, 3).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(5, 1, 3).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(2, 1, 4).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(3, 1, 4).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(4, 1, 4).getBlock().setType(Material.GRASS_BLOCK);
                    startBlock.getLocation().add(1, 1, 5).getBlock().setType(Material.GRASS_BLOCK);

But need to check if the block I am gonna replace is Air so I wont destroy anything. But is there an easier way than doing an if Statement around every block I am placing? I am placing a lot more than only them above....

wraith rapids
#

google "java for loops"

tired spoke
#

how can i add 1.8 support to a 1.12.2 plugin?

#

i want the 1.12.2 plugin has 1.11, 1.10, 1.9 and 1.8

#

i've see a plugin that starts from 1.12 and has 1.8 support

eternal night
#

You code against the 1.8 spigot API

#

The plugin should then work against the mentioned versions

#

Obviously will break if nms is involved

keen kelp
#

does the java's Color work for chat message/Item name etc

#

java.awt

chrome beacon
#

Never use java.awt

keen kelp
#

ok

tired spoke
chrome beacon
keen kelp
#

is it just §0

chrome beacon
#

Yes

keen kelp
#

frick

#

I even wrote my own color enum ;-;

#

also can I make Intellij show colored squares for custom classes

slim kernel
wraith rapids
#

create a list of locations and then iterate over them

slim kernel
#

oh okay I will try it thank you

tired spoke
#

@eternal night i need to use NMS or recode on 1.8 the plugin?

devout goblet
#

Hey, is it possible to set hex scoreboard team colors?

wraith rapids
#

read what he said

coral sparrow
tired spoke
#

i never know because all of you give an answer, 1 says maven, other nms

#

what is the right

wraith rapids
#

we've given you the answer

#

maven and nms aren't mutually exclusive

#

and if you read what was said you'll understand, or you would if you had past-kindergarten levels of english comprehension, what you need to do

#

it was spelled out very simply and verbosely for you

tired spoke
#

ok

opal juniper
#

So if you use spigot only there is a high likelihood that it will work on older versions anyways.

However, if you use nms, it will not work on any other versions unless you use reflection or something

river spear
#

If I have two locations how can I calculate the circumference of the rectangle

wraith rapids
#

assuming it is an axis-aligned rectangle, calculate its shape and then calculate the circumference

#

if it's not axis-aligned, two points isn't enough to identify it

river spear
#

So I would like to have all locations as scope

#

https://prnt.sc/14ceea3 The two red dots are given and the green one I want to have allos minecraft locations. But it can also be three-dimensional.

keen kelp
#

should I have an enum for NamespacedKey's?

ivory sleet
#

Uh

keen kelp
#

if that's even possible

ivory sleet
#

Yeah it is

keen kelp
#

but should I do it

ivory sleet
#

I mean speaking of how NamespacedKey is instantiated you do need a plugin instance right?

keen kelp
#

that's what I was talking about

#

how do I get main to the enum

#

hence me saying if that's even possible

ivory sleet
#

Of course you could use something like
PluginMain.getInstance() or JavaPlugin.getPlugin(PluginMain.class)

keen kelp
#

Now we know that I CAN do it, SHOULD I though?

tired spoke
keen kelp
#

it's that like a good thing to do?

tired spoke
#

i start by paper and i add spigot support

ivory sleet
#

lau_sam it’s probably fine here since we’re not writing enterprise java code here

#

But enums can be very limited and needless to say static can also

keen kelp
#

so when codes get big, it would ideally have enums for it

#

but for the scale we're doing at it doesn't matter?

ivory sleet
#

Yeah it really doesn’t matter for a spigot plugin I think

keen kelp
#

or that the other way round

#

I see

ivory sleet
keen kelp
#

but that makes your code look fancy amiright

opal juniper
ivory sleet
#

Uh if you want your code to be fancy use a lot of generics and enterprise your project lol

keen kelp
#

generics as in

ivory sleet
#

AbstractFactoryFactory<T,S extends T>

#

Or smtng

keen kelp
#

oh I see

#

that's just gonna be a nightmare for me XD

tired spoke
keen kelp
#

but for the sake of not needing to add a NamespacedKey in the constructor of everything Imm just make an enum for it

ivory sleet
#

Yeah I mean some people overuse that. While I could see a point in doing so for the purpose of learning you probably want to avoid any over engineering or overuse of a single tool.

keen kelp
#

nice

ivory sleet
#

Yeah lau it might be beneficial to do it here so that you can decouple your namespaces from whatever class you had them in before

keen kelp
#

bruh

#

my water just rolled over my keyboard

ivory sleet
#

Lol

keen kelp
#

So I should just pass the namespacekey all around?

ivory sleet
#

With the enum?

#

Arguably even using an enum here is redundant

keen kelp
#

the choice is either have a NamespacedKey in every constructor(that needs it ofc) or have an enum right

ivory sleet
#
interface Namespaces {
  NamespacedKey SOME_KEY = create("test");

  NamespacedKey create(String key) {
    return new NamespacedKey(JavaPlugin.getPlugin(PluginMain.class,key);
  }
}```
#

That might be enough (using an interface to cut down verbosity)

ivory sleet
tacit drift
#

can i use color codes in plugin.yml?

#

with §

#

or something

chrome beacon
#

Yes if it is a message

tacit drift
#

like in the description?

#

plugman

quaint mantle
#

Have anyone any methods to how to get custom textured heads in menus ?

tacit drift
ivory sleet
#

Hot swapping

late dove
#

How can I get a player by nickname? To then replace it with the setWhitelisted() method

ivory sleet
#

Easiest way would be to get it with Bukkit.getPlayer("name");

keen kelp
#

I never learned to use Interface so I have 0 idea how it works

urban trout
#

hiyo my timer + scoreboard are kinda messed up https://paste.md-5.net/osipihazep.cs
im testing with my alt account and the timer is moving down 2 seconds every second and then it randomly spams the end screen code bit

ivory sleet
keen kelp
#

ok

#

ok now how do I use it

ivory sleet
wraith rapids
#

that's because you're iterating over all players in the same runnable

#

and subtracting timeleft with each iteration

ivory sleet
#

@keen kelp now let’s say you wanna use the namespace SOME_KEY, then for instance you might have this:

class ListenerBlah implements Listener {
  @EventHandler public void onBlah(InventoryClickEvent e) {
    e.getInventory().getItem(0).getItemMeta().getPersistentDataContainer().get(Namespaces.SOME_KEY,PersistentDataType.STRING);
  }
}``` or smtng
keen kelp
#

doesn't work :/

#

lemme look into it

#

bruh

#

rip

#

@ivory sleet outta curiosity, why does it have to be an interface

#

I dont know how it works but wouldn't a class work just fine

mighty rune
#

how do you consistently get the player's crafting inventory (those 4 slots)?

keen kelp
#

p.getinventory.getitem()?

ivory sleet
keen kelp
#

I see

opal juniper
#

does the spigot server have access to lombok classes by default

#

i forget

ivory sleet
#

no

opal juniper
#

ok thanks

ivory sleet
#

or I mean its not like a transitive dependency if thats what you mean

opal juniper
#

yeyey

ivory sleet
#

also isn't it an annotation processor?

opal juniper
#

i get ya

ivory sleet
#

or smtng

opal juniper
#

yeha

#

thats true

ivory sleet
#

yeah well I believe bungeecord has it

mighty rune
mortal sail
#

is there a way to change the player event speed and mobspeed

keen kelp
#

@ivory sleet so emm I can't use it for some reason, any ideas?

#

It's just nor prompted at all

ivory sleet
#

Did u declare the class to be public

keen kelp
#

public interface Namespaces?

ivory sleet
#

Oh yeah how’s the code for Namespaces looking

keen kelp
#

what modifier is it by default

ivory sleet
#

public

keen kelp
#

so I shoudn't need it right

#

or am I dummy

ivory sleet
#

I really don’t know as of now, mind sharing some code?

keen kelp
#

I made it public and it's fine now :/

#

so apparently it's not public by default

#

public interface Namespaces {
NamespacedKey Accessory = create("Accessory");

static NamespacedKey create(String Key)
{
    return new NamespacedKey(JavaPlugin.getPlugin(Main.class), Key);
}

}

ivory sleet
#

Oh yeah

keen kelp
#

and I can just use it with Namespaces.Accessory

#

my code is getting super verbose so I def needed this

ivory sleet
#

Yeah but have it all caps since it’s a constant

keen kelp
#

ACCESSORY?

#

Naming convention yay

ivory sleet
#

Ye (:

maiden cape
#

Does BlockBreakEvent#setDropItems(false) prevent experience from being dropped, and if so how would you recommend getting around this if I want experience to still be dropped.

keen kelp
#

is there a like thong for naming conventions

maiden cape
keen kelp
#

thax

#

this page is very...

#

ungoogley

maiden cape
#

they're not going to waste time making a pretty style guide xd

keen kelp
#

well

#

I mean

#

google already have a style going right

#

It can't be that hard to use anything more than purple text XD

ivory sleet
#

I follow google style loosely

keen kelp
#

how loose

ivory sleet
#

Some of their style conventions are pretty counter intuitive

keen kelp
#

color scheme?

#

or you mean coding style

ivory sleet
#

Color is irrelevant

#

Coding style yeah

keen kelp
#

cool

#

I.. just do whatever comes up in my head XDD

ivory sleet
#

Yeah but try have some sort of style or at least consistency needless to say you should still adhere the standard java naming conventions

keen kelp
#

also if you use Intellij(which I suppose you do), do you know anything about colored squares

ivory sleet
#

Colored squares?

keen kelp
#

dis

#

picture from minikloon's tweet

#

in which we know it's an enum, 99% sure it's intellij and 100% java

eternal night
#

Pretty sure intellij shows them next to java colour objects

keen kelp
#

so Im pretty sure we can do it aswell

#

but it's not a color object

ivory sleet
#

Oh no clue actually I know those show up sometimes when the line involves color as lynx said

eternal night
#

are you sure there isn't a colour object in the enum constructor call ?

keen kelp
#

they show up when Color is used

#

but is it possible to have it show up for my own class is the question

#

pretty sure

#

we dont get much info about this

#

it seems to be new Buildblabla

eternal night
#

I'd take a wild guess it is rather hard coded into intellij

#

fam

keen kelp
#

so I suppose prolly not?

eternal night
#

there might just be a new Color(23,422,145) in that line

ivory sleet
#

There might be a configuration or plugin which may add that feature

#

Like on top of IntelliJ then that is

keen kelp
#

yeah Im thinking of that but google isn't budging

quaint mantle
#

Is there an event for when a player damages a mob, i saw a event for right clicking a mob but not leftclicking

keen kelp
#

EntityDamageEntityEvent?

ivory sleet
#

Yeah EntityDamageByEntityEvent

quaint mantle
#

Oh -_- ok me being stupid

keen kelp
#

then if(!event.getdamager instanceof Player) return bla bla bla

quaint mantle
#

Yeah cheers

keen kelp
#

:)

quaint mantle
#

Wait was it in the entity event tab

keen kelp
#

pretty sure yes

eternal night
quaint mantle
#

Ah i was looking in player events

eternal night
#

btw just to give you a heads up on how that screenshot might have been created

keen kelp
#

oh :/

ivory sleet
#

ComplexWrapper hypixel_this_is_fine

keen kelp
#

so I can't make my enums have color

#

is this the thing you were talking about to make your code look fancy

eternal night
#

the point of these colour codes is that you can easily modify the colours through the interface

#

not some weird colour coding for enum constants

keen kelp
#

I mean it would be cool to just be able to change a message's color from a GUI amiright

eternal night
#

there is ChatColor support using the minecraft development plugin

keen kelp
#

like if the text was black and I dont like it, instead of typing, just click click click

keen kelp
#

;-;

#

you know this is unfair

eternal night
#

how

keen kelp
#

plz send

eternal night
#

what

keen kelp
#

how does one do this

eternal night
#

I

keen kelp
eternal night
#

yes

keen kelp
#

I just found it like 10sec ago

eternal night
#

👀

keen kelp
#

I thought it's only for creating new projects

#

iirc this team also have an addon for VSC

eternal night
#

don't care much for VSC ¯_(ツ)_/¯

keen kelp
#

i used to use it

#

still do for datapack

#

just dont make datapacks anymore

#

but regardless this is very poggers

eternal night
#

I mean, if you code any somewhat used plugin you will have to externalise your language configuration anyway

quaint mantle
eternal night
#

at which point this feature becomes useless

keen kelp
#

lol

quaint mantle
#

like im so glad i found it before i started deep development

keen kelp
#

unlike me :/

quaint mantle
#

ouch

keen kelp
#

sucks to suck man

maiden briar
#

java.lang.NoSuchMethodException: Constructor ('[class java.lang.Integer, class java.lang.Integer]') not found! ???

public static Reflection newInstance(Class<?> clazz, Object... parameters)
    {
        Class<?> superClass = clazz;
        Class<?>[] parameterTypes = new Class[parameters.length];

        for(int i = 0; i < parameters.length; i++)
            parameterTypes[i] = parameters[i].getClass();

        while(superClass != null)
        {
            try
            {
                Constructor<?> constructor = superClass.getDeclaredConstructor(parameterTypes);
                constructor.setAccessible(true);
                return new Reflection(constructor.newInstance(parameters));
            }
            catch(NoSuchMethodException e)
            {
                superClass = superClass.getSuperclass();
            }
            catch(InvocationTargetException | IllegalAccessException | InstantiationException e)
            {
                e.printStackTrace();
            }
        }

        try
        {
            throw new NoSuchMethodException("Constructor ('" + Arrays.toString(parameterTypes) + "') not found!");
        }
        catch(NoSuchMethodException e)
        {
            e.printStackTrace();
            return null;
        }
    }```
eternal night
#

Integer and int are different classes

bitter ridge
#

Hello! Is there easy way to change string for example "COD" to "Cod" or "DIAMOND" to "Diamond"?

eternal night
#

and the object array you are using to pass the parameters can only store Integer

#

as ints are native/primitive

maiden briar
#

Oh...

#

And in reverse, if the constructor is (Integer, Integer) and I try to parse an int, does it work?

eternal night
#

no

keen kelp
#

Use string to make them all lower cased then just capitalize the first letter?

eternal night
#

completely different classes

maiden briar
#

Ok but how can I see then if I need Integer or int?

keen kelp
maiden briar
#

Same with Byte or byte and Short or short also?

eternal night
#

yes

maiden briar
#

Just cast it?

eternal night
#

Boolean and boolean are different things too

#

no

keen kelp
#

they are completely different

eternal night
#

you will need to specify what type you want to use I am afraid

maiden briar
#

Can't I add a boolean for "primitive" ?

eternal night
#

or try every possible combination of object and primitive type

#

huh ?

#

You are only passing in a parameter object array tho

keen kelp
#

Imma head out this convo is getting confuuusing

eternal night
#

either you interpret every Integer as an int

#

which would mess up constructors that take Integer

maiden briar
#

Can't I just try and catch?

keen kelp
#

it would always fail

eternal night
#

yes but then you'd have to try every combination of Integer or int

keen kelp
#

cause you can't

#

right

eternal night
#

to make sure you actually find the right constructor

maiden briar
#

Yes that is too much

eternal night
#

just also pass an array of classes

#

that define the types

maiden briar
#

Hm ok, no other things to try?

eternal night
#

none that I know of

maiden briar
#

Ok

keen kelp
#

If I want a variable to not exist beyond a point, is there a better way better than if(true)

proper notch
#

what

#
if (true) {
  do thing
}

is the exact same as

do thing
lusty cipher
#

use scopes @keen kelp

#
{
  int x = 5;
  obj.anotherFunc(x); // works fine
}
obj.anotherFunc(x); //error, x does not exist.
pine elbow
#

Newbie at bukkit/spigot API (and java in general TBH)
This looks like it's horrible code, What's a better way of dealing with items with durability?

Inventory inv = ply.getInventory();
for (int size = 0; size<inv.getSize(); size++) {

    ItemStack item = inv.getItem(size);
    if(item != null){

        ItemMeta meta = item.getItemMeta();
        if(meta instanceof Damageable){

            Material type = item.getType();
            int min = config.getInt("min_damage");
            int max = config.getInt("max_damage");
            int durabilityChop = type.getMaxDurability() / (int)Math.floor(Math.random()*(max-min+1)+min);;

            ((Damageable) meta).setDamage(((Damageable) meta).getDamage() + durabilityChop);
            item.setItemMeta(meta);

            if(type.getMaxDurability() - ((Damageable) meta).getDamage() < 0){
                inv.setItem(size, new ItemStack(Material.AIR));
                ply.getWorld().playSound(ply.getLocation(), Sound.ENTITY_ITEM_BREAK, 1, 0.8f);
            }
        }
    }
}
lusty cipher
#

I mean for one, for better readability you would be better of doing

ItemStack item = inv.getItem(size);
if (item == null) continue; // Skips the current iteration of the loop to the next one.
pine elbow
#

ah yeah, fair.
Juggling the ItemMeta and Damageable seems odd to me

lusty cipher
#

other than that, maybe

if (meta instanceof Damageable) {
  Damageable damageableMeta = (Damageable) meta;
  // no need to cast damageableMeta anymore.
}

or if you're using Java 16 or newer:

if (meta instanceof Damageable damageableMeta) {
  // no need to cast damageableMeta anymore.
}
bold parcel
#

are locations immutable? i.e. if I use add, does it modify the location or return a new location?

eternal night
#

it mutates them

bold parcel
#

thanks

lusty cipher
bold parcel
#

yeah I somehow missed that xD

pine elbow
#

Aight next thing, is there a way to test if bStats is working other than just waiting?

lusty cipher
#

I mean I personally just create the Metrics instance and don't care about it afterwards. If there's any problems it'll throw an error. If it stays quiet it's in 99.99% of the cases running fine.

viscid oasis
#

Hello, can anyone help me? I am trying to make pickaxe with my custom enchantment and i want to prevent players to add mending or unbreaking to that pickaxe (for not OP purposes)... How can I set that custom enchant, to conflicts with these enchantments?

maiden briar
vital ridge
#

Can anyone tell me why this code isnt spawning specific player's head

#
public PhysicalBox(Chicken chicken) {        
        
        Location skullLoc = chicken.getLocation();
        World w = chicken.getWorld();
        
        skull = new ItemStack(Material.PLAYER_HEAD);
        meta = (SkullMeta) skull.getItemMeta();
        meta.setOwningPlayer(Bukkit.getPlayer("Nuxoria"));
        
        skull.setItemMeta(meta);
        
        skullLoc.getBlock().setType(skull.getType());
        
    }
#

this just spawns steve's head

#

is it because skull.getType?

#

and it just spawns the default head?

vale cradle
#

Are you trying to change a player head block using the ItemMeta?

vital ridge
#

yea

vale cradle
#

Tha wont work

#

Get the BlockState, cast it to a skull and change everything you want from here

vital ridge
#

yea but

#

i need to set the block type first

#

before getting the state

#

otherwise it returns air

vale cradle
#

Do it then

vital ridge
#

can i change how block looks when its arleady placed?

vale cradle
#

Looks?

vital ridge
#

i mean

#

the owner

stone sinew
#

e.getView().getTopInventory()

vale cradle
wet breach
stone sinew
#

Ok I was right the first time

wet breach
#

skull block has setOwningPlayerMethod()

vital ridge
#

idk why but this code still spawns default steve's skull

#
public PhysicalBox(Chicken chicken) {        
        
        Location skullLoc = chicken.getLocation();
        World w = chicken.getWorld();
        
        skullLoc.getBlock().setType(Material.PLAYER_HEAD);
        
        skull = (Skull) skullLoc.getBlock().getState();
        
        skull.setOwningPlayer(Bukkit.getPlayer("Nuxoria"));
    }
vital ridge
#

So ill set the type again?

stone sinew
#

What exactly do you want to do?

#

Thern check if its that inventory

vale cradle
#

No, no from player.getInventory the player's inventory will never be the top one

vital ridge
#

i set the type again

#

at the top of the code

#

but it still spawns steve

#

i just added that:

vale cradle
vital ridge
#

oh

#

aight

quaint mantle
#

help please

vital ridge
vale cradle
quaint mantle
#

yea

#

im dumb sorry

vital ridge
#

yeah dont

#

np

stone sinew
#

Debug

#

Also drag is when you have an item on the cursor already

#

not click

#

Nope need to check click for that

#

or inventory swap

vale cradle
#

What is ChallengesMenu?

#

An inventory?

#

?

stone sinew
#
if(event.getAction() == InventoryAction.HOTBAR_MOVE_AND_READD || event.getAction() == InventoryAction.HOTBAR_SWAP || event.getAction() == InventoryAction.MOVE_TO_OTHER_INVENTORY) {
    event.setCancelled(true); p.updateInventory();
}
``` in `InventoryClickEvent`
vale cradle
#

Is ChallengesMenu an inventory?

#

Why do you create a new inventory every time?

#

Just create a single one

stone sinew
#

Show me the updated code

#

Delay updating the inventory by a tick

#

And debug to make sure its running

cold tartan
#

is there a way for animals such as pigs, sheep, and cows run away from someone as if they hit them

stone sinew
#

You didn't cancel the event on that new code... just broadcasted a message

#
if (newInventory == ChallengesMenu) {
    Bukkit.broadcastMessage("Challenge Menu");
}
#

My code only cancels for specific actions

#

Not clicking

maiden briar
#

Is it easier to listen for an event on all the priorities so you don't need to create 6 methods?

stone sinew
#

try using .equals instead of == in this case. on newInventory.equals(ChallengesMenu) Also... every time you type that command its creates a new inventory so if you're still viewing the old inventory instance this will always be false.

#

Correct its not initialized until you type the command.

#

That can work to.

#

Debug. something isn't equal to your object

#

Then people can just create inventories with that name

paper viper
#

you should really get into the habit of using ChatColor instead of §c

#

ChatColor allows better compatability between versions

worldly ingot
#

Nah it's not a version thing. It's an encoding thing

#

Same point though

paper viper
#

Ah

#

Then consider using a component api

#

or the one built into spigot

worldly ingot
#

lol if anything that's more verbose

paper viper
#

true lmao

#

But at least you can get rid of the concatenation clutter

stone sinew
#
public String colorize(String s) {
    return ChatColor.translateAlternateColorCodes('&', s);
}

// player.sendMessage(colorize("&6Hello!"))
tribal holly
#

Someone know how to summon potion particle at a location ?

paper viper
#

Isn't there Player#spawnParticle or World#spawnParticle

tribal holly
#

yes it is but don't find the Particle.POTION_PARTICLE

quaint mantle
#

i dont see how the particle matters; both of those methods have a parameter for location

tribal holly
#

what ? i need the particle name to summon it

paper viper
#

I think the particle is SPELL?

tribal holly
#

and i can't find any kind of potion particle inside Potion ENUM

paper viper
#

Oh wait hm

tribal holly
#

wanna have this

quaint mantle
#

should be spell or spell_mob

paper viper
#

Maybe try Particle.SPELL

#

then use DustOptions

#

to set the color

tribal holly
#

okay thx

quaint mantle
#

dustoptions works with spell?

paper viper
#

Hm

#

it says in the docs actually its for redstone

quaint mantle
#

yeah idk if it could be used for anything else besides that

#

if it can thats kinda neat

paper viper
#

Ok so according to the client changes, the World#playEffect(location, effect, int)

#

you just pass in the color you want for the int actually

#

you dont use DustOptions

#

The integer should be an rgb color

tribal holly
#

si i need to use DustOption ?

paper viper
#

No

#

Let me check something to make sure, maybe even spawnParticle isnt the right method

#

cause there is playEffect

tribal holly
#
public <T> void spawnParticle(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);```
paper viper
#

And then you can try passing in an Effect and integer rgb color

#

Not sure tho, I need to verify this

quaint mantle
#

i think you can use the offset x y and z parameters for colors

paper viper
#

Yeah

#
int rgb = red;
rgb = (rgb << 8) + green;
rgb = (rgb << 8) + blue;
paper viper
#

I think that would be how you get the rgb int

#

and pass that into the color

quaint mantle
#

the count parameter also controls the alpha iirc so you can only spawn 1 at a time

bleak reef
#

Hey, I'm kind of confused, I'm probably doing something really simple wrong but I honestly have no clue,
Its printing test into the console however the armor stand isn't moving

Location armorLoc = armor.getLocation();
int task = Bukkit.getScheduler().scheduleSyncRepeatingTask(Main.getPlugin(Main.class), new Runnable() {
  public void run() {

    armorLoc.setY(armorLoc.getY() + 0.05);
    armor.teleport(armorLoc);
    System.out.println("test");
  }
}, 1L, 1L);
paper viper
#

You should be using BukkitRunnable btw instead (docs outdated it)

worldly ingot
#

scheduler is fine here

ivory sleet
#

lambda fingerguns

worldly ingot
#

Finn, 0.05 is extremely small and armour stands have gravity

bleak reef
#

Ive disabled gravity, sorry forgot to mention that

#

armor.setCollidable(false); armor.setBasePlate(false); armor.setGravity(false);

paper viper
#

maybe try setting + 0.05 to something bigger

#

and see if you notice a difference

bleak reef
#

Ive already done that, I set it to 1 earlier, still no movement whatsoever

minor garnet
#

what you are trying to do

bleak reef
#

Just move it upwards

worldly ingot
#

?kick @gritty flame trolling

queen dragonBOT
#

👢 Kicked Dragonze (Shank)#9952

opal juniper
#

lmao

minor garnet
#

tf

paper viper
#

weird kid

paper viper
#

Can we see the code?

opal juniper
tribal holly
paper viper
#

Oh ok

paper viper
ivory sleet
#

I mean both works

bleak reef
#

Its printing test so its fine

tribal holly
paper viper
#

Can you show code

worldly ingot
#

It's just a little nicer to write

Bukkit.getScheduler().runTaskTimer(plugin, () -> {
    // whatever
}, 0L, 20);```
tribal holly
#
loc.getWorld().spawnParticle(Particle.SPELL, x + 0.5, loc.getY(), z + 0.5, 2, 255l, 0l, 0l);```
ivory sleet
#

Pulse the only reason I would not use the BukkitScheduler would be where you want to take advantage of the impurity BukkitRunnable may offer

tribal holly
#

haa ok i'm tryng

queen dragonBOT
paper viper
#

Hm yeah

#

for me it is

ivory sleet
#

same

cold tartan
#

is there a way to detect entity movement in an event, i know PlayerMoveEvent is a thing

#

but i need it for entities

ivory sleet
quaint mantle
#

that must've just happened lol, i was on the docs like 2 minutes ago

tribal holly
cold tartan
vale cradle
ivory sleet
#

Uh I guess you could use a repeating task to check movement

tribal holly
quaint mantle
#

how to set item position in gui?

paper viper
#

then for the rgb, use the code i sent above

ivory sleet
paper viper
#

which coverts the r, g, b into one integer

paper viper
paper viper
#

Options which can be applied to redstone dust particles - a particle color and size.

#

yeah

vale cradle
#

Then, I guess the color of the SPELL must be determined by the speed

paper viper
#

wdym

tribal holly
vale cradle
#

the speed of the particle may change some misc stuff of the particles

quaint mantle
tribal holly
#
loc.getWorld().playEffect(new Location(loc.getWorld(),x + 0.5, loc.getY(), z + 0.5), Effect.POTION_BREAK, 0);```
severe night
ivory sleet
#

Yes it seems to be

severe night
#

;-;

pine elbow
#

spigot down again yeah