#help-development

1 messages Β· Page 2078 of 1

crisp steeple
#

so no

tender shard
#

no

#

that should work though

#

?paste your code

undone axleBOT
arctic moth
#

@tender shard

#

i dont see why it shouldnt work

quaint mantle
#

holy shit

#

use mutliple lines

arctic moth
#

lol

#

but i always get roasted for my arrow code

chrome beacon
#

Then don't make arrow code?

arctic moth
#

well how else would i make my if statement multiple lines

viral crag
#

you dont need redundant checks

chrome beacon
#

returns statements :)

viral crag
#

if something isAdult, it is ofcourse Agable

arctic moth
#

but its just to run 2 lines of code

arctic moth
viral crag
#

&& event.getDamager() instanceof Ageable && !((Ageable) event.getDamager()).isAdult() &&

granite burrow
#

Alright im a bit confused.
I was trying to use this to make sure that the item would get removed from the dispenser, however, after I run this https://paste.md-5.net/ocobukifiy.coffeescript I get the bucket being put in the top left side and where ever the bucket originally was, any idea why?

viral crag
#

it is also all almost a waste of time for your objective - it really is too bad that intellij does not have a time profiler

stuck flax
#

is it possible to run a bungeecord command through a plugin on a spigot server

viral crag
#

yes

stuck flax
#

how

stuck flax
#

ty

arctic moth
stuck flax
viral crag
stuck flax
#

I want to run a bungeecord command on the console via a spigot plugin

viral crag
#

you think if isAdult fails that Agable is useful to waste time checking?

arctic moth
#

wdym lol i cant do isadult because i cant cast it unless its an instance of ageable

viral crag
#

...

carmine pecan
#

Anyone here knows how to listen for pressure plates using packets?

viral crag
#

why would you use packets? an event exists for it

eternal night
#

but is it really a ✨ fast async / packets pressure plate plugin ✨ if you use events

dusk flicker
#

that has to be the stupidest thing ive ever heard (not you Lynx, thats great)

carmine pecan
#

Well I'm sorry for asking, I just wondered if any one of you knew if that's possible?

sterile token
#

What its wrong i cannot understand?

public void send(Player player, String path) {
        this.lang.get(path).equals(String.class) ? player.sendMessage(this.lang.getString(path)) : this.lang.getStringList(path).forEach(player::sendMessage);
}
dusk flicker
#

.equals(String.class)?

#

would that even work

viral crag
#

yeah it is possible but unneeded work unless you have an ancient server

sterile token
#

Something better for that code?

#

Because its not working

dusk flicker
#

What is 'lang'?

#

(the object, i mean)

sterile token
#

Lang its a YamlConfiguration object

#

So im trying to check if the path is string send player the string and if its a list send the message using foreach

dusk flicker
#

use isList

#

(that is implemented into YamlConfiguration)

sterile token
#

so it will be

lang.isList(path) ? lang.getStringList(path).foreach(text -> player.sendMessage(text)) : player.sendMessage(lang.getString(path))

dusk flicker
#

I believe so

sterile token
#

Not working

dusk flicker
#

What isn't working about it

#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

sterile token
#

Saying its not a statement

#

Im so annoyed lmao

#

The error says "that its not a statement"

dusk flicker
#
if (lang.isList(path)) lang.getStringList(path).forEach(Player:sendMessage);
else player.sendMessage(lang.getString(path));
#

try that

dusk flicker
#

it should be but let's make sure its just working for now

#

also I think im missing a ; on the top if statement

#

wrote that out in discord so no idea if its right lol

ivory sleet
#

πŸ₯²

sterile token
ivory sleet
sterile token
#

So a expression?

ivory sleet
#

share the code

sterile token
#

Allright

#
lang.isList(path) ? lang.getStringList(path).forEach(player::sendMessage) : player.sendMessage(lang.getString(path));
ivory sleet
#

oh

#

forEach yields nothing

#

(aka void)

dusk flicker
#

the player also isnt capitalized in the lambda

sterile token
ivory sleet
#

I believe thats since they want to send every string of the list to the player

dusk flicker
#

this is why I dont do java after work as I am out of my mind lol

ivory sleet
#

πŸ₯²

sterile token
#

Oh lmao i dont kno what happens

#

Java todays is amess

#

Lot of problems its giving me today

dusk flicker
#

personally id firstly make it work in a normal if statement, then work on condensing it down

ivory sleet
#

mye I mean

#

^

dusk flicker
#

I hate debugging a stupid inline if statement lol

ivory sleet
#

prioritize the intermediate working state

sterile token
#

Oh so it not possible ho i want :/

ivory sleet
#

I mean

#

((Runnable)(lang.isList(path)?(() ->lang.getStringList(path).forEach(player::sendMessage)):(()->player.sendMessage(lang.getString(path)))).run() or sth maybe

#

but it gets extremely unreadable

ivory sleet
#

I mean doesnt have to be

#

but ternary is what u call syntactic sugar

#

it compiles down to lower level stuff

#

"desugaring"

sterile token
#

I dont udnerstand why not work

#

It should be working

ivory sleet
#

no because you cannot really do anything with void

#

its just void

#

like

#

void x = condition ? send() : disconnect();

#

that wont work

sterile token
#

Oh ok

ivory sleet
#

same with this:

void method(void x) {

}

#

that does not work either

#

void is made to just represent nothing

sterile token
#

My big issue is that it will explote when the path its an list

#

Do i explained?

ivory sleet
#

well

#

what was the underlying issue here

sterile token
#

oh ok

stuck flax
#

what is NMS?

ivory sleet
#

its an acronym for net minecraft server or native minecraft source and basically refers to mojang's server software

stuck flax
#

what does it do/used for

low temple
ivory sleet
#

its the server implementation

#

like

#

the logic behind entities being able to path finding, ability craft, break and place blocks etc

stuck flax
#

ah alr

ivory sleet
#

spigot api and plausible forks just create an api (a set of interfaces) which to some extent abstract over the server implementation

#

this becomes meaningful when the server implementation changes drastically, where apis such as spigot api can resist these changes that causes unexpected and unwanted incompatibilities

low temple
#

In the PlayerInteractEvent, is there a way to detect when a player releases/presses right click?

#

or is the event based on the keypress

eternal night
#

the event is based on what the client tells the server

#

you won't get key press information

#

nor a release

sterile token
eternal night
#

what ?

#

the player toggle sneak event is something completely different

sterile token
#

OnInteract you can check if he is sneaking

eternal night
#

how does that relate at all to the question or my statement πŸ˜…

viral crag
#

if the click does something, then you would get the event. however that comes with various caveats - (the server itself does not care if the source is a mouse, keyboard, touch screen, controller, etc)

ivory sleet
#

key logging would arguably give too much control

viral crag
#

ms wouldnt allow it in any case

ivory sleet
shrewd solstice
#
out.writeUTF("GetServer");
String servername = in.readUTF();```

in cannot be resolved
pliant oyster
#

what are your parameters

ivory sleet
#

are you writing or reading?

sterile token
#

Because you write the request and them receive a response

viral crag
#

in doesnt contain anything

ivory sleet
#

myes but like you usually write the entire thing and then get the array and send that

#

and somewhere else, like inside the pmc listener would be where you pick up responses

sterile token
#

Yeah

jaunty helm
#

try catch (Throwable $ex)???

quaint mantle
#

How can I make the seconds display: second, seconds?

#

1 second

#

30 seconds

low temple
#

then check if it == 0

quaint mantle
low temple
#

show the config and what u want it to do

quaint mantle
#

Using a jump after a certain time, which can be configured via the config

low temple
#

so in the config u have something like

jump-cooldown: 1

?

quaint mantle
#

yes

low temple
#

and u want it to say "seconds" or "second" where?

quaint mantle
#

I need exactly the ending

low temple
#

In a message sent to the user?

quaint mantle
#

yes

low temple
#

ok so in the message you can do

int cooldownLeft = <get ur cooldown int>;
String message = "Cooldown: " + cooldownLeft + (cooldownLeft == 1 ? " Second" : " Seconds");
#

if cooldownLeft == 1 then the message will be
Cooldown: 1 Second
otherwise itll be
Cooldown: <number other than 1> Seconds

quaint mantle
#

is it possible somehow without this?

low temple
#

without checking if cooldownLeft is equal to 1?

quaint mantle
#

I need it for different languages

quaint mantle
low temple
#

so with languages if u have a way to get the plural rather than the singular then change to

int cooldownLeft = <get ur cooldown int>;
String message = "Cooldown: " + cooldownLeft + (cooldownLeft == 1 ? <singular String var> : <plural String var>);
low temple
quaint mantle
#

Okay

#

Thanks

cobalt tinsel
#

i need help with maven

#

you give support for that here?

sand vector
#

Do all versions of spigot support JDK 18?

vocal cloud
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

ivory sleet
#

older versions have apache utils which use stuff that was removed in newer jdks iirc

sand vector
#

so what would be the best version for 1.13?

ivory sleet
#

Idk

#

I always use 17

#

or 11

#

since those are lts

river oracle
#

It should say when starting the server

#

Also 1.13 is god awful why...

#

Like atleast use a more optimized 1.12 or 1.15

ivory sleet
#

basically non lts versions are just experiment and intermediate versions just lowkey (jdk 12 to 16 for instance (but yes they are marked as stable))

river oracle
#

I mean since your above 1.8 and your not complaing about pvp why not 1.18

sand vector
#

I want to make it cross versions so I didn't know whether you had to have a jdk for all

#

idk tbh

ivory sleet
#

well

river oracle
#

I've not got into cross version support but from what I've done is just use an older version usually the older api works fine but it's awful to manage

ivory sleet
#

you can use more than one version concurrently

#

it just gets a bit ugly

river oracle
#

It gets really ugly if you use nms

vocal cloud
#

Man people just need to suck it up and use the latest lol. I find it funny that backwards support is such a huge deal. It's not like you can't update your Minecraft. The updates are literally free.

shrewd solstice
#

player.getServer().getInfo().getName().equalsIgnoreCase("hub")

error ->
The method getInfo() is undefined for the type Server
spigot 1.16.5

ivory sleet
#

spigot or bungeecord

shrewd solstice
#

both

#

i want to make a /hub to send player to the hub if he isnt on the hub

ivory sleet
#

cuz like, bungeecord and spigot is just one directional

#

bungeecord knows about spigot servers

#

not the other way around usually

quaint mantle
#

Anybody here have knowledge on jacksons core?

ivory sleet
#

unless you use sth like pmc

quaint mantle
#

Im having a mental breakdown

shrewd solstice
#

so... how i do?

ivory sleet
#

Dm07 well what are you trying to do?

quaint mantle
ivory sleet
#

whats the name of the error class?

quaint mantle
#
HashMap hash = mapper.readValue(file, HashMap.class);
#

i dont get why

#

its erroring

#

this SHOULD work 100% fine

ivory sleet
#

how does the file content look like

quaint mantle
# ivory sleet how does the file content look like
try{
            if(file.createNewFile()){
                HashMap<String, Object> hash = new HashMap<>(){{
                    put("buttonPos", new Vector2(0,0));
                    put("isBasicGrind", false);
                    put("isAutoDep", false);
                    put("isAutoRewards", false);
                }};
                String json = mapper.writeValueAsString(hash);
                FileWriter myWriter = new FileWriter(file);

                myWriter.write(json);
                myWriter.close();
            }
        }catch(IOException e){
            e.printStackTrace();
        }
#

Generated here

ivory sleet
#

what if u use sth like new TypeReference<HashMap<String,Object>>() {} instead

shrewd solstice
#

can i do something? like... put something like
server_name = hub

and take it in the plugin to know that is the hub?

ivory sleet
#

Instead of HashMap.class

quaint mantle
ivory sleet
#

hmm

quaint mantle
#

however that did solve 1 issue i was having

#

so now i can use <>

#

for hashmaps

#

yay

ivory sleet
#

lol yeah

#

well

#

perhaps its due to how you write and save

quaint mantle
#

is there a way i can improve that?

ivory sleet
#

I mean the File class is obsolete and abandoned first and foremost

#

idk why oracle hasnt deprecated it yet

#

because Paths are just better

#

and then you have Files.newBufferedWriter(path,charset) which is just better than FileWriter

#

(with StandardCharsets.UTF_8)

quaint mantle
#

Wait, what are paths?

#

How do I use them

ivory sleet
#

either with
File#toPath
or Path.of() or Paths.get()

#

and you use Path#resolve

#

to walk up or down

#

and to create the file or directory etc you'd use methods from the Files.java class

quaint mantle
#

A

ivory sleet
#

let me try with jackson

quaint mantle
#

Do paths work the same?

ivory sleet
#

more or less

quaint mantle
#

Alright, and how does Files.newBufferedReader

#

work

worldly ingot
ivory sleet
#

try (var writer = Files.newBufferedWriter(file.toPath().toAbsolutePath(),StandardCharsets.UTF_8)) {
writer.write(json);
}

#

iirc

#

might have to use sth like if (Files.notExists(path)) Files.createFile(path) (before)

noble lantern
#

this is for json right

#

why not use Gson instead of manually serializing that shiz

ivory sleet
#

they're not manually serializing with jackson either tho

quaint mantle
#

@ivory sleet IT WORKED

#

THANK YOU SO MUCH

noble lantern
ivory sleet
#

I mean they could create a pojo

noble lantern
#

true true

ivory sleet
#

and like... jackson supports that as much as gson, but ye gson is a bit more intuitive and just better designed imho

noble lantern
#

didnt know jackson supported that

#

and yeah i love gsons designs its rly simple

ivory sleet
#

ue

#

well, jackson is more enterprisy

quaint mantle
#

@ivory sleet Would you like to know what im doing btw lol

ivory sleet
#

sure

#

πŸ‘€

noble lantern
quaint mantle
#

I got lazy and made a macro for a discord bot cause I dont wanna spend all night grinding so it does tasks for me based on settings I want it to do

#

:P

ivory sleet
quaint mantle
#

AKA: Im lazy

ivory sleet
#

you'd need to use plugin messaging

#

else, bungeecord provides that info in the api

quaint mantle
#

ill show ya the ui

quaint mantle
#

its for the discord bot

#

whats it called

#

Dank Memer

quaint mantle
#

or whatever its called idk

ivory sleet
#

average naming

noble lantern
#

lmfao wtf

#

i bet there UpperCaseWithUnderscoresStrategy too

quaint mantle
#

@ivory sleet Bad ui but it works

ivory sleet
#

lol

EDIT nice, typical java ui tho

noble lantern
#

LowerAndUpperCaseWithUnderscoresStrategy

#

theres a gui library uhhhm

#

shit whats its name

#

sec

ivory sleet
#

lol

noble lantern
#

sec this might take a while but ik it was really cool

ivory sleet
#

πŸ‘€

quaint mantle
#

πŸ‘€

young knoll
quaint mantle
#

id love a new ui for it lol

echo basalt
#

java swing

quaint mantle
#

for a discord bot

#

cause i dont wanna grind on it all night

noble lantern
#

this

#

ImGui

quaint mantle
#

so it auto does every taslk for me

young knoll
#

So it’s a bot

#

For a bot

quaint mantle
young knoll
#

The robot takeover is here

quaint mantle
#

debounce = !debounce

noble lantern
ivory sleet
#

oh holy

young knoll
#

Yo is that minecraft

ivory sleet
#

thats... fancy

quaint mantle
noble lantern
quaint mantle
#

THAT LOOKS BEYOND BEAUTIFUL

noble lantern
young knoll
#

I wonder what the first version of minecraft that had a GUI looked like

noble lantern
#

even nodejs has a port for imgui lmfao

noble lantern
#

you could use a ooooooold version and look

quaint mantle
#

to make it work

#

with this

noble lantern
young knoll
#

Nah not the inventory GUI

#

But like, the first version of the game to actually open something that wasn’t a console window

#

Probably just an empty void

noble lantern
#

probably looked really buggy

ivory sleet
noble lantern
#

theres a video of the first ever mc video thingy

noble lantern
ivory sleet
#

this is where 1.8 faction devs usually turn out to be the biggest culprits, bad design per say

noble lantern
#

sorry i lied with my first link

shrewd solstice
noble lantern
#

you can just make your plugin a bungee plugin and then have the command registered on the proxy

#

i think i might have an example of this

shrewd solstice
#

ok

noble lantern
#

Okay my example likely wont work as it used a annoted command api as well as other things apologies

#

but

#

iirc if you try to send a player to a server theyre already on

#

it wont reconnect them

#

as with my examples we didnt do that but there could of been something in our API that handled it

shrewd solstice
#

yeah i know i want to if he do /hub he go to 8 4 8 bc i can connect player to server but if he do /hub on the hub it do an error...

noble lantern
#

8 4 8?

shrewd solstice
#

the coordinates

#

8.5 4.00 8.5

noble lantern
#

i see, in that case bungee should have an option to get the servers name the player is on, so you can just register a command to the proxy and handle it there

noble lantern
#

what we did is in config.yml we specified the server name in there

#

idk if your able to add stuff to server.properties

#

i could be wrong though

shrewd solstice
#

so i can do it in config.yml

#

?

noble lantern
#

yes and just save your servers name/key in there, IE Hub-01 but youll need plugin messaging ofc

#

its been almost 3 years since ive done any bungee development so things could have changed as well, you can always google this stuff too

quaint mantle
#

@noble lantern Can you help me install this?

#

Its a pain lol

noble lantern
quaint mantle
#

wha

#

imgui

noble lantern
#

ive only sparingly used it tbh, never used its java port

quaint mantle
#

ah

noble lantern
#

its a little harder to work with but it definatly looks nice

#

any ports documentation relies on the native C# variant

quaint mantle
#

how would i change the UI style

#

without having to make it load a second window

noble lantern
#

ie changing like the whole theme/layout of it?

#

@open silo welcome

open silo
#

Hello

#

Send the thing

noble lantern
quaint mantle
#

@noble lantern class java.util.LinkedHashMap cannot be cast to class com.emerald.funcs.Vector2

#

Any reason this may occur?

#

(I made a custom Vector2 class for java)

lavish hemlock
#

Well

#

The uhh

brave sparrow
#

Lol

lavish hemlock
#

The error is quite...

#

self-explanatory

brave sparrow
#

?learnjava

undone axleBOT
noble lantern
#

needs to extend/implement LinkedHashMap in order for you to cast it like that

#

which i dont rly reccomend

quaint mantle
#

how do i do that

noble lantern
#

why do you have to?

noble lantern
# quaint mantle how do i do that

You just make your command extend/implement that class and then your gonna need to override any methods (Your ide should tell you)

#

you should be able to just implement it

quaint mantle
#

its not a hashmap

noble lantern
#

yeah with extending stuff your gonna have to actually basically re-create linkedhashmap and its methods

#

which really isnt something you should do

noble lantern
noble lantern
#

and yourVector2.linkedHashMap

quaint mantle
#
package com.emerald.funcs;

public class Vector2 {
    public float x;
    public float y;

    public Vector2() {
        this.x = 0.0f;
        this.y = 0.0f;
    }

    public Vector2(float x, float y) {
        this.x = x;
        this.y = y;
    }

    public boolean equals(Vector2 other) {
        return (this.x == other.x && this.y == other.y);
    }
}
#

this is what it looks like

brave sparrow
#

?xy

undone axleBOT
noble lantern
brave sparrow
#

What are you trying to do

noble lantern
#

why are you trying to cast that to LinkedHashMap anyways?

#

^

quaint mantle
#

retrieves data from a JSON file

#

and returns buttonPos inside it

#

so i can convert it to Vector2 and use it

#

to move the mouse

noble lantern
#

i see

#

so your using jackson right

#

idk much about it

#

but

quaint mantle
#

yes i am using jackson

noble lantern
#

if you used gson, you could store that class stupidly easy

brave sparrow
#

Oh btw, your β€œequals” method is wrong

#

Lol

quaint mantle
brave sparrow
#

Should be equals(Object)

#

And you also need to override hashCode if you’re doing that

brave sparrow
#

The same way you’re overriding equals

noble lantern
#

With gson you could store that class super easily, youll just have to change these 2 arguments

#

without any of the LinkedHashMap bs

brave sparrow
#

You don’t need to use gson

noble lantern
#

im sure jackson has a feature similar to this

#

i just dont know jacksons api

#

can probably google it

#

but spigot provides gson by default

quaint mantle
brave sparrow
#

ObjectMapper objectMapper = new ObjectMapper();
Car car = new Car("yellow", "renault");
objectMapper.writeValue(new File("target/car.json"), car);

quaint mantle
#

as Im unsure how id do that

quaint mantle
#

without using a class

brave sparrow
brave sparrow
#

Lmao

#

You’re gonna have to parse the strings and create your class manually if you don’t want to use the mapper

quaint mantle
#
if(file.toFile().createNewFile()){
    HashMap<String, Object> hash = new HashMap<>(){{
        put("test1", false);
        put("test2", false);
        put("test3", false);
        put("test4", false);
    }};
    String json = new ObjectMapper().writeValueAsString(hash);
    try (var writer = Files.newBufferedWriter(file.toAbsolutePath(), StandardCharsets.UTF_8)) {
        writer.write(json);
    }
}
#

i used mapper

#

i just store it as a JSON instead

#

via a hashmap

brave sparrow
#

Why would you do that

quaint mantle
#

suprisingly its fast

brave sparrow
#

Of course it’s fast, it’s a tiny object lmao

#

But it would be faster to not

quaint mantle
#

also, why would i need to override the hashcode

brave sparrow
#

Read the article

#

If you override one you’re supposed to override the other, it’s part of the Java class contract

quaint mantle
#

Only X and Y

#

so what do i return

brave sparrow
#

return x * 31 + y;

#

@quaint mantle

quaint mantle
brave sparrow
#

Actually

#

Use Objects.hash(x, y);

#

Saves a lot of discussion about hashcodes

quaint mantle
#

ok

#
package com.emerald.funcs;

import java.util.LinkedHashMap;
import java.util.Objects;

public class Vector2 extends LinkedHashMap {
    public float x;
    public float y;

    public Vector2() {
        this.x = 0.0f;
        this.y = 0.0f;
    }

    public Vector2(float x, float y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public boolean equals(Object obj) {
        if(this == obj)
            return true;

        if(obj == null || obj.getClass()!= this.getClass())
            return false;

        Vector2 vector = (Vector2) obj;

        return (vector.x == this.x && vector.y == this.y);
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.x, this.y);
    }
}
brave sparrow
#

ID is just an example field in that article, not something special that hashcodes are based on for every class

quaint mantle
#

Is this correct?

#

Cause its not working lol

brave sparrow
#

Change the getClass thing to obj instanceof Vector2

#

Like !(obj instanceof Vector2)

quaint mantle
#

@brave sparrow There, but it still errors

brave sparrow
#

That won’t fix your error

#

That was just another problem

quaint mantle
#

class java.util.LinkedHashMap cannot be cast to class com.emerald.funcs.Vector2

#

Oh. What will lol

#

A

brave sparrow
#

Correct

noble lantern
#

why override equals

#

just use equals as is

brave sparrow
#

Nah

#

If you’re doing something like a vector you don’t want to use default equals

noble lantern
brave sparrow
#

Even if two Vector2s are constructed separately, if they have the same x and y they should be considered equal

quaint mantle
noble lantern
#

that returns a LinkedHashMap

brave sparrow
#

retrieveData().get(β€œbuttonPos”)

#

Is returning the JSON object as a map

brave sparrow
#

You made the poor decision to not use an object mapper

#

So you have to do the parsing of the JSON object into your class manually

quaint mantle
#

How

#

Its returning the readvalue information

brave sparrow
#

Which is a HashMap<String, Object>

#

If you look at the method signature

#

That object mapper is just mapping it to a hashmap

quaint mantle
#

then how do I do this correct

brave sparrow
#

String json = "{ "color" : "Black", "type" : "BMW" }";
Car car = objectMapper.readValue(json, Car.class);

#

So in your case

quaint mantle
brave sparrow
#

What?

#

What do you think that message means

#

Lmao

quaint mantle
#

Okay, hear me out

#

Oh

#

Im a dumbass

#

:/

quaint mantle
#

@brave sparrow Oh my god your amazing

#

Tysm

brave sparrow
#

Np

quaint mantle
# brave sparrow Np
String json = new ObjectMapper().writeValueAsString(retrieveData().get("buttonPos"));
data = new ObjectMapper().readValue(json, Vector2.class);
#

thats really dumb however, to workaround like that

quaint mantle
#

idk if its just me but for some reason i cant get my inventory click event registered..... but yet i can get the inventory itself opening...

#

ping me if u have a solution or wanna see the code or somethin

vocal cloud
river oracle
#

how can I solve your problem without any context simply It won't register is so vague

wet breach
vocal cloud
#

That's a bannable offense I think

river oracle
wet breach
#

don't worry, I don't have those abilities either, just assumed others did lol

#

but I guess that person above doesn't need help either

river oracle
#

Ahaha

vocal cloud
#

Probably realized it was never annotated

quaint mantle
#

Main Class: https://pastebin.com/pHph8CHd
Inv Click & GUI Class: https://pastebin.com/TUgcyYYZ

Description of my problem: For some reason my inventory click method event wont register but yet the gui opens up fine and all that i don't know what i am doing wrong. ( as its literally 2:25 am and im tired )

#

im going to bed ping me if you know a fix to this since i most likely will be stuck on this random issue as well tomorrow...

summer scroll
#

uh oh

#

You change the instance of the inventory each time you execute that command and that's gonna cause problems, I'm suggesting you to change how you handle it.

vocal cloud
# quaint mantle Main Class: https://pastebin.com/pHph8CHd Inv Click & GUI Class: https://pastebi...

The event registers fine. Your issue isn't the event.

Firstly you shouldn't put your listeners and commands together. I mean you can but it gets a bit messy on the reg

Here is your issue

        pm.registerEvents(new PracticeXSCommands(this), this);
        pm.registerEvents(this, this);
 
        getCommand("practice").setExecutor(new PracticeXSCommands(this));

You register 2 new instances of your class. When you do this the listener gets an inv variable and the command gets an inv variable. Because they are neither static nor of the same instance the listener inv will always be null. The solution is to

  1. Register 1 instance of the class (you'll still need to solve the issue that if 2 people run the command the inv instance gets set again.)
  2. Create a custom inventory you can instanceof check
midnight shore
#

why do i get this error?

#

this is what i want to implement

#

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependency>
<groupId>com.github.koca2000</groupId>
<artifactId>NoteBlockAPI</artifactId>
<version>-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

chrome beacon
#

Actually the error doesn't match what you sent

midnight shore
#

no, what i send is the owner of the API sent me

#

but he answered me so ty

chilly haven
#

Bukkit.getScheduler().scheduleSyncRepeatingTask(pl, new Runnable() {
@Override
public void run() {
for(Player onlinePlayer : Bukkit.getOnlinePlayers()) {
onlinePlayer.getPlayer().sendMessage(ChatColor.GOLD + "[StrengthWave]" + ChatColor.RED + "You have been given Strength I!");
onlinePlayer.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 80, 0));
}
}
}, 1200, 1200);
Why does this spam the message a lot of times.
it is supposed to do that every minute once.

eternal night
#

are you spawning the repeating task multiple times ?

eternal night
#

Well the ticks look good so

#

registering multiple ones seems like the only logical explanation

eternal needle
zealous osprey
chrome beacon
zealous osprey
# eternal needle huh?

This is null and always stay null since you arent setting it to anything.
Use a getter in your main class to get the instance of the plugin.

chrome beacon
#

?di

undone axleBOT
chrome beacon
#

Or this ^

eternal needle
chrome beacon
#

That won't set the variable

#

It just registers the listener

eternal needle
chrome beacon
#

Read what we said above

noble lantern
#

makes things so much easier

eternal needle
chrome beacon
#

...

#

?di

undone axleBOT
zealous osprey
chrome beacon
undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

zealous osprey
#

Fair, I'll keep it in mind.

tender shard
#

I like my new message / translation api

Msg.get("cooldown").placeholders(player).replace("{cooldown}",String.valueOf(timeLeft)).sendTo(player);
tardy delta
#

?di instead of a public static main lol

undone axleBOT
tardy delta
#

?main too

tardy delta
#

:)

#

people scared now

tender shard
tardy delta
#

because it goes brr doing Main.PLUGIN.something()

tender shard
#

also I don't agree with the "don't name your stuff main" post

tender shard
tardy delta
#

why not making every field public then and using static everywhere?

tender shard
tardy delta
#

its just cleaning in my opinion

#

i have a cooldownmanager per command

#

so i instantiate it

tender shard
#

well if I needed one per command, I'd but it into an additional map I guess

#

put*

tardy delta
#

i still have to make mine πŸ˜‚

tender shard
#

like Map<BaseCommand,Map<UUID, Long>>

tardy delta
#

it went the wrong direction when i made an enum to represent the command

#

and saving the command instead was like useless

#

memory waste

#

i could do it but ye

tender shard
#

well references typically have 4 bytes

tardy delta
#

hmm i could just use a Map<UUID, Long>

#

in the command class basically

#

but then i made a proper Cooldown class so that became Map<UUID, Cooldown> and now im stuck lol

tender shard
#

if I had more than one command that have cooldowns, I'd probably make an abstract class that extends BaseCommand and has the cooldown stuff builtin

#

than other commands can just extend that one

tardy delta
#

then i was trying to save the cooldowns in the user profile class so it could be easily saved to the database

#

im just trying to put everything the user has in the User class

#

f.e. it contains the homes

#

chatprofile

#

etc
and now i ended up with a Map<CommandType, Cooldown>

molten jacinth
#

Why does Material#GLASS_PANE have Fence.class as it’s BlockData and not GlassPane.class?

lavish hemlock
#

Probably a historical decision based upon glass panes and fences being connected blocks

molten jacinth
young knoll
#

Probably a legacy thing

lavish hemlock
#

Okay yeah I can't explain that lol

young knoll
#

Since glass panes have existed much longer than the stained version

tender shard
#

for me it returns CraftIronBars lol wtf

 class org.bukkit.craftbukkit.v1_18_R2.block.impl.CraftIronBars
molten jacinth
#

Fair point, still seems like a silly design choice

tender shard
#
System.out.println(Bukkit.createBlockData(Material.GLASS_PANE).getClass());
molten jacinth
#

According to the docs, it has Fence

lavish hemlock
#

(Not) a good API!

tender shard
#

CraftIronBars implements Fence

#

really weird

buoyant viper
#

minecraft is really weird

tender shard
#

first one

#

the [] belongs to the type

buoyant viper
#

first one unless im in C/Cpp

tender shard
#

the second only makes sense for weird stuff

#

like

#
int a, b[], c;
summer scroll
#

yeah that's weird as hell lmao

tender shard
#

well if you want to have 2 ints and one int[]

#

lol

#

yes, as I said myself, it's only useful for "weird stuff"

#

depends, you can toggle this inspection

#

but yeah imho the [] belongs to the type so it should be in front of the var name

buoyant viper
#

just ignore the warning

tender shard
#

fun fact, on default settings, intelliJ considers this to be totally fine:

private int[]a,b[];
#

a is now int[] and b is int[][]

tardy delta
#

lmao

tender shard
#

sure

#

makes perfect sense

#

yeah sure

#

:<

ornate heart
#

Does PlayerInventory#getContents return the contents in order?

#

That seems to be the case, but I want to make sure.

worldly ingot
#

Yes

#

Slot zero is index 0, slot 36 is index 36

ornate heart
#

Gotchu. Thanks

tender shard
#

be aware that getContents also contains null elements

#

unlike getItem(int) which simply returns empty itemstacks

ornate heart
#

πŸ‘

outer loom
#

I need help with iterating over a configuration section inside a file, my result is that it only goes to the first key and then stops

undone axleBOT
ornate heart
#

Showing the config file may help as well.

tender shard
#

^

outer loom
#

sorry, I'm new

tender shard
#

just go the website I linked, then paste your code there, click on "save", then send the link

#

and do the same for your config file pls

outer loom
#

ok

#

iteration:

#

config

tender shard
#

or did you only add them to the default config?

outer loom
#

I think it might be related to it being a custom file

#

its not the original config

tender shard
#

yeah well but that doesn't matter. show the code where you loading your yaml file pls

outer loom
#

ok

true vault
#

Hi, the comments explain my problem
How can I get around this?

        event.getEntity();

        // I need an entity like Zombie or Skeleton to modify health
        // But I don't know which type the event.getEntity() has
        Zombie entity = (Zombie) event.getEntity();

        // Now I can call the method
        entity.setHealth(1);```
tender shard
#

all entities that have health extend/implement LivingEntity

outer loom
#

here you go:

sleek flume
#
public class PreventMobs implements Listener {
    @EventHandler
    public void onMobSpawn(EntitySpawnEvent e){
        Entity mob = e.getEntity();
        if (!(mob instanceof Player)){
            Location loc = mob.getLocation();
            System.out.println("Only chicks allowed!");
            ExplodeChick.createChick(loc);
        }
    }
}```
im trying to make a plugin that removes all entities and change them into custom chickens but it does not work, it spams this error. can someone help me?
tender shard
true vault
eternal night
#

that looks like a nice stack overflow

#

you are creating there

tender shard
ornate heart
tender shard
outer loom
tender shard
# outer loom good point, let me check

you only "save" your included file when there is no file existing yet in the datafolder. my guess is, you saved the file oncewhen you only had one arena in the default config, so of course the file still only contains one arena

outer loom
tender shard
#

wtf, what kind of unicode character is that lmao

warm saddle
#

hey so im making a plugin and in the plugin there is a command that creates a world, however when the plugin starts up i am getting this error Error occurred while enabling OneBlock v1.0 (Is it up to date?) java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "dev.jamieisgeek.oneblock.OneBlock.getCommand(String)" is null at dev.jamieisgeek.oneblock.OneBlock.onEnable(OneBlock.java:12) ~[OneBlock-1.0.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:564) ~[paper-1.18.1.jar:git-Paper-177] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:478) ~[paper-1.18.1.jar:git-Paper-177] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:727) ~[paper-1.18.1.jar:git-Paper-177] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:503) ~[paper-1.18.1.jar:git-Paper-177] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:313) ~[paper-1.18.1.jar:git-Paper-177] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1202) ~[paper-1.18.1.jar:git-Paper-177] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-177] at java.lang.Thread.run(Thread.java:833) ~[?:?] when the plugin loads, any ideas?

tender shard
warm saddle
#

here is the code i believe is responsible: java getCommand("create").setExecutor(new IslandCreateCommand());

#

oh fuck

#

yeah

#

that'll be it lmaoo

tender shard
#

I'm so glad I always use ACF so this kinda stuff cannot happen to me anymore lol

summer scroll
#

Hey, this might be a stupid question but I try to use a plugin where it uses Redis and they're using Redisson, but for the address I need to put the IP and the port, and where can I find that?

tender shard
summer scroll
#

All I can find is the public endpoint

tender shard
#

then they probably tell you the IP, username, port, password somewhere?

arctic moth
#

ok so apparently the ageable thing was working, it's just returning null when im holding an item

tender shard
arctic moth
summer scroll
arctic moth
#

does that only work when they are using it or smth

tender shard
#

just don't include the password :p

tardy delta
#

smart boy

#

shit wrong channel

summer scroll
tender shard
#

k

arctic moth
tardy delta
#

smh

quaint mantle
arctic moth
#

when im literally holding an item

#

ima do getInventory().getItemInMainHand() and see if that does smth

sleek flume
tender shard
tardy delta
sleek flume
#

how did you know lmao

tender shard
#

En ik hou van eten, maar wie niet

#

and this looks kinda dutch

#

lol

sleek flume
#

it is

sleek flume
tardy delta
#

ik hou ook van eten

#

😳

sleek flume
tender shard
#

I'd do it like this

    private boolean ignoreSpawn = false;
    
    @EventHandler
    public void onSpawn(EntitySpawnEvent event) {
        if (ignoreSpawn) return;

        // Do your stuff

        ignoreSpawn = true;
        // Spawn your custom Entity
        ignoreSpawn = false;
    }
tardy delta
#

meh

sleek flume
tender shard
mighty pier
#

i want to use essentials economy with my plugin and i dont know how to implement it

tardy delta
#

isnt essentials eco using vault?

tender shard
tardy delta
#

if you have to install vault then it probably uses it

tender shard
#

essentials definitely does not require vault

tardy delta
#

ah

#

i guess it has its own api

#

then just add that as a dependency

tender shard
#

yeah I think it uses vault when it's installed, but it also works without it

#

but yeah, you should always use vault to add economy support

tender shard
arctic moth
#

fuck its too op

#

lagging out my game

#

what did i do

#

xD

tardy delta
#

lmao

arctic moth
#

i cant even leave the server

#

cuz the games so laggy

tardy delta
#

lmao

arctic moth
#

im getting decent fps now

mighty pier
arctic moth
#

loading new chunks makes them all strike at the same time

#

theres just a border of fire around the edge of chunk range

sleek flume
#

it spawns chickens now, but everytime the chicken dies it spawns a new chickenjava new BukkitRunnable() { @Override public void run() { if (!chick.isDead()) { if (chick.getTarget() == null) { for (Entity entity : chick.getNearbyEntities(10, 10, 10)) { if (entity instanceof Player) { Player player = (Player) entity; chick.setTarget(player); } } } else { LivingEntity target = chick.getTarget(); if (target.getLocation().distanceSquared(chick.getLocation()) < 25) { chick.getWorld().playSound(chick.getLocation(), Sound.ENTITY_CREEPER_PRIMED, 5, 5); chick.getWorld().spawnParticle(Particle.SMOKE_NORMAL, chick.getLocation(), 10); Bukkit.getScheduler().runTaskLater(main, new Runnable() { @Override public void run() { chick.getWorld().dropItemNaturally(chick.getLocation(), drops); chick.remove(); chick.getWorld().createExplosion(chick.getLocation(), 5, false); chick.getWorld().playSound(chick.getLocation(), Sound.ENTITY_CHICKEN_HURT, 5, 5); } }, (2 * 20)); } } } else { cancel(); } } }.runTaskTimer(main, 0L, 20L);

tender shard
#

wtf is "chick"?

mighty pier
#

an entity you haven't seen because you dont go outside

tardy delta
#

then only spawn a new one if the entity which died isnt a chicken?

tardy delta
#

obsessed

tender shard
# tardy delta obsessed

I want to get close to you, you are my dream come true. ✨ Obsessed With You by The Orion Experience from the album Cosmicandy. Perfect song for your favorite fandom. πŸ’œπŸ­

🎡Spotify: https://open.spotify.com/artist/2qU0jqxiFeXrw5NTV1bIQM
🍎Apple Music: https://music.apple.com/us/artist/the-orion-experience/215309076
🌈ORION EXPERIENCE MERCH
https://l...

β–Ά Play video
tardy delta
#

weird music

tender shard
#

no u!

tardy delta
#

"i wanna have sex with u" πŸ’€

tender shard
#

obviously the singer is obsessed with you

tardy delta
#

ah yes

mighty pier
#

speaking skill leveled up

sleek flume
arctic moth
tardy delta
#

what were you doin again?

arctic moth
sleek flume
tardy delta
#

ah right

#

seems logic that whenever an entity dies a new chicken spawn?

#

so whenever your custom entity spawn it also spawn a new one?

sleek flume
#

yeah, but i dont want that.

#

if the chicken explodes an exact same chicken spawns at the same place as the died chicken

#

and i want a chicken that explodes without spawning a new chicken

tardy delta
#

do those custom chickens have any special things applied?

sleek flume
#

yeah they have a name

tardy delta
#

you could try to check for the name but that will cause problems with other named mobs, i would set something in the pdc so the entities can be identified as being a custom entity or not

#

?pdc

true vault
#

Is there a good way to add an entity to a team?
I tried hideNameTags.addEntry(entity.getUniqueId().toString()); but this didn't seem to work

tardy delta
#

arent teams only for players?

eternal oxide
#

no

#

add players to teams using their name, add entities using their UUID

tardy delta
#

oh

arctic moth
#

any idea what this means

summer scroll
#

you need to shade the libs

tardy delta
#

did you shade it

#

lmao fast af

summer scroll
#

nah

#

you too slow fam

tardy delta
#

😭

arctic moth
tardy delta
#

can you post code?

#

?paste

undone axleBOT
true vault
severe plume
#

Works.. Thanks!

arctic moth
#

any idea why its not finding the stuff to shade?

#

artifact/gruop

severe plume
#

Error?

arctic moth
#

oh had to reload

#

so it downloads

#

oops

severe plume
#

xD

arctic moth
#

im still getting noClassDefFoundError

tardy delta
#

that doesnt look valid

summer scroll
summer scroll
#

so the pattern should be de.jeff_media.customblockdata i guess

tardy delta
#

you have to specify the goal?

#

ye just package

summer scroll
tardy delta
#

i have my thing like this

sleek flume
#

does spigot think a dropped item or a explosion is an entity

tardy delta
#

dropped item yes iirc

#

explosian not sure

#

i think that too

sleek flume
#

then i think i know whats going wrong

tardy delta
#

its probably not an entity xd

arctic moth
sleek flume
#

an explosion is not an entity, but a dropped item actually is

arctic moth
#
<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <configuration>
                            <relocations>
                                <relocation>
                                    <pattern>de.jeff_media.customblockdata</pattern>
                                    <shadedPattern>me.hypercodec.hardermode</shadedPattern>
                                </relocation>
                            </relocations>
                            <minimizeJar>true</minimizeJar>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
#

thats my tuff

#

stuff

summer scroll
#

ah

#

you're putting configurations inside the executions

tardy delta
#

you need a phase too i guess

warm dust
#

Hi I made a login and register system. Everything works except imagine you join the server you register you disconnect and when you go to reconnect the password will be said not to exist whereas in the yml file it is present because after a restart of the server if you reconnect it works perfectly. If you have a way to update the file or other I'm interested!

If you need some codes @ me ! Thx

tardy delta
#

google translate moment

tardy delta
#

and it wasnt saved to the file?

warm dust
#

But the server if i dont reload it dont seems to see it

tardy delta
#

im not understanding what you mean

eternal oxide
#

Then you are not updating the data in memory

warm dust
#

I just write and save it

eternal oxide
#

sounds like you save to file, but don;t update your data in memory untilyou reload

warm dust
#

Yes

crimson terrace
#

?paste I am having a problem creating a log file. I am trying to create it new every time the plugin is enabled, but it keeps creating a new file instead of overwriting the original file. Paste is here -> https://paste.md-5.net/mitusufeyi.cs

undone axleBOT
spring pike
#

how can I send hex colored messages to players?

crimson terrace
#

ChatColor.Of(String hexCode) + "text"

spring pike
#

with # or without?

crimson terrace
#

hexcode is for example "#FFFFFF" i believe

#

so the # should be in that string

spring pike
#

thanks, ill try

crimson terrace
#

np, tell me if it works

spring pike
#

works πŸ™‚

warm light
#

How a sheep color can be null?
is that white?

#

I mean every sheep have a color

crimson terrace
#

ignore the nullpointer at the top. but thats your answer

#

null means that it has not been changed I believe

ornate heart
#

So, I'm doing a project and a client wants me to draw a peace sign with redstone particles. How would you approach this? I have no clue where to start.

crimson terrace
#

Have a list of locations that make a peace sign and spawn the particles at each one?

ornate heart
#

how would you come up with the list of locations though. It has to be relative to the player's location. I assume there would be some math involved.

golden turret
crimson terrace
#

If you want to make it more versatile you could make a function which writes the locations of blocks to a file when you make something like a peace sign. something like "write all block locations to a file where the block type isnt air"

#

if the peace sign is all you need you could just hardcode a peace sign and display it at a location you pass into that method

rugged cargo
#

just for later today, id like to know if drawing outlines on blocks the player isn't looking at when holding a certain item is possible with spigot NOTE: Moved from #help-server to here

#

now with plugins being server side this seems close to impossible, but im just not sure

muted sand
#

what world format does spigot use? anvil?

echo basalt
#

yes

lavish hemlock
#

I think all modern servers use Anvil lol

echo basalt
#

that outline is rendered client-side

lavish hemlock
#

Actually wait no there is one server implementation that does not use Anvil

#

But it's not fully implemented

echo basalt
lavish hemlock
#

And it doesn't work with regular worlds

#

Obviously

muted sand
#

ah well i was going from a pocketmine world to spigot
and stupid pmmp uses pmanvil so

rugged cargo
#

i could use particles maybe?

#

and try to be as light with them as possible

golden turret
#

where can i find the usage for this constructor in the bukkti code?

echo basalt
echo basalt
#

You might need to import the entire project with your IDE

golden turret
#

i tried that

echo basalt
#

but also are you sure it's even being used πŸ€”

golden turret
echo basalt
#

you gotta refresh the project

golden turret
#

but it is not being recognized as maven project

echo basalt
golden turret
#

how do i refresh

echo basalt
#

compiling it often refreshes it

#

as the IDE re-indexes missing files on compilation

late sonnet
# golden turret

you need check the pom in "Bukkit" "CraftBukkit" and "Spigot" directory for make the IDE read this directory like a maven projecct

golden turret
#

could someone send me the spigot git linjk pls

crimson terrace
timid parrot
#

how can i make the effect duration and the effect if you open the inventory invisible

#

so you cant see the effect

spring pike
#

i think it's the ambient tag

timid parrot
#

ok

spring pike
#

nope, ambient is something about particles

#

sorry

timid parrot
#

ok

molten hearth
#

any way to detect a plugin's memory leak?

tender shard
#

spark

molten hearth
#

ty

#

we have a server with 99 plugins and one with 20 and the one with 99 is using 2gb of ram and the one with 20 is using 7

#

pain

tender shard
#

hm

molten hearth
#

probably my fault >->

tender shard
#

do a timings report AND a spark report, then send it in #help-server

warm light
#

how to change a item from creative middle click?

timid parrot
#

how can i clear this

quaint mantle
kind hatch
quaint mantle
timid parrot
#

no i mean that the effect is still there but this menu not

kind hatch
#

Not sure if that is possible. If you have an effect, it will show up in your inventory and on your screen as the smaller variant. I think this is client sided behavior.

#

You might be able to remove it with a resource pack.

echo basalt
#

only possible after 1.13

ornate heart
echo basalt
#

look at the code

granite owl
#

how do i send a multiline message in spigot to a player? using the '\n' character does not work

#

xD

#

seems unsupported

#

and i dont want to send multiple msgs

arctic moth
#

im trying to use CustomBlockData, but i keep getting the ClassDefNotFoundError despite shadowing it

#
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <configuration>
                            <relocations>
                                <relocation>
                                    <pattern>de.jeff_media.customblockdata</pattern>
                                    <shadedPattern>me.hypercodec.hardermode</shadedPattern>
                                </relocation>
                            </relocations>
                            <minimizeJar>true</minimizeJar>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
#

is this the right shade?

echo basalt
echo basalt
arctic moth
#

no

echo basalt
#

good

echo basalt
#

which breaks half the game's chat settings

granite owl
#

xD

#

not really

#

what im looking for though

fierce hawk
#

How can I make an event that fires when a player wears a specific player head?

tardy delta
#

when he puts it on?

#

listen for some inv click event

granite owl
#

also team.getPrefix() on an empty prefix returning "" ? or null and thus throwing an error

#

cause its using the NotNull annotion

arctic moth
vast kelp
warm dust
#

Hello i want to cancel the animation with the chest and done this:

if (block.getType() == Material.CHEST) {
   Event.setCancelled(true);
   Chest chest = (Chest) block.getState();
   Inventory inv = chest.getBlockInventory();
   player.openInventory(inv);
}

But dont work, if someone know how can i fix it ? It just open the inventory normal

tardy delta
#

Event?

#

what

warm dust
#

PlayerInteractEvent

#

It work with ender chest

tardy delta
#

never name a variable something that starts with uppercase

#

unless its static

warm dust
#

Its not my question

tardy delta
#

the animation is showing?

warm dust
#

Yep

tardy delta
#

any other plugins listening for that?

warm dust
#

And i dont found anything about something else

#

Nop