#help-development

1 messages ยท Page 1406 of 1

mortal hare
#

wait lemme try to listen to that packet

#

what is it called

opal sluice
#

PacketType.Play.Server.WORLD_PARTICLES

#

The goal is to remove that when a mob dies

#

if I do /particle poof

#

It does remove the particles though :/

#

So it works

wraith rapids
#

some particles are spawned by the client

#

f.e campfire particles

opal sluice
#

rip :/

wraith rapids
#

i don't know if those particles are spawned by the client, but they might

opal sluice
#

It seems that they are

#

Since when I do the command it does cancel them

#

but by killing the mob it doesn't

mortal hare
#

well i dont seem to get them on my packetlistener

#

server particles != client particles

#

ik

#

shitty mojang logic

wraith rapids
#

some sounds are also played by the client all by itself

#

which is sad

mortal hare
#

what you can do

opal sluice
#

Yup :/

mortal hare
#

is like i said

wraith rapids
#

i was going to write a plugin to redo the shitty sound system of the game

#

but turns out not possibru

mortal hare
#

wait

#

i think its possible

#

isnt this is ?

wraith rapids
#

that's for spawners i think

mortal hare
#

lemme test

#

by burning sheep on fire

#

devilish

opal sluice
#

rip sheeps

mortal hare
#

send this packet with status 3

wraith rapids
#

remember the old player damage sound

mortal hare
#

wdym

wraith rapids
#

the new damage sound is so boring

mortal hare
#

oh

#

OOF

#

i miss the cranking doors

#

more

#

that was satisfying sound

wraith rapids
#

lol

mortal hare
#

finally mojang adding custom texts

#

to resource pack download prompts

#

in 1.17

wraith rapids
#

"install or kick"

mortal hare
#

๐Ÿ˜„

#

yes

#

the only thing i would like

#

to have an option to force it

wraith rapids
#

didn't they add that?

#

well, "force"

mortal hare
#

instead of relying on kicking system

#

"force" from serverside

#

i mean

wraith rapids
#

modded clients still go around it obviously

#

but i'm pretty sure someone said that servers can now tell the client that they can't join without the resource pack

mortal hare
#

not that easily anymore

#

Resource packs has SHA-1 hash verification check

#

if that check fails

#

kick the player

#

i mean yea

#

but i would like to have no prompt whatsover

quaint mantle
#

do text components not support rgb values?

mortal hare
#

they should?

#

ChatColor.fromRGB

#

or smth like that

wraith rapids
#

use bungee chat colors

#

the bukkit chat colors are fucked

quaint mantle
#

huh?

wraith rapids
#

use the chatcolor class from bungee

#

the chatcolor class in bukkit doesn't support rgb

#

ChatColor.of is the factory method for arbitrary rgb colors iirc

quaint mantle
wraith rapids
#

is that supposed to mean anything to me

quaint mantle
#

I'm sending the code just wait a second ```java
String message = teamIcon + Color.translate(player.getName() + " &7ยป " + event.getMessage());
TextComponent outMessage = new TextComponent(" " + message);
outMessage.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + player.getName()));
outMessage.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(Color.translate(hoverText.toString()))));
Bukkit.getOnlinePlayers().forEach(loopPlayer -> loopPlayer.spigot().sendMessage(outMessage));
player.sendMessage("Message: " + message);

#

it's the same message, I'm using a color parser already

#

but if it's sent with the text component the color messes up

quaint mantle
mortal hare
quaint mantle
#

yes just don't mind them, the only thing is the color not working if it's sent using the text component

wraith rapids
#

i have literally no idea what i'm looking at, but

#

Color.translate(hoverText.toString())
are you sure the toString shits out something that is translated properly

quaint mantle
#

it's a stringbuilder

mortal hare
#

im actually interested in this

quaint mantle
#

256x256

mortal hare
#

does it support all color palette?

#

png like?

quaint mantle
#

those are text components

mortal hare
#

yea but can it render pictures?

wraith rapids
#

does the TextComponent string constructor parse colors

#

i'm not seeing you applying a color or decoration to the component itself

mortal hare
#

do these components work in a titles subtitles?

quaint mantle
#

the thing is the color is being parsed on the message before, and the message variable is being passed to both

wraith rapids
#

message is a string

quaint mantle
quaint mantle
mortal hare
#

what about in gui titles?

wraith rapids
#

then the next question is whether textcomponent constructor parses legacy color codes

#

because your string uses legacy color codes

#

the bot is trash

mortal hare
#

lol

quaint mantle
#

huh

mortal hare
#

bot is gonna be

#

nope

#

your post is trash

wraith rapids
#

lmao

quaint mantle
#

it's utf, it works on anything text is used in

mortal hare
#

so its kinda font format like

wraith rapids
#

i don't think the textcomponent ctor parses legacy colorcodes into proper component colors

dusty herald
# quaint mantle

so how'd you manage to get that TEAM thing? ๐Ÿ‘€ kinda interested

#

looks nice

quaint mantle
#

guy I will help you with that, if I get the thing I am working on fixed xD

#

I am asking if the text component doesn't parse rgb colors

wraith rapids
#

again, I don't think the textcomponent ctor parses legacy color codes

mortal hare
#

scroll

wraith rapids
#

there's like a util method somewhere that parses them

#

as for where it is or what it's called i have no clue

mortal hare
#

just traverse

wraith rapids
#

just use adventure tbh

mortal hare
#

the component code

quaint mantle
mortal hare
#

its component api

wraith rapids
#

the better and actually consistent and good chat formatting library

mortal hare
#

but better

wraith rapids
#

it's bundled in by paper and integrated into their api now

#

but you can still use it as a dependency as you would with any other library

quaint mantle
#

link to the api?

dusty herald
#

ah fuc

#

i hate texture packs Sadge

quaint mantle
dusty herald
#

I hate it because the only way to really force a user to use it is to kick them if they decline it

quaint mantle
quaint mantle
wispy fossil
dusty herald
quaint mantle
# quaint mantle

well yeah anyway it shows how much you can do with custom textures

wraith rapids
#

if only we had like custom models and shit as well

#

or could texture worn armor pieces

#

it looks great on the surface but when you start doing anything with it you realize how lackluster the custom x support is

wispy fossil
#

i can only get so hard

left swift
#

Does anyone know how I can delete entity hitbox? I tried ...getBoundingBox().resize(0, 0, 0, 0, 0, 0); but it nothing changed :/

wraith rapids
#

define changed

#

the server doesn't send bounding box information to the client

#

the client computes the boxes separately

#

so you can't for example make a player click through an entity

#

it will still appear as if the player punched the entity on the client side

paper viper
#

and also, that code makes no sense lmao

waxen plinth
#

That wouldn't even change the size of the bounding box

paper viper
#

Yeah

#

does it return a copy?

waxen plinth
#

Not sure but I'm pretty sure that's like

paper viper
#

either way it wouldnt work

#

lmao

waxen plinth
#

Amount to change in each direction

#

They're passing 0 for all args

#

So it wouldn't change the size regardless

paper viper
#

lol

left swift
#

then is there any way to remove hitbox entity?

paper viper
#

No?

#

why would you think this would be even possible

wispy fossil
wraith rapids
#

depends on what you mean by remove

#

you can remove it on the client side

#

but not through the api

paper viper
wraith rapids
#

and it won't be easy

paper viper
#

custom client

quaint mantle
#

I might have found a solution to get it working with the components

wraith rapids
#

the bounding boxes and are set like every tick

#

for client side hitboxes, you can do nothing

#

the client computes those on its own

#

you can't tell it to make them go away, or tell it to change their size

left swift
#

I have slime as player's passanger, but it blocks my field of view with its hitbox, so I can't block, capture, etc.

wraith rapids
#

yeah

#

that is controlled by the client

left swift
wraith rapids
#

a what

quaint mantle
#

okay it works, even if it seems like a hacky solution in code

left swift
eternal oxide
left swift
wraith rapids
#

what about this armorstand

#

is it visible to the player themselves?

#

or only to others

eternal oxide
#

Then why are you putting a slime on it?

left swift
wraith rapids
#

because if so, like I suggested when you asked last time, you can hide the entity through protocol fucknuggetry

left swift
wraith rapids
#

for that, you'll want to hook up into protocollib and block all of the packets for that entity from going to that player

eternal oxide
wraith rapids
#

supposedly when he tried to move the armorstand manually, it ended up lagging behind the player

left swift
wraith rapids
#

although now that I think about it, that shouldn't happen

eternal oxide
#

ah

wraith rapids
#

since if both the player movement and the armorstand movement packets are sent at the same time, they should move in sync

#

more or less, anyway

#

and only for other players

eternal oxide
#

as Armorstand is a LivingEntity and they can both be and have passengers

#

Not sure its going to fix your hitbox issue anyway

#

you could make the first armorstand a small stand then the one on top normal size

#

small stand = smaller hitbox

#

or how about a parrot?

#

tiny hitbox

left swift
#

although the parrot has a small hitbox, you can hit it

wraith rapids
#

last time you said that with the approach where you manually made the armorstand follow the player, the armorstand appeared to lag behind the player, right

#

can you show your implementation of that

left swift
#

a tried with snowballs, because i cant hit snowballs, but i cant make snowballs invisible

wraith rapids
#

and how did you measure it lagging behind

#

because that shouldn't happen

left swift
#

i teleport armorstand to player location

wraith rapids
#

and how did you measure this supposed lag

#

did you look at the armorstand over your own head?

left swift
#

wait a sec

wraith rapids
#

or did you have another player look at it

wraith rapids
#

i can't see replies

wraith rapids
#

did you have another player look at it

#

i'm asking this because that method will appear laggy, but only to the player viewing their own armorstand

#

to all other players, it should appear perfectly synchronous

#

if you don't require the player to see their own armorstand, the approach should be sufficient

eternal oxide
#

It looks like a baby chicken has the smallest hitbox

wraith rapids
#

elgar, you can see replies right

eternal oxide
#

yes

wraith rapids
#

did tuso reply to anything

eternal oxide
#

wait a sec, yes and no

wraith rapids
#

i can't figure out whether they answered yes or no

eternal oxide
#

Baby rabbit has smallest hit box

#

You could also put them on the same team with pvp off for the team. May not affect the hitbox though

wraith rapids
#

pretty sure that just makes no damage happen, it'll still absorb the punch

round finch
#

does optifine CIT packs on spigot server?

#

custom items textures

tranquil viper
#

hola

#

I am here for help

#

I am receiving this error

#

here is the registerCommands() method

#
         getCommand("addhunter").setExecutor(new AddHunterCommand(this));
         getCommand("gethunters").setExecutor(new GetHuntersCommand(this));
         getCommand("removehunter").setExecutor(new RemoveHunterCommand(this));
         getCommand("togglenethertracking").setExecutor(new ToggleNetherTrackingCommand(this));
         
         getCommand("addspeedrunner").setExecutor(new AddSpeedrunnerCommand(this)); //issue occurs here
         getCommand("getspeedrunners").setExecutor(new GetSpeedrunnersCommand(this));
         getCommand("removespeedrunner").setExecutor(new RemoveSpeedrunnerCommand(this));
    }```
#

I'm confused on why I am receiving it

eternal oxide
tranquil viper
#

yea

#

I understand that

#

But I don

#

don't understand why

eternal oxide
#

what is line 33

tranquil viper
#

registerCommands();

#

its the method

#

and I provided the method code ^

#

it's happening with the addspeedrunner

left swift
eternal oxide
tranquil viper
#

no

#

it is registerCommands()

eternal oxide
#

I can;t help you if you don't tell me what line 33 is

wraith rapids
#

did you teleport the armorstand in the player move event

tranquil viper
#

line 33 is registerCommands()

wraith rapids
#

or did you do it every tick

tranquil viper
#

the error is at line 49

#

which is getCommand("addspeedrunner").setExecutor(new AddSpeedrunnerCommand(this));

eternal oxide
#

then addspeedrunner command is not defined in your plugin.yml

left swift
tranquil viper
#

it is tho

eternal oxide
#

? your plugin.yml

#

?paste

queen dragonBOT
tranquil viper
#

oh

#

typo

#

LOL

#

thanks

eternal oxide
#

show your plugin.yml

#

oh you had a typo. I assume its fixed then

wraith rapids
#

maybe he typo'd again while fixing it

jagged badge
#

is there a way to get the raw text of a component?

unique spindle
#

hey, how would I import the spigot 1.8.8 api in intellij?

tranquil viper
unique spindle
#

maven

tranquil viper
#

If you use eclipse you can just use build path but I dont really know if there's a feature like that in intellij

tranquil viper
#

another question though

#

how come e.setCancelled(true)doesn't work on PlayerMoveEvent

wraith rapids
#

it does

#

just not as you expect it to

#

movement is client side

tranquil viper
#

shoot

wraith rapids
#

the server can't cancel the movement

tranquil viper
#

so how would I cancel it then?

wraith rapids
#

it can only undo it

#

which causes jittering and rubberbanding on the player's end when the player is forcibly teleported back

tranquil viper
#

I figure i can get the players location and then if they move it tps them back

wraith rapids
#

if you want to make the player unable to move, set their walking speed to zero

tranquil viper
#

                double x = location.getX();
                double y = location.getY();
                double z = location.getZ();

                if (player.getLocation().getX() != location.getX() || player.getLocation().getY() != location.getY()
                        || player.getLocation().getZ() != location.getZ()) {
                    float yaw = player.getLocation().getYaw();
                    float pitch = player.getLocation().getPitch();

                    location = new Location(Bukkit.getPlayer(player.getName()).getWorld(), x, y, z, yaw, pitch);

                    player.teleport(location);
#

I did this

paper viper
#

still causes rubberband effect if you do tp

tranquil viper
#

would that work?

paper viper
#

no, and its very bad

#

because its unnecessary

tranquil viper
#

I don't really care

#

because it's only for 10s

paper viper
#

either way, it will still cause that rubber band effect

tranquil viper
#

yea its not a big deal

#

but just in theoru

#

how would I do it without the rubberband effect?

#

I haven't seen that before

#

every server I see has a rubber band effect

tranquil viper
#

ok

#

ty

tranquil viper
# paper viper .

setting it to 0 doesn't work, what should I set it to instead?

#

actually idk if it works

#

cause it just completely crashes my server

wraith rapids
#

sounds like you're doing something wrong

tranquil viper
#

lol

#

idk

#

im done at this point ive been working on this way too long

novel hornet
#

How do i add events to a custom item

paper viper
#

??

#

wdym

#

"add events to a custom item"

#

you can only listen to events

#

not add or remove them to anything

mellow gulch
#

i was reading the docs trying to plan out how i want to try doing something.
i read in EntityChangeBlockEvent: "Called when any Entity changes a block and a more specific event is not available."
is there a list anywhere that specifies which entities cause this event?

mellow gulch
cloud berry
#

guys wahts th event when a player places a cake on th world :I

#

blockplaceevent but i need to know what the cake item was...

#

nvm im dumb lol blockplaceevent has getItemInHand()

sly bay
#

Is there a library for building cages?

sage swift
#

what

#

are you making a (political candidate i dislike) plugin

floral flare
#

How do I put more than one of my plugins on a server? It gives an error "This plugin has already been initialized".

sage swift
#

more than one?

#

what?

sharp bough
#

are the plugins named the same?

#

lol

floral flare
#

More than one plugin

floral flare
sage swift
#

show the structure of the files in your code editor

#

mostly plugin.ymls and the main classes

floral flare
#

Ok

sly bay
sage swift
floral flare
#

In short, two plugins with the same plugin.yml will not work?

sage swift
floral flare
dusk flicker
#

oh god

#

I forgot how weird eclipse looks

dusk flicker
sage swift
#

yeah you probably have same package names

dusk flicker
#

your primary plugin class shoulden't be named 'Main'

sage swift
#

especially since both main classes are named main thats even worse

sage swift
#

the whole point of the package is so that the plugin loader doesnt confuse your class with another plugin's

floral flare
#

Ohh, ok

#

Thanks

sage swift
#

which, in this case, it is doing since they are both the same

dusk flicker
#

Make sure to look into code conventions aswell, as your class names/capitalization/package capitalization is a standard, not just random

novel hornet
#

package me.mrpiedot.PantsThatPoopTnt.commands;

import org.bukkit.Bukkit;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerToggleSneakEvent;

import me.mrpiedot.PantsThatPoopTnt.Main;

public class TntCommand implements Listener {

private Main plugin;

public TntCommand(Main plugin) {
    this.plugin = plugin;
    Bukkit.getPluginManager().registerEvents(this, plugin);
}

@EventHandler
public void TnTCrouchEvent(PlayerToggleSneakEvent e) {
    Player player = e.getPlayer();        
    player.getWorld().spawnEntity(player.getLocation(), EntityType.PRIMED_TNT);
    if (event.getItem() !=null) {

}

}

dusk flicker
#

please learn conventions

#

like

#

really needed

novel hornet
#

why am i getting a error saying that event cant be resolved

dusk flicker
#

in the class?

#

or what

#

Send a screenshot of the err

mellow gulch
#

because your event argument is named "e"

#

if (event.getItem() !=null)
event is not the name of your event:
public void TnTCrouchEvent(PlayerToggleSneakEvent e)

sage swift
#

why was i pinged

#

by whom

quaint mantle
sage swift
#

what

quaint mantle
#

top right

sage swift
#

no i was there for that

#

i sent messages after

#

i had another one when i returned

young knoll
#

If itโ€™s not in recent mentions then it was a ghost ping

#

My favourite

woeful moon
#

Hello, I would like to send a string message from config, but replace %player% with e.getPlayer(). The only methods for replacing words in a string were either with chars, or using regex, although I believe there was a much easier method

young knoll
#

String.replace

woeful moon
#

I've tried:

configmessage.replace("%player%", e.getKingdom());

But that method only uses chars for some reason?

young knoll
#

Takes a regular string for both args

woeful moon
summer scroll
young knoll
#

String implements CharSequence, so itโ€™s usable there

woeful moon
young knoll
#

You can also call toString

#

Although getKingdom sounds like something that would have a getName method

worldly ingot
#

Well... what does getKingdom() return... if it's a Kingdom object then its toString() probably isn't what you want

#

sounds like something that would have a getName method
Exactly my thoughts

summer scroll
#

For example, getClickedBlock() will return Block

woeful moon
summer scroll
#

ah, there you go.

woeful moon
#

Hmm, it's still not replacing it correctly for some reason

young knoll
#

Keep in mind strings are immutable

woeful moon
#

What does that mean?

sudden raft
#

the string that u use to invoke the replace method doesn't change

young knoll
#

It means any methods that modify them return a new string

sudden raft
#

so u must use its return value

#

yes

young knoll
#

And the one you passed isnโ€™t changed

woeful moon
#

By the way, for context, I'm making a plugin that sends a webhook message when a kingdom (another plugin) gets created using that API. Here's the part with the config message:

            String configmessage = KingdomsWebhook.plugin.getConfig().getString("new-kingdom-description");
            assert configmessage != null;
            configmessage.replace("%player%", e.getKingdom().getName());
            embedBuilder.setDescription(configmessage);

Here's the default config:

new-kingdom-description: "**New Kingdom created!**\n*Name:* %player%"

And it's still not replacing the %player% sadly

woeful moon
summer scroll
#

embedBuilder.setDescription(configMessage.replace(...));

woeful moon
#

:O That worked!

#

Thanks so much everyone!

sullen flint
#

sorry im not english so i might have a typo

wispy fossil
#

Hey, does anybody have a way of creating a "Fake Lead"?
Like, a lead that goes from the player to a target block?

wide galleon
#

How do I check if a player survives or not survives an mlg inside a playermoveevent? because this doesnt seem to work: ```java
if(player.getFallDistance() == 0) {
player.sendMessage(Main.getPrefix("ยง2MLG") + "ยง7You have ยง2completedยง7 the MLG. This was your ยงa" + mlgs.get(player.getUniqueId()) + ". MLG");

                }
                else {
                    player.sendMessage(Main.getPrefix("ยง2MLG") + "ยง7You have ยงcfailedยง7 this MLG. This was your ยงc" + mlgs.get(player.getUniqueId()) + ". MLG");
                    player.setHealth(0);
                }```
torn oyster
#

how do i prevent people from naming mobs

#

well actually

#

let them name it

#

but then rename the mobs back to what their original names (but a bit different)

worn tundra
#

What exactly are you trying to do?

#

Have you tried PlayerInteractEntityEvent?

worn tundra
wide galleon
worn tundra
#

What is MLG?

quiet ice
#

In non-english speaking countries they still live on

brittle nova
#
        if(Objects.requireNonNull(f.listFiles()).length > 0) {
            for(File file : Objects.requireNonNull(f.listFiles())) {
                return file.getName().equals(fileName);
            }
        }
        return false;
    }``` Correct?
torn oyster
#

how would i make creepers not leave behind their effects when they explode

brittle nova
torn oyster
#

i am trying to make a mob levelling system

#

like lvl 1 creeper

#

etc

#

and give them strength depending on their level

#

but

#

creepers leave behind strength 10 if they are level 100

#

and its permanent

#

so kinda need to fix that

#

any ideas

mortal hare
#

last time

quiet ice
#

I imagine that these memes are the latest shit on the Spanish internet if I know them right

mortal hare
#

do you have calling overhead in java?

quiet ice
#

yes, but it is very minimal in modern JVMs

#

Plus JIT can inline methods if it feels like it; Javac can also do that but it is a bit more restrictive on when it does it

vital ridge
#

Hey, can someone tell me why this code is not applying the new enchantment levels? It sysouts the debug messages correctly with old enchantment level and right multiplier

public static void multiplierCheck(Player player) {

        multiplierCheck = new BukkitRunnable() {
            @Override
            public void run() {

                for (ItemStack i : player.getInventory().getContents()) {

                    if (i != null) {

                        ItemMeta iMeta = i.getItemMeta();

                        NamespacedKey key = new NamespacedKey(main, "UUID");

                        if (!iMeta.getPersistentDataContainer().has(key, PersistentDataType.STRING)) {

                            if (iMeta.hasEnchants()) {

                                Map<Enchantment, Integer> enchantments = i.getEnchantments();

                                for (Enchantment ench : enchantments.keySet()) {

                                    Enchantment oldEnchants = ench;
                                    int oldEnchantLevels = enchantments.get(ench);

                                    i.removeEnchantment(ench);

                                    i.addUnsafeEnchantment(ench, oldEnchantLevels * main.multiplier);
                                    
                                    System.out.println(oldEnchantLevels + " " + main.multiplier);
                                    
                                    System.out.println("added");

                                }

                                iMeta.getPersistentDataContainer().set(key, PersistentDataType.STRING,
                                        UUID.randomUUID().toString());

                                i.setItemMeta(iMeta);

                            }

                        }
                    }
                }

            }
        }.runTaskTimer(main, 0, 5);

    }
sage swift
#

adding enchant to the item then overwriting its meta (and therefore the new enchant) with the old meta

vital ridge
#

so i should get the item meta

#

after adding the enchantment?

sage swift
#

no, you should add the enchantment to the meta, not to the item

#

since you're setting the meta back at the end

vital ridge
#

ookay

#

Tho meta doesnt have addunsafencahtnemtn

#

enchantment

sage swift
#

addEnchantment

vital ridge
#

This will still add the unsafe ones aswell?

sage swift
#

boolean

vital ridge
#

?

vital ridge
#

oh so that boolean is for the unsafe ones

#

gotchu

brittle nova
stone sinew
brittle nova
#

oh... The file is not created because it gets the file with the other spelling and changes in this file the values. So I type /add test and the file with the name "Test" which already exists is changed

brittle nova
stone sinew
brittle nova
stone sinew
brittle nova
# stone sinew I'm lost lol... whats the issue exactly?

When I type "/add Test" a file is created with the name "Test". In this file stands: "name: Test". And now when I type "/add test" no new file is created but the text in the file named "Test" is changed. The text in this file is now: "name: test".

#

But I want that a new file is created

stone sinew
stone sinew
quiet ice
#

Windows allows for files with independent cases

#

Either way I'd suggest to enforce lowercase

haughty reef
#

Hey, I got a question about publishing resources on the spigot site. If someone wanted to publish their resource for free, but charge for support, could that be done through a third party, our would you still want that sold as a premium resource? This is entirely hypothetical, but in thinking about this, I figured selling support as premium could be restrictive as it is a one-time purchase.

If anyone happens to know, please mention me.

stone sinew
haughty reef
#

Awesome, do you know where I could find the rules about this

queen dragonBOT
stone sinew
#

?premium

#

?resources

queen dragonBOT
stone sinew
#

IDK the free one command

haughty reef
#

Yeah, turns out i've seen the premium one before, but yeah, the free one is more elusive

blissful canyon
#

hi guys i need help to install geyser

#

can u help me

chrome beacon
quiet ice
#

This is spigot, not geyser

#

And that too

wanton cipher
#

what plugin is for selling ranks (in-game money)

hidden torrent
#

using a custom world generator, can I control which blocks are generated? imagine I want to limit the world size to 10k blocks, can I prevent placing blocks that exceed X/ -X / Y / -Y coordinates beyond 10k?

quiet ice
#

Well, you can generate these are void chunks, but why not set the World border a bit before it?

hidden torrent
#

I am drafting an idea for a world generator

#

kinda like you open up you atlas and view the world: rectangular. "top" and "bottom" spawning ice biomes, gradually working up to the "equator".

#

scaling that whole generator up to the limit of the world-size property would be.... very huge, I guess. if you have to walk for ages to the north, knowing, you would never reach it.

wanton cipher
#

what plugin is for selling ranks (in-game money)

hidden torrent
hidden torrent
quiet ice
#

yes, but you can't simply stop somewhere, if you want to you can hide that by setting a world border

quaint mantle
#

@quiet ice do you want to be loved by me?

#

By the pepe

hidden torrent
#

why can't I just stop?

quiet ice
#

It would look ... off

hidden torrent
#

at X=30M, that is exactly what is happening anyway

quiet ice
#

That's for another reason

hidden torrent
#

I think for the same reason: the world size is reached

quiet ice
#

But why don't you just don't generate these chunks?

vital ridge
#
@EventHandler
    public void onAnvilUse(PrepareAnvilEvent e) {

        if (main.commandCalled) {
            
            Player p = (Player) e.getViewers().get(0);

            if (e.getInventory().getRepairCost() >= 5) {

                main.getServer().getScheduler().runTask(main, () -> e.getInventory().setRepairCost(2));

            }
        }

    }

can someone tell me why this is not working? Its not setting the repair cost to 2 when the repair cost is >= 5

hidden torrent
#

well, you answered that before when I asked if I can control to not place blocks.

quiet ice
#

Ah well, misunderstood you

#

Generally world border should prevent player-lead placement. However you can also cancel all Block-related events

hidden torrent
#

sounds good enough. I shall later look into the world generator tutorial I found and see if I can make it to align each biome in Y=5 wide strips

#

afterwards, writing some perlin noise and implementing the rules I want should do it.

quiet ice
#

I think vanilla makes biomes align in 2x2x2 blocks, though I don't really know

#

So you can only go with either 4 or 6 wide strips

hidden torrent
#

I will see :D you answer gave me an idea of what should be possible

mortal hare
vital ridge
#

it needs to have 1 tick delay

#

otherwise it wont work

mortal hare
#

oh

vital ridge
#

I read in spigot forums

mortal hare
#

yea

#

true

vital ridge
#

But i still dont understand why its not working

#

Is it something with itemmeta?

mortal hare
#

have you tried debugging

#

the code

vital ridge
#

I havent, i will rn

mortal hare
#

by checking if the if statements are working

quaint mantle
#

@mortal hare I love you

vital ridge
#

Now it works

#

lol

main plinth
#

Where can I get the spigot mappings?

chrome beacon
mortal hare
#

send the packet back without any data

#

i guess

main plinth
#

I want to decompile a spigot jar

chrome beacon
#

But why

languid geode
#

BuildTools does that for you but indeed why

main plinth
#

I want a custom one

mortal hare
#

i myself see no use of mappings viewer because intellij works pretty well at decompiling the jar

chrome beacon
#

^^

#

If you want a custom fork there are wiki pages on how to do it

#

Manually decompiling the spigot jar isn't one of the steps

mortal hare
#

anyone knows how to transform logarithm's base?

#

to another base

languid geode
#

who what now

main plinth
languid geode
#

Oh lord the hub's backlog is overflowing

lofty mulch
main plinth
#

So the manual steps are given but it also specifies a BuildTools method for automatically doing it. How to do that?

lofty mulch
#

download and run BuildTools

main plinth
#

Any arguments to be specified?

#

I ran it already. Where can I find the source?

lofty mulch
#

<build folder>/Spigot

main plinth
#

Ok

quaint mantle
#

How to import Spigot API?

round finch
#

does optifine custom texture pack work on a spigot server?๐Ÿ‘
because i need to set texture for items
i'm trying to make custom items

lost matrix
lost matrix
wraith rapids
#

mappings viewer is nice

#

because the md mappings are dumb

#

and being able to see what nms classes and fields and methods are actually called is nice

lost matrix
#

I think you might have to just re-send the spawn and metadata packets after sending one despawn packet.

round finch
lost matrix
#

Yes. That might be enough actually.

lost matrix
round finch
wraith rapids
#

you should eat regularly and healthily, and excercise daily

#

or did you have something specific in mind

#

don't forget to drink water and change your socks regularly, too

lost matrix
jagged badge
#

is there a way to get the raw text of a component?

lost matrix
jagged badge
#

yes and it returns all the information on the component not just the text

lost matrix
#

Oh i see. You just want the text of it

mortal hare
#

if its json output

#

just use gson

#

to get the key value

#

or implement your own hardcoded toString() with indexOf() and substring()

#

idk if there's a method to get the text

#

but that are my solutions

minor garnet
#

is there a way to make a projectile not collide with another one in the spigot?

mortal hare
#

no

minor garnet
#

setCollidable(false) dont work

wraith rapids
#

or use adventure

mortal hare
#

Paper only allows it

wraith rapids
#

and use raw component serializer

mortal hare
#

Paper has onProjectileCollide event

minor garnet
#

yes ik

mortal hare
#

and its really graphically unpleasing

#

it just warps the projectiles behind

#

with that same velocity

wraith rapids
#

projectiles don't collide with other projectiles

mortal hare
#

i mean you can design your own

wraith rapids
#

in fact projectiles don't collide with anything

minor garnet
wraith rapids
#

projectiles don't have collision code

minor garnet
#

i mean,

mortal hare
wraith rapids
#

the entity collides with the arrow

#

not the other way around

minor garnet
#

idk u make me ungry

mortal hare
#

whatever

#

entity seeks for to get hit by an arrow

#

logical

#

i mean more performance friendly i guess

quaint mantle
#

How do I add the Spigot API?

wraith rapids
#

if you want to make an entity not collide with another entity, you have to set them both to not collide

mortal hare
#

you can implement your own version of projectile collision

quaint mantle
#

there is a commande for the clearlagex?

wraith rapids
#

if you only set entity a to collidable=false, entity b can still collide with entity a

eternal oxide
#

Not sure if it would work but have you tried adding all projectiles to a Team and disable collisions and friendly fire?

wraith rapids
#

even if entity a can't collide with entity b

minor garnet
#

let me see if i find a old gif

wraith rapids
#

the team thing could work

mortal hare
#

you can add non living entities

#

to the scoreboard team?

wraith rapids
#

maybe, maybe not

minor garnet
#

oooh

mortal hare
#

i dont think so

wraith rapids
#

doesn't matter, as projectiles don't collide to begin with

eternal oxide
#

projectiles are entities adn it accepts UUID as a string

#

try it

wraith rapids
#

he's probably talking about regular entities

quaint mantle
#

vinny7 how do I add the SPigot API?

mortal hare
#

but projectiles are entities too

quaint mantle
#

dovidas

mortal hare
#

?

wraith rapids
#

read the fucking guide that was linked to you

mortal hare
#

import the spigot api jar via maven gradle or build system of your IDE

quaint mantle
#

@wraith rapids it doesn't help

wraith rapids
#

are you using intellij or eclipse

#

here is for intellij

#

if you use eclipse get fucked i guess

mortal hare
#

on eclipse its even easier

#

for beginners

quaint mantle
wraith rapids
#

yeah but i don't have a guide at hand for eclipse

#

do you even have an IDE

quaint mantle
#

What's an IDE?

mortal hare
#

he just literally took a screenshot of IDE

wraith rapids
#

hhhh

#

i can't see shit because ripcord can't zoom on images

mortal hare
#

lol wtf

wraith rapids
#

the icon in the taskbar looks like eclipse

mortal hare
#

its an eclipse with build settings opened up

quaint mantle
#

What do I do?

mortal hare
#

import your downloaded spigot api

quaint mantle
#

How

mortal hare
#

you are on file selection

wraith rapids
#

you either switch to intellij or ask dovias to link you a guide for eclipse

mortal hare
#

just select that jar file

wraith rapids
#

or god forbid google and find it yourself

quaint mantle
#

I can't find it

mortal hare
#

you need to download it

#

?

quaint mantle
quaint mantle
wraith rapids
#

write "how to make a plugin with maven for spigot" into google

#

and press enter

wraith rapids
#

maybe throw eclipse as a keyword in there too

mortal hare
#

here

#

Spigot API

#

download it from there

#

and import it

quiet ice
#

Rubbish, don't do that

opal sluice
#

You can also use the server jar, it will work as it has the api in it

quiet ice
wraith rapids
#

real men use ant

quiet ice
#

I have updated it to 1.16.5 a few days ago, so it will be somewhat up-to date

wraith rapids
#

very good

dusk flicker
#

Lol

quaint mantle
#
static {
     NAME_MAP = new HashMap<>();
     ID_MAP = new HashMap<>();
     for (ParticleEffect effect : values()) {
       NAME_MAP.put(effect.name, effect);
       ID_MAP.put(Integer.valueOf(effect.id), effect);
     } 
   }
quaint mantle
#

Why can't I import?

chrome beacon
eternal oxide
#

You also havn't defined values()

#

You probably mean ParticleEffect.values()

untold rover
#

Hey, for my Project I need "animated inventories" basically once I open the inventory I want the items to come in from the right side. I have started working on a class for that (https://paste.sentinalcoding.eu/KQWlc98k2Q) but there is a small flaw: As I need to move the items every 5 ticks for the animation, my guess was to just set the items in a hashmap with a current "fake" and just always subtract 1 and re-set all items. but I am not sure how to calculate which int I have to assign to each of the items in order for just subtracting them works
so If there should be an item on slot 0, and I set its current slot to slot 8, just subtracting 1 would work, it would end up in the right slot, but I am not sure how to efficiently perform the math on all items, to get the proper starting slot for them
so basically for the first column of items, I need to get the furthest right slot, but what do I do with the other columns.

My goal is to achive something like: https://streamable.com/idxwm4

quaint mantle
wraith rapids
#

illegal forward reference is when you refer to something that doesn't exist yet

eternal oxide
#

is your static block in that enum class?

quaint mantle
quaint mantle
eternal oxide
#

You guess?

quaint mantle
eternal oxide
#

Hi sweetie

wraith rapids
#

how 2 import splรถgget

quiet ice
quaint mantle
wraith rapids
#

illegal forward reference is when you're trying to reference something that doesn't have a value assigned yet

quaint mantle
#

@quiet ice I did this

wraith rapids
#

you can't invoke an enum's values() before the enum is initialized

quiet ice
#

That is the wrong way of doing it

quaint mantle
#

How do I do it?

wraith rapids
#

read the guide that was linked to you

eternal oxide
#

You have no enums when your static block executes

quiet ice
#

I cannot really say because the only poms that I have are pretty bloated

quaint mantle
quiet ice
#

Basically it should look like this, just with 2021 stuff

quaint mantle
quiet ice
#

yes

quaint mantle
#

I am supposed to type that stuff?

quiet ice
#

either way, the way you did it is wrong, you should not use JDT as your build tool

#

Not really, you did follow a guide right? That one should have the up to-date info

summer scroll
#

What is the ding sound effect?

untold rover
#

which version

summer scroll
#

1.12.2

quiet ice
#

Which one? The XP sound or the Noteblock one?

summer scroll
#

idk, but the server usually use it when arrow hit

#

like arrow hit notify

quiet ice
#

I assume it is BLOCK_NOTE_PLING

#

The XP one is a bit different

summer scroll
#

alright, i'll test it.

wraith rapids
#

doesn't that have its own dedicated sound

quiet ice
#

maybe, idk

wraith rapids
#

who knows

untold rover
#

show the full exception

wraith rapids
#

and not in a screenshot

minor garnet
#

let take the log

summer scroll
#

I think it's the orb pickup, thanks.

queen dragonBOT
minor garnet
quiet ice
# untold rover Hey, for my Project I need "animated inventories" basically once I open the inve...

I assume that an array with a struct that has {index, variance, stack}, you'll iterate over it and add index and variance together, if the sum of it by the modulo of 9 is not equal to index modulo 9, then you don't display it; the itemstack stack is then placed on the inventory at index index + variance, after that you'll decrease variance by 1.

Honestly, variance could also be a "global" property

#

I would not use a Hashmap for this

untold rover
#

woah, okay sooo that sentence sounds sooo smart, but I don't get it.

untold rover
quaint mantle
#

geol do you use IntelliJ?

quiet ice
#

No, eclipse

quaint mantle
#

How do you do it?

untold rover
#

maven is still same in both

wraith rapids
#

are you physically incapable of reading the guide linked to you

quiet ice
#

Via maven or gradle, JDT is absolute cancer to work cooperatively

wraith rapids
#

or is there some issue you're not mentioning

quaint mantle
wraith rapids
#

well did you follow it?

#

it was step by step

quaint mantle
#

I don't understand it

wraith rapids
#

you don't need to understand it

#

you just need to repeat after it

#

like a parrot

quaint mantle
#
public enum ParticleEffect
 {
   EXPLOSION_NORMAL("explode", 0, -1, new ParticleProperty[] { ParticleProperty.DIRECTIONAL});
static {
     NAME_MAP = new HashMap<>();
     ID_MAP = new HashMap<>();
     for (ParticleEffect effect : ParticleEffect.values()) {
       NAME_MAP.put(effect.name, effect);
       ID_MAP.put(Integer.valueOf(effect.id), effect);
     } 
   }
}
wraith rapids
#

or perhaps a monkey

untold rover
wraith rapids
#

populate the name and id maps in the enum constant constructors

quiet ice
#

Basically you'd have a

class Entry {
  ItemStack is;
  Integer index;
}

and a

Entry[] stacks = new Entry[36];
int animationProgress = 9;

to animate it you'd use

for (Entry e : stacks) {
    int actualIndex = e.index + animationProgress;
    if (actualIndex % 9 != e.index % 9) {
        continue; // Out of bounds (would display on the next row)
    }
    // Display item
}
untold rover
#

okay and when displaying the item, I just actualIndex as the slot right?

quaint mantle
quiet ice
#

I think so, yes

maiden briar
#

Is it possible to register your plugin without extending JavaPlugin? I want to create my own custom class

untold rover
#

make a class that extends JavaPlugin

#

and then extend that

#

afaik

quiet ice
#

extends Plugin

untold rover
#

whoops yea

maiden briar
#

Ok but I want that the subclass can't override methods

quiet ice
#

Or implements, idk Plugin might be an interface

maiden briar
#

Yes Plugin is an interface

#

But if I look into bukkit's loader, I see plugin instanceof JavaPlugin

quiet ice
#

Let me see

wraith rapids
#

Plugin is an interface iirc, JavaPlugin is the impl

maiden briar
quiet ice
#

Yeah, I think you'd need to boostrap the plugin

wraith rapids
#

bukkit is rigged to only work with javaplugins

quaint mantle
quiet ice
#

So basically you will need to use a Plugin that loads the other plugins.

wraith rapids
#

nix

#

like I keep saying

#

illegal forward reference is when you defer to something that isn't set yet

#

in this case, likely the values() method

#

since the enum constants aren't defined

quiet ice
#

You are iterating over something that will be initialized later

wraith rapids
#

populate the id and name maps in the enum constant constructors

#

not in a static block

quiet ice
#

The enum constants are populated AFTER your static block (in the same static block)

maiden briar
quiet ice
#

What are you trying to achieve? Create a plugin loader or something else?

untold rover
maiden briar
#

I want to let people extend my custom class, but I want to prevent them from overriding methods, and also I want my own return type for the getConfig

quiet ice
#

Can't you mark it as final?

maiden briar
#

Yes good idea

#

And the getConfig method then?

untold rover
#

I think you can override it

quiet ice
#

No, I don't think so

maiden briar
#

Yes and my custom return type?

quiet ice
#

Does the custom return type extend the original return type of "super"?

eternal oxide
#

You can;t override a method and have a custom return type

untold rover
# quiet ice the slot it should end in

got it, one last thing, I need to call a callback once the animation is over, how would I implement it with your code? eg once all Items are on their index

quiet ice
#

While the JVM would allow methods with different return types but the same name, javac does not allow it.
So you'd need to choose another name and/or deprecate the old one (and optional throw an OperationNotSupported exception)

wraith rapids
#

the return type of an overriding method must be the type of the overridden method, or a subtype of it

maiden briar
#

I have this structure:

public interface Configuration

public class BukkitConfiguration implement Configuration

public class BungeeConfiguration implement Configuration

public class ConfigFile // Return type, and this will work with my Configuration interface
wraith rapids
#

you'll have to deprecate the javaplugin getConfig

quiet ice
wraith rapids
#

and declare a method with a new name

maiden briar
#

Ok, but Bukkit will never remove the method

wraith rapids
#

yes

#

you removed it

maiden briar
#

Or I just override and return null?

wraith rapids
#

override and throw not implemented exception

#

or operationnotsupported

#

whatever tickles your pickle

maiden briar
#

Nice I will throw an exception

#

But any name for the new method?

wraith rapids
#

getMyConfig

#

i don't know

maiden briar
#

The class is named Configuration

wraith rapids
#

if your plugin framework has a name, you can use that

#

or just getConfiguration, literally whatever, use what name you think is good

quiet ice
maiden briar
#

Ok and why not getConfigFile ?

untold rover
quiet ice
maiden briar
#

Ok

wraith rapids
#

well, it's not a file

#

but sure

coral sparrow
#

Hello, I am tryna make a plugin which replace messages, When it tries to register AsyncPlayerChatEvent it shows an error

wraith rapids
#

uh huh

#

my crystal ball is in the repair shop

coral sparrow
#

Could not pass event AsyncPlayerChatEvent to Emoji v1.0 org.bukkit.event.EventException

#

any help :)

wraith rapids
#

go on

odd gulch
#

Show your code and the rest of the stacktrace.

coral sparrow
#

Where do i paste lol

coral sparrow
#

embed fail

wraith rapids
#

i don't have embed perms

minor garnet
wraith rapids
#

maybe I should create a sockpupper alt just to verify this account

#

then again why bother

coral sparrow
#

Where do i paste the code than flooding here..

wraith rapids
#

on any given paste site of your choice

chrome beacon
#

?paste

queen dragonBOT
coral sparrow
#

ty

#

this is the code

wraith rapids
#

and the exception

coral sparrow
#

I made a problem with translateAlternateColorCodes ig..

#

any help would be appreciated

wraith rapids
#

what's on the relevant line of the Main class

#

me.Hazim.io.Main.PlayerAsyncChat(Main.java:152)

#

you didn't paste the entire class file so we don't have line numbers

coral sparrow
#

oh sorry

#

@wraith rapids

wraith rapids
#

message = message.replace("<3", heart + ChatColor.translateAlternateColorCodes('&', this.getConfig().getString("afteremojichatcolor")));

coral sparrow
#

ye

#

all of em

wraith rapids
#

my guess is that the config getString returns null

coral sparrow
#

is same

#

ah okay

#

ty

wraith rapids
#

add defaults or nullcheck the return values

odd gulch
#

You can provide a default value as the second parameter when you get values from the config to avoid that.

wraith rapids
#

and ideally, cache the values instead of grabbing them from the config every time individually

#

configs are quite slow

coral sparrow
#

Yeah you are right, i am so dumb i forgot to save the config

coral sparrow
odd gulch
#

The default config is cached already.

wraith rapids
#

yes, but each get is still a map lookup

#

which is several orders of magnitude slower than a regular field get

coral sparrow
#

gg

#

xd

wraith rapids
#

still fast, yes, but also orders of magnitude slower

#

doesn't matter because it's the async chat event, yes, but still good practice

odd gulch
#

That is true but still won't cause any performance impact. But for the most part you should cache yourself. I don't disagree with you : )

minor garnet
wraith rapids
#

my client doesn't support message links

#

can you copy paste the message or something

coral sparrow
#

?paste

queen dragonBOT
odd gulch
coral sparrow
#

oh.

odd gulch
#

You should check if the value is present.

minor garnet
#

inside of method ?

wraith rapids
#

i guess i'll go looking for it

odd gulch
#
Optional.of(entities.stream().filter(e -> e instanceof ArmorStand && e.getLocation().distanceSquared(loc) < radius).findFirst().get());```
#

I suppose that is the issue without have looked closer at it.

minor garnet
odd gulch
#

If there is no armorstand in the radius then you are calling get() on an empty optional

#

Which causes that exception.

#

And why are you wrapping it in the first place?

#

Just return the result from findFirst()

minor garnet
#

i'm starting to use optional

odd gulch
#

Just return

entities.stream().filter(e -> e instanceof ArmorStand && e.getLocation().distanceSquared(loc) < radius).findFirst()```
minor garnet
#

^ in this case ill not catch the exception ?

wraith rapids
#

the exception is thrown if you call get on an empty optional

young knoll
#

I imagine config gets would be faster without the string stuff

wraith rapids
#

you are not calling get here at all so the exception can't be thrown

#

which is what you want

#

then later you call ifPresent on that optional to perform an operation, but only if the optional isn't empty

minor garnet
#

aaah right

#

im still getting null..

#

but i dont know why

#
    public Optional<Entity> getClosest(final Location loc, final double radius) {
        final List<Entity> entities = Arrays.asList(loc.getChunk().getEntities());
        return entities.stream().filter(e -> e instanceof ArmorStand && e.getLocation().distanceSquared(loc) < radius).findFirst();
    }``` i dont know if its because a filter
#

but and usually when I get it

untold rover
#

hey for some reason this method causes a nullpointer Java public static ItemStack restoreItemStack(String data){ return ItemStack.deserializeBytes(Base64.getDecoder().decode(data)); } but I am not sure why, the string passed is loaded from the Config, and the string in the config is set using: Java public static String StringifyItemStack(ItemStack itemStack){ return Base64.getEncoder().encodeToString(itemStack.serializeAsBytes()); }

the error is: https://paste.sentinalcoding.eu/4CbRmO1ZiW

#

is use similar code in a method that returns a list of string with the contents of an inventory, and that works fine

worn tundra
#

What's at line 54

untold rover
#

its this return ItemStack.deserializeBytes(Base64.getDecoder().decode(data));

worn tundra
#

Then data is null?

wraith rapids
#

null pointer exception is thrown when you .call a method on a variable or a field that is null (a null pointer)

worn tundra
#

Have you checked that?

untold rover
#

I know what causes a null pointer, but the value is read correctly, so I thought its passing it correctly, let me double check

eternal oxide
#

PaperUtils.java:54

untold rover
#

oh wait, nvm I think its just a spelling issue when reading from the file

wraith rapids
#

and this is why I always recommend using in-source configuration management

#

the IDE will be able to catch typos in keys and whatnot for you

untold rover
#

that sounds good, do you have a ressource that explain how to properly set it up and use it?

wraith rapids
#

there are config frameworks that do it, uh, the first one that comes to mind is configurate

ivory sleet
#

Configurate is undoubtedly a nice config framework

untold rover
wraith rapids
#

of course those are for actual configurations

#

what you're doing looks more like storing arbitrary data than a configuration

untold rover
wraith rapids
#

between lines 73 and 75

untold rover
#

thats just the ClickInventory class I use, that method just sets the item in the inventory.

  public void setItem(int slot, ClickableItem item) {
    items.put(slot, item);
    inventory.setItem(slot, item.getItemStack()); <---- 74
  }```
wraith rapids
#

java.lang.ArrayIndexOutOfBoundsException: Index 54 out of bounds for length 54

#

you're trying to place an item in the 55th slot

untold rover
#

I know, but I am not sure how to fix it with geol code

#

the item is being set in the tick method

#

and the code was made by geol

wraith rapids
#

looking at it, my only suggestion is to rewrite it from 0

untold rover
#

why? isn't that just an easy fix?

wraith rapids
#

it looks like spaghetti

untold rover
#

well I want to get it working in this state before thinking about that

wraith rapids
#

when working with inventories it's usually a good idea to abstract the concept of index out of it, and work with columns and rows

untold rover
#

Well I can't just rework the whole Inventory System, we have too many inventory that use that system

#

and the AnimatedInventory I just want to get it working first

wraith rapids
#

make the animated item entry thing hold a target column and row

eternal oxide
wraith rapids
#

create an util method to calculate index from column and row

#

then instead of iterating with the index directly, modify the column or row each tick

#

doesn't require you to rework your entire inventory system or whatever, just this class

quiet ice
#

I made a mistake

#

It should be

if (actualIndex / 9 != e.index / 9) {
                continue;
}

as far as I see, maybe use Math.floorDiv() just to be safe with this

#

Modulo is for getting the colum, but we want to compare the row ๐Ÿ˜…

untold rover
#

got it lemme try

untold rover
quiet ice
#

that is intersting. Still the same line?

untold rover
#

Idk, thats literally everything I get

wraith rapids
#

sounds like the jvm is swallowing stack traces

#

make sure you have that jvm flag that prevents it from omitting them set

quiet ice
#

I guess try to manually insert a try-catch in there.
Though interesting nonetheless

#

I doubt he has that flag since he obtained a stacktrace before

untold rover
#

java -Xms128M -Xmx3072M -jar server.jar I have no flags except xms and xmx

wraith rapids
#

for "performance reasons" the jvm can arbitrarily start omitting the stack traces of exceptions that are thrown often

#

which means that he'd get it earlier but since it repeated x times, it now gets omitted

untold rover
#

weird so even with a try catch its still not throwing the exception. and I have freshly restarted the server so there should be no other exceptions

#

there we go

#
        at java.util.Arrays$ArrayList.set(Arrays.java:4356) ~[?:?]
        at net.minecraft.server.v1_16_R3.NonNullList.set(SourceFile:53) ~[patched_1.16.4.jar:git-Paper-416]
        at org.bukkit.craftbukkit.v1_16_R3.inventory.CraftInventoryCustom$MinecraftInventory.setItem(CraftInventoryCustom.java:108) ~[patched_1.16.4.jar:git-Paper-416]
        at org.bukkit.craftbukkit.v1_16_R3.inventory.CraftInventory.setItem(CraftInventory.java:99) ~[patched_1.16.4.jar:git-Paper-416]
        at de.jaholl.core.inventory.ClickInventory.setItem(ClickInventory.java:74) ~[?:?]
        at de.jaholl.core.inventory.AnimatableInventory.tick(AnimatableInventory.java:55) ~[?:?]
        at de.jaholl.core.inventory.AnimatableInventory$1.run(AnimatableInventory.java:39) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.4.jar:git-Paper-416]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.4.jar:git-Paper-416]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.4.jar:git-Paper-416]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]```
#

so actualIndex is still to high

glossy scroll
#

What spigot version are you running

untold rover
#

1.16.4

glossy scroll
#

This is paper?

untold rover
#

yes

glossy scroll
#

Well

#

Its their problem

#

Because one of their patches is throwing this exception

wraith rapids
#

you clearly have no idea how stack traces work

wraith rapids
#

the guy who's saying it's paper because the exception was thrown in their domain

glossy scroll
#

Im sorry

#

Nevermind

#

Disregard

#

On mobile

wraith rapids
#

the exception was thrown in their domain because it was given an illegal argument

glossy scroll
#

Couldnt read it