#help-development

1 messages · Page 420 of 1

hushed spindle
#

i need to know the exact places in such classes

lost matrix
#

Preferably a proper profiler like VisualVM

#

stop the server (this will pause all tasks)
change the config
start the server again

lost matrix
hushed spindle
#

i know the methods too lol

#

i need to know what in the method is causing the lag

lost matrix
#

Show the method and ill tell you

#

And spark also shows you exactly what in there takes up your time btw

#

Are you running on a potato?
MaxParallelAsyncCalls: 8 -> MaxParallelAsyncCalls: 2
MaxMillisPerTick: 22.5 -> MaxMillisPerTick: 10

#

How many CPU cores do you have at your disposal?

#

Yeah then decrease the parallel calls to 2 and max millis to maybe 10-15

remote swallow
#

BLOOM PepeScream

echo basalt
#

shared host woeisme

patent socket
#

Looking in there it says something is null. I replied to this already with the log

undone axleBOT
#

The NullPointerException, (commonly referred to as NPE), is thrown in the following cases, but not sealed to: 1. null is passed into a method or constructor which does not allow it; 2. When trying to access a field on an object pointing to null; 3. Casting null to a primitive. See https://stackoverflow.com/a/3988794/17047120 for information on how to debug NPEs.

echo basalt
#

NPEs are harder to debug in java 8 ;)

#

newer versions tell you exactly what's null

torn shuttle
#

what's a NPE? never seen one

torn shuttle
#

my code is just too good

echo basalt
#

yo magma

#

just to flex on you

#

I made a scripting system

torn shuttle
echo basalt
#

with 0 enums

torn shuttle
#

yep

#

confirmed

#

this man is the garbage man he eats garbage

echo basalt
#

just like 5 interfaces

#

and you can make as many functions as you want ;)

#

it also didn't take me 8 hours to come up with

pseudo hazel
#

is there a tutorial for how to manage multiple config/settings/data yml files for the plugin to use in several places?

torn shuttle
pseudo hazel
#

I did have a solution but I think its pretty bad

echo basalt
#

mine also allows complex targeting

lost matrix
#

Oh we flexing our work rn?
Multiple lines in the ActionBar 😄

echo basalt
#

mans got too much time in his hands

pseudo hazel
torn shuttle
echo basalt
#

yeah

ivory sleet
#

Steaf, most tutorials just creates different FileConfiguration instances and thats it, one might even create a ConfigFacade along with a ConfigManager

#

Smile smiling pretty smilingly hard rn

torn shuttle
# echo basalt yeah

did you make it so it's usable by people who have never seen a line of code and does it have a webapp or external creation tool ?

echo basalt
#

yes, I taught my boss how to use it

pseudo hazel
#

but how do they make one that can be used from anywhere, is that using DI or like static instances ?

torn shuttle
echo basalt
#

he's a mac user

pseudo hazel
#

because right now I have some static boys but I think thats not the best practice way, but DI makes it annoying

ivory sleet
#

Steaf yes

echo basalt
#

it also doesn't use maplists

ivory sleet
#

This is a choice between usability and design

torn shuttle
#

hm did I use maplists?

patent socket
torn shuttle
#

I think I only did for the configuration structure based on yaml right

ivory sleet
#

DI would be better design wise, but a static singleton can be argued to increase usability

#

Up to you here

pseudo hazel
#

okay but there are pretty much the same performance wise right?

ivory sleet
#

Yes

pseudo hazel
#

okay I see

#

thanks

ivory sleet
#

All good, I can check over what you’ve written if u want and we can discuss what you could have done differently

#

Like after u’ve implemented it (:

#

But give it a try urself first and foremost

torn shuttle
#

I have been editing this kinda devlog kinda tutorial video for so long I no longer understand what is going on on the screen

pseudo hazel
#

okay sure, I will make a thread for it

ivory sleet
#

Ye just ping me i reckon

lost matrix
ivory sleet
#

🥲

winged anvil
#

whats the difference between a singleton and just making a class fully static other than lazy loading

patent socket
ivory sleet
#

Not as thread safe-able by design

lost matrix
ivory sleet
#

And cant be used as a generic type

#

You also compromise open closed principle entirely and other solid principles

lost matrix
#

Static should be stateless and immutable. If it changes on runtime then it should not be static.

torn shuttle
lost matrix
ivory sleet
#

Well I am more referring to the canonical definition,
only one instance with a global access point

echo basalt
#

sometimes I wonder where I went wrong, to be making plugins for the past 6-7 years and only have this much knowledge

#

but then I remember I was like

#

11

torn shuttle
patent socket
ivory sleet
#

I mean it depends what you’re after right also

#

If you just want to learn how to write a join plugin, then learning about design principles is scarcely helpful

lost matrix
echo basalt
#

buy the most basic java book for 20$ and read it

#

but like really read it

#

Or just use Jetbrains academy or one of the 20 other links out there

#

?learnjava

lost matrix
#

Imagine reading books to learn programming...

undone axleBOT
pseudo hazel
#

constructors are the basis for oop stuff

echo basalt
#

They're genuinely useful

echo basalt
torn shuttle
#

meanwhile I implemented an aabb check between two rotated cuboids using a shortest arc quaternion last week, I'm still riding that high

#

there probably was an easier way to do it but who cares

young knoll
#

Which step on codeacademy is constructors I wonder

quaint mantle
ivory sleet
#

Constructors are just functions with special semantics aPES_NarutoRun

hazy parrot
#

Probably first step after learning branching loops and datatypes

torn shuttle
ivory sleet
#

Lol so true

pseudo hazel
#

yes and methods are just static functions where the first argument is this

lost matrix
#

yeah you usually start with data types and arithmetic operations
then control flow (if else)
then loops (for & while will do most of the time)
and then you start with oop

torn shuttle
ivory sleet
#

You can write sth like

class A{
void a(A this){}
}

pseudo hazel
#

so are you a static abuser smile? think again

#

everyone is

young knoll
#

How do I compile code I’ve written in a notebook

#

Is there like, a scanner with a Java compiler built in?

torn shuttle
pseudo hazel
#

press is really hard

winged anvil
#

get a magical notebook

quaint mantle
#

Windows notepad

torn shuttle
#

arrange an infinite amount of rocks on an infinitely large surface

quaint mantle
lost matrix
#

Or you dont use methods in your classes at all. Imagine this

  public final Function<String, Integer> parseSafe = input -> {
    try {
      return Integer.parseInt(input);
    } catch (Exception e) {
      e.printStackTrace();
      return 0;
    }
  };
hazy parrot
#

Tbh js vibe

ivory sleet
#

tho now I cant extend my AbstractFactoryFactory and override the “method”

patent socket
lost matrix
lost matrix
quaint mantle
ivory sleet
lost matrix
#
  public class SomeFactory<T> {
    public final Supplier<T> supplier;

    public SomeFactory(Supplier<T> supplier) {
      this.supplier = supplier;
    }
  }
lost matrix
quaint mantle
#
/**
*  Java abstract Abstract class
*/
public abstract class AbstractAbstract {
  
  /**
  *  Get the abstract class
  *  @return the abstract class
  */
  public abstract AbstractAbstract method();
}

I even made javadocs 😎

patent socket
young knoll
remote swallow
#

i bet coll is cod

#

you have to like bend the first L and its cod

young knoll
#

Villagers can smelt cod in exchange for emeralds

#

And they don’t go to a furnace to do it

#

Therefor villagers are a furnace

#

Powered by emeralds

lost matrix
#

Imagine "smelting" a fish

remote swallow
#

i too fill a steel furnace full of fish to cook it

young knoll
#

I love casting fish ingots

lost matrix
#

Can you smelt my cod and grill my iron ore?

quaint mantle
young knoll
#

What about the evoker

#

They can summon vex

quaint mantle
#

Vex tries to hug you, he not bad

#

It's like creeper, he just want some hugs, but he gets overexcited and explodes

young knoll
#

Animals can summon babies by pressing their faces together

quaint mantle
#

That's not summoning, that's love

#

You didn't got summon by your parents, did you? 💀

remote swallow
#

it starts with face smooshing

young knoll
#

No but I’ve never seen a minecraft animal give birth

#

The baby just appears

remote swallow
#

mojank skipped that part

quaint mantle
young knoll
#

Minecraft animals also have a very short pregnancy

remote swallow
#

0.5 seconds

quaint mantle
young knoll
#

So the baby is made of hearts

quaint mantle
#

So, the baby animal doesn't get summoned, it gets loved to life

remote swallow
#

babies are holograms

tardy delta
#

huh what happened

young knoll
#

So they are enslaved to show text and only exist for the client?

remote swallow
#

yeay

quaint mantle
severe folio
#

if only it were that easy

quaint mantle
#

It is, just open your eyes bruh

tardy delta
#

when you remember its all packets

torn shuttle
#

I've never been there to see someone giving birth so it must be how it happens

verbal slate
#

Guys, who can help me with the question of applying effects? Here is my code: https://pastebin.com/raw/gKqV2jEt.
The problem is that for some reason 2 items do not impose different effects at the same time. Conditionally, if I have leggings in the slot for them give the "jump" effect, and the pickaxe in the main hand gives "night_vision", then only 1 of them will work.

torn shuttle
pseudo hazel
#

HADOUKEN

#

learn about early returns and extracting functions out of bigger functions

#

because noone can read this, including you a few days from now

patent socket
ivory sleet
hazy parrot
#

That doesn't make sense, learn java please

#

You are just blindly copy pasting

#

Without understanding what is happening there

tardy delta
#

me when doing webdev

hazy parrot
#

Same tbh

echo basalt
#

if you rotate your code sideways and see a bunch of mountains

#

that's a problem

lost matrix
#

?di

undone axleBOT
lost matrix
#

Read this

sharp bough
#

whats a good inventory api? with item callback etc

serene sigil
#

is there a way to convert my 1.19 plugin to 1.16.5? do i just change my pom.xml?

lost matrix
echo basalt
#

I just made my own

#

it's not that hard

lost matrix
quaint mantle
sharp bough
#

i used it a while ago

#

and forgot the name

verbal slate
echo basalt
#

oh god this karma gui lib is not good

sharp bough
#

it has static panes

quaint mantle
echo basalt
#

it also dynamically registers listeners and uses python's naming scheme

quaint mantle
#

Well, that's actually right

#

I made those really fast, didn't even though on the correct implementation for it

echo basalt
#

and hardcores skull hashes and all

#

overall 3/10

sharp bough
#

Inventory Framework thats the one

quaint mantle
dry yacht
#

While @lost matrix's proposed AnvilInventory#getRenameText() should work in order to let bukkit handle the PacketPlayInItemName (or custom payload MC|ItemName on older versions, FYI) and set the text field on the wrapped anvil container (AnvilInventory), I couldn't get that approach to function at all. Virtual (non-block-bound) Anvil UIs seem to be weird on bukkit, as I also couldn't manage to set any anvil slot contents. Since I need to perform clientside slot updates anyways (for the bottom inventory UI), I decided to handle the packets myself. If there's any better solution to this, which doesn't require the madness of having one implementation per version, I'd be happy to hear about it. My implementation works from 1.9-present, while 1.8 has some weird crash I didn't yet investigate.

echo basalt
#

well these are more like design flaws

#

than just bad code

echo basalt
dry yacht
echo basalt
#

just steal code samples from it

echo basalt
#

test it out and fix errors

outer raft
#

Hi, does anybody know why itemmeta doesnt inherite PersistentDataHolder?

echo basalt
#

probably because you have an old version of spigot

serene sigil
#

for the pom

echo basalt
#

probably 1.16.4

#

iirc

#

just try 1.16.5 and keep downgrading until it works

#

it's not a big deal

serene sigil
#

replace with 1.16.5?

echo basalt
#

ye

#

1.16.5-R0.1-SNAPSHOT

torn shuttle
#

if I don't get a confirmation that my keyboard has shipped by the end of next week I'm going to taiwan and firebombing the place making it

echo basalt
#

and if that doesn't work, 1.16.4-R0.1-SNAPSHOt...

echo basalt
torn shuttle
#

I'm not paranoid, I have the beginnings of a repetitive stress injury and my normal keyboard hurts to use

echo basalt
#

homie ordered my birthday gift and it should arrive on monday around 10:30 - 11am, so I'm scheduling my day around it

torn shuttle
#

I just want my zsa moonlander to get here already

echo basalt
#

looks like an off-brand ps4 controller

torn shuttle
#

has the same amount of keys too

#

a very astute observation from imillusion once again

serene sigil
# echo basalt 1.16.5-R0.1-SNAPSHOT

alright... first issue

[17:16:52 ERROR]: Could not load 'plugins\ZMPTeams.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.16.5
        at org.bukkit.craftbukkit.v1_16_R3.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:361) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:149) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
        at java.lang.Thread.run(Thread.java:833) [?:?]```
eternal night
#

1.16 in your plugin.yml

echo basalt
#

api-versions on the plugin.yml should not include revisions

serene sigil
echo basalt
#

so 1.13, 1.14, 1.15

#

etc

eternal night
#

ye ^

serene sigil
#

alr

torn shuttle
echo basalt
#

rope

torn shuttle
# echo basalt rope

if you think I'm throwing that rope down after I yeet you down a cliff you are delusional

#
    private static void visualEffect(int counter, WormholeEntry wormholeEntry) {
        for (Vector vector : new ArrayList<Vector>(wormholeEntry.getWormhole().getCachedRotations().get(counter))) {
            Location particleLocation = wormholeEntry.getLocation().clone().add(vector);
            wormholeEntry.getLocation().getWorld().spawnParticle(Particle.REDSTONE, particleLocation.getX(), particleLocation.getY(), particleLocation.getZ(), 1, 0, 0, 0, 1, new Particle.DustOptions(wormholeEntry.getWormhole().getParticleColor(), 1));
        }
    }

fun mystery, how is that spawnParticle giving me a CME?

echo basalt
#

cachedRotations is being modified

#

not the collection it holds

torn shuttle
#

how is that even possible, cached rotations should be getting initialized at the start and never modified... am I modifying a shallow copy or smth

echo basalt
#

probably

#

not my fault you put collections inside collections

torn shuttle
#

I'm a bit of a collector you see

#

these will be worth a lot of money in 30 years

young knoll
#

List<Set<Map<Queue<String>, Potato>>>

quaint mantle
young knoll
#

Obviously a list of sets that map a queue of strings to a potato

quaint mantle
#

I think it's better to have this instead:

List<Set<Map<Queue<String>, Potato>>>[0]
torn shuttle
#

this def shouldn't be shallow

#

but

quaint mantle
#

An array of lists of sets of maps of a queue of strings to a potato

young knoll
#

But the array is 0 in size

serene sigil
#

whats the dependency for nms? maven

quaint mantle
#
List<Set<Map<Queue<String>, Potato>>>[-1]
#

Now it's -1, meaning infinite

#

😈

serene sigil
quaint mantle
serene sigil
#

oh right

quaint mantle
young knoll
#

Then change spigot-api to spigot

torn shuttle
#
this.cachedRotations = new ArrayList<>(new VisualEffects(wormholeConfigFields).getCachedRotations());
torn shuttle
#

why bother investigating

quaint mantle
#

I think we should stop joking, I mean, apparently the channel description is "Serious Spigot and BungeeCord programming/development help"

#

I've added 3 different sql database options to my software and when inputting data mysql, mariadb do it perfectly fine but postgresql returns an error saying it can't find a specific column... Makes 0 sense am I missing something with postgre???

tardy delta
ivory sleet
sterile token
#

Okay, lamo definitly redis is bein asshole today

ivory sleet
#

u sure?

#

maybe u configured it poorly

sterile token
#

I cant fix the shity issue related to sending specif server data

#

So then the data is only sent to data server and is not self listened to it

#

Pretty simple, but im so dumb that cant figure the why 😡

rough drift
#

can I ask smt or are ya'll helping someone

ivory sleet
#

ask away :]

sterile token
#

Conclure want to see code?

ivory sleet
#

uh sure

#

u using lettuce or redisson right?

sterile token
#

Atm plain Jedis, but i will change it, dont critice it

ivory sleet
#

jedis, ooough

rough drift
#

using an exp bottle does not trigger a player interact event

ivory sleet
#

alr

#

keep going

ivory sleet
#

cause Im 99% sure it should ?

rough drift
#

only when throwing it in the air

tardy delta
#

uhh making 9000 streams when the player logins isnt a good idea right?

rough drift
#

Wait no interacting with air doesn't call it

ivory sleet
#

since it has quite the memory footprint

tardy delta
#

good ol' for loop :(

ivory sleet
#

I mean I assume gc does the job tho

#

but still

tardy delta
#

its kinda fun to see gc working when generating chunks

ivory sleet
#

oo

#

using zgc?

#

or g1gc?

tardy delta
#

dunno what that is

#

i just looked at visualvm

ivory sleet
#

ah alr

sterile token
ivory sleet
#

@rough drift

sterile token
tardy delta
#

idle server

ivory sleet
rough drift
#

not actually the bottle throwing

#

it's a custom item

ivory sleet
#

ah i c

rough drift
#

Fixed it

ivory sleet
#

o, nice

rough drift
#

apparently the event gets cancelled

sterile token
#

So far global channel works perfect, the issue is while using specific server channel

rough drift
#

so if you use ignore cancelled set to true (mcdev default) it won't work

tardy delta
sterile token
# ivory sleet o, nice

If im not wrong i sent the JedisListener code, also smth i forget to say the "servers" given via RedisBuilder are the channels which im subscrubing

tardy delta
#

that looks.. ..brr

sterile token
#

I really to need to fix this, if not i wasnt beeing so asshole

sterile token
patent socket
sterile token
#

Thern i would write it properly, just need to make it work and the yes i can improvee everything

#

Just give me a hand to fix it 😬

#

I just need that

tardy delta
#

hehe chunk generation, i dont want to see what happens when i use the reverse engineered vanilla one

#

takes seconds to load

sterile token
#

no conclure goes off, now i dont have anyone heling haha

#

Okay what a good momment to dm some friend, cya for some seconds

tardy delta
#

Collections.add a redis thing?

sterile token
#

Which just add the value into a String[]

#

Mainly

#

Because Jedis subscripton is so stupid, that just accepts String[] or byte[] for subscribing to channels 😡

rotund ravine
#

k

ivory sleet
#

cool but String[] isnt a collection derivative, rather just an array :>

sterile token
ivory sleet
#

ye, well, btw did u know redis has inbuilt support for pattern based channels

sterile token
ivory sleet
#

yeah but u can translate that no?

#

String::new and String::toBytes

sterile token
#

it takes more time

#

Just want to fix this

#

Then i recode if you want

#

😂

#

I really need to fix this shit, then i can do whatever and follow your improvees

#

Just give me a small hug to fix this

#

I cant find the reason

tardy delta
#

you are being shagged by a rare parrot

sterile token
ivory sleet
#

^

#

idk if u use that but it basically abstracts away ur pattern logic

sterile token
#

lol

#

I thought that method was only availaible for Binary

icy beacon
#

is it possible to see if a player is holding rmb

#

or only the interact momenn

ivory sleet
#

well, key input logging isn't possible

icy beacon
#

saw it coming

#

ty

ivory sleet
#

but probably possible to do it fairly robustly with just events

ivory sleet
#

(possibly nms also)

sterile token
#

I will give a try to it

ivory sleet
#

yea gl verano

icy beacon
#

nah I'll just go with checking if the player is sneaking

#

works perfectly for me too

sterile token
#

Fucking github, it doesnt allow me to invite any people as any repo collaborator

ivory sleet
#

wait what

sterile token
#

And seems to me be the only one having that issue

ivory sleet
#

maybe u did sth wrong?

sterile token
#

I did correctly

#

I go to repo/settings/collaborators and invite

ivory sleet
#

they have to join ntl

sterile token
#

Then i select the correct user, after that when i select to invite

a) they dont receive the invitation
b) the invitation link is broken with a 404 response

ivory sleet
#

line 17

#

public DialogueCommand() {

sterile token
ivory sleet
#

change to
public DialogueCommand(Plugin plugin) {

tardy delta
#

probably also want the name of your main class instead of Plugin

ivory sleet
#

plugin is fine

#

should at most be JavaPlugin there

tardy delta
#

as long as you dont need your own stuff sure

ivory sleet
#

well, if u have other stuff, that should come from a different dependency

quaint mantle
#

Are there any other games that runs java and have good dev tools etc like mc?

ivory sleet
#

what are good dev tools according to you?

quaint mantle
#

Well like mc has huge dev support with apis and stuff. So just similar to minecraft, I guess.

#

Just bored of mc

#

Fancy a change

ivory sleet
#

hmm, probably not in java

#

i mean there are other games

#

but smaller communities

#

significantly

quaint mantle
#

Like what

#

Ahh

ivory sleet
#

runescape for instance

#

sim city also?

sterile token
#

Yea Java is really oddy for games, specially huge ones

quaint mantle
#

What other big games have similar community size to minecraft with dev support etc. I'm open to learning different languages

quaint mantle
ivory sleet
#

^

sterile token
ivory sleet
#

unity

ivory sleet
#

terraria is decently big

sterile token
#

Lmao idk how people can code on that shity scripting lan

quaint mantle
#

Which I don't know which worse 😂

quaint mantle
ivory sleet
#

fivem supports Csharp also tho?

sterile token
ivory sleet
#

which is like, Java on steroids drunk

quaint mantle
#

It supports C++

quaint mantle
ivory sleet
#

spring is fairly popular still

sterile token
#

Are you still free?

#

😬

ivory sleet
#

ye well idk if I can fix ur mess tho

#

tbh

sterile token
#

Now i moved to patterns right

#

i will open a thread

#

its better

#

Redis pattern pub/sub questions

quaint mantle
#

I don't even understand redis, I couldn't find out how to actually create a view a collection... Am I just stupid? Any other db's are fine but redis I just didn't like... Maybe I was looking in the wrong places for info

ivory sleet
#

i mean

#

redis is just a huge hashmap<string,string> basically

#

in memory by default

quaint mantle
#

And you can even store json

#

Which is a +1

sterile token
tardy delta
#

you can also store json in a database

#

👺

sterile token
#

Redis is not persisten (you can enable an option for it), but his goal is just to have huge amounts of cache

quaint mantle
sterile token
#

karma, do you much experience?

#

with redis?

ivory sleet
#

I mean

#

u can send in a blob in sql if u prefer lol

sterile token
sterile token
#

Redis = memory database
Sql/NoSQL = persistent databases

quaint mantle
sterile token
#

i just need basic help tho

#

Would you like to see my thread?

quaint mantle
#

I use it to synchronize two ws

ivory sleet
#

redis can be persistent also, btu ye

sterile token
ivory sleet
#

true

sterile token
#

Its mainly designed for catching huge amount of values

sterile token
#

Sorry if im being asshole, i must fix this, i have been many hours

#

Legacy versions 💀

tardy delta
#

change 1.19 to 1.8?

sterile token
#

But bungee 1.16 allows to connect 1.8, 1.9, 1.10, etc players up to 1.16 mc version?

tardy delta
sterile token
#

You confirm it

tardy delta
#

time to make the fork up to date

tender shard
#

and why "won't it load"? what's the error?

lost matrix
#

XDD

#

Maybe you can dig something out from half a decade ago.

tender shard
#

1.7 is 9 years old lol

lost matrix
#

Well then from almost a decade ago, wow

sterile token
#

Uri is blocked on my country, please use paste md5

tardy delta
#

oh this is a thing

sterile token
#

When using spigot, you have to use ?paste uri

vivid skiff
#

How can i add multi-version support to a plugin? Like support for 1.12 and 1.16

tender shard
#

why don't you just use the latest bungeecord? it does support your 9 year old version, doesnt it?

sterile token
tender portal
#

Is there any specific way to light an end portal? I'm spawning one with all ender eyes but it isn't light. and the blocks are facing the right direction.

tender shard
#

it definitely supports 1.8

#

1.7, not sure

vivid skiff
tender portal
tardy delta
#

lighting a self built one probably wont work

vivid skiff
tender portal
tardy delta
#

clearly a mismatched version issue

sterile token
#

Same issue its blocked on my country

#

?paste

undone axleBOT
mighty pier
#

what database for storing player data for server with 30 average players

#

sqlite?

sterile token
tardy delta
icy beacon
sterile token
tardy delta
#

lol

icy beacon
#

tf

#

oh yeah I recall having my spigot code on pastebin being taken down by interpol

#

so relatable man fr fr

icy beacon
sterile token
#

Those weird uris for pastes looks like 1900s sites

icy beacon
#

well I do but you can't say that I must do it lmao

winged anvil
#

anyone mind doing sort of a code review here in a couple hours? Tryna get input on the way I use static and singletons

icy beacon
#

if I want I can use pastebin or whatever

icy beacon
#

oh you don't have it yet

#

well do you have any parts of code that are ready?

sterile token
#

Why github support is so shity

#

They have taken 22 hours and no answer, its really import ticket tho

icy beacon
#

Oh my fucking god

#

sorry dude, must I use gitmd5 on spigot or something

#

it just wasn't clear my bad

sterile token
#

Imagine that i have to open ticket on Github because their collaborators system is broken on my account, people i invite to repos doesnt receive the invitation or the link they received is broken with a 404 code

tardy delta
#

the urge to use atomic ints 💀

pseudo hazel
#

whats an atomic int do

icy beacon
#

it's basically an int but fancy and you can use it in inner lambdas

#

xd

tardy delta
#

volatile int wrapper with some extra logic

pseudo hazel
#

okay

#

so pretty useless in this case then is it not

tardy delta
#

ensures all accessing threads see its value the same way

#

yes, still better than those stupid ifs

icy beacon
#

is it performance heavy at all btw

tardy delta
#

6 lines of code for 2 checks 💀

icy beacon
#

the atomics

tardy delta
#

well the int is volatile so it isnt stored in cpu cache but its retrieved from main memory every time

latent depot
#

is there some way to use custom player heads without having to change my skin every time? (I didn't start yet, but I assume that old player skins stay uploaded somewhere for this to work..?)

tardy delta
#

shouldnt be noticeable

icy beacon
#

ty

pseudo hazel
#

you can probably do that in the same amount if lines as rn but using ternary

tardy delta
#

unless you care about 3 cpu cycles

#

looks ugh but whatever

#

this algorithm has to work instead

pseudo hazel
#

instead of what

tardy delta
#

instead of not working

pseudo hazel
#

well yeah

#

that makes sense to me

tardy delta
#

lemme just spawn a thread that keeps responding to keep alives when i start debugging 🤡

river oracle
#

I can't believe you would do that :O

#
#

then just use bukkit's PlayerProfile feature

#

Should be Bukkit#createPlayerProfile

#

or something along thos elines

tardy delta
#

oh i can debug player inv stuff while player is offline

tawdry echo
#

i have class Gui implements InventoryHolder and listener for inventoryclickevent, then i check if event inventory holder instanceof Gui but holder of inventory is null, someone have idea why?

echo granite
#

My eyes are burning

echo basalt
#

It's a world generator that makes those plots based on a basic mathemathical function

#

here's a basic example:

young knoll
#

(Yes it is infinite)

echo basalt
#

A plot is

edge, block x16, edge, roadx4

#

so the total length is 22
isEdge -> index % 22 == 0/17
isBlock -> index % 22 within (1, 16)
isRoad -> index % 22 within (18, 21)

#

and you just set the blocks depending

#

or you can do some fancy math and just fill out the squares and road individually

young knoll
#

I believe the sizes are all configurable

static finch
#

i have 2 plugins

plugin 1 is an dependency of plugin 2

in plugin 2 plugin.yml i put depend: [plugin1]

why my server keep loading plugin 2 before plugin 1 ?

limpid nexus
#

delay plugin 2 loading

static finch
#

plugin 2 absolutly need plugin 1 to work

young knoll
#

I mean depend should be enough

#

Do you have the name correct

limpid nexus
#

loadbefore: [OnePlugin, AnotherPlugin]

static finch
#

i think yes because depend: [plugin1]
i puted the same name that the /plugins give

young knoll
#

hmm that should be all you need

#

For example, this works softDepend = ['WorldGuard', 'Towny', 'GriefPrevention']

static finch
#

yes yes iiii maybe missed something in the code of plugin1 :(

limpid nexus
#

loadbefore is what you want

young knoll
#

No it isn't

limpid nexus
#

needs putting in the plugin.yml

#

Yes it is

#

read the fucking documentation

young knoll
#

If you control both plugins, use depend

#

depend will stop plugin2 from loading if plugin1 is not installed

limpid nexus
#

why its there

#

if you want to do that create a check onload on the 2nd plugin

#

simple enough

young knoll
#

Why do that when spigot can do it for you

eternal oxide
#

softdepend will nto affect load order. Depend will

limpid nexus
#

You're an idiot.

static finch
#

plugin2 depend of plugin1 and cannot work without

young knoll
# eternal oxide softdepend will nto affect load order. Depend will

softdepend
A list of plugins that are required for your plugin to have full functionality.
The value must be in YAML list format.
Use the name attribute of the required plugin in order to specify the dependency.
Your plugin will load after any plugins listed here.
Circular soft dependencies are loaded arbitrarily.

eternal oxide
#

unless you add any of the other load priorities then depend will ensure teh load order

eternal oxide
static finch
eternal oxide
#

correct, softdepend only checks the plugin is there, no affect on load order though.

static finch
#

but anyways i still use depend

#

so it should affect the load order

eternal oxide
#

do you have softdepend too for other plugins?

static finch
#

no its just a test that i'm doing

#

but i think maybe i know why

#

wen does onEnable is called ?

eternal oxide
#

after onLoad

static finch
#

yeah because like i create the instance in onEnable

#

soooo maybe i should create it on onload because the onEnable of plugin1 trigger after the loading of plugin2

#

ok nevermind

#

the plugin2 load and enable before plugin1

#

wtf even whit the depend

#

what the depend is ? is it the artefact ID ?

young knoll
#

Plugin name

#

From Plugin.yml

static finch
#

or is it the plugin name in the plugin.yml

#

OOoook

#

so whyyyyyy my spigot is doing that :((((

tender shard
#

softdepend does change the load order if possible

desert tinsel
#

Hashmaps are only saved in cache, you need a way to save the hashmap

#

You can do it in yml, Json files or databases, or using player's PersistentDataContainer

young knoll
# eternal oxide yeah, look at teh actual code and softdepend does not affect load order

Before vs After, only change made was adding softDepend = ['WorldGuard', 'Towny', 'GriefPrevention'] to Blueprints plugin

[15:47:59] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:48:00] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:48:00] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0
[15:48:00] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:48:00] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1

[15:49:42] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:49:42] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:49:42] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:49:42] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:49:42] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0

eternal oxide
#

load order is not guaranteed, unless depend. it's random depending on the directory file list

young knoll
#

The directly file list did not change

eternal oxide
#

one startup may show a different order then the next

serene sigil
#

is there any api i can use to generate minecraft maps from images? i know theres one website that does it, but i want to implement it in the plugin

young knoll
#

Alright lets see

eternal oxide
#

no not the presence of files, the order the system provides them

#

check stash, I dug through all teh load code ages ago

#

depend and softdepend are handled differently. soft does not affect the order

eternal night
#

softDepend should affect order

young knoll
#

It does

#

[15:52:56] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:52:57] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:52:57] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:52:57] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:52:57] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0

[15:53:46] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:53:47] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:53:47] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:53:47] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:53:47] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0

[15:54:24] [Server thread/INFO]: [WorldEdit] Loading server plugin WorldEdit v7.2.13+46576cc
[15:54:25] [Server thread/INFO]: [WorldGuard] Loading server plugin WorldGuard v7.0.8-beta-01+cbb2ba7
[15:54:25] [Server thread/INFO]: [GriefPrevention] Loading server plugin GriefPrevention v16.18.1
[15:54:25] [Server thread/INFO]: [Towny] Loading server plugin Towny v0.98.6.0
[15:54:25] [Server thread/INFO]: [Blueprints] Loading server plugin Blueprints v1.0.0

#

3 more startups

eternal oxide
#

?stash

undone axleBOT
quiet ice
#

It wouldn't make any sense anyways

#

Outside as a suggestion of sorts that is - but in that case the plugin.yml would need to look a lot more differently

young knoll
#

There is

#

Well, in spigot there is

serene sigil
#

really?

quiet ice
#

Although java.awt.Image is kinda meh

serene sigil
#

yea

quiet ice
#

If you don't care about performance it's okay but outside of that you'd want to use LWJGL or similar for rendering

young knoll
#

I'm using it, but to be fair only at startup

serene sigil
#

👍

echo basalt
eternal oxide
#

if it is in softdepend is goes ahead and loads it. it does not get delayed

quiet ice
young knoll
#

// We're clear to load, no more soft or hard dependencies left

serene sigil
#

im using 1.16 btw

quiet ice
#

And if we are applying de-morgan we get
if (!dependencies.containsKey(plugin) && !softDependencies.containsKey(plugin) && plugins.containsKey(plugin)) {

eternal oxide
#

Yes, we had this issue with Towny for the longest time. On some systems it would error due to load order. Others would work fine. soft depend was the issue

#

depend fixes load order

quiet ice
#

Could be something that was an issue in older versions of bukkit

eternal oxide
#
                // We now iterate over plugins until something loads
                // This loop will ignore soft dependencies```
serene sigil
eternal oxide
#

line 317

serene sigil
#

?

eternal oxide
#

all depends get resolved first, then it loads all others no matter if it has a soft or not

quiet ice
eternal oxide
#

no it runs for all plugin which HAVE a depend, soft or depend

magic dome
#

Does anyone know how to use the generateNoise() override method in the ChunkGenerator class??? I don't understand what the point of it is or how to change the noise during this... For reference I am trying to make a plugin that generates a vanilla minecraft world, with a custom heightmap... somehow editing the noise function to be the function I have for the heightmap seems the most logical, no? but at the same time this generateNoise() method seems almost useless? can anyone help? Here is a link to the method https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/generator/ChunkGenerator.html#generateNoise(org.bukkit.generator.WorldInfo,java.util.Random,int,int,org.bukkit.generator.ChunkGenerator.ChunkData)

eternal oxide
#

the first section runs for all plugins which don;t have any depends

rough drift
#

can I add a player's uuid as a valid team entry?

eternal oxide
#

players add to teams by name, entities by UUID

rough drift
#

but... why?

green falcon
#

is there any alternative to ProtocolLib? its not working for 1.19.4

young knoll
young knoll
#

I mean my testing showed the load ordered changed when I added softdepends, so I'll stick with that

eternal oxide
#

it changed because your files on disc changed so your system offered up a different order

young knoll
#

So if I delete the file and copy it again, it should change again

eternal oxide
#

it MAY not guaranteed

#

it all depends on the FAT

#

This is why it took us so long to figure out our bug, it was so unreliable to replicate

young knoll
#

Well, after deleting and copying it again 4 times it has not changed

eternal oxide
#

It would be so much easier if it did affect teh order

#

to duplicate the load order issue for me it took a completely different system

young knoll
#

I mean

#

You would think removing the softdepends would not change the load order then

#

Still on the same system

eternal oxide
#

I never found any rhyme nor reason to when it changed.

#

so finally dug into the CB source

#

the order files are offered up by the system are not guaranteed.

young knoll
#

I guess I could modify bukkit to print the order it receives the files

eternal oxide
#

that would be a good test

young knoll
#

then we can see if that matches the load order

serene sigil
#

can u create npcs with spigot or u gotta use nms?

young knoll
#

NMS

tardy delta
#

find the bug

young knoll
#

Or citizens api

serene sigil
young knoll
serene sigil
young knoll
#

no idea

serene sigil
modest garnet
quiet ice
#

last 1.8 version

serene sigil
#

no

#

1.8.9

quiet ice
#

Client-only iirc

serene sigil
#

oh

quiet ice
#

I'd guess you have a compilation error though.

#

Good luck

gilded bloom
#

Hello, I have problem with deleting an armorstand.

First I save my armorstand in hashmap called "knockedout":

        ArmorStand as = victim.getWorld().spawn(victim.getLocation(), ArmorStand.class);
        {
            as.setVisible(false);
            as.setCanPickupItems(false);
            as.setInvulnerable(true);
            as.setMarker(true);
            as.setSilent(true);
            victim.getScoreboard().getTeam("noCol").addEntity(as);
            as.setCustomNameVisible(true);
            as.addScoreboardTag("knockout_counter");
            as.setGravity(false);
            as.setAI(false);
            as.setPersistent(true);
        as.setCustomName("KNOCKEDOUT");
        };
        victim.setPassenger((Entity) as);
        Object[] data = new Object[]{60, 15, null, 10, null, as.getUniqueId()};
        knockedout.put(victim.getUniqueId(), data);

Later I collects his UUID from this hashmap

            Object[] data = knockedout.get(id);
            Player p = Bukkit.getPlayer(id);

            ArmorStand as = (ArmorStand) Bukkit.getEntity((UUID) data[5]);
          
  
            p.sendTitle(ChatColor.GREEN + "HEALED", ChatColor.WHITE + "You have been healed by "             + helper.getDisplayName()); //WORK
            p.setPassenger(null);
            as.remove();
            p.getScoreboard().getTeam("noCol").removeEntity(p); //WORK
            knockedout.remove(id); //WORK

And everything looks fine, because the armorstand disappears, but when we get all passengers of that player, this armorstand is still there. Then I can't add any other passenger. Any ideas? I'd be grateful if someone helped.

rough drift
modest garnet
#

cannot resolve symbol

quiet ice
quiet ice
#

Are you really using 1.8.8?

rough drift
#

nah m8, beta 1.2

quiet ice
#

i.e. try LEGACY_MOB_SPAWNER. Does that compile? If yes, you have an issue

green falcon
#

anyone know if entity spawning changed in 1.19.4?

quiet ice
#

I don't think I even launched that version yet ¯_(ツ)_/¯

rough drift
#

so no

green falcon
young knoll
eternal oxide
young knoll
#

Only when I change file names

eternal oxide
#

yes, thats enough at times to affect the order files are discovered

#

almost any change to files many affect discovery order

young knoll
#

Notice that the file order for 1 and 4 are the same

#

But the load order changes since I removed the softdepends

eternal oxide
#

its quite random

young knoll
#

On windows at least, it's always reading the files in alphabetical order

#

Ignoring case

eternal oxide
#

I guess there are edge cases where softdepend fails and others it works for ordering

#

in all my tests teh only fix was depend over soft

young knoll
#

I mean it's possible it changed

#

The last edit to the loading method was in 2020

eternal oxide
#

its possible. this was a long time ago

serene sigil
#
java.lang.NoClassDefFoundError: net/citizensnpcs/api/CitizensAPI
        at com.zushee.zmpteams.plugin.trader.Trader.createTrader(Trader.java:15) ~[?:?]
        at com.zushee.zmpteams.plugin.world.Worlds.lambda$createWorlds$0(Worlds.java:116) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:485) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1083) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassNotFoundException: net.citizensnpcs.api.CitizensAPI
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:155) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Paper-794]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
        ... 7 more```
#

can any 1 help, citizens api doesnt load

#

my pom.xml:

gilded bloom
#

try adding citizens jar file into project modules dependencies.

young knoll
#

Are you depending on citizens in your plugin.yml

serene sigil
#

no?

young knoll
#

You need to load after citizens

#

Or you need to shade the API

serene sigil
#

how?

young knoll
#

depend: [Citizens]

serene sigil
#

wait, am i supposed to add a plugin?

young knoll
#

Yes

#

Citizens

serene sigil
#

ohhhhhhhhhh

#

where do i get the plugin?

young knoll
tardy delta
#

player living in congo

young knoll
#

Or you can buy it, since it's premium

pseudo hazel
#

what line is the error at?

tardy delta
#

what aint working

young knoll
#

public DialogueCommand() {
this.plugin = plugin; //here
}

#

Hmmm

#

You are assigning this.plugin to itself

#

Which does nothing

pseudo hazel
#

oh lmao

#

yes

#

you forgot the injection part of dependency injection

#

you need a constructor parameter that is the plugin you want to store

rough drift
#

Ah, seem as if org.bukkit.WeatherType is missing thunder lmfao

#

only clear and downfall

young knoll
#

Thunder is not a weather type

rough drift
#

It is though

young knoll
#

It's just an extra flag when it is raining

rough drift
#

It makes the sky darker

pseudo hazel
#

mfw weathertype is not a boolean

rough drift
eternal oxide
#

nope

rough drift
#

Ayo chief

pseudo hazel
#

maybe logically, but technically, no

quiet ice
#

Yeah I also recall it being an extra boolean

eternal oxide
#

thats an essentials command

young knoll
#

mhm

rough drift
#

that is vanilla

rough drift
#

I am in single player @eternal oxide

quiet ice
#

There's toggledownfall and thunder

rough drift
#

@young knoll Find that method on player tyvm ❤️

icy beacon
#

afaik there's none

rough drift
#

Exactly

#

Why did they stop at rain

#

not that hard to add thunder

icy beacon
#

for some reason it's only rain or no rain for per player

icy beacon
young knoll
#

^

#

Oh yeah it's still backwards

#
if (type == WeatherType.DOWNFALL) {
   this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.STOP_RAINING, 0));
} else {
   this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.START_RAINING, 0));
}
#

Mojank

pseudo hazel
#

wdym backwards

#

its a toggle

young knoll
#

Notice that setting it to downfall sends the stop rain packet

pseudo hazel
#

no

#

wait

#

where does type come from

quiet ice
#

it does lmao

young knoll
#

Full method

#
 public void setPlayerWeather(WeatherType type, boolean plugin) {
        if (!plugin && this.weather != null) {
            return;
        }

        if (plugin) {
            this.weather = type;
        }

        if (type == WeatherType.DOWNFALL) {
            this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.STOP_RAINING, 0));
        } else {
            this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.START_RAINING, 0));
        }
    }
quiet ice
#

in NMS, right?

pseudo hazel
#

oh oof

#

nvm

young knoll
#

Yes

#

This is in ServerPlayer

quiet ice
#

Bukkit reverses it again to be the correct form?

young knoll
#

No

#

It is correct, just backwards

#

Well more specifically the mappings are wrong ig

#

Also the packet for thunder is not a simple on/off

#

Its a float

green falcon
tardy delta
#

if (plugin) i thought i was looking at some weird js for a moment

opal juniper
#

there is nothing weird about js /s

tardy delta
#

oh i loved writing methods today that dont return anything although they have to

fluid river
#

js?

#

delete this channel

tardy delta
sterile token
tardy delta
#

?

sterile token
#

NextJS ❤️

tardy delta
#

idk im learning webdev at college

sterile token
#

ohh ok

#

Nice

tardy delta
#

angular newt year

sterile token
#

Oh Angular

#

Such a good framework

#

For backend in Ts i will all life prefer Nest

chrome beacon
#

Nuxt is nice

tardy delta
#

dont let me write html/css or ill fuc k up so badly

#

you daont want to see my exam file

torn shuttle
#

real quick, if I have a blockstate of a block whose world unloaded if I access blockState#getWorld will that make it unhappy or should it be a relatively safe access?

chrome beacon
#

What are you trying to do with that World

echo basalt
#

something tells me you're hard-referencing that

sullen marlin
#

Unhappy

torn shuttle
echo basalt
#

in which case the world wouldn't be properly garbage collected, no?

sullen marlin
#

If it does anything at all

torn shuttle
#

guess I'll pass a reference to the world uid then

tardy delta
#

me who was already looking through the stash

torn shuttle
#

thanks

tardy delta
#

if world is null, it throws an illegalstate

sullen marlin
#

Is world a weak ref though?

#

Also a possibility the ref hasn't been GC'd

tardy delta
#

isPlaced checks if world != null

torn shuttle
#

oh

#

that's convenient

sullen marlin
#

Yes but world won't be null if created from a loaded world

torn shuttle
#

will it evaluate to placed if the world no longer exists?

echo basalt
#

so by holding that block state

#

you're keeping the world in memory?

sullen marlin
#

Yes

echo basalt
#

magma's code got memo leaks

#

inferior

tardy delta
#

whats that weakWorld thing?

torn shuttle
#

where's my gigachad world

tardy delta
#

lmao i probably got a memory leak by keeping 200 item tags into memory

torn shuttle
#

there are no memory leaks just happy little patches of fun memories of the times we had together

sullen marlin
#

Also the weak one can still blow up if it hasn't been GC'd yet

torn shuttle
#

ok so I'll just get the world uuid ahead of time huh

tardy delta
#

md5 wondering what he wrote

#

or someone else

tiny ferry
#

why do i get this error:

Cannot invoke "org.bukkit.inventory.ItemStack.getItemMeta()" because "teststack[i]" is null

on this loop:

for(int i = 0; i<10; i++) {
                    if(item.getItemMeta().getDisplayName().equals(teststack[i].get ItemMeta().getDisplayName().toString())) {
                    p.sendMessage("Display Name: " + teststack[i].getItemMeta().getDisplayName().toString());
                    
  }
}

When it clearly works? Like it works i just want to get the error out of the console

https://imgur.com/a/qeBumqP

tardy delta
#

itemstack[i] is null?

tiny ferry
#

but it isnt

tardy delta
#

does that come from an inv?

tiny ferry
#

no its an array of itemstacks

#

but yeah the method gets called in an inventory

tardy delta
#

"in an inventory" do those stacks come from an inventory or not? there no item there then

tiny ferry
#

no those stacks get created in methods like these:

public static ItemStack[] getItemStacksDamageEnhancementUnlocked(Player p) {
        ItemStack[] skillpoints = new ItemStack[9];
        int damagelevel = skillCommand.cfg.getInt(p.getName() + ".Damage");
        
        for(int num = 0; num<damagelevel; num++) {
            skillpoints[num] = new ItemStack(Material.GREEN_CONCRETE);
            ItemMeta nameMeta = skillpoints[num].getItemMeta();
            skillpoints[num].setAmount(1);
            nameMeta.setDisplayName("§alevel " + (num + 1));
            ArrayList<String> namelore = new ArrayList<String>();
            namelore.add("§6increases your total damage done");
            namelore.add("§6against enemys by §e" + ((num+1)*5) + "%§7.");
            nameMeta.setLore(namelore);
            skillpoints[num].setItemMeta(nameMeta);
        }
        
        
        
        return skillpoints;
        
    }

torn shuttle
#

I wonder if I could get that modelengine alternative done by april first to do a fun prank

tardy delta
#

damagelevel is lower than the amount of stacks then

tiny ferry
#

i mean the stacks created are based on the damagelevel

tardy delta
#

please use syntax highlighting my eyes are already dead enough

code here
tiny ferry
#
public static ItemStack[] getItemStacksDamageEnhancementUnlocked(Player p) {
        ItemStack[] skillpoints = new ItemStack[9];
        int damagelevel = skillCommand.cfg.getInt(p.getName() + ".Damage");
        
        for(int num = 0; num<damagelevel; num++) {
            skillpoints[num] = new ItemStack(Material.GREEN_CONCRETE);
            ItemMeta nameMeta = skillpoints[num].getItemMeta();
            skillpoints[num].setAmount(1);
            nameMeta.setDisplayName("§alevel " + (num + 1));
            ArrayList<String> namelore = new ArrayList<String>();
            namelore.add("§6increases your total damage done");
            namelore.add("§6against enemys by §e" + ((num+1)*5) + "%§7.");
            nameMeta.setLore(namelore);
            skillpoints[num].setItemMeta(nameMeta);
        }
        
        
        
        return skillpoints;
        
    }
tardy delta
#

well it loops through damagelevel itemstacks then and leaves the rest null

tiny ferry
#

ohh wait i think you are right, the array is limited to 9

#

yeah it fixed it, im dumb thank you

torn shuttle
#

I think ImIllusion broke into my house and stole my toothbrush, I can't find it anywhere

tardy delta
#

i did

#

i have fifteen now

torn shuttle
#

they know I'm about to blow up as a youtuber and they want some memorabilia

torn shuttle
#

each strand of hair is worth its weight in antimatter

young knoll
#

How much is antimatter worth

torn shuttle
lost matrix
#

There is a scammy crypto currency called AntiMatter

torn shuttle
#

there's also its namesake in physics which merely costs 62 trillion per gram

young knoll
#

How does it have a price

lost matrix
#

peanuts

torn shuttle
lost matrix
young knoll
#

I did not expect us to be able to produce it

lost matrix
#

Thats basically the cost of energy and equipment wear

torn shuttle
#

you thought we'd just find it somewhere randomly?

#

aw shit I was digging in my backyard and found 3 grams of antimatter

young knoll
#

I thought it was more of a theory

torn shuttle
#

yall I made it

#

I'm about to go make my own country

ocean hollow
#

where should I click to call ClickType.WINDOW_BORDER_RIGHT?

lost matrix
#

On the right window border trollface

ocean hollow
#

here?

lost matrix
#

Yes. But with right clicks

ocean hollow
#

what if nothing happens?))

#

Either I'm not clicking there, or I don't know. no errors

lost matrix
#

Add sysouts to check if the event is even fired

sullen marlin
#

Maybe it's not used anymore

#

Someone can check the code

ocean hollow
#

then you can create an inventory with more than 54 slots? I mean, use the player's inventory as well. and at the same time do not replace his things?

native gale
#

Hello! Can anyone have any idea why this happens

#

But by accident I inserted it into ShapelessRecipe and...

pseudo hazel
native gale
#

it just works?

native gale
tardy delta
#

lemme say i have this class, if something outside that class still uses EMPTY_INGREDIENT, can my recipeloader object be freed or not?

young knoll
#

Yeah I think the docs are outdated

#

And no one is really sure what it works for

#

So no one has updated them

rough drift
#

To send a player info update packet, do I also need to first send a player info remove packet?

lost matrix
tardy delta
#

ah, checked it with visualvm to be sure and yep

#

that server.start method is blocking so hmm

rough drift
#

it runs on the thread that called it

tardy delta
#

well ye so my method isnt exited so how can that recipeloader be gced?

rough drift
#

Where is that method

tardy delta
#

run method

rough drift
#

at the end of it?

tardy delta
#

yes

rough drift
#

If anything holds a reference to an object (or to it's fields) it will never get GC'd

rough drift
#

anyways yeah it will be freed

#

because the GC knows it's not used anymore