#help-development

1 messages Β· Page 1936 of 1

next stratus
#

Self taught

tranquil viper
#

Spawner isn't considered a CreatureSpawner?

hardy swan
#

it is

tranquil viper
#

class org.bukkit.craftbukkit.v1_17_R1.block.CraftBlock cannot be cast to class org.bukkit.block.CreatureSpawner

hardy swan
#

you sure creature spawner is a block?

next stratus
#

oh, hey md 5

sullen marlin
#

Only block states can be cast like that, not blocks

worldly ingot
#

It's not. It's a state

sullen marlin
#

Call .getState

tranquil viper
#

πŸ€¦β€β™‚οΈ

#

thanks

next stratus
#

md_5, do you like redlib?

hardy swan
#

"What's that"

young knoll
#

The 51st state, CreatureSpawner

next stratus
tranquil viper
#

what’s the most efficient way of detecting when one entity gets close to another?

dark arrow
#

I want to code a plugin with my friend so is there is any IDE which allows that?

quaint mantle
#

git

#

then push to github

dark arrow
#

like in VS code there is a option through which i can liveshare and both me and my friend can type in same time but i dont see any features to code java spigot thats why i am asking is there is anything similar to that on which we can code together

eternal oxide
dark arrow
#

oh yea its there

#

thx πŸ™‚

nocturne trail
#

        String name = chunk.getX() + "," + chunk.getZ();

        file = new File(Minewindpvp.getPlugin().getDataFolder() + File.separator + "chunks" + File.separator, name + ".yml");
        chunkFile = YamlConfiguration.loadConfiguration(file);

        boolean dirCreated = file.getParentFile().mkdirs();
        boolean fileCreated = file.getParentFile().createNewFile();

        if (override || !(dirCreated || fileCreated)) {return;}

        chunkFile.createSection("blocks");
        chunkFile.createSection("palette");
    }``` is creating the 'chunks' directory but not the actual yaml file, any insight?
tacit dagger
#

why this can't resolve constructor?

ItemStack head = new ItemStack(Material.LEATHER_HELMET, 1);

PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(spirit.getId(), 5, CraftItemStack.asNMSCopy(head));
buoyant viper
#

control click the class and see what the constructor should be

dark arrow
#

is it possible to check what potion effect does the player has?

#

using if conditions

hasty prawn
#

hasPotionEffect

#

Or just getPotionEffect if you want the actual effect

tranquil viper
#

what’s the most efficient way of detecting when one entity gets close to another?

ornate heart
#

Is there a way to get a base64 skull heads without using nms?

sullen marlin
dark arrow
tacit dagger
blazing scarab
worldly ingot
#

Few days now

#

Oh, sorry, equipment change. I think a couple months

blazing scarab
#

nah i meant profiles

worldly ingot
#

Yeah, profile API was added 3 days ago

blazing scarab
short raptor
vocal cloud
#

And we don't even know because without code this error is useless

dark arrow
#
I tried this code
if(player.getActivePotionEffects().equals(PotionEffectType.LEVITATION)){
              player.spawnParticle(Particle.FLAME,player_under,5);

          }```
 it was supposed to summon particles when a player has levitation but it does no that
#

it does not summon any particles at all

buoyant viper
#

youre trying to see if an entire collection is equal to a single object

vocal cloud
#

Ahhhh

buoyant viper
#

you need to do player.hasPotionEffect not player.getActivePotionEffects().equals

vocal cloud
#

I was gonna make then figure it out

buoyant viper
#

someone had already told them to use hasPotionEffect anyway

buoyant viper
vocal cloud
buoyant viper
#

but imo they had the spirit, just missed the mark a bit

vocal cloud
#

I imagine that at least intellij would give a type warn

buoyant viper
#

it should

short raptor
#

Only happens when the player is offline

#

I am aware getOfflinePlayer() is bad

vale ember
#

what is the event for right-clicking villager?

vocal cloud
#

Get offline player is only bad if you use name

short raptor
#

The only way I found was literally just doing getOfflinePlayer(name).getUniqueId() lol

#

I'm not doing anything critical that will matter if it gets the wrong player which is unlikely to happen anyway

blazing scarab
short raptor
#

Ik it causes a blocking request but I also don't know how to stop that either

terse panther
#

Hello, I'm getting this error installing BuildTools.jar
Enter the version: 1.18.1 Error: Invalid or corrupt jarfile BuildTools.jar

sullen marlin
#

you dont have BuildTools.jar downloaded to your current directory

vocal cloud
terse panther
vocal cloud
#

Then redownload the jar file if it's corrupted?

#

Make sure it's fully downloaded then run it in cmd

terse panther
sullen marlin
#

screenshot what youre doing

vocal cloud
#

^

#

Show command prompt and folder

terse panther
#

I can do it by MD? Here i can't send images

sullen marlin
#

you can upload somewhere else or verify

vocal cloud
#

Imgbb or something

terse panther
#

Directoy, .bat code, cmd

#

is something wrong?

vocal cloud
#

What's in the buildtools folder?

terse panther
#

Btw I'm doing this to use NMS on my plugin

terse panther
#

And I restarted my pc and update java, but nothing

vocal cloud
#

Why not just run it via cmd? What version is this for

sullen marlin
#

the fact that its 1kb

#

something is probably blocking the download

#

just download it yourself

vocal cloud
#

Ah shoot didn't see that

quaint mantle
#

if you use curl

terse panther
quaint mantle
#

curl -L before the download link

#

i think your download link redirected to somewhere else

#

so use -L it will support the redirect thing

terse panther
terse panther
#

Or both are fine?

vocal cloud
#

It's a local jar run it via cmd

sullen marlin
#

either is fine, git is recommended

buoyant viper
#

wait ur supposed to run it through git bash?

quaint mantle
#

yeah if you use bat thing from windows it will just gonna download git

#

so use it through git

#

it will not download anything

#

other than cloning things

buoyant viper
#

always wondered why it downloaded PortableGit even when i had git for windows installed

short raptor
#

Is there something about doing this to an OfflinePlayer that causes ticking entity error and freezes the whole server?

sullen marlin
#

cant really help you without the error

short raptor
quaint mantle
#

purpur

short raptor
#

Of spigot

quaint mantle
#

so do paper

sullen marlin
#

sir this is spigot

quaint mantle
#

but md just dont want to help paper users at all lol

#

LOL

short raptor
#

Ok

#

I'll try it on my spigot server

quaint mantle
#

he copied that again

buoyant viper
#

the error could be specific to purpur

short raptor
#

I'll be back if error is still there

quaint mantle
#

purpur is paper fork btw

short raptor
buoyant viper
#

could still be an issue in purpur rather than spigot

short raptor
#

Boutta find out

drowsy helm
terse panther
quaint mantle
#

im sad that i did not get any ping, but then i realized im not really like pings

short raptor
#

On spigot the exact same thing happens but it doesn't post anything in the console

#

πŸ™„ πŸ™„ πŸ™„

#

Oh hey it finally crashed

short raptor
sullen marlin
#

its an inherent problem with the OfflinePlayer API in that it has to save after each method call

#

so your bulk method is resulting in hundreds/thousands of saves

short raptor
#

Oh that makes sense

#

I guess I have to run my own DB then

sullen marlin
#

just delete their stats file tbh

short raptor
#

Lets go I didn't think of that and instead jumped to the most complicated answer

#

Thanks for your help

#

I don't think I woulda figured it out otherwise

elfin atlas
#

Is there a way to check if a player who sits on armorstand pressed W or A Or Spacebar?

sullen marlin
#

Doubt it

blazing scarab
#

on LivingEntities, with some nms hacks, that's possible

#

but i doubt it is on armorstands

elfin atlas
quiet ice
#

Is SpongeAbsorbEvent#blocks mutable?

sullen marlin
#

Maybe, check

dark arrow
#

is it possible to change slimeblock restutiono?

quiet ice
#

Does the block metadata change when the block is removed or replaced?

sullen marlin
#

What metadata

quiet ice
#

Block implements Metadatable, I'm talking about the methods that it implements

#

Actually, it is a bit irrelevant in my case. Thankfully

mellow edge
#

(my plugin)

tardy delta
#

Wha-

quiet ice
#

I only upload the best quality stuff on my account

dark arrow
#

whats the difference between getName and getDisplayName?

mellow edge
#

I meant if anyone has ability to upload his own plugins on spigotmc

tardy delta
proud badge
#

getServer().getPluginManager().registerEvents(listener:this, plugin:this); Anyone know why both of the : are showing up on a red underline?

drowsy helm
#

double colon

#

plugin::this

proud badge
#

ok

tardy delta
#

is that java

#

plugin::this

drowsy helm
#

yeah it is

proud badge
#

now im getting even more errors

#

leme screenshot

drowsy helm
#

why are you using that operator anyway

#

you dont need it

tardy delta
#

looks weird i dont understand the context

proud badge
#

idk im following a tutorial and for some reason its not working

drowsy helm
#

can just remove the this bit

tardy delta
#

i hope its not codedred ._.

proud badge
#

idk i just clicked on the first one that showed up

proud badge
quiet ice
#

Are you sure that this is java and not scala or something

proud badge
#

yes

quiet ice
#

because that is no java syntax

proud badge
#

hmm

drowsy helm
#

no colons

proud badge
#

ok

quiet ice
#

no. this.plugin and this.listener

tardy delta
#

just new MyListener() and this

#

omg

quiet ice
#

x::y marks a method reference. Mostly used with functional interfaces, but that is something for later

proud badge
#

ok now were down to only 2 errors

quiet ice
#

It is very unlikely that you will need it

proud badge
#

cant resolve symbol plugin and listener

drowsy helm
#

they are not defined

#

have you set the plugin and listener variables?

quiet ice
#

or fields

tardy delta
#
getSerer().getPluginManager().registerEvents(new MyListener(), this); // in your main class```
quiet ice
#

Could you link us that tutorial? I'm interested why it is suggesting you to do what you are doing

tardy delta
#

or replace this by your plugin's instance if not main class

drowsy helm
#

hes using getServer so its in the main class

tardy delta
#

i only see this

#

bruh he was typing the listener: and plugin:

quiet ice
#

Oh

#

Yeah, intelliJ was there to fuck you up

proud badge
#

cool

quiet ice
#

the listener: and plugin: parts do not actually exist and are just inserted by intelliJ to aid the developer. They are the names of the parameters

tardy delta
#

if you look what he typed, you would have seen that he only typed "this" twice

terse panther
#

Hello, to use import net.minecraft.server. * I must to add this right?

spiral light
#

nope

#

its 2 lines above

#

if you use "spigot" you also have access to nms

#

if you use "spigot-api" you only have access to the spigot api and no nms

#

remapped-mojang is just for having nice named nms-methods / classes

#

but with "remapped-mojang" you will need an extra thing in the pom

terse panther
tardy delta
#

just use "spigot" as artifact id

spiral light
#

you dont need to add spigot-api if you have spigot

terse panther
proud badge
#

btw on eclipse when i build the project where does the jar go?

#

where can i find it?

worldly ingot
#

With what tool? Maven? Gradle? No tool?

proud badge
#

i think its gradle

#

wait

#

i haven't opened eclipse in a long time

spiral light
worldly ingot
#

If you're using Gradle, by default it will be <projectDir>/build/libs/

midnight shore
#

Guys! how can i use grandle with eclipse in an already created project? @quiet ice i used your method but i can't find the terminal

terse panther
#

there is a way with BuildTools?

quiet ice
worldly ingot
quiet ice
#

You need to do it via the "gradle tasks" view

midnight shore
#

now i get this logo on the project

chrome beacon
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

quaint mantle
#

Can i use java 11 with spigot 1.8?

midnight shore
#

its this the right page?

quiet ice
#

You need to double click the "init", then go to the console view/window and complete the setup

chrome beacon
#

Don't manually install the jar. Run BuildTools and it will install things for you

#

?bt

undone axleBOT
midnight shore
#

i don't get that page here

quiet ice
#

Oh first you need to go to the gradle tasks view. That would be
Window (on the top bar) > Show view > other > gradle > gradle tasks

chrome beacon
#

Also never download the spigot jar. There is no official download page. The only way you should get it is from BuildTools

quaint mantle
#

?bt

undone axleBOT
quaint mantle
#

?buildtool

midnight shore
#

okay nice

quaint mantle
#

?builttools

#

?buildtools

chrome beacon
#

Well yeah since you shouldn't use it

midnight shore
#

what should i use?

quiet ice
#

basic

midnight shore
#

oh god this is getting harder

quiet ice
#

Groovy, eclipse does not support kotlin well

drowsy helm
#

eclipse doesnt support anything well

midnight shore
#

ok i did it, now i can see the grandle page

quiet ice
#

(Also this is how you should always create gradle projects in eclipse. Otherwise eclipse will go with the application template and let me tell you - in 80% of cases it sucks)

midnight shore
#

Eclipse is just sucking at everything

quiet ice
#

Eh, I'd say that this is a gradle issue

midnight shore
#

so now to import some api i can just use grandle right?

quiet ice
#

Yep.

midnight shore
#

Noice

quiet ice
#

It is best to get fully rid of whatever system you have in place right now, but you can always delay this task to later

midnight shore
#

?

quiet ice
#

Well your old eclipse build path is still present (I. e. when you told eclipse to use spigot). This may interfere with gradle

#

It isn't really important until you want to actually build via gradle (e.g. to shade stuff like bstats into your plugin) or until you switch your PC

midnight shore
#

so? i'm a little scared that this is actually going to damage my plugin

#

i spent like 2 months on that so...

terse panther
#

Hi, I remapped the NMS, but now I don't access to the imports, is something wrong?

quiet ice
#

Not really. It's just right clicking on your project > build path > configure build path > libraries
Then you can remove any external jar you set up previously (though you need to readd them in your build.gradle file later on).

terse panther
midnight shore
quiet ice
#

Yes

midnight shore
#

okay

#

i'm trying IntelliJ rn, lets see how it goes

spiral light
#

also you need to run buildtolls with the remapped mojang flag once

midnight shore
quiet ice
terse panther
spiral light
#

yeah because the name changed probably

#

EntityCreature will be Creature (same name like spigot, but different class)

#

also EntityZombie and all the other entities will now have the name without the Entity prefix probably

terse panther
#

xd omg, is there a site or documentation to check the name changes?

spiral light
#

contains a lot of data and thats why its soo big xD but you can search at top left for class names if the page loaded completly

tardy delta
#

"if the page loaded completely"

#

brr

spiral light
#

? would be useless to search things on a 10% loaded page and then write " i cant find anything i search"

blazing scarab
tardy delta
#

hmm im looking for a method to colorize hex colors and normal chat colors on the same string

#

and i want to use the normal hex format, not the one with a & infront

blazing rune
#

How do I stop scoreboard flickering

tardy delta
#

use scoreboard packets instead i guess

spiral light
spiral light
blazing rune
#

Also how do I get the player's time

#

Like 8:05 pm

spiral light
#

CompoundTag maybe

chrome beacon
#

ItemStack#Save

#

Assuming mojmaps

quiet ice
#

It isn't error free however, but it is the best thing you can do

#

Unless you are willing to do an IP lookup

quaint mantle
#

Okay, i've made a command working, but whenever i send the command it outputs what i've set to, and the command too

#
        if ((label.equalsIgnoreCase("ban"))) {
            player.sendMessage(ChatColor.GREEN + "Hello " + player.getDisplayName());
            player.getServer().broadcastMessage("hello");
        }```
#

nvm

#

i was missing a return statement

mortal hare
#

wow

#

i just realised how inefficient bukkit itemstacks in inventory are

#

whenever you call getItem() inside Bukkit Inventory class

#

it would create new CraftItemStack object

#

also whenever you set ItemStack inside the slot

#

it would make a NMS copy inside method and store it

tardy delta
smoky oak
#

how do i compare char? neither equals nor == is working

quiet ice
#

he's probs asleep, for now

#

It's ==

smoky oak
#

then why does it give an error

quiet ice
#
char x = 'x';
if (x == 'a') {
     System.out.println("I destroyed the world!");
}
#

That is a string, not a char

smoky oak
#

...

dusk flicker
#

chars use '

smoky oak
#

its the quotation marks aint it

dusk flicker
#

you're using " which is a string, a char is '

quiet ice
#

Also, you should be using .codepointAt if there is only the slight doubt that you will encounter non-ascii characters

#

Plus it confuses decompilers :)

tardy delta
#

does this looks good?

blazing rune
#

When I do player.getHealth() it shows like 14.4999999046325684 on the health, anyone know how to fix this?

dark arrow
#
if(plugin.getConfig().getBoolean("enable")){
                if(args.length==1&&args[0].equalsIgnoreCase("set")){
                    Location homeLocation = player.getLocation();
                    plugin.getConfig().createSection("savedLocations."+player.getName());
                    plugin.getConfig().set("savedLocations." + player.getName() + ".x" + homeLocation.getX());
                    
                }
            }```
it was suppose to add the player x on config but instead it says 'set(java.lang.String, java.lang.Object)' in 'org.bukkit.configuration.MemorySection' cannot be applied to '(java.lang.String)'
spiral light
quiet ice
#

Well it is a bit difficult to display it

#

But using String.format("%.02f", player.getHealth()) should suffice here

#

or just multiply by 2, cast to int and handle it manually

quaint mantle
blazing rune
quiet ice
#

then cast to int

tardy delta
blazing rune
quiet ice
#

just know that 14.49... will be 14 after getting casted

quaint mantle
tardy delta
#

ah that

quaint mantle
#

matcher =... in while loop is unecessary

tardy delta
#

i saw it in the video lol

quaint mantle
#

Matcher's similar to iterator

quiet ice
#

A lot of stuff on the interwebz is bad

tardy delta
#

dont know how to do it myself lol

hardy raven
#

hi

tardy delta
#

hi

hardy raven
#

I got an maven error

#

Can you help?

dusk flicker
#

?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.

tardy delta
#

?paste it

undone axleBOT
dusk flicker
#

Provide all details please

#

Errors, what you tried doing, etc

hardy raven
#

And pom.xml is

dusk flicker
#

Send your pom in a paste, not just here

#

?paste

undone axleBOT
hardy raven
#

is this how to do paste?

dusk flicker
#

yes

hardy raven
#

Plugin version: 1.12.2
Need to import luckperms and essentials

#

Is there further informations needed?

quiet ice
#

Try using bstats 3 instead

hardy raven
#

bstats 3?

quiet ice
#

Nvm

hardy raven
#

How do I use it?

quiet ice
#

Just exclude every dependency

hardy raven
#

okay.

quiet ice
#

I. e. something like

        <dependency>
            <groupId>com.sk89q.worldguard</groupId>
            <artifactId>worldguard-core</artifactId>
            <version>7.0.6-SNAPSHOT</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
worn tundra
#

Yeah, give your ItemStack a UUID inside its PersistentDataContainer

tardy delta
#

setMaximulStackSize or something?

tardy delta
quiet ice
#

A UUID in the PDC will work

worn tundra
quiet ice
#

And it's the more traditional approach

tardy delta
#

never heard of that

quiet ice
#

As you can only stack two items if almost all the metadata is identical

hardy raven
tardy delta
#

why an uuid tho?

worn tundra
#

Because It's unique

#

Could also have a random number generator

quiet ice
#

Yes, though with different groupIds, artifactids and versions

tardy delta
#

or a random string

quiet ice
#

Or more simply a long obtained from an AtomicLong

frigid rock
#
  cooldownTime.put(p, plugin.getConfig().getInt("cooldownTime"));
                        cooldownTask.put(p, new BukkitRunnable() {
                            @Override
                            public void run() {
                                int timeLeft = cooldownTime.get(p) - 1;
                                cooldownTime.put(p, timeLeft);
                                if(timeLeft == 0){
                                    cooldownTime.remove(p);
                                    cooldownTask.remove(p);
                                    cancel();

                                }
                            }
                        });
                        cooldownTask.get(p).runTaskTimer(plugin, 20, 20);```
#

does anyone know why this is not working?

quiet ice
#

random values are inherently expensive to produce

tardy delta
#

oh no runnables for cooldown

frigid rock
spiral light
#

and dont read config every time; read it onEnable and store it somewhere

tardy delta
#

with a runnable

tardy delta
#

im using timestamps

#

so a map with UUid and Long

hardy raven
#

No bugs but is it ok with no dependency?

quiet ice
#

Most of the time you do not need transitive dependencies

#

And when you need them you can simply re-add them

hardy raven
#

Invalid maximum heap size: -Xmx4G
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

quiet ice
#

Use 64 bit java

#

Right now you are using 32 bit java, which only allows up to 2G of memory

hardy raven
#

oh

#

But how do I use 64 bit?

tardy delta
#

download it

quiet ice
#

Uh, where did you encounter this error?

tardy delta
#

saw that

mystic scaffold
native gate
#

hello, wanted to ask, why brigardier isn't really implemented in spigot, and only in library plugins? does nobody had time or brigadier that went to MIT licence isn't enough to make a proper support in spigot api?

hardy raven
#

re-login to mc

#

jeet26

mystic scaffold
#

Bro how can i fix that. It is bungee server

grave fox
#

this is good?

            

      if (!player.get(0).equals("ERROR")) {
                ResultSet playerRS = (ResultSet) player.get(0);
                
                if (!playerRS.next()) {
                    String encodedPassword = Base64.getEncoder().encodeToString(password.getBytes());
                    
                    ArrayList id = mysql.select("SELECT max(id) FROM authentication");
                    String insertQ;
                    
                    if (!id.get(0).equals("ERROR")) {
                        ResultSet idRS = (ResultSet) id.get(0);
                        
                        if (idRS.next()) {
                            insertQ = String.format(
                                "INSERT INTO authentication (id, username, password) VALUES (%d, '%s', '%s')",
                                idRS.getInt(1)+1,
                                username,
                                encodedPassword
                            );
                            
                        } else {
                            insertQ = String.format(
                                    "INSERT INTO authentication (id, username, password) VALUES (0, '%s', '%s')",
                                    username,
                                    encodedPassword
                            );
                        }
                        mysql.insert(insertQ);
                        return 1000;
                    } else {
                        return (Integer) id.get(1);
                    }
                } else {
                    return 1001;
                }
            } else {
                return (Integer) player.get(1);
            }
tardy delta
#

that looks like bedrock edition

quiet ice
#

Backends need to be in offline mode

mystic scaffold
#

I use geysermc

worn tundra
mystic scaffold
quiet ice
hardy raven
#

this is spigotMC discord I think

tardy delta
#

nice, password encoded in base64

grave fox
quiet ice
hardy raven
#

I know but geyserMC

quiet ice
#

They are the best invention since cut bread

native gate
hardy raven
#

org.bukkit.plugin.InvalidPluginException:

tardy delta
#

that mysql library goes brr tho

hardy raven
#

This happened when I put the plugin in the folder

tardy delta
#

do you have a plugin.yml file?

hardy raven
#

yes

quiet ice
hardy raven
#

at least in source code

tardy delta
#

sec

mystic scaffold
#

Bro i need help

smoky oak
#

question, do plugins get loaded into RAM or are they executed from the drive? Or is it a mix of both considering events get registered?

quiet ice
mystic scaffold
#

Ok

quiet ice
#

So if you delete a class from the jar before that class is loaded, it will throw an exception when it attempts to load that class

native gate
quiet ice
#

At least that is the case in my setups. Windows will have it's differences

tardy delta
#

?paste it real quick lol

undone axleBOT
hardy raven
tardy delta
#

is it even in the reources folder?

hardy raven
#

yes

worn tundra
#

You could try decompiling your plugin

#

Using JD-gui

#

And see what sort of plugin.yml you have there

smoky oak
quiet ice
#

Then just use swap

smoky oak
#

I'm deciding if i want to optimize for speed or for size

quiet ice
#

but don't

hardy raven
worn tundra
#

Screenshot?

quiet ice
tardy delta
#

whats the path of it?

quiet ice
#

Do you have the "com.mcpkdot.rankui.RankUI" class?

hardy raven
#

yes

#

public final class RankUI extends JavaPlugin implements Listener {

quiet ice
#

?stash

undone axleBOT
worn tundra
#

Bruh probably some very little error

quiet ice
#

With the right package?

hardy raven
#

package com.mcpkdot.rankui;

tardy delta
#

hehe i love optionals

hardy raven
#

hehe

quiet ice
#

what is teh exact error?

hardy raven
#

full?

tardy delta
#

?paste it, yes

undone axleBOT
tardy delta
#

the stacktrace

quiet ice
hardy raven
worn tundra
#

Lmao

quiet ice
#

You do not have ess installed

tardy delta
#

bruh

quiet ice
#

Or ess loads after your plugin

hardy raven
#

It might be but how to change sequence?

tardy delta
#

set essentials as a dependency

quiet ice
#

Don't reference foreign plugins in your constructor or fields

hardy raven
tardy delta
#

in your plugin.yml depend: [Essentials]

#

or soft-depend if you want to use essentials' things but dont want to stop the plugin if essentials isnt installed, you would have to check manually tho

quiet ice
#

You can only safely use foreign plugins in non-JavaPlugin classses, provided they are not used in the constructor of the JavaPlugin

#

Well soft-depend wouldn't work here

tardy delta
#

i dont understand what you're saying lol

hardy raven
#

yay it worked thank you!

quiet ice
tardy delta
#

i would do PersistentDataType.STRING and UUID#toString but idk if that will work

quiet ice
#

That is even worse

tardy delta
quiet ice
#

Use AtomicLong instead of anything random

#

You can assign the AtomicLong to a random value at startup if that is the issue

tardy delta
#

why atomic?

quiet ice
#

but afterwards it is just an increment + 1 which is a lot faster than a random number generator

quiet ice
#

Because, eh. You can always need it

tardy delta
#

for itemstacks hmm

#

._.

worn tundra
#

For which UUID.randomUuid.toString should be fine

quiet ice
#

AtomicLong is faster!

ivory sleet
#

Should be said, any of the atomic classes do not guarantee synchronization (necessarily not talking about lock mechanisms)

quiet ice
#

But AtomicLong has compareAndSet which can be a lifesaver to guard against race conditions

worn tundra
#

The goal here, is to have unique data in each ItemStack that would prohibit them from stacking.

ivory sleet
#

That will not always guarantee atomicity

#

however you can use sth like getAndUpdate

#

Which ensures a synchronized β€œget value, change it, set it back based on previous value”

quiet ice
#

Hm, I thought weakCompareAndSet would be the one that doesn't guarantee atomicity

ivory sleet
#

Well, they guarantee atomicity, provided that you know how to use them correctly

#

Idk the exact difference between weakCAS and just normal CAS after they changed to VarHandle as opposed to Unsafe

#

But hopefully they haven’t changed in spite of the internal change

quiet ice
#

getAndUpdate internally uses weakCompareAndSetVolatile

hardy raven
#

I got
Could not pass event PlayerCommandPreprocessEvent to RankUI v1.0-SNAPSHOT

Can you help?

worn tundra
#

That's not the actual error

quiet ice
#

full stacktrace please

hardy raven
#

?paste

undone axleBOT
hardy raven
tardy delta
#

are you importing the wrong Utils class?

ivory sleet
#

I think, or perhaps if VarHandle was the class that could override that

#

But ye

tardy delta
#

RankUI.onCommand(RankUI.java:72)

quiet ice
#

I think compareAndSet is the same as weakCompareAndSetVolatile, though latter is HotspotIntrinsic so eh

smoky oak
#

what's more efficient and/or faster? Storing a group name per player then check in a FileConfiguration if that group has an attribute, or storing a EnumSet per player, then calling set.contains(enum) ?

hardy raven
ivory sleet
#

Ah right, but ye you could stick with weakCAS. Probably worded it wrongly, those methods are atomically safe, but they may not end up guarantee synchronization of actions and updates you perform.

tardy delta
#

line 72

hardy raven
#

oh

#

public void onCommand(PlayerCommandPreprocessEvent e){
String[] str = e.getMessage().split(" ");
str[0] = toLowerCase(str[0]); <---------line 72
if(str[0].equals("/rankshop")){
openInv(e.getPlayer());

quiet ice
ivory sleet
#

Probably not danceDog

#

It’s still a sin atomicity is excruciatingly painful to test

tardy delta
hardy raven
tardy delta
#

you have to implement CommandExecutor and set an executor for a command

hardy raven
#

Ohh

#

Thank you

quiet ice
#

Uh, complicated. Basically it is a wrapper around the primtive long (just like Long) but is mutable

ivory sleet
#

^ if you wanna know you ought to look up the semantics of what volatile guarantees

quiet ice
#

It's main plus is that is provides many methods that allow multiple threads to operate on the object at the same time. Though you also need to use these methods correct

tardy delta
#

just a synchronized long

#

🀑

quaint mantle
#

How do i access the black glass stained pane via code?

ivory sleet
tardy delta
#

nawh

quiet ice
#

I do not have an example that uses atomic longs at hand, but there is something similar to it with a ConcurrentHashMap:

                    do {
                        PlayerRecord oldSuccessor = successors.get(worldPos);
                        if (oldSuccessor == null) { // There is no successor, so we can easily change it now
                            oldSuccessor = successors.putIfAbsent(worldPos, tickedRecord);
                        }
                        if (oldSuccessor != null && tickedRecord != oldSuccessor
                                && oldSuccessor.score().get() < tickedRecord.score().get()
                                && !successors.replace(worldPos, oldSuccessor, tickedRecord)) {
                            continue; // The old value changed in the meantime: let's have another poke at it
                        }
                    } while(false);

As you see, it is complicated

tardy delta
#

do while false huuh

quaint mantle
#

forgot to mention, spigot 1.8

ivory sleet
quiet ice
#

Unfortunately you cannot do something like

loop: {
    if (cond) continue loop;
}
ivory sleet
#

But ye

quiet ice
#

Nah, while(false) was intended

ivory sleet
#

Was it?

tardy delta
quaint mantle
#

Isn't

tardy delta
#

for the continue i guess

quiet ice
#

Yep, I could've also used while(true) but I would have to invert all the conditions in the if statement and replace the continue with a break

tardy delta
#

which 'overrides' the false?

ivory sleet
#

Usually when we change something atomically we have a boolean flag which is set to true and then dependent on some comparisons we set it to false thus terminating the atomic update

#

Ah right

#

Fair

midnight shore
#

Hi, how can i check when an armor is equipped and disequipped?

tardy delta
#

idk about the blockdata

quiet ice
#

You could if you were to write the bycode by hand

#

But javac does not allow that

ivory sleet
#

πŸ₯²

midnight shore
#

Armor equip and disequip event

quiet ice
#

would only be something like

loop:
iload cond
jump_ifeq loop
ivory sleet
#

How do you even remember those devilish instructions lol

quiet ice
#

I work with the bytecode a lot

#

but I still confuse opcodes, especially the jump ones

hardy raven
#

I got error with inventory click event

tardy delta
#

?paste it ._.

undone axleBOT
hardy raven
quiet ice
#

You are probably comparing a BigDecimal to a null value

#

what do you have on line 87

tardy delta
#

just send the whold thing

quiet ice
#

also good

tardy delta
#

xd

hardy raven
#

ok

#

?paste

undone axleBOT
tardy delta
#

omg

hardy raven
#

line 87 has }

#

idk

#

probably this caused error

quiet ice
#

When did you define premiumPrice?

hardy raven
#

at class

#

with no modifiers(public static final etc

quiet ice
#

Okay, wrong wording

tardy delta
#

did you give it a value?

quiet ice
#

That is better

young knoll
#

Pre-flattening black stained glass pane was STAINED_GLASS_PANE with meta something

#

13? idk

hardy raven
#

sorry I asked something stupid lol

quiet ice
#

Does anyone know whether eclipse has a plugin that implements basic support for jetbrain's Contract annotation?

eager knoll
#

I'm having trouble with the playerItemDamageEvent event, it doesn't seem to cancel durability change at all when I cancel the event, I have a 1.8.9 server, any reason for this?

tardy delta
#

did you register the event? did you cancel it?

quiet ice
#

I'm impressed by the fact that even though 1.8 has a userbase of under 10% there are still quite a lot of devs for it

young knoll
#

I didn’t know the event existed back then

#

Dang

eager knoll
#
    public void noDurability(PlayerItemDamageEvent event){
        if (event.getPlayer().getWorld().getName().equals("spawn")){
            event.setCancelled(true);
        }
    }```
tardy delta
#

uhm probably the world checking

quiet ice
#

Hm, and the condition can indeed evaluate to true?

young knoll
#

Add a sysout or something

eager knoll
young knoll
#

Well then debug it

tardy delta
#

print all bukkit worlds and you'll see if it contains "spawn"

vocal cloud
tardy delta
#

isnt hypixel still 1.8?

quiet ice
#

Hypixel is different

midnight shore
#

Ok so I'm using the ArmorEquipEvent and it works perfectly, but now how do i check if i disequip an armor piece? will it work with dragevent? if yes, how can i check the old item position?

tardy delta
#

or just a plugin that allows 1.8 like pvp

quiet ice
#

Nah, it's still on an ancient version, it really does not like 1.13 movement

midnight shore
#

i found that the inventorydragevent has an option to get the cursor position, but it is a set of integer, how can i get the first one?

young knoll
#

Ah that’s forked from the original

#

See the resource page I linked to check for unequipping

midnight shore
#

ty

tardy delta
#

.stream().findFirst() lol

young knoll
#

Basically old item != null and new item == null or air

midnight shore
tardy delta
#

nobody saw that

young knoll
#

You don’t need the drag event

midnight shore
#

shi* i'm using 1.17

#

😐

young knoll
#

And?

midnight shore
#

will it work? or will it throw some weird errors?

#

oh wait

#

it is the same as the one i was using

young knoll
#

Should work fine

midnight shore
#

lol

young knoll
#

I told you that you are just using a fork

#

The documentation for the original still applies

midnight shore
#

what its wrong with this? it doesn't do anything

quiet ice
#

Quite a lot

midnight shore
#

?

quiet ice
#

You shouldn't store anything in the lore

#

You are not caching the item meta

midnight shore
#

i want to make like an attribute to the item with stats

quiet ice
#

variable naming is unconventional

young knoll
#

Use pdc for storing attributes

midnight shore
#

how should i store the data? in the item name?

young knoll
quiet ice
#

You are invoking getLore#indexOf while iterating over it to obtain the index of the current value

midnight shore
#

i understand it is not good code

midnight shore
young knoll
#

?pdc

quiet ice
#

You then proceed to get the item at the index of the current value, which is completely useless

#

You use #replace() when #substring() is more performant

#

And that is about it

young knoll
#

Pdc is so much nicer

midnight shore
#

well

young knoll
#

No weird string faffing

midnight shore
#

the problem wasn't that

#

i'm asking why it doesn't cast when i equip it

quiet ice
#

cast?

midnight shore
#

nevermind

quiet ice
#

Do you get a ClassCastException or something else entirely?

midnight shore
#

don't mind i'm just stupid

#

ty

#

bye

dark arrow
#

if(plugin.getConfig().getBoolean("enable")){
                if(args.length==1&&args[0].equalsIgnoreCase("set")){
                    Location homeLocation = player.getLocation();
                    plugin.getConfig().createSection("savedLocations."+player.getName());
                    plugin.getConfig().set("savedLocations." + player.getName() + ".x" + homeLocation.getX());
                    
                }
            }

it was suppose to add the player x on config but instead it says 'set(java.lang.String, java.lang.Object)' in 'org.bukkit.configuration.MemorySection' cannot be applied to '(java.lang.String)'

quiet ice
#

At compile time or at runtime?

young knoll
#

You are just passing a single argument

dark arrow
young knoll
#

Type it and the ide will handle that

quiet ice
#

You should have already done this if you are using 1.14+

#

If you are using 1.13- you are out of luck

midnight shore
#

i'm always in 1.17

young knoll
#

Then you have it as part of the API

midnight shore
#

Sorry for asking again, now it is working fine when i disequip the armor but not when i do equip it, can you help me?

quaint mantle
#

What's the best way to find a player that has a colored name?

opal juniper
#

@lost matrix
I read your guide on tracking player's block changes, and i am trying to store world,x,z of a chunk in a single key. i got something like this:

private long getaLong(UUID world, int x, int z) {
    return x & 0xFFFF | (z & 0xFF) << 16 | (world.getMostSignificantBits() & 0xFF) << 24;
}

but im not too sure about how unique it would be, wondered if you had a better way

sorry to bother you πŸ˜„

quiet ice
#
for (Player p : Bukkit.getOnlinePlayers()) {
    if (p.getDisplayName().indexOf('Β§') != -1) {
       // Colored name
    }
}

probably this

quaint mantle
#

what about to get player's name from a gui like

#

there's a inventory named <playername>'s info

visual tide
#

dont
use
an
inventory
title
to
validate
anything

#

check the inventoryholder

quiet ice
#

If you created that inv, just keep a concurrent hash map

visual tide
#

!

young knoll
#

Don't use holder either

#

InventoryView

quaint mantle
#

It's a ban GUI, you click on a player and it opens info inventory

quiet ice
#

Yeah, then HashMap

visual tide
young knoll
#

Well yes

quiet ice
#

Map<UUID, UUID>

#

UUID is the viewer, the other UUID is the viewed player

#

Saves you a Bukkit#getOfflinePlayer lookup

quaint mantle
#

thanks

cold pawn
#

I have a feature in my plug-in that changes a players skin when they join the server to a specified skin. It works well for the most part but an issue that it seems to have is, if the player is in the nether when they join the server the world will not load for them until they are teleported to the overworld. Does anyone know how I can fix this issue?

opal juniper
#

Its been fairly reliable so far

dusk flicker
#

Lets you set the skin from a mojang texture server texture

#

It's only in the like very latest builds tho

young knoll
#

That's a thing?

#

Noce

lost matrix
cold pawn
lost matrix
opal juniper
#

Hmm thats annoying

#

Ok tho, thanks

young knoll
#

When do we get 128 bit numbers

lost matrix
lost matrix
young knoll
#

int int int int

opal juniper
tender shard
lost matrix
lost matrix
vocal cloud
#

Aren't big integers theoretically limitless in size

ivory sleet
#

Yes

lost matrix
young knoll
#

Are they string based?

ivory sleet
#

Mhm

young knoll
#

Lame

lost matrix
#

Let me double check

ivory sleet
#

I believe to some extent they are?

young knoll
#

Why can't java just support arbitrary bit length integers

vocal cloud
#

It's what happens when you want beeeeg numbers

blazing scarab
#

πŸ˜„ tables are underrated

young knoll
#

I want 72 bit integers

ivory sleet
#

Long2ObjMap (:

young knoll
#

Long2whatnow

tender shard
#

if you're not, I would not worry

lost matrix
tender shard
#

also BigIntegers aren't exactly String based, are they?

#

I've never looked at their source

young knoll
#

Yeah but tables already abstract the nested maps for you

ivory sleet
#

HashBasedTable is quite slower than just nested map since it has to update an additional backing map most of the time

opal juniper
young knoll
#

Use table

#

plz

ivory sleet
#

Tooble

young knoll
#

It may be slower but ahh ugly

ivory sleet
#

Yeah true

opal juniper
# ivory sleet Long2ObjMap (:

i tried to use one of these then i found out old spigot versions dont shade it and for the negligible perf gain against not supporting legacy i just chucked it in the bin

ivory sleet
#

πŸ₯²

blazing scarab
#

I thought only paper shades fastutil

opal juniper
#

that might be it lol

#

cause i run paper kek

ivory sleet
#

I believe there is some other primitive collection library that was used during some interval

lost matrix
#

banned

ivory sleet
#

Trove or sth iirc

ivory sleet
#

Yaa

opal juniper
lost matrix
#

GoldmanSachsCollections

ivory sleet
#

They used that one also?

lost matrix
#

Oh nope. I just listed all the primitive collection frameworks i know XD

ivory sleet
#

Ah, didn’t know that one so very pog

tender shard
#

wtf is a trove

opal juniper
#

treasure trove

lost matrix
tender shard
#

ok but

#

what is FastUtils

opal juniper
#

SCHNELL

lost matrix
blazing scarab
#

Immutable primitive collections when ☹️

ivory sleet
#

πŸ™

#

Technically you could wrap around and provide an immutable view

#

But that’s not as nice

blazing scarab
#

I've heard of java plans of making primitives actually objects

#

It is going to happen anytime soon?

lost matrix
# tender shard what is FastUtils

FastUtil is a high performance collection library for java.
Primitive collections prevent the overhead of wrapping
primitives into they Object counterpart. So long -> Long, int -> Integer etc.
Map<int, Object> is not possible in Java. This results in Map<Integer, Object> being used instead.
FastUtil provides collections like
Int2ObjectMap<Object>
or
Int2IntMap
To save some cpu time and memory.

ivory sleet
opal juniper
#

how come like if a method returns void, you cant return the result of another method that returns void

blazing scarab
#

wha

opal juniper
#
public void foo() {
    return anotherVoidMethod();
}

eg

lost matrix
#

Interestingly my benchmarking of those collections showed that the initialisation of FastUtils collections
is quite expensive. So if you have long lived collections like a
private final Int2ObjectMap<>
then FastUtil is better. But if you have a spot where a lot of collections
are being created then Javas Collections are better suited.

blazing scarab
opal juniper
#

right, but void = void

blazing scarab
lost matrix
tender shard
tender shard
lost matrix
#

Btw this problem was also encountered by oracle when working on Java 8. They just made a Void Object for this XD

opal juniper
#

Haha

lost matrix
#

Wait its been there since 1.1?

tender shard
#

wasn't Void included since java 1?

tender shard
#

I thought it was JDK 1

#

like, "always been there"

lost matrix
#

Weird i swear ive seen this in 8 for the first time

tender shard
opal juniper
#

normalise Void > void

tender shard
#

for example being able to throw RuntimeExceptions without throws

lost matrix
tender shard
#
public static void doStuff() /* throws IllegalStateException // not needed */ {
  throw new IllegalStateException();
}
#

without declaring throws IllegalStateException

#

because IllegalStateException is a RuntimeException. You can throw them always without having to declare it

#

that's e.g. why you don't have to wrap Integer.parseInt into a try/catch

lost matrix
tender shard
#

throw and throws are both keywords πŸ˜„

tender shard
#

lol

terse ore
#

Can I detect if a mob spawned naturally or by /summon?

tender shard
#

after that, no

#

but

#

you could listen to CreatureSpawnEvent and simply add the SpawnReason as PDC tag to the mob

terse ore
#

ok ill try that

lost matrix
#

Btw you dont have to declare throws ever. Thats completely optional and you can compile
code opting out of catching uncaught exceptions.

tender shard
#

in bytecode it works, but javac doesn't like it

#

that's why Lombok invented @ SneakyThrows

lost matrix
tender shard
#

doesn't work without throws or some magic lombok πŸ˜„

#

javac is unforgiving

lost matrix
tender shard
lost matrix
#

I dont use it anymore because i had a really bad experience where it hid a thrown exception within a CompletableFuture<>. Took me a while to find.

tender shard
#

whoops lol

#

yeah I only use it in API methods that aren't longer than 5-10 lines. Noone wants to e.g. have to wrap this into a try/catch:

List<String> lines = FileUtils.getResourceAsStringList("disabled-blocks.txt");

if the developer really forgot to include that file, tbh it's their fault. If this ever fails, things are seriously fucked up anyway

lost matrix
#

I need to take a look at those sween annotations a bit more often.

    @Cleanup InputStream in = new FileInputStream(args[0]);
    @Cleanup OutputStream out = new FileOutputStream(args[1]);
    byte[] b = new byte[10000];
    while (true) {
      int r = in.read(b);
      if (r == -1) break;
      out.write(b, 0, r);
    }

Auto cleanup of open resources looks kinda neat.

tender shard
#

Cleanup? Never heard of that one

lost matrix
#

Same

tender shard
#

is that Lombok too?

lost matrix
#

Yes

tender shard
#

oh nice

#

I'll add that to my todo list

lost matrix
#

Currently digging through this

#

Wellp... thats the only new one to me

tender shard
#

huehuehue

opal juniper
#

I really dont like lombok but i have been somewhat forced to use it

tender shard
#

you can always decide if you want to use it or not

vocal obsidian
#

mfnalex when you sleep or rest

opal juniper
#

like wtf is this kek

vocal obsidian
#

you help others all the time

#

XD

tender shard
#

and @ Getter @ Setter @ RequiredArgsConstructor (or, in short: @ Data) for sure is better than having to write it yourself

opal juniper
#

but intellij does it for you

midnight shore
#

Hi guys how can I get the index of a specific itemstack in an inventory?

tender shard
opal juniper
#

u just have to start writing get... and can tab it in with autocomplete

tender shard
#

the ToString.Include annotations are useless here

lost matrix
tender shard
#

useless boilerplate code

opal juniper
#

idm it

tender shard
tender shard
opal juniper
#

meh whatever

tender shard
vocal obsidian
opal juniper
opal juniper
#

why duplicated?

#

Return the contents from the section of the inventory where items can reasonably be expected to be stored. thonk

lost matrix
opal juniper
#

oh huh

opal juniper
#

is it possible to make this stuff or is it only for jdk shit

tender shard
# opal juniper idm it

well what's easier?
writing

@Getter boolean someBool;

or doing this:

boolean someBool;
// Now click on Code -> Generate -> Choose "Getter" -> Choose "someBool" -> Click on Code -> Generate again -> update equals method -> Click on Code -> Generate again -> update hashCode method
#

oh and toString, too

quiet ice
#

The javadocs?

opal juniper
#

yes

tender shard
#

what about javadocs?

opal juniper
#

can i compile it in

#

so that it dont dissapear

midnight shore
#

but the getcontents does not have a method to get indexes

quiet ice
#

ah, intelliJ issues

tender shard
#

are you using maven?

opal juniper
#

yes

tender shard
#

okay one sec

#

check out my pom

#

it's the "attach-sources" and "attach-javadocs" plugin or however it's called

#

HOWEVER - those javadocs will be a separate .jar

#

in the repo it'll look like this:

quiet ice
#

I think the IDE also is able to create the Javadocs if only the sources are available, but do not quote me on that

tender shard
quiet ice
#

laziness

tender shard
#

it's just one additional maven plugin πŸ˜„

quiet ice
#

Is it even a maven plugin?

tender shard
#

yes

#

maven-javadoc-plugin

#

oh btw

vocal obsidian
tender shard
#

the sources do NOT include the javadocs

#

my javadocs .jar is 150kb, the sources jar is only 26kb

vocal obsidian
#

which plugin is that

quiet ice
#

Because the sources are raw sources, and do not contain the additional markup

#

I know with eclipse however when it sees the javadocs it automatically "compiles" (if you can call it that) into HTML

#

The HTML form however will be a lot bigger than the raw form

#

What is a quick and dirty way to get the UUID of a player if Player#getUniqueId returns null?

waxen plinth
#

?di

undone axleBOT
quiet ice
#

actually I am kindof dumb

tender shard
opal juniper
#

tldr lombok messes up the javadocs plugin

tender shard
opal juniper
#

i think its the builder

tender shard
#

except that of course lombok generated methods don't have javadocs

quiet ice
opal juniper
#

meh ill look at javadocs another time

sleek pond
#

Wrong channel

sage dragon
#

anvilInventory.setRepairCost(0);
That doesn't work, right?

quiet ice
#

It works, to some degree

#

The method call is valid, however if I am right paper does not like this (no idea about spigot)

sage dragon
subtle folio
#

Whats the EntityType for WitherSkeleton?

quiet ice
#

You probably can achieve this via packets as I am fairly certain that the server is the issue here

subtle folio
#

bc EntityType.WITHER_SKELETON doesnt exist

quiet ice
#

?jd

mortal hare
#

is recipe book clientside or serverside

quiet ice
#

Recipe book is serverside

quiet ice
mortal hare
#

then why there's separate ID's for furnace, blast furnace, and smoker in protocol

quiet ice
#

Basically:
1.8: EOL
1.9: EOL
1.10: EOL
1.11: EOL
1.12: EOL
1.13: EOL
1.14: EOL
1.15: EOL
1.16: EOL
1.17: EOL

mortal hare
#

they all share the same UI

quiet ice
#

End of life

mortal hare
#

End Of Life

subtle folio
#

and how does that help me set a entitytype to wither skeleton?

#
Skeleton skeleton = (Skeleton) spawnLocation.getWorld().spawnEntity(spawnLocation, EntityType.SKELETON);
skeleton.setSkeletonType(Skeleton.SkeletonType.WITHER);``` big brain,
quiet ice
#

could be done a bit smarter I believe

#
spawnLocation.getWorld().spawnEntity(spawnLocation, Skeleton.class).setSkeletonType(Skeleton.SkeletonType.WITHER);
subtle folio
#

ok bro

mortal hare
#

only if the returned object is not used

sage dragon
mortal hare
#

well yes

#

server sends packet(s)

#

to update your xp bar

quiet rune
#
        Searched in the following locations:
          - https://repo.maven.apache.org/maven2/org/spigotmc/spigot-api/1.18.1-R0.1-SNAPSHOT/spigot-api-1.18.1-R0.1-SNAPSHOT/.pom
          - https://oss.sonatype.org/content/repositories/snapshots/org/spigotmc/spigot-api/1.18.1-R0.1-SNAPSHOT/spigot-api-1.18.1-R0.1-SNAPSHOT/.pom
        Required by:
            project :
#

whats the issue here?

#

im really confused- ive tried changing stuff and it just doesnt work

wintry badger
#

hi, i want tipped arrows to disappear when they hit anywhere but the players. so the players wont be able to pick them up. which event should i look into?

#

ProjectileHitEvent ?

wintry badger
#

thanks! i think getEntity will return the arrow, right?

blazing scarab
chrome beacon