#help-development

1 messages · Page 1696 of 1

somber hull
#

Why is my computor not recognizing java 16

#

i have to clarify the file path every time

#

@unkempt peak

#

i finally got the test command working

#

i managed to make an armostand

#

and sit on it

upper vale
#

armor desync is annoying af

#

i hope everything goes well for you

karmic bear
#

hey

#

uh, how do you make custom exception messages get thrown in java

#

since the exception constructor isnt working for me

#

it forces me to make a try/catch block so it never uses my custom exception messages

upper vale
#

rethrow the exception

#

why isnt the exception constructor working?

quaint mantle
#

so.... how should i play sounds in a radius

#

do i just play the sound for the WORLD?

#

World.playSound()

#

and change its volume....?

#

orrrr what

#

i'll try it and see

#

yeah so WOrld#playSound plays it to the entirew orld i guess, flew away a lot and same things

#

so not too sure

quaint mantle
somber hull
#

Maybe

quaint mantle
#

it is not

waxen plinth
#

Huh

somber hull
#

are ytou doing world.playSound(location, sound, volume)

waxen plinth
#

There's Player#playSound

waxen plinth
#

But it can carry extremely far if you set the volume high

somber hull
quaint mantle
#

its only at 1.5

somber hull
#

its probably a double

#

where 1.5 is like 150%

#

or something crazy

waxen plinth
#

No

#

1.5 is fine

somber hull
#

😐

waxen plinth
#

Definitely doesn't play to the entire world

quaint mantle
somber hull
#

Should i teleport an entity, or set the velocity of an entity?

quaint mantle
#

i could hear it at around 50 blocks away..

somber hull
#

For a vehicle

quaint mantle
waxen plinth
#

Probably set velocity so it's smoother

quaint mantle
waxen plinth
#

You can set fall distance to reduce or disable fall damage

dry forum
#

so i have Chunk ec = (Chunk) p.getLocation(); for (Entity entity : ec.getEntities()) {, how can i get the ammount of entities in the loop? .getSize doesnt work

quaint mantle
#

.size()

dry forum
#

Cannot resolve method 'size' in 'Entity'

quaint mantle
#

Bruh

#

bruh

#

ec.getEntities().size()

#

^that

dry forum
#

nope, doesnt work still says Cannot resolve method 'size' in 'Entity' Chunk ec = (Chunk) p.getLocation(); for (Entity entity : ec.getEntities()) { ec.getEntities().size(); break;

quaint mantle
#

bro

#

Bruh

#

idk whats happening anymore

quaint mantle
#

agree

dry forum
#

get the ammount of entities in a chunk

quaint mantle
#

so why do you need а loop

dry forum
#

to loop the entities in the chunk?

waxen plinth
#

Chunk#getEntities returns an array

quaint mantle
#

But you don't need it if you just need to get siE

waxen plinth
#

You get its size with .length

#

Looping just to get one value and immediately break is very pointless though

dry forum
#

ah thanks

turbid tiger
#

I have implemented a feature that allows end crystals to be turned into sentries which attack hostile mobs. I do this by using a listener for a right click of the crystal which triggers a runnable. How can I make it so that crystals which become sentries retain their sentry-status persistently? Should I add a list of crystal coordinates to a data store and then use those coords upon server startup to re-create the runnables? What is the best course of action here?

somber hull
#

Ok

#

so

somber hull
#

Cause if you try to access unloaded chunks you get an NPE

turbid tiger
#

Oh smart

#

But how should I trigger the runnable creation?

#

Is there an on chunk load event?

somber hull
#

ye

#

I have a long that is < 0 for left > 0 for right, and another thats the same thing but for foreward and backward

#

how would i translate that into like changing velocity

#
            public void onPacketReceiving(PacketEvent event) {
                Player plr = event.getPlayer();
                PacketContainer packet = event.getPacket();
                float sideways = packet.getFloat().read(0);
                float forward = packet.getFloat().read(1);
            }
turbid tiger
#

If I want to check if there is an EnderCrystal in event.getChunk().getEntities(), do I need to iterate with a for loop and check if every entity is an instanceof? Or is there a better way?

alpine urchin
#

Entity#getType == EntityType.ENDER_CRYSTAL

#

yea you gotta iterate

turbid tiger
#

alright thank you

alpine urchin
#

np

#

if its in that chunk there shouldn’t be that many entities?

#

so it shouldn’t be a problem

turbid tiger
quaint mantle
#

does anybody know which part of the EntityHorseAbstract class

#

has the player ride code

#

im trying to apply it to other custom mobs

#

everything online is outdated

alpine urchin
turbid tiger
#

do you think that will cause performance issues

alpine urchin
#

might be a tiny bit heavy

#

what are you trying to achieve

turbid tiger
#

I have implemented a feature that allows end crystals to be turned into sentries which attack hostile mobs. I do this by using a listener for a right click of the crystal which triggers a runnable. How can I make it so that crystals which become sentries retain their sentry-status persistently? Should I add a list of crystal coordinates to a data store and then use those coords upon server startup to re-create the runnables? What is the best course of action here?

#

No way to do it?

turbid tiger
#

yes I know what you said, @alpine urchin stated that running on every chunk load would be a bit heavy

somber hull
#

Check if the location is in the chunk first

#

(╯°□°)╯︵ ┻━┻

turbid tiger
#

woah wait

#

chunks have persistent data containers?

somber hull
#

ye

#

🙂

turbid tiger
#

oh awesome I will use that

somber hull
#

I have worked with it before

#

save the key as X_Y_Z_DATANAME

#

if you need coords

peak salmon
#

Can anyone help me out with MobArena, I made some changes to the mob spawns and now it's not working 😢

somber hull
#

(:

peak salmon
#

Well, I'd like to be lol I'm not sure what I screwed up. It was all working fine until I edited something, now its not working at all.

#

"Internal error has occurred"

somber hull
#

🤦🏿

#

idk why its black

#

anyway

#

check your console

#

theres an error

peak salmon
#

I'll keep looking. It all looks like its set up right, I'm not sure what I'm missing

somber hull
#

wait

#

is it a plugin you made?

peak salmon
#

no

somber hull
peak salmon
#

oh sorry

#

ty

turbid tiger
#

Does every entity have a persistent UUID I can store and use to get the entity later?

#

For example do ender crystals have uuids which will remain the same on server restart?

somber hull
#

but

#

when their in an unloaded chunk

#

you cant access them

#

the joy of entities 🙂

turbid tiger
#

Yes I know I plan on putting them in the chunks PDC

somber hull
#

smart

turbid tiger
#

What is the method to get the entity with the uuid?

somber hull
#

then check every chunk on load and check if it has PDC

turbid tiger
#

yep

somber hull
#

if it does, check if its form your plugin

somber hull
#

pretty sure

turbid tiger
#

perfect thank you

somber hull
#

people yelled at me a lot for it

#

and its helpful since i dont have to ask for help a lot

last ledge
#
java.lang.NullPointerException: Cannot invoke "org.bukkit.plugin.Plugin.getDataFolder()" because the return value of "org.bukkit.plugin.PluginManager.getPlugin(String)" is null
        at advancedchatmanager.chatmanager.CustomConfig.BannedWords.setup(BannedWords.java:16) ~[?:?]
        at advancedchatmanager.chatmanager.ChatManager.onEnable(ChatManager.java:14) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:511) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:425) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:619) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:266) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1010) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at java.lang.Thread.run(Thread.java:831) [?:?] ```
#

whats the issue someone help

dry forum
#

from this code:

                    int inc = 0;
                    for (Entity ce : ec.getEntities()) {
                        inc++;
                        ce.remove();
                        if (inc >= removal) {
                            break;
                        }
                    }```
im getting this error:
```Caused by: java.lang.UnsupportedOperationException: Calling Entity#remove on players produces undefined (bad) behavior
        at org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer.remove(CraftPlayer.java:2263) ~[patched_1.16.5.jar:git-Paper-786]
        at com.nesanco.disneywishes.commands.optimize.onCommand(optimize.java:44) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.16.5.jar:git-Paper-786]
        ... 19 more``` which is the ce.remove(); line, how can i fix this?
stone sinew
dry forum
stone sinew
dry forum
#

so check the entities, if the entitiy is a player, not remove them?

last ledge
# stone sinew Show code
package advancedchatmanager.chatmanager.CustomConfig;

import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;

import java.io.File;
import java.io.IOException;

public class BannedWords {
        private static File file;
        private static FileConfiguration BannedWordsConfig;


        public static void setup() {
                file = new File(Bukkit.getServer().getPluginManager().getPlugin("Advancedchatmanager").getDataFolder(), "BannedWords.yml");
                if (!(file.exists())) {
                        try {
                                file.createNewFile();
                        }catch(IOException e){
                                //This plugin was made by Shayam Sharma
                        }
                }
                BannedWordsConfig = YamlConfiguration.loadConfiguration(file);
        }
        public static FileConfiguration get(){
                return BannedWordsConfig;
        }
        public static void save(){
                try{
                        BannedWordsConfig.save(file);
                }catch (IOException e){
                        System.out.print("Error Occuered will trying to save the file");
                }

        }
        public static void reload(){
                BannedWordsConfig = YamlConfiguration.loadConfiguration(file);
        }
}

stone sinew
#

Bukkit.getServer().getPluginManager().getPlugin("Advancedchatmanager") is null

last ledge
#

i have put the value

stone sinew
#

Cause it is lol

#

Maybe you input the name wrong

somber hull
#

?paste

undone axleBOT
somber hull
#

Protocollib

#

Im trying to get the first 2 Floats

#
        manager.addPacketListener(new PacketAdapter(plugin, ListenerPriority.NORMAL, PacketType.Play.Server.ENTITY_HEAD_ROTATION) {
            @Override
            public void onPacketSending(PacketEvent event) {
                Player plr = event.getPlayer();
                Entity entity = plr.getVehicle();
                if(entity == null) return;
                PacketContainer packet = event.getPacket();
                Float yaw = packet.getFloat().read(0);
                Float pitch = packet.getFloat().read(1);
                entity.getLocation().setPitch(pitch);
                entity.getLocation().setYaw(yaw);
            }
        });
alpine urchin
#

byte yaw = getBytes().read(0);

#

byte pitch = getBytes().read(1);

somber hull
#

your blind

#

🙂

alpine urchin
#

try it

#

you'll see

somber hull
#

oh shit

#

wait

#

why bytes...

#

im blind

#

🙂

somber hull
alpine urchin
#

The NMS objects are not equal to the documented raw packets in the protocol

somber hull
#

im trying it rn

alpine urchin
#

wait

somber hull
#

yea

alpine urchin
#

yea

somber hull
#

it just breaks everything

alpine urchin
#

try byte

#

it doesn't work?

somber hull
#

ye

alpine urchin
#

then give me a sec

alpine urchin
#

that isn't the entity head rotation then

somber hull
#

Oh shit

#

so

#

Its player movement

#

but

#

in the IDEA

#

it doesnt give me the option for player rotation

#

or position

alpine urchin
#

ik

#

hm

somber hull
#

x=-889.6268060091414
y=69.0
z=-913.1163306813386
yRot=-177.49936
xRot=9.450546
relativeArguments=[]
id=50
dismountVehicle=false

alpine urchin
#

what mc version

#

are you coding this on?

somber hull
alpine urchin
#

ok perfect

#

give me a sec

somber hull
#

for Server.POSITION

alpine urchin
#

it might be entity head rotation

#

but one sec

#

nope

#

its not

#

on wiki.vg, entity head rotation is called entity head look

somber hull
#

but thats clientbound

#

im trying to get the player

#

idk if i said that earlier

alpine urchin
#

clientbound means server-sided

#

?

somber hull
#

Ye

#

I want what the player is facing

#

So

#

when the player moves their camera

#

The armostand their riding moves with them

alpine urchin
#

i see

somber hull
#

i guesse i really only need yaw

#

i think

#

idk the diff from yaw and pitch

alpine urchin
#

why are you using Server then

#

if (PacketType.Play.Client.

somber hull
alpine urchin
#

thats for server-bound packets

#

ProtocoolLib PacketType.Play.Client stands for client-sided

somber hull
#

dang

#

ok

alpine urchin
#

yes

#

thats when thec lient moves and rotates

#

LOOK is when the client only rotates, but doesn't move

somber hull
#

leme try it

#

yes thats what i want

alpine urchin
#

so yea

somber hull
#

still errors....

alpine urchin
#

POSITION is when the client moves, but doesn't rotate

#

so what data do u wanna read

#

from the packet

somber hull
#

?paste

undone axleBOT
somber hull
alpine urchin
#

you can use getFloats()

#

before there was a misunderstanding and were trying to read the wrong packet

somber hull
#

ye

#

forgot bout that lol

#

same errors

#

?paste

undone axleBOT
somber hull
#
        manager.addPacketListener(new PacketAdapter(plugin, ListenerPriority.NORMAL, PacketType.Play.Client.POSITION_LOOK) {
            @Override
            public void onPacketSending(PacketEvent event) {
                Player plr = event.getPlayer();
                if(plr.getVehicle() == null) return;
                Entity entity = plr.getVehicle();
                PacketContainer packet = event.getPacket();
                float yaw = packet.getFloat().read(0);
                float pitch = packet.getFloat().read(1);
                entity.getLocation().setPitch(pitch);
                entity.getLocation().setYaw(yaw);
            }
        });
#

also

#

those errors only show up when im moving, and rotating

#

@alpine urchin

alpine urchin
somber hull
#

ikr

alpine urchin
#

change onPacketSending

#

to onPacketReceive or so

somber hull
#

oh shit

#

i meant to change that back earlier

last ledge
somber hull
#

I mean

#

no errors anymore

stone sinew
alpine urchin
somber hull
#

but it still doesnt change the armorstands facing direction

last ledge
alpine urchin
#

hm

#

are you moving and rotating

stone sinew
alpine urchin
#

wait, how is an armorstand a vehicle?

#

can you ride an armor stand?

#

tf

last ledge
somber hull
#

.addPassenger

last ledge
# stone sinew Then try capitalizing
                file = new File(Bukkit.getServer().getPluginManager().getPlugin("AdvancedChatManager").getDataFolder(), "BannedWords.yml");
                if (!(file.exists())) {```
somber hull
#

you can with any entity

last ledge
#

still dosent work

alpine urchin
#

wait

#

then i dont think we are using the right packet

#

there is a separate packet for when the player steers a vehicle

somber hull
#

Ye

#

i have that done

alpine urchin
#

yea?

somber hull
#

But i need the "Vehicle" to face the direction the player is looking

alpine urchin
somber hull
#

oof

#

i cant screenshare

alpine urchin
quartz basalt
#

how can i use firework nbt in a command? for example i do /fireworktest <nbt of firework> then it summons a firework with that nbt?

alpine urchin
#

can someone help me setup mojang mappings on spigot 1.17 with gradle

turbid tiger
#

Like there is no way not just that method

somber hull
#

hey

#

uhh

#

dig a little harder

#

🙂

#

@turbid tiger

turbid tiger
somber hull
#

HOW DO I ROTATE THE FUCKING ARMORSTAND

turbid tiger
#

returns a unique id

#

does not return an entity

#

for a given id

somber hull
#

Ohh

#

there is a way to do that

#

But why would you???

turbid tiger
#

because I am storing the uuids in pdcs

somber hull
#

If a chunk is unloaded then the entity "doesnt exist"

turbid tiger
#

i am storing the uuid in the chunk pdc.

#

I will create a chunk ticket, get the uuid from the pdc, then get the entity with the uuid

somber hull
#

why not just store a custom UUID and have the stats of that sentry tied to that UUId so when the chunk loads just create the sentry

somber hull
#

But re-create the sentry with the settings you saved to the UUID

alpine urchin
#

by the uuid?

turbid tiger
#

yes

alpine urchin
#

Bukkit.getPlayer(uuid)

turbid tiger
#

A mob

#

not a player

alpine urchin
#

ok

somber hull
#

i dont remember it

#

i used it once

alpine urchin
#

you need to iterate

#

if its not a player

somber hull
#

oh

#

wow

#

🤣

alpine urchin
#

nevermind

turbid tiger
#

lets gooo

opal juniper
turbid tiger
opal juniper
#

what? no it doesn’t

#

md explicitly said that there is no map and you should use a for loop

eternal night
#

👀 I have my doubts on that, pretty certain there is a map per world

opal juniper
#

i was then looking for it

#

it seems to be coming from an nms class

#

or not

#

i’m blind

eternal night
#

Huh ? It should

#

ServerLevel (under Mojang mappings)

lone sandal
#

When was player#sendTitle added? Which mc version

opal juniper
#

idk

#

i’m trying to use the stash on mobile and it is a terrible experience

turbid tiger
chrome beacon
#

I think you need the entity metadata packet

opal juniper
#

i think you need the datawatcher for that 🤔

#

i cant remember though

chrome beacon
#

I've never messed with this before was just guessing

opal juniper
#

yea sure

#

i was just thinking out loud lol

chrome beacon
#

You're spawning it in the world and sending it as a packet

#

What's the point of the packet part

#

I know

opal juniper
#

What he means

#

is that

#

you are actually spawning the cow

#

so why send packets

#

cause the server handles that itself

#

Although it doesnt look like you are actually spawning it...

chrome beacon
#

^^

#

I was just thinking a bit wrong

#

Anyway what's the point of these packets

opal juniper
#

but why

#

what are you doing

paper geyser
#

what

opal juniper
paper geyser
#

wait

opal juniper
#

it wont move or anything tho

paper geyser
#

is he spawning the cow on the server and also sending packets?

opal juniper
#

nah he isnt

#

eh

paper geyser
#

oh ok cool

#

just double checking thought I read that somewhere

paper geyser
chrome beacon
#

The minor amount of performance this might gain is not worth the effort

opal juniper
#

final PacketPlayOutEntityMetadata metaPacket = new PacketPlayOutEntityMetadata(nmsEntity.getId(), nmsEntity.getDataWatcher(), true);

#

lol

#

thats all you need tho?

#

then just send it

chrome beacon
#

Oh well server still needs to keep track of the entity

opal juniper
#

oh rite yeah i forgot about that

chrome beacon
#

It will eat ram if you spawn too mant

opal juniper
#

mmm not as much as a normal entity afaik cause no pathfinding shite

#

but yes

chrome beacon
#

^ but no ticking

opal juniper
#

what olivo sed

chrome beacon
#

Datawatcher has name iirc

#

A mess to work with

#

If I recall correctly

opal juniper
#

there is some code further down

#

although the fields probs changed names

#

cause 1.17

chrome beacon
#

He's 1.15

opal juniper
#

oh well then great

#

what a random arse version

chrome beacon
#

^

opal juniper
#

u said

#

at teh start

#

i hate javafx

#

cant seem to make it work

#

yeh there is a gist class (which has been saved as a txt for some reason)

slim kernel
#

I made a plugin you can shout water sources with. But if there are exactly 5, 7, 9, 11,.... Blocks between me and the target its not getting hit. That means the water is not being placed on every block on the vector between me and the target. How can I fix that?
https://gist.github.com/ItzJustNico/0de94ce7dce1c64294a278a875fbc9e4

Gist

GitHub Gist: instantly share code, notes, and snippets.

cursive delta
#

Hi, I'm constantly getting world null in my location. Can you please help me?

opal juniper
#

sure

#

what code are you using?

cursive delta
undone axleBOT
chrome beacon
#

?paste

#

Stop flooding the chat

cursive delta
#

ok

opal juniper
#

also, we were looking for an event listener for the join event based on that error

cursive delta
opal juniper
#

currentLocation where is this assigned

chrome beacon
#

^^

cursive delta
#

in the same class as join

opal juniper
#

show

cursive delta
#

line 285

opal juniper
#

what is all this static???

cursive delta
#

thats for db, inventory saves, etc

eternal oxide
#

when are you creating the BoomPVP instance?

cursive delta
#

right in the main

chrome beacon
#

So where are you setting the location

cursive delta
#

in GetFirstMap()

#

it looks to the list of locations

#

and picks one

#

coords are right

#

but the world is null

#
public static List<Location> listLokace = new ArrayList<>(List.of(
            new Location(Bukkit.getWorld("world"), 11, 52, -0.5),
            new Location(Bukkit.getWorld("world"), -2, 54, 502.5),
            new Location(Bukkit.getWorld("world"), 24.5, 52, -492),
            new Location(Bukkit.getWorld("world"), 497, 18, 492)
            ));```
chrome beacon
#

So uh I'm guessing the world doesn't exist

#

Is the main world named world

cursive delta
#

yes

chrome beacon
#

When are you calling that

cursive delta
#

in GetFirstMap()

#

where it picks one

eternal oxide
#

a static nightmare

chrome beacon
#

I'm so confused

#

The code is a total mess

eternal oxide
#

very

cursive delta
#

yep, i know

eternal oxide
#

I gave up trying to trace it. all the static and back and forth is a mess

cursive delta
#

ok, nevermind

#

i will try to fix it

chrome beacon
#

Where is GetFirstMap

#

And when is that called

cursive delta
#

in the Main class

#

and from the OnEnable method

chrome beacon
#

There we go your problem

#

You're getting the world before it's loaded

eternal oxide
#

you call getFirstMap() but you didn;t show the code for that

chrome beacon
#

Make your plugin load post world

cursive delta
chrome beacon
#

It's not

#

You cut it off

cursive delta
#

oh

eternal oxide
#

There is no getFirstMap() in your posts

cursive delta
#
 public void GetFirstMap() {
        BoomPVP.currentLocation = BoomPVP.listLokace.get(new Random().nextInt(BoomPVP.listLokace.size()));
    }```
chrome beacon
#

So you're not creating the map in there

#

I give up helping you

cursive delta
#

ok

eternal oxide
#

ok does your onEnable print the world at startup?

#

System.out.println(Bukkit.getWorld("world"));

#

does it actually show in the log?

chrome beacon
#

Try making the plugin load post world that's all I can say

eternal oxide
#

If not, you are exploding on the Objects.requireNonNull

#

so missing boomkit command in the plugin.yml

quaint mantle
#

does anyone know how to detect if a passenger triggers a jump while riding an nms mob

#

the old field has changed

#

i looked in entityhorse but it looks like it sbecome more complex

#

wondering if anyone knows the answer 🙂

chrome beacon
#

NMS is a mess and generally unsupported since none of us here knows every class and how things work

quaint mantle
#

yeah

#

i figure it will be a long shot

#

very draining to go thru everything

chrome beacon
#

Reverse engineering and using Google are the best approaches here

quaint mantle
#

ya

chrome beacon
#

You could also listen to packets sent with Protocollib

#

Anyway when asking for NMS help you need to specify what Minecraft version you're on. We cannot help without it

quaint mantle
#

ill do some reverse engineering, if i find it ill defs post it

chrome beacon
#

1.17.1 or 1.17

quaint mantle
#

its probably changed again

#

um

#

1.17.1

chrome beacon
#

You need to be specific

quaint mantle
#

yeah my bad

#

i forgot even the slightest updates chang stuff

quaint mantle
#

It seems to be the way you wrote it will give an error

eternal oxide
#

I didn't write it. and thats not the point

#

and no it would not error, it would either print null or it would print the toString()

quaint mantle
#

i had a similar issue

#

worked when @eternal oxide told me to do something

#

this.minigamesManager = new MinigamesManager(this, getWorld());

#

ended up doing this

#

this.world = getServer().getWorld("world");

#

(onEnable())

gritty urchin
#

How can I send a message to a player on TextComponent click event?

chrome beacon
#

TextComponent click runs a command

#

Listen to the command and send message

quaint mantle
#

is there a way to get un-obfuscated nms?

#

just like a doc sheet to read

chrome beacon
#

Yeah

#

Read 1.17 release post

quaint mantle
#

how can I allow putting a block in private blockplaceevent?

#

region

#

worldguard

bright jolt
#

How would I go about making a /cleararmor command? I want to have the option to specify a player, but I also want the option to be able to put a * to clear all online players' armor.

quaint mantle
#

for (Player pl : Bukkit.getOnlinePlayers()) {

ivory sleet
quaint mantle
#

@ivory sleet

#

how can I allow putting a block in private blockplaceevent?
region
worldguard

bright jolt
#

If it doesn't work can I post my code here so you can see what is wrong?

ivory sleet
#

Idk maybe through some permission @quaint mantle ?

quaint mantle
gritty urchin
#

How do I catch this message on invalid command and cancel it from sending?

eternal oxide
#

you return true from your onCommand

quaint mantle
gritty urchin
#

nvm I've solved

#

I was trying to catch commands that weren't actually registered as commands.

quaint mantle
#
        Field field = null;
        try {
            field = EntityLiving.class.
                    getDeclaredField("bn");
            field.setAccessible(true);

            if(field != null && this.getPassenger() != null){
                return field.getBoolean(this.getPassenger());
            }
        } catch (NoSuchFieldException | IllegalAccessException noSuchFieldException) {
            noSuchFieldException.printStackTrace();
        }
        return false;
    }```
#

if anyone is interested in checking if their passenger is pressing the spacebar, here you go 🙂

#
        if(this.hasSinglePlayerPassenger()) {
            return (EntityLiving) this.getAllPassengers().iterator().next();
        }
        return null;
    }```
#

(1.17.1)

quaint mantle
#

how can I cancel the left hand if there was a press in the right hand?

#

@eternal oxide

eternal oxide
#

I can't answer that as your questions are never what you actually want. It takes about 30 minutes to find out what you really want to do.

slim kernel
quaint mantle
#

cancel the left hand if the right hand was used

quaint mantle
#

blyat, ya ebal

eternal oxide
# slim kernel Pls can anybody help I asked 4 times already plss
    public static List<Block> getBlocksInBetween(final Location from, final Location to) {
        
        Preconditions.checkArgument(from.getWorld() != null && from.getWorld().equals(to.getWorld()));
        final World world = from.getWorld();
        final Vector start = from.toVector();
        final Vector direction = to.toVector().subtract(from.toVector());
        final int distance = (int) Math.floor(direction.length());
        final double yOffset = 0;
        final BlockIterator blockIterator = new BlockIterator(world, start, direction, yOffset, distance);
        final ArrayList<Block> blockList = new ArrayList<>();
        blockIterator.forEachRemaining(blockList::add);
        return blockList;
    }```
#

that gets every block between two locations

quaint mantle
#

I use two hands when pressing in two hands. how can I make sure that only the right hand is used?

quartz pike
#

ahhahahahah

slim kernel
quaint mantle
# quaint mantle what does that even mean

if (e.getHand() == EquipmentSlot.HAND) {
p.sendMessage("HAND");
item.setAmount(item.getAmount() - 1);
p.getWorld().spawnEntity(loc, EntityType.PRIMED_TNT);
} else if (e.getHand() == EquipmentSlot.OFF_HAND) {
p.sendMessage("OFF_HAND");
alternate.setAmount(alternate.getAmount() - 1);
p.getWorld().spawnEntity(loc, EntityType.PRIMED_TNT);

eternal oxide
eternal oxide
#

clone if you don;t want it altered

slim kernel
#

Oh didnt knoe it also happens if I just set an other variable

#

Thank you!

deep spindle
#

Hello, I'm trying to find a way to code a minecraft plugin on my Chromebook, can anybody help me out?

onyx shale
#

tehnically.. you can code in notepad

eternal oxide
# quaint mantle how can this be fixed?

If you are clicking with both hands then an event will be fired for each hand, one after the other. There is no way to tell which is the click you want as theres no way to be certain which order they fire in

onyx shale
eternal oxide
#

programming on a chrome book, interesting

onyx shale
#

this is more of a google question

#

not a spigot one

quaint mantle
onyx shale
#

what event is that?

chrome beacon
#

Yeah my school has my Chromebook locked down can't run Intellij

onyx shale
#

you shouldnt code on a school pc...

#

in the first place

chrome beacon
#

We have programming lessons in Java

onyx shale
#

they likely provide theyr own way of doing it

chrome beacon
#

Web browser it is my guy

onyx shale
#

i usually fully despite combining equipment thats not personal

chrome beacon
#

thank god I have my own PC

quaint mantle
# eternal oxide If you are clicking with both hands then an event will be fired for each hand, o...

public void mainHand(PlayerInteractEvent e) {
if(e.hasItem()) {
if(e.getItem().hasItemMeta()) {
if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
if(e.getItem().getType() == this.material) {
NBTItem nbtItem = new NBTItem(e.getItem());
if(nbtItem.hasKey(this.pl.getConfig().getString("WithdrawItems.XpBottle.NBTLore")).booleanValue()) {
if(e.isCancelled() && e.getAction() == Action.RIGHT_CLICK_BLOCK) {
e.setCancelled(true);
} else {
e.setCancelled(true);
boolean offHand = false;
if(this.pl.isServerVersionAtLeast(Version.V1_9) && e.getItem().equals(e.getPlayer().getInventory().getItemInOffHand())) {
offHand = true;
}

                    this.pl.getServer().getPluginManager().callEvent(new BottleRedeemEvent(e.getPlayer(), e.getItem(), nbtItem.getInteger(this.pl.getConfig().getString("WithdrawItems.XpBottle.NBTLore")).intValue(), offHand));
                 }
              }
           }
        }
     }
  }

}

quartz pike
#

bruh bruh bruh

eternal oxide
quaint mantle
#

,,,123,,,

#

<!DOCTYPE html>

#

hmm

unreal quartz
#

google ?

quaint mantle
#

yes

#

,,,123

#

,123

#

,,123

#

щр

#

"123

#

`123

#

``123

eternal oxide
#

```java
//code
```

quaint mantle
#

how send?

#
//
public void mainHand(PlayerInteractEvent e) {
      if(e.hasItem()) {
         if(e.getItem().hasItemMeta()) {
            if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
               if(e.getItem().getType() == this.material) {
                  NBTItem nbtItem = new NBTItem(e.getItem());
                  if(nbtItem.hasKey(this.pl.getConfig().getString("WithdrawItems.XpBottle.NBTLore")).booleanValue()) {
                     if(e.isCancelled() && e.getAction() == Action.RIGHT_CLICK_BLOCK) {
                        e.setCancelled(true);
                     } else {
                        e.setCancelled(true);
                        boolean offHand = false;
                        if(this.pl.isServerVersionAtLeast(Version.V1_9) && e.getItem().equals(e.getPlayer().getInventory().getItemInOffHand())) {
                           offHand = true;
                        }

                        this.pl.getServer().getPluginManager().callEvent(new BottleRedeemEvent(e.getPlayer(), e.getItem(), nbtItem.getInteger(this.pl.getConfig().getString("WithdrawItems.XpBottle.NBTLore")).intValue(), offHand));
                     }
                  }
               }
            }
         }
      }
   }```
#

oh

eternal oxide
#

Ok, your event is going to be fired twice, once for each hand that you pressed.

quaint mantle
eternal oxide
#

you can't tell if the other hand is clicked or not in a single event

#

each hand should have its own action, but it would not be easy to ignore a left click if a right click came before

#

or vice versa

quaint mantle
#

yes

#

how?

eternal oxide
#

Not really possible

#

as you may want to only process the right click if both are clicked. However, you may receive the left click event first.

#

You have no way of know if a right click is going to follow your left click

bright jolt
#

How would I loop through all online players?

quaint mantle
quaint mantle
eternal oxide
#

Well from what you have described I'd say it would be really REALLY hard. You would need to delay processing a click for a certain number of ticks to wait for any other clicks.

bright jolt
eternal oxide
#

But I don't believe you have described what you really want to do so we are likely talking about two different things

eternal oxide
#

Its always bad

quaint mantle
#

I need to pick up an item from the right hand if the click was in the right hand

#

also with the left hand

eternal oxide
#

so what exactly do you want to happen? If a player clicks BOTH hands, you want to ignore the left and only process the right?

quaint mantle
#

but if the click was in both hands, pick up the item only from the right hand

eternal oxide
#

"pick up an item" = remove 1 from the stack?

quaint mantle
#

pick up 1 item from the stack

eternal oxide
#

I'm going to assume "pick up" means remove

quaint mantle
#

нуы

#

yes

#

item.setAmount(item.getAmount() - 1);

eternal oxide
#

The only way to do it reliably is to delay any left clicks

quaint mantle
#

if 2 hands?

eternal oxide
#

you may be able to achieve it by delaying a tick or two

bright jolt
#

It isn't working.

#

...

#

?paste

undone axleBOT
bright jolt
#

That's my code.

#

For the command.

#

Knowing me I probably did something wrong xD

quaint mantle
#

Inventory inv = p.getInventory();

#

Inventory inv = pl.getInventory();?

eternal oxide
bright jolt
#

Oh

#

So what would I get rid of?

eternal oxide
#

and line 16 you should return false so none of the rest of the code runs

bright jolt
#

kk

eternal oxide
#

you are trying to blank out inventory slots 100 to 103 of a player?

#

You'd be safer to use teh armour methods available from the player

quaint mantle
#

@eternal oxide

#

how can I allow a block to be placed in the region if it is dynamite?

eternal oxide
#
private void clearArmor(Player player) {
  player.setHelmet(null, true);
  player.setChestPlayer(null, true);
 // etc
}```
eternal oxide
quaint mantle
eternal oxide
#

No clue, I don;t use worldguard

quaint mantle
eternal oxide
#

if you want to override all protection plugins and always allow the placement of TnT then run it very last and un-cancel the event

eternal oxide
#

theres no getting past spawn protection, other than you placing the block in code, but the explosion will not break blocks in spawn

quaint mantle
#

yes

#

BlockPlaceEvent

#

how can I make a block be placed in protected regions?

eternal oxide
#

it depends on what is protecting the region

quaint mantle
#

worldguard/spawn-protect

eternal oxide
#

run HIGHEST and if the event is your place and the event is cancelled event.setCancelled(false);

wary harness
#

any one maybe know what is default

#

float for player speed

#

?

eternal oxide
#

zero 🙂

wary harness
#

that will make it not move

eternal oxide
#

yep, default for a player without any action is stationary

wary harness
#

speed

#

then

eternal oxide
#

walking is 0.2

wary harness
#

thanks

#

oh

#

any page with than info

eternal oxide
#

nothing hard coded in spigot as its a value set by Mojang and could change at any time.

eternal oxide
#

its a utility method

#

add the missing set armor lines for the last two slots

#

then you call that from your command passing the player you want to clear the armour on

bright jolt
bright jolt
#

What part in the code?

#

?

eternal oxide
#

You put that method in teh same class as your onCommand

bright jolt
#

Show me?

#

Oh like private void onCommand?

#

Nono

eternal oxide
#

You are a very beginner at java it seems

bright jolt
#

yes lol

quartz pike
#

?learnjava

undone axleBOT
eternal oxide
#

I'd really recommend learning some basics.

bright jolt
#

Could u tell me how to do tho?

#

like do the private void thing

eternal oxide
#

at least take a few beginner tutorials so you understand classes, methods and variable scopes

bright jolt
#

Ohhh wait I think I know how to do it.

wary harness
bright jolt
eternal oxide
#

not inside onCommand, but below

wary harness
last ledge
#

import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;

import java.io.File;
import java.io.IOException;

public class BannedWords {
        private static File file;
        private static FileConfiguration BannedWordsConfig;


        public static void setup() {
                file = new File(Bukkit.getServer().getPluginManager().getPlugin("AdvancedChatManager").getDataFolder(), "BannedWords.yml");
                if (!(file.exists())) {
                        try {
                                file.createNewFile();
                        }catch(IOException e){
                                //This plugin was made by Shayam Sharma
                        }
                }
                BannedWordsConfig = YamlConfiguration.loadConfiguration(file);
        }
        public static FileConfiguration get(){
                return BannedWordsConfig;
        }
        public static void save(){
                try{
                        BannedWordsConfig.save(file);
                }catch (IOException e){
                        System.out.print("Error Occuered will trying to save the file");
                }

        }
        public static void reload(){
                BannedWordsConfig = YamlConfiguration.loadConfiguration(file);
        }
}
#

Whats wrong in the File(Bukkit.getServer().getPluginManager().getPlugin("AdvancedChatManager").getDataFolder(), "BannedWords.yml");

#
[11:55:15] [Server thread/INFO]: ºaAdvanced Chat Manager Enabled !!!
[11:55:15] [Server thread/ERROR]: Error occurred while enabling ChatManager v1.1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.plugin.Plugin.getDataFolder()" because the return value of "org.bukkit.plugin.PluginManager.getPlugin(String)" is null
        at advancedchatmanager.chatmanager.CustomConfig.BannedWords.setup(BannedWords.java:16) ~[?:?]
        at advancedchatmanager.chatmanager.ChatManager.onEnable(ChatManager.java:14) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:511) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:425) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:619) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:266) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1010) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305) ~[server.jar:3241-Spigot-6c1c1b2-1492826]
        at java.lang.Thread.run(Thread.java:831) [?:?]```
#

It throws this error

#

i tried every possible way but dosent work

eternal oxide
#

?di use it to pass a plugin instance

undone axleBOT
last ledge
eternal oxide
#

pass a plugin instance not Bukkit.getServer().getPluginManager().getPlugin

last sleet
#

I'm getting this error, I looked a bit but can't seem to find it's cause. Maybe it's because my server is in 1.8.8? I found some people saying that older versions might get this kind of error.

eternal night
#

if your server runs 1.8 you will need to also depend on spigot 1.8

last sleet
#

In the pom.xml?

eternal night
#

yea

last sleet
#

?

eternal night
#

well you can depend on spigot 1.7 I guess ?

last sleet
#

I'm confused now

stone sinew
#

I use 1.17.1 as the depend base for one of my plugins. But I support down to 1.8.8

eternal night
#

that is plain stupid

last sleet
#

So I change this is 1.8.8 or...

eternal night
#

using 1.17 as your base for development when coding on 1.8 means you have to guess for every method if it existed in 1.8

#

yea that should be 1.8.8

last sleet
#

Alright thanks!

stone sinew
#

Not really. I also do forwards compatability lol 1.8.8 up to 1.17.1

eternal night
#

Yea but then you should be using a modular layout for version specific features you need

#

compiling a single plugin that only runs on 1.8

#

with 1.17 is just not a good idea

stone sinew
#

I use reflection for versionless.

eternal night
#

great, does not change the fact that a plugin that targets a 1.8 server should be compiled against spigot 1.8

stone sinew
#

Nope

eternal night
#

so you have your own server. That only runs 1.8

#

you still go for 1.17 api ?

stone sinew
#

So I build against 1.17.1 because I support 1.17.1 down to 1.8.8 and if the code doesn't function on a certain version I adjust accordingly.

eternal night
#

and how exactly does that relate to a "I am running a single 1.8 server I am coding against, should I use 1.17 api or 1.8" ?

#

if your plugin will only ever run on 1.8, choosing 1.17 as an API version is just not a clever idea

stone sinew
#

You said "if your server runs 1.8 you should depend on 1.8" that's not true you can depend on any version just won't be able to use some methods not found in your servers version

eternal night
#

if you want to properly do multiple versions, you will create individual modules that are loaded based on the server version

#

those can depend on the respective version

eternal night
#

sure /shrug. I'll look forward to seeing your approach in your next releases 👍

stone sinew
dense remnant
#

Whats the event when a fire source destroys a block?

#

I am trying to create a plugin where fire spreads through the forest without actually destroying the trees

paper geyser
#

BlockBurnEvent

dense remnant
#

Didnt find anything about this on the internet xd

#

thanks

paper geyser
#

no worries

vernal pier
#

use getBukkitEntity()

onyx shale
#

at that point dont use the pdc or anything else,go straight with the entity id

#

packet entities cant rly do much.. only the id is unique about them

#

the entity never exists

#

this psecific method will only work if your converting a entity into nms then back,not for packet entities

zealous osprey
#

Could someone help me/give advice on how to use AmberWats font ?

vast sapphire
#

How would I check the broken block in a BlockDropItemEvent?

onyx shale
#

event.getBlock?

vast sapphire
#

yes

#

That won't work for what i'm doing with the PlayBlockTracker API

onyx shale
#

then its up to you to find a solution if its not spigot related

#

go ask in theyr support

vast sapphire
#

I need to 'forward' the blockbreakevent

onyx shale
#

you can get the block from the event as i said,just pass it?

vast sapphire
onyx shale
#

if your at that stage dont even think about using an api yet..

vast sapphire
onyx shale
#

hm?

#

use eyelocation

#

will always be in front of him

#

or i guess if ur not in need of it,you can still use the eye to determine the angle between player and block

#

to figure out where the block is compared to the player face

idle cove
#

why does @Override not work in 1.17 - whenever i try to type it it autofills to @java.lang.Override and then says cannot resolve symbol 'java'

#

it worked for me in 1.8.9 so im confused

last sleet
#

I'm having this problem now that the java runtime isn't compatible, I didn't really do anything except just add things to my code. Any help?

idle cove
last sleet
#

Yeah as I said i didn't change anything in the pom.xml or plugin versions, so are there any ways to fix it?

idle cove
#

you should be using jdk 8

last sleet
#

I'm fairly new to intelliJ, can you please explain how to do that? Is it in like the java.version in the pom.xml?

idle cove
#

uh no

#

u download the jdk 8

#

online

#

and then u go to project structure when u hover over the files tab

#

click sdks

#

and then the plus button

#

click add jdk

#

and then go to where u saved the jdk 8

#

and then apply and build again

#

also u might wanna delete other jdk versions u already have installed idk if that will interfere

last sleet
#

Add jdk?

idle cove
#

yeah

last sleet
idle cove
#

click the plus button

#

top left of that windo

#

window*

#

then add jdk

last sleet
#

Ah ok

idle cove
#

but i mean

#

it seems like u already have 1.8 jdk installed

#

so idk how to fix ity

quaint mantle
#

Check if the projects java version is the 1.8 jdk

last sleet
quaint mantle
#

no what

#

in the project structure

last sleet
#

Ah I seem to have found it

#

it was on 11

#

I don't know how that could have happened though

idle cove
#

Anybody know why @Override autofills to @inner rock.lang.Override using spigot 1.17.1 api?

#

oops

#

i means java.lang.Override

quaint mantle
#

why are you making an annotation named "Override"

idle cove
#

for the onenable and ondisable

quaint mantle
#

?

rare cave
#

?

quaint mantle
#
@Override // Builtin to java
#

its in java.lang, automatically imported

idle cove
#

well

#

it autofills to that

#

for some reason

idle cove
#

then says java is not identifiable or smt

quaint mantle
#

That's what you want though

idle cove
#

java*

#

not wilsoon

rare cave
#

@inner rock.lang.Override

quaint mantle
#

Just delete wilsoon.lang.override

#

why are you naming it that

idle cove
#

no

quaint mantle
#

!?!?!?!?

idle cove
#

i meant to type java.lang.override

inner rock
#

he meant java.lang.Override

idle cove
#

that was a typo

inner rock
#

but my Discord name is Java

#

lol

quaint mantle
#

the guys name is java

#

Lmao

#

@idle cove intellij?

idle cove
#

yea

#

it says this: Cannot resolve symbol 'java'

rare cave
#

didnt see it before

quaint mantle
#

never heard of that happening

#

did you press like optimize imports

idle cove
#

nope

tired spoke
#

i have a BukkitRunnable problem

quaint mantle
#

just delete the java.lang part

idle cove
#

it wont work if i do that

quaint mantle
#

it will

#

its automatically imported

idle cove
#

Cannot resolve symbol 'Override'

rare cave
#

?

quaint mantle
#

tf java are you using

#

send a screenshot

idle cove
#

16

tired spoke
quaint mantle
quaint mantle
#

?learnjava

undone axleBOT
idle cove
#

still doesnt work

restive tangle
last sleet
#

So um even though it's set on 1.8 it still gives off the same error, even if I clicked Apply and reloaded the server; the plugin won't show up

restive tangle
#

or remove 1

restive tangle
last sleet
#

Even in the pom java is 1.8

last sleet
rare cave
last sleet
tired spoke
restive tangle
#

the plugin was compiled by a more recent version of the java runtime , it tells you that

#

i fixed mine by setting the compiler to 8

idle cove
last sleet
#

I changed the jdk to 8 but it won't work

rare cave
quaint mantle
idle cove
quaint mantle
#

java 52 = 8

rare cave
last sleet
#

it is 1.8 and won't work

last sleet
rare cave
#

no

last sleet
#

Because I need it to be 1.8.8 or 1.8.9

rare cave
#

download corretto 11

#

then retry

#

download corretto 11 on ur server but not ur pc

quaint mantle
#

what

restive tangle
#

i fixed it without corretto , that seems convoluted

eternal night
#

yea idk why you'd need corretto xD

rare cave
# quaint mantle what

he can solve this easily by updating the runtime version so dont care about the compiler

#

i meant he should update his java on his server

eternal night
#

does spigot 1.8 even allow running with java 11 ?

rare cave
#

idk but im running spigot 1.12 with java 16

quaint mantle
#

thats most likely your problem

restive tangle
#
If you're using IntelliJ, go to Settings > Build,Execution,Deployment > Compiler > Java Compiler, and set 'Target bytecode version' and 'Project bytecode version' to 8
Then go to your project structure,
Here, ensure that:

1- Project Settings > Modules > Sources: is on '8 - Lambdas, type annotations etc.'
2- Project Settings > Project > Project Language level: is also on '8 - Lambdas, type annotations etc.'
rare cave
#

well how to obfuscate my plugin

vernal pier
#

change all your class names to abc

eternal night
#

👀

idle cove
#

this is how i made lore in 1.8.8 but it doesnt work in 1.17.1 any solutions?

rare cave
eternal night
#

what ?

#

then why even obfuscate

rare cave
#

I cannot publish my purchased plugin without obfuscating

last sleet
rare cave
last sleet
#

alr

eternal night
#

premium resources may be obfuscated

#

you don't have to

last sleet
onyx shale
#

well in the end it must follow the obfuscation rules on the forum

eternal night
#

"You are allowed to obfuscate your resources, however the decompiled code must be somewhat legible by staff."

onyx shale
#

well not just that

#

there are specified obfuscators and certian naming rules

idle cove
#

This is the error i get

rare cave
#

not publishing on SpigotMC

idle cove
#

This is what i did:

#

This is how i set lore in 1.8.8 spigot

#

so im confused

onyx shale
#

you somehow deleted

#

the java folder wut

#

or tf is adoptopenjdk

rare cave
#

this may works

onyx shale
#
"C:\Program Files\Java\jdk-15.0.1\bin\java.exe" -Xmx5G -Xms3G -jar server.jar -nogui
PAUSE
idle cove
#

oh wait

#

wrong jdks

#

but i still get this error:

#

I also switched to the right jdk and this is the error i got form building:

quaint mantle
#

@idle cove just delete that java folder and let intellij install it for you

idle cove
#

intellij can install it by itself?

quaint mantle
#

yeah

idle cove
#

so delete the whole folder

#

and intellij will install it automatically

#

oh nvm i see

#

so i installed it using intellij and tried building again:

#

deleted then installed i should say

quaint mantle
#

did you select it

idle cove
#

yeah

#

it wouldnt let me build otherwise

#

since it prompts me to choose an sdk when i try to build when i havent chosen one

quaint mantle
#

try updating intellij

#

and if that doesnt work press file / invalidate caches/restart

grand leaf
#

hey guys, im trying to detect when a player drags an item into the slot in the hotbar that they are currently holding, I cant make sense of which inventory event achieves this, anyone know which one it is?

lethal knoll
#

Hey everyone, I just tried to integrate JDA bot with discord, and I got an error and apperantly, it has to do with the classloader of bukkit. Any ideas how to proceed?

#

I need to have a solution to send messages in discord from the plugin

paper viper
#

No error?

#

Code?

eternal night
#

Providing the error is a good idea

#

Yea

paper viper
#

Lol

lethal knoll
eternal night
#

Are you doing some plugman reload shenanigans ?

#

or modifying the jar at runtime

lethal knoll
#

Yea, @eternal night , actually doing that yes. Do you think that causes it?

#

It's because I'm developing the plugin

#

When using, It would not be the case

eternal night
#

yeah, replacing a jar while it is actively being used and not all classes are loaded from that jar might explode

lethal knoll
#

I'll try to stop the server and run it again

#

just a moment

golden turret
#

how do i detect when an item burns?

eternal night
#

should be a normal entity damage event

regal dew
#

for the events, EntityCombustByBlockEvent and EntityCombustByEntityEvent

short sundial
#

is there any way to grab the itemstack of a bucket from before it was emptied using PlayerBucketEmptyEvent? or do I juse use PlayerInteractEvent?

idle cove
#

what does this even mean anyway

quaint mantle
#

it cant determine the file path to tools.jar