#help-development

1 messages · Page 2061 of 1

tardy delta
#

js?

chrome beacon
#

Good manhwa

round finch
#

Is that a challenge?

grim ice
#

im using php lmfao

tardy delta
#

im out

solar sable
#

because I really have an idea of making enchanted foods that has special effects like enchanted chicken that gives you strength for 5 minutes

grim ice
#

Idk js

solar sable
grim ice
#

how to do it in js tho

solar sable
#

i can give ideas just cant do them XD

round finch
#

🤣

solar sable
#

i should make a job out of this

#

just give people ideas

#

1 idea = 1 dollars

round finch
#

Minecraft enchantmented chicken

solar sable
viral crag
# grim ice im using php lmfao

inter tubes say:

$dirname = "media/images/iconized/";
$images = glob($dirname."*.png");

foreach($images as $image) {
    echo '<img src="'.$image.'" /><br />';
}
solar sable
#

you can make an item glow by giving it an enchantment it doesnt supposed to have right?

#

i remember someone saying to put lucky or something on it?

#

i forgor

round finch
#

Enchanted cooked chicken

fossil lily
#

If I assign xrandom above, and then re-assign in here, and then I access xrandom outside of the while loop, will it use the re-assigned value?

viral crag
#

guessing thats whats in that folder taht are png

tardy delta
#

;-;

solar sable
solar sable
viral crag
#

or its smaller than that and you didnt use the proper open-closwe tags

grim ice
solar sable
#

i mean its for computers but what even is that 😭

grim ice
#

cuz images are jpg

grim ice
#

dunno what u mean

glossy venture
#

ur getting into access modifiers on lesson 32???

viral crag
#

like html, php has open and close tags so the server knows how to parse it

sand vector
#

Trying to make a player housing system which moves a player to a void world which only holds that players house. Any idea if there is a forum which explains this as I'm struggling to find anything. For example something like hypixel housing or how jailbreakmc(RIP) had cells

glossy venture
#

whats lesson one, the semicolon?

grim ice
#

yeah

#

like this

#
        <?php
        
        $dirname = "images/";
        $images = glob($dirname."*.jpg");

        foreach($images as $image) {
            echo '<img src="'.$image.'" /><br />';
        }
        ?>
#

right?

viral crag
#

yeah

tardy delta
grim ice
#

its correct

tardy delta
#

first learning variable types and such i guess

glossy venture
#

fair

grim ice
#

Pain

tardy delta
viral crag
#

although that specifically generated poor html, servers still allow it

grim ice
#
<!doctype html>

<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Title</title>
    </head>
    <body>
        <?php
        
        $dirname = "images/";
        $images = glob($dirname."*.jpg");

        foreach($images as $image) {
            echo '<img src="'.$image.'" /><br />';
        }
        ?>
    </body>
</html>
#

thats what i have

#

literally

#

lmao

viral crag
#

thats better

round finch
solar sable
fossil lily
grim ice
solar sable
#

uh but i have this problem XD

grim ice
#

its still not working lol

solar sable
round finch
#

You could generate the perfect number in case..

viral crag
grim ice
#

dunno

#

not running on my pc

#

latest i assume

tardy delta
#

i would say dont do such complicated things if you dont know that much java

#

start with something more simple

viral crag
grim ice
#

uh

#

no i am

#

echo '<img src="'.$image.'" /><br />';

round finch
#

Wait..

grim ice
#

img src

#

and image variable

#

and br

viral crag
#

yeah i see, i am pretty rusty it seems. try to avoid webstuff

grim ice
#

ik but i wanna make

#

like

#

a cross platform

#

image storing

grim ice
#

idk js

onyx fjord
#

its easier than php for sure

#

tbh according to ur code its easy to rewrite that in node js

round finch
#
Random r = new Random();
int low = 10;
int high = 100;
int result = r.nextInt(high-low) + low;
grim ice
#

~and i cant find any code to copy paste in js in google~

onyx fjord
#

are you sure that you are using real google

grim ice
#

yeeeeee

#

anyways just help me i beg

onyx fjord
#

are u using expressjs

#

or what

solar sable
#
class MyClass {

    ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();

    public void setExecutorService(ScheduledExecutorService executorService) {
        this.executorService = executorService;
        executorService.schedule(MyClass::new, 10, TimeUnit.SECONDS);
    }
    static void sayHello(String name) {
        System.out.println("Hello " + name);
    }

    public static void main(String[] args) {
        sayHello("Ray");
        sayHello("Lukas");
    }
}
``` ok so I kind of fixed it but also not but uh it didnt really delay it
#

im not good at this clearly lol

tardy delta
#

uhm

grim ice
#

idk shit about js

onyx fjord
#

u dont know what web server are u using

tardy delta
#

also instead of the set method use a constructor

ivory sleet
#

iirc

tardy delta
#

he only wants to run it once if im understanding it correctly

ivory sleet
#

ah

tardy delta
#

which ::schedule does?

ivory sleet
#

yeah

grim ice
ivory sleet
#

correct

tardy delta
#

:)

#

im not using that very often

ivory sleet
#

sadge

solar sable
#

so like Ray and then 10 seconds and Lukas

ivory sleet
#

you could just Thread.sleep(10_000) between the two method calls

tardy delta
#

in this case you could use Thread.sleep

#

ah conclure fast af

solar sable
#

oh

ivory sleet
#

hehe

#

or well

solar sable
#

why didnt you tell that before that is much easier

#

xD

ivory sleet
#

print("Ray")
schedule.schedule(() -> print("Lukas"), 10, SECONDS);

viral crag
#

@grim ice

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php
        
        $dirname = "";
        $images = glob($dirname."*.jpg");

        foreach($images as $image) {
            echo '<img src="'.$image.'" /><br />';
        }
?>
 </body>
</html>

Works fine, did you save your file as index.php ?

onyx fjord
#

fuk php

solar sable
#
class MyClass {

    static ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();

    public void setExecutorService(ScheduledExecutorService executorService) {
        this.executorService = executorService;
    }
    static void sayHello(String name) {
        System.out.println("Hello " + name);
    }
    public static void main(String[] args) {
        sayHello("Ray");
        executorService.schedule(() -> sayHello("Lukas"), 10, TimeUnit.SECONDS);
        sayHello("Lukas");
    }
}
``` good now?
ivory sleet
#

that will print

#

Ray

#

Lukas

#

then Lukas after 10 seconds

fossil lily
#

Will this continue to run the code below it after the while loop is finished?

ivory sleet
#

myes

solar sable
#

oh wait i didnt remove the other lukas lol

#

but it works now omg

#

thank you

#

i would cry rn if i was good at crying

#

but ig i can just give you a virtual hug

#

sends virtual hug

ivory sleet
viral crag
#

pushes FourteenBrush in front to block it

ivory sleet
viral crag
#

maybe Conclure soaked it all up

tardy delta
onyx fjord
#

could someone explain what Clojure is and what does it have to do with ajva

ivory sleet
#

It compiles to jvm bytecode

tardy delta
#

sounds like conclure

#

kek

ivory sleet
#

Similarly to how kotlin can run on the jvm

onyx fjord
#

wow you know a lot about it, i wonder why

ivory sleet
#

And it aims to be functional, as much as possible lol

#

Yeah well I have touched it

onyx fjord
#

looks cool

#

but why is all shit in ()

ivory sleet
#

Not a wholesome experience

#

Nested functions

#

Since immutability and everything must be declarative

onyx fjord
#

wait so i can make plugins in it?

ivory sleet
#

Basically yeah

#

I believe someone made a "Minecraft server software"

onyx fjord
#

in conclure... i mean clojure?

ivory sleet
#

Ye

onyx fjord
#

can u link it

ivory sleet
#

Let’s see if I can find it

ivory sleet
#

Why 😦

river oracle
#

wat

tardy delta
#

then go to rust lol

river oracle
#

sounds like someone doesn't like writing boiler plate 😆

ivory sleet
#

So you like clojure, Haskell and f#? That’s kinda sadge

onyx fjord
ivory sleet
#

Lol

#

I mean functional gets intricate as well sometimes

viral crag
grim ice
#

oh ok

ivory sleet
#

For instance you should never reference old values when creating new objects in functional, which makes the design a bit, well… questionable sometimes (due to garbage collection)

onyx fjord
#

pff who uses GC, i write my own memory management

grim ice
#

Problem solved

#

ok

ivory sleet
#

Functional and memory management? Sounds like pain 😔

grim ice
#

now i need to somehow

viral crag
#

dont you pay your servants to take out the garbage?

grim ice
#

make a way to access the website folder

ivory sleet
grim ice
#

with some ui

ivory sleet
#

Actually it’s in Haskell

#

But that’s even more religious

onyx fjord
ivory sleet
#

yeah he’s a functional one

onyx fjord
#

oh god what the fuck is that syntax

ivory sleet
#

🥲

onyx fjord
#

.&.

viral crag
#

pretty colors

onyx fjord
#

idk where how am i supposed to know

onyx fjord
grim ice
#

alr

#

now i gotta input a file and add it to a directory

viral crag
#

gogo forms!

grim ice
#

not knowing wtf ur doing is surely a bad feeling

onyx fjord
#

google

grim ice
#

it wouldve been awesome if this was java 😭

onyx fjord
#

then do it in java

viral crag
#

you could use SAPI ...

grim ice
#

wait

#

well

#

java isnt a markdown language

#

u cant do elements and shit with it can u

onyx fjord
#

i mean u can make sites with it but how i have no idea

fossil lily
#

How can I access azrandom outside of this while loop?

tardy delta
#

not

viral crag
#

start something else and access it?

tardy delta
#

or put it outside the loop with a starting value

viral crag
#

seems like a great way to have bad things happen

#

what does java do when your read and write something at the same time? or write multiple things?

fossil lily
ancient plank
#

eRush

tardy delta
#
int a = 0;
while (a > 1 && a < 92) {
  a++;
}```
#

this doesnt makes sense but ye

fossil lily
#

So if I access a after the loop like this:

int a = 0;
while (a > 1 && a < 92) {
  a++;
}
System.out.println(a);

It will give me "92"

tardy delta
#

yes

fossil lily
#

aight

#

thanks

#
            while (xrandom > 108 && xrandom < 196){
                xrandom = (int) Math.floor(Math.random() * (xmax - xmin + 1) + xmin);
            }
            while (zrandom > 1 && zrandom < 92){
                zrandom = (int)Math.floor(Math.random()*(zmax-zmin+1)+zmin);
            }

So just to make sure, this will run until zrandom is between those two numbers right?

tardy delta
#

spaghetti

viral crag
#

blocking

fossil lily
#

?

#

??

tardy delta
#

maths

#

my brain is hurting

fossil lily
#

but yes?

ivory sleet
#

loudbook r u trying to get a random number between two numbers?

solar sable
#

@tardy delta can you find a java based dc server and invite me there

fossil lily
#

I want to make sure my random number is every number except a number between those two

ivory sleet
#

Here’s one (this one) but I got several amxyar

fossil lily
#

int xmax = 229;
int xmin = 97;
int zmax = 130;
int zmin = -50;

solar sable
#

im tryna ask java based questions there because this is based on spigot not java particulaparticularly

tardy delta
#

discord . gg / code

solar sable
tardy delta
#

just go to the java channel

ivory sleet
#

This is for java also

tardy delta
#

i cant sent invites here :(

solar sable
chrome beacon
#

I can invite you to Together Java

tardy delta
#

the coding den 😎

solar sable
#

just dm me any java server xD

tardy delta
#

im only in the coding then but there are a lot of programming languages there

solar sable
#

i made myself a list of my friends XD

tardy delta
#

scary

acoustic pendant
#

Hello, i have done the way to create a world:

            String worldName = args[1];

            WorldCreator wc = new WorldCreator(worldName);

            wc.environment(World.Environment.NORMAL);
            wc.type(WorldType.FLAT);

            wc.generatorSettings("2;0;1");

            wc.createWorld();```
and now I would like to save that world or delete it if the player doesn't want to apply its changes
how can i do that?
and store those world would be with the name of the world, or the other method?
chrome beacon
chrome beacon
#

So you can delete it

#

?

acoustic pendant
#

okay

#

and to save the world do i made a copy of it and delete the copy if i run a command that is made for not saving changes?

grim ice
#

btw

#

when i have a domain

#

eg

#

like

#

how would i access x and y thru x.com

vocal cloud
#

You have to reference them

clear raptor
#

Any idea why skullMeta.setOwningPlayer(Bukkit.getOfflinePlayer(player.getUniqueId())); works, but skullMeta.setOwningPlayer(player); not, when setting PLAYER_HEAD owner? When I not get OfflinePlayer, PLAYER_HEAD does not have right skin.

west oxide
#

hey,question

#

if i cancel a message event from a bungeee plugin will it just cancel on the server aswell right ?

maiden thicket
#

how does spigot load libraries from maven central? i see their library loader, they have their createLoader function, but how do i actually load in libraries?

#

i'm trying to use their system for something else

west oxide
maiden thicket
#

and i can't figure out how to actually load the library

left pine
#

Hello, can someone help me with a small problem?

west oxide
left pine
left pine
left pine
vocal cloud
#

Yep that floor is made out of floor

left pine
vocal cloud
#

I don't understand your problem

quaint mantle
fervent gate
#

Is it possible to create multiple borders in a single world?

crisp steeple
#

world borders?

fervent gate
crisp steeple
#

doubt it

#

you could make your own though

fervent gate
#

Because I want to create a world where each player has an island with a border. That one moves, but to create a world for each player would be killing the server

crisp steeple
#

packets would probably be the best bet in that situation

#

might be difficult though

fervent gate
#

Can you create something with packets that the player can't pass somewhere?

ivory sleet
#

Yes

#

But you should check the movement from the server itself also

fervent gate
#

seems like a daunting task as a whole

worldly ingot
#

I have a PR in the works for client-sided world borders

#

Just waiting on a bit more feedback, will probably refine tomorrow, hopefully merged within the coming days

ivory sleet
fervent gate
worldly ingot
#

I probably won't remember to do that ;p

fervent gate
#

haha no problem, I'll message you in a few days

worldly ingot
#

👍

crisp steeple
#

i don’t know

west oxide
#

its possible to cancel a message from bungee right ? just like on spigot

crisp steeple
#

ok so

#

what do you mean by canceling an message ever

west oxide
crisp steeple
#

like a chat event or a plug-in message event?

west oxide
west oxide
#

normal chat event

#

like saying hi in the chat

crisp steeple
#

just cancel the chat event

left pine
west oxide
vocal cloud
west oxide
crisp steeple
left pine
west oxide
# crisp steeple yes

whats the event please i looked for a while all i found is PluginMessageEvent and i dont think thats the one

west oxide
#

oh

#

thats a thing

#

thank you

crisp steeple
#

np

west oxide
west oxide
desert musk
#
  public static UUID getNest(String name) {
        //how do i do this?
        for (String nestID : Objects.requireNonNull(CustomConfig.get().getConfigurationSection("nests")).getKeys(false)) {
            if (Objects.equals(CustomConfig.get().getConfigurationSection(nestID + ".name"), name)) {
                if (name != null) {
                    return UUID.fromString(name);
                }
                System.out.println(nestID);
            }
        }
        return null;
    }```

||`/* config file
        nests:
            (NestUUID):
                name:
                level:
                members:
                    (MemberUUID):
                        role:
                        last-use:
                        respawn:
                            X:
                            Y:
                            Z:

*/`||
desert musk
#

how is this done?

#

the code does not work

dusk flicker
#

?notworking

undone axleBOT
#

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

desert musk
dusk flicker
#

not really

#

What's not working?

desert musk
#

🤷

desert musk
dusk flicker
#

okay, so debug it out, what is causing it to be null, you have two if statements, one printout, are you getting the printout? Add more, see what you are actually getting, etc

desert musk
#

I just figured people here might know how to properly search through yaml files

#

so am i doing it correctly from the looks of it?

#

or don't you know

#

but i'll continue to debug

dusk flicker
#

Im no expert in configuration sections, all I know is they can be a pain, I know others here know more but just running through basic debugging atm is the best

desert musk
#

yeah

left pine
desert musk
#

i'll get back once i have more details

dusk flicker
desert musk
#

i've already got the writing methods down

#

it's the breadth search that i don't know how to implement

#

and normal search for that matter:

#
    public static UUID getNest(UUID nestId) {
        for (String nestID : Objects.requireNonNull(CustomConfig.get().getConfigurationSection("nests")).getKeys(false)) {
            if (Objects.equals(CustomConfig.get().getConfigurationSection(nestID), nestId)) {
                return UUID.fromString(nestID);
            }
        }
        return null;
    }```
west oxide
#

hey isnt a chat message can only be sent by a Proxiedplayer ?

#

why do i have to cast it

#

and why is it Connection

ember estuary
#

cant console send chat messages too?
or am i thinking about a different chat

west oxide
#

console cant send that right ?

ember estuary
#

say abc

#

sure it can

west oxide
desert musk
#

java.lang.OutOfMemoryError: Java heap space

LMFAO what did i do wrong

west oxide
desert musk
#

i killed the server

west oxide
desert musk
#

is yaml really that mystical that i can't find a breadth search algorithm anywhere??

ember estuary
#

well, i thinks its obvious what it is, and theres docs on it, but i am wondering how u can get the player that sent the message

#

Shakiz i think u want PlayerChatEvent

#

or not?

west oxide
ember estuary
#

instead of ChatEvent

west oxide
#

nvm thats not a thing

ember estuary
#

use that, that should work as expected and sender will be player

#

not?

#

what version u using

west oxide
#

am on bungee

#

bungee plugin

ember estuary
#

ah oh

#

well then just cast it to proxiedplayer

#

check instanceof first tho!

#

or does one even need to? not sure xD

west oxide
sand vector
ember estuary
west oxide
#

and see if it does something

ember estuary
#

sure

desert musk
#

ok does anyone here know how to use yaml decently??

#

cause i sure don't

#

and it looks like nobody does

noble lantern
#

Yaml is quite easy tbf

sand vector
#

kinda

desert musk
noble lantern
#

breadth?

desert musk
#

yeah yeah

#

so like

#

hold on

noble lantern
#

Whats the word mean lmao

desert musk
#

you'll see

desert musk
#

the wall of text

noble lantern
noble lantern
#

do not use requireNonNull

#

null check it

desert musk
#

oh what's the difference

sand vector
desert musk
#

just if(!null) ?

noble lantern
#

if (thatSection == null) {
// log
return;
}

maiden thicket
#

is it possible to add to spigot's library loader on runtime

desert musk
#

ok

maiden thicket
#

or load extra libraries on runtime

noble lantern
#

Can you resend that chunk of code so i dont gotta keep scrollig up and jumping back and forth (After you add the null check)

desert musk
#

yeah sure

noble lantern
desert musk
#

was gonna but didn't wanna flood chat again

#

i wish you could make dropdowns with discord smh

noble lantern
desert musk
#
    public static UUID getNest(UUID nestId) {

        if ((CustomConfig.get().getConfigurationSection("nests")).getKeys(false) == null) {
            System.out.println("Null causeed fail 1");
        }

        for (String nestID : (CustomConfig.get().getConfigurationSection("nests")).getKeys(false)) {
            if (Objects.equals(CustomConfig.get().getConfigurationSection(nestID), nestId)) {
                return UUID.fromString(nestID);
            }
        }
        return null;
    }

#

`/* conifg file
nests:
(NestUUID):
name:
level:
members:
(MemberUUID):
role:
last-use:
respawn:
X:
Y:
Z:

*/`

noble lantern
desert musk
#

so what do i do instead? 🤷

noble lantern
#

getConfigurationSection() == null

desert musk
#

o

#

right

noble lantern
#

getKeys returns an iterable and will still throw a NPE if getConfigurationSection was null

desert musk
#

cool

#

so i was sorta doing it right?

noble lantern
#

sorta, yes

desert musk
#

just lmk where i messed up

noble lantern
#

one sec

#

imm rewrite this

desert musk
#

oke

#

i appreciate that

#

my stuff's still in the github i gave you if you need more code context

#

i'll push this rn

noble lantern
#

i added comments explaining everything i did

desert musk
#

omg thank you

#

alright awesome

#

i'll test this in a moment tho on something else

#

🙏

tall dragon
#

@noble lantern sorry to ping you. but do you happen to know a thing or 2 about syncing data accross servers?

#

since ive been struggling to find a good reliable way to have cross server data storage.

since players can easily change server in about a second, how do i make sure my data will be up to date on there :/

#

or maybe @quaint mantle :D

quaint mantle
#

just dont allow the client to connect until their data has been retrieved

noble lantern
#

^

tall dragon
#

hmm wont that be rlly annoying for the user?

noble lantern
#

it will be a millisecond or two for them

quaint mantle
ivory sleet
#

Redis allkeys lru cache + pub sub sync

quaint mantle
#

its just like the loading process for literally any other data store

#

youtube isnt instant

tall dragon
#

yea im using redis.

noble lantern
ivory sleet
#

Tho should be said redis isn’t reliable in pub sub/mq, sth like rabbitmq is superior and much more reliable in terms of data loss

winged anvil
#

wish i could figure redis out

ivory sleet
#

An in memory database

tall dragon
ivory sleet
#

The general idea when dealing with multiple cache factors is to be integrally disciplined

tall dragon
#

i didnt even know that was possible without just not allowing the login.

ivory sleet
#

I mean AsyncPlayerPreLoginEvent is blocking

noble lantern
tall dragon
ivory sleet
#

Last recently used

#

Since you know

#

Redis is in simple terms just a hash map

tall dragon
#

yea. a fancy one

#

but i yet still have the issue that another server does not know whether the data on redis is up to date.

ivory sleet
#

Lru is a way to configure it to automatically remove entries based on when an entry was last used

#

myes

#

So the idea is to have sth like
Local cache
Redis cache
Persistent database

#

and then whenever you want to perform a data fetch

#

If the value isn’t in the local cache, get it from the redis cache and put it in the local cache

If the value isn’t in the redis cache, get it from the persistent database and put it in the local cache and the redis cache

#

Then whenever you send an update through pub sub, all servers must clear (local caches) any data related to the given node that pub sub informs about

#

And then of course re-fetch from redis and potentially your persistence database

#

Of course in certain cases you might be able to take shortcuts (aka not having to entirely clear an entry from a local cache)

hasty prawn
#

caching hurt brain

ivory sleet
#

But this also comes with how much you prioritize up-to-date data

tall dragon
#

yea my brain is very much hurting right now.

#

data has to be up to date 100 % if possible.

ivory sleet
#

But yes in your design

tall dragon
#

so when a player joins a server. it bassicaly has to inform all other servers to send its local information about that player to redis.?

#

which could only be one other server

ivory sleet
#

It might be reasonable to split up the user object into different objects such as EconomyUser, FightingUser etc to avoid entire user reloads

tall dragon
#

yea i have that

tall dragon
ivory sleet
#

Well

#

Let me clarify

#

Whenever a spigot server manipulates the data of a player, it must then publish a message to the pub sub

Subscribers (other spigot servers) will then hear the update and let’s say you manipulated money, then all the other spigot servers would have to fetch the money from the user from the redis cache (or the persistence database if no data is found in the redis cache) this implies the other spigot servers would have to invalidate certain data in their local caches

fossil lily
#

Will this prevent xrandom and zrandom from being within an area?

tall dragon
ivory sleet
#

Yes but in case you get to that point

#

You just want to make sure redis is your primary cache, it should take precedence over local caches

tall dragon
#

sooo bassically ur saying to have player data cached in all servers locally?

ivory sleet
#

Well yes

#

I mean you almost always want that

#

As it’s a reliable way to quickly grab data (like a normal concurrent hashmap could be the local cache)

tall dragon
#

ah

#

so to sum it up, whenever a players data gets modified by a server -> sends update to all servers to "refetch" that piece of data

ivory sleet
#

Yeah well this of course depends exactly on what you’re doing

#

Let me perhaps ask you that first

tall dragon
#

well i have a lobby and 3 "game servers" those 3 servers have a local lobby as well where people can choose a team. its a game called Annihilation.

ivory sleet
#

Oh right

#

I believe hypixel used to use redis

#

Or well they still do

#

But they used it to send data mainly between servers

#

Not so much for caching, which is actually what redis is mostly about

tall dragon
#

but this is why i am sceptical about having local data about all players on all servers.

#

since when a player is playing somewhere hes not going to change suddenly

#

but like maybe when a game has ended

#

he could.

ivory sleet
#

Might not be necessary for you

tall dragon
#

ofc u also have hypickle skyblock

#

there i would go for that yea

worldly ingot
#

Redis' pub/sub was a God-send. It effectively mimics inter-server packets

ivory sleet
dusk flicker
#

redis pub/sub is great

ivory sleet
#

I believe they might use some sort of redis master slave thing

tall dragon
#

@worldly ingot any suggestions on how i could handle it? :D

ivory sleet
tall dragon
#

if a player quits a server i could send an update but idk if its fast enoughj

#

like it could happen to be not fast enough

ivory sleet
#

Just save necessary data on quit from game server #1 which then game server #2 picks up once the player joins

tall dragon
#

yea that was my plan. but will it save quick enough

ivory sleet
#

Hm

#

Mye well then redis would be fitting

#

I mean one way would be to catch it through the proxy

#

Where you could block the login until the data save from the previous quit has completed

tall dragon
#

how will that look for a user. tho

#

will he just see loading screen?

ivory sleet
#

Basically

tall dragon
#

how do u make somethng like that tho. thats done with a bungeecord plugin then?

ivory sleet
#

Yeah

#

Of course you’d still use redis to talk between the servers

#

But yeah

tall dragon
#

hmm

#

what a difficult problem haha

ivory sleet
#

Yeah truly intricate

tall dragon
#

would it be an idea to "invalidate" data on redis?

#

whenever a server updates some data locally

#

so other servers know the data is not yet saved

#

and can then wait for an update

maiden thicket
#

hey conclure- do you know how spigot's library loader works

#

like the actual code itself

eternal oxide
#

?stash

undone axleBOT
ivory sleet
#

Just so that whenever Conclure leaves, other servers just blocks it until they receive a message from pubsub telling them whether Conclure is allowed to join or not maybe?

ivory sleet
#

And then loads them

maiden thicket
#

im trying to replicate it and add the system to a module system i designed

ivory sleet
#

Oh

maiden thicket
#

downloading works, but i don't know how to load them in

tall dragon
ivory sleet
#

URLClassLoader basically

#

Take a look at how for instance LuckPerms does it ig or spigot for that part

maiden thicket
#

yeah i made a new urlclassloder

#

oh- which class does luckperms use

#

for that

ivory sleet
#

It uses url

maiden thicket
#

i meant where haha

ivory sleet
#

But it does some hacks with it

#

Ugh idr

maiden thicket
#

this ?

ivory sleet
#

Nope

tall dragon
ivory sleet
#

Yeah epic I was more thinking like

maiden thicket
ivory sleet
#

Yes

maiden thicket
#

but not all maven dependencies have main classes

#

i think

ivory sleet
#

Nope

#

Peek at the stash which Elgar linked ya

#

Believe it might elucidate things

#

onQuit(e){
saveData(e.player).future().get();
redis.publish(e.player+"S");
}

Map<player,lock> allowed
onRedisSub(msg) {
allowed.get(msg.player).unlock()
}

onAsyncLogin(e){
allowed.get(e.player).lock()
}

@tall dragon

#

Sorry I am kinda tired so heading to sleep for now

#

But basically that’s that

tall dragon
#

hmm

ivory sleet
#

And ye probably don’t wanna use lock there

#

But uhm, for instance a CountDownLatch

#

I can rewrite it a bit better tomorrow if you remind me by then :3 gn

tall dragon
#

i would really appreciate that.

#

good night :) thanks for any help you've provided already

fossil lily
#

How can I prevent an entity from walking into an area?

brave sparrow
pliant oyster
#

How can I make a leaderboard in a yml file,idk how to explain it that well

brave sparrow
pliant oyster
#

basically I store player data in a yml file, and I need to get the highest ints

vocal cloud
#

You can store it as a list

sharp flare
#

will this cause memory leak? method gets called on Player interact event and other events

sullen marlin
#

No

sharp flare
#

thats a great relief, thanks

maiden thicket
# sullen marlin No

hey md, what did u do to load the maven artifacts into the classpath from maven central

#

tried taking a look at the code for it but got lost

wet breach
#

used maven pom

maiden thicket
#

no i mean

#

the library loder

#

loader*

wet breach
#

just used a class loader

maiden thicket
#

i tried that and it would say classnotfoundexception

wet breach
#

java has api's for such things

maiden thicket
#

for example i used it for springboot and then used another jar i loaded on the same classpath to use the springboot api

#

and it gave a classnotfound

river oracle
#

how do I check if a chorus fruit is dead given the Block I'm assuming it might be something with Ageable, but not sure

#

eh guess we'lll figure it out lmao yea its ageable I'm just stupid

wet breach
maiden thicket
#

that's the "local maven repository" set apparently

wet breach
#

however, loading a jar via class loader isn't the way you use dependencies though

sharp bough
#

feels kinda complex

#

i just want to paste a schematic on world generation

#

on the quartz block

tranquil viper
#

Is anyone able to help me compile my gradle project? I use maven and am compiling someone else's code after I optimized it. Don't feel like actually learning gradle either :/

waxen plinth
#

Just run gradle build

tranquil viper
#

It says something about dependencies n stuff

waxen plinth
#

Or if you don't have gradle installed

#

./gradlew install

waxen plinth
tranquil viper
#

Yup was screenshotting it

waxen plinth
#

Does it not have the spigot repo

#

Oh I see

tranquil viper
#

I thought it did, although like I said I really don't know what I'm doing with gradle

waxen plinth
#

You need to run build tools for spigot 1.18.2 locally

#

So go do that

tranquil viper
#

Alright

#

Do I need to install git aswell?

river oracle
#

heyo anyone got an idea how I could see how many chorus fruit blocks are attached to the base block broken. I have tried crying, slamming my head against a wall and doing a few google searches.

tranquil viper
river oracle
#

ok i've tried this, but I'm stupid Ig I'll just take another crack at this tommorow nothing a little sleep can't fix

waxen plinth
#

huh

waxen plinth
#

ok dude

#

no you don't even need recursion

#

this is just breadth-first

crisp steeple
#

what if its on a different tree then

waxen plinth
#

One moment @river oracle

river oracle
#

recursion is how i've been doing all similar algorithms

#

I've spent too long on this lmao 30 minutes tryna figure out how to count chorus fruit stalks

brave sparrow
#

Lol

#

There’s nothing wrong with a recursive solution if that’s easier for them to write

waxen plinth
#
private static BlockFace[] FACES = new BlockFace[] {BlockFace.UP, BlockFace.NORTH, BlockFace.EAST, BlockFace.WEST, BlockFace.SOUTH};

public static Set<Block> getChorusTree(Block base) {
  Set<Block> seen = new LinkedHashSet<>();
  Queue<Block> frontier = new ArrayDeque<>();
  frontier.add(base);
  Material type = base.getType();
  while (!frontier.isEmpty()) {
    Block block = frontier.poll();
    if (!seen.add(block)) {
      continue;
    }
    for (BlockFace face : FACES) {
      Block rel = block.getRelative(face);
      if (rel.getType() != type) {
        continue;
      }
      frontier.add(block.getRelative(face));
    }
  }
  return seen;
}```
#

There you go

#

That should get the entire chorus tree from the root iteratively

#

You should avoid recursion where possible since it can be expensive

river oracle
#

hmmm never used a queue before should probably look into that

waxen plinth
#

Sometimes it's the best solution but I generally prefer iterative approaches

brave sparrow
#

It’s really not that expensive lol

waxen plinth
#

It can cause a stack overflow for deep trees

brave sparrow
#

It’s a micro-optimization, especially in this tiny tiny case

waxen plinth
#

Yeah it won't make a huge difference

brave sparrow
#

Yeah but that’s a whole different scale of data

waxen plinth
#

I still prefer iterative though

#

In this case it's likely not to make a difference at all

brave sparrow
#

Right

tranquil viper
brave sparrow
#

What is NMS support

tranquil viper
#

ah

river oracle
brave sparrow
#

That would appear to be the problem

tranquil viper
#

This isn't my plugin so I'm not entirely sure what's going on, still getting errors importing which I don't understand

#

I don't use gradle but I only get errors here

brave sparrow
#

Did you set up the dependencies properly?

tranquil viper
#

I cloned the project

#

So I would assume so

waxen plinth
#

It takes practice

#

But eventually this stuff will become like second nature

brave sparrow
#

You have to do more than just clone it

river oracle
waxen plinth
#

11 months is still rather fresh

tranquil viper
brave sparrow
#

Is it gradle?

tranquil viper
#

yup

brave sparrow
#

Is it maven?

#

Ok

tranquil viper
#

I know maven I just don't know gradle that's why I'm here haha

brave sparrow
#

Does the gradle have the spigot dependency in there properly?

river oracle
tranquil viper
brave sparrow
#

Have you run build tools?

tranquil viper
#

Project is split up like this. The files under "plugin" work fine, however, the files under "api" don't.

#

I believe I just ran BuildTools, yes.

brave sparrow
#

Let’s see the build.gradle for plugin then

lavish hemlock
#

Should be called "JACP" for "Just Another Crate Plugin"

brave sparrow
#

lol

tranquil viper
#
plugins {
    id("com.github.johnrengelman.shadow") version "7.1.2"
}

repositories {

    maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")

    maven {
        url = uri("https://repo.codemc.org/repository/maven-public/")
        content {
            includeGroup("de.tr7zw")
            includeGroup("com.gmail.filoghost.holographicdisplays")
        }
    }

    maven {
        url = uri("https://jitpack.io")
        content {
            includeGroup("com.github.decentsoftware-eu")
        }
    }

    maven {
        url = uri("https://papermc.io/repo/repository/maven-public/")
        content {
            includeGroup("io.papermc")
        }
    }

    maven {
        url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
        content {
            includeGroup("me.clip")
        }
    }

    maven {
        url = uri("https://repo.mvdw-software.com/content/groups/public/")
        content {
            includeGroup("be.maximvdw")
        }
    }
}

dependencies {

    compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")

    compileOnly("me.clip:placeholderapi:2.11.1") {
        exclude(group = "org.spigotmc", module = "spigot")
    }

    compileOnly("com.gmail.filoghost.holographicdisplays:holographicdisplays-api:2.4.9")

    compileOnly("be.maximvdw:MVdWPlaceholderAPI:3.1.1-SNAPSHOT") {
        exclude(group = "org.spigotmc", module = "spigot")
        exclude(group = "be.maximvdw", module = "MVdWUpdater")
    }

    compileOnly("com.github.decentsoftware-eu:decentholograms:2.2.5")

    implementation("de.tr7zw:item-nbt-api:2.9.2")
    implementation("io.papermc:paperlib:1.0.7")

    implementation("org.bstats:bstats-bukkit:3.0.0")

    // Api Module
    implementation(project(":api"))
}

tasks {
    shadowJar {
        archiveFileName.set("Crazy-Crates-[v${rootProject.version}].jar")

        val path = "com.badbones69.crazycrates.libs"

        relocate("de.tr7zw", path)
        relocate("io.papermc.lib", path)
        relocate("org.bstats", path)
    }

    processResources {
        filesMatching("plugin.yml") {
            expand(
                "version" to rootProject.version
            )
        }
    }
}```
sharp bough
#

bro sent the bible tf

#

?paste

undone axleBOT
tranquil viper
#

It's the build.gradle?

#

If you enjoy looking at that more

#

So..

brave sparrow
#

Yeah so plugin is using the spigot repo but api is using your maven local

#

Is spigot in your maven local?

tranquil viper
#

nope

#

So maybe I should just use repo for both?

brave sparrow
#

That would be my suggestion

tranquil viper
#

Alright I'll find some tutorials on it thank you ❤️

brave sparrow
#

Yw

glass mauve
#

How and where should I store Player Data

vocal cloud
#

yml, database. Depends on how much and how often

glass mauve
#

ok thanks, I will use yml bc its only a learn Plugin. And where should I save the yml?

fading lake
#

in your plugins config file

tranquil viper
#

Have jdk 17 installed but can't choose it as a compiler version?

glass mauve
#

really in the config file? I thought its for settings stuff like EnableNoFood: true or smth like that

tranquil viper
#

you make a file such as playerdata.yml

#

and it works the same way as a config file

glass mauve
#

ok thats nice thanks

tranquil viper
#

I personally prefer using mongodb for storing player data but not always practical

glass mauve
#

hm and how can I save smth on the file? I cant get the yml file with getConfig()

tranquil viper
#

then you can just create a new file with

public FileHandler config;
public FileHandler enabledpvp;

//in OnEnable
        try {
            config = new FileHandler(this, "config.yml", true);
            enabledpvp = new FileHandler(this, "enabledpvp.yml", true);
        } catch (IOException | InvalidConfigurationException e) {
            e.printStackTrace();
        }
#

true copys the defaults you type in the file

#

false makes it a blank file

glass mauve
#

oh thanks

tranquil viper
#
java: pattern matching in instanceof is not supported in -source 15
  (use -source 16 or higher to enable pattern matching in instanceof)
#

Anyone know this error?

rotund pond
glossy venture
#

its a compiler error

tranquil viper
#

Don't think it's related to the line, it's related to the compiler

#

I can't seem to get java 17 as an option to compile with

glossy venture
#
a instanceof b aCastToB
``` doesnt work with your source version for some reason
glass mauve
#

you need Java 16+ to use a instanceof b name

tranquil viper
rotund pond
#

That's what I thought

tranquil viper
#

Don't have access to 17

#

Not sure what to do?

glossy venture
#

do you use any build system?

tranquil viper
#

Don't even know, I'm using gradle for the first time and I hate it. I usually use maven.

glossy venture
#

for gradle try

sourceCompatablity = 16
targetCompatability = 16
#

i dont remeber exactly how

#

maybe put that in the compileJava task settings idk

tranquil viper
#

dk what that even is haha

#

Ill look it up

#

Didn't work

#

Any other ideas?

vocal cloud
#

You can manually install it?

ebon coral
sullen marlin
#

google outward spiral matrix java or something

ebon coral
#

Okay okay, appreciate it :)

rotund pond
ebon coral
#

Yeah but it's weird to start in the very corner of a world than the center.

rotund pond
#

Ah yeah okay

#

Ty 👍

granite owl
#

is this a good guard to lock commands to admin usage?

#
if (sender instanceof Player)
            {
                Player p = (Player) sender;
                if (!p.isOp())
                {
                    p.sendMessage(StandardMessages.getMsgByString("CMD_PERMISSION"));
                    return true;
                }
            }
#

StandardMessages.getMsgByString("CMD_PERMISSION") is my method to use the same standard messages across all plugins*

#

or is there a simpler one?

merry python
#

I had the same issue

#

2021.3.3 surely has it

tender shard
granite owl
#

and if u delete the team all permissions get auto deleted alongside it

#

and if i need new scoreboards ill serialize them myself

static hollow
#

Hi, can i do this better?

#
List<Location> glassLocations = new ArrayList<>();
glassLocations.add(loc.clone().add(0, 4, 0));
glassLocations.add(loc.clone().add(0, 5, 1));
glassLocations.add(loc.clone().add(0, 5, -1));
glassLocations.add(loc.clone().add(1, 5, 0));
glassLocations.add(loc.clone().add(-1, 5, 0));
glassLocations.add(loc.clone().add(0, 6, 1));
glassLocations.add(loc.clone().add(0, 6, -1));
glassLocations.add(loc.clone().add(1, 6, 0));
glassLocations.add(loc.clone().add(-1, 6, 0));
glassLocations.add(loc.clone().add(0, 7, 0));

for (Location glassLoc : glassLocations) {
    glassLoc.getBlock().setType(Material.GLASS);
}
tardy delta
#

Arrays.asList

static hollow
#

add doesn't set one time

#

I would have to subtract after that

tall dragon
#

ah yea i see, my bad

#

is that some kind of pattern of glass?

static hollow
#

yep

#

"cage" for player

tall dragon
#

you can probably also achieve that with some math & loop

static hollow
wet breach
#

how large of a box are you doing?

#

2x3x2?

static hollow
wet breach
#

I would just make it a nice square

#

only because looping wise, it is just easier

wary harness
#

how often does Bungee Messaging channel refreshes for new data?

wet breach
#

however fast your nic is

wary harness
#

if I am correct and there is whiled loop

#

which is checking if there is data to read

wet breach
#

well message channels use the connection the player has to the server.

wary harness
#

some thing like this

#

I use sockets for custom information transfering over multiple bungees

wet breach
#

ok?

wary harness
#

and thing is if you run while(true){if(!in.ready())continue;}

#

for example

#

it just kills cpu

#

so what I did I made runnable which checks every 10 ticks

#

if some data is ready to be read

wet breach
#

if you have a while loop killing your cpu for listening on a socket, then you are doing something wrong

wary harness
#

while(true){if(!in.ready())continue;}

wet breach
#

however, for custom sockets and what not I recommend using a daemon thread

wary harness
#

and it was running cpu on 90% to 100%

#

daemon thread ?

wet breach
#

probably shouldn't be messing with sockets if you don't know how to do threading

modern valley
#

what is the resource pack format for 1.18.1? (the one we write in the pack.mcmeta)

pliant oyster
#

anyone wanna help me I'm so confused

#

so basically

#

I store a uuid and a int inside a yml file for player data

#

and now I'm trying to make a leaderboard sort of thing and find out which uuids have the highest ints

#

and idk how to do that because all the data is in the yml file

#

I didnt store it to a hashmap

#

is there a way I can loop through every uuid saved and check the highest ints?

glossy venture
# static hollow Hi, can i do this better?
Location playerLoc = ...;

final Vector[] glassOffsets = new Vector[] {
  new Vector(0, 4, 0),
  new Vector(0, 5, 1),
  /* etc */
};

for (Vector go : glassOffsets) {
  Location glassLoc = playerLoc.add(go);

  world.getBlock(glassLoc).setType(Material.GLASS);
}
static hollow
#

thanks

pliant oyster
#

anyone wanna help me

tall dragon
#

?ask

undone axleBOT
#

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

pliant oyster
#

read up

tall dragon
#

load everything to a map, sort it

pliant oyster
#

do I save the hashmap to the yml file?

#

because rn I'm doing it without a map

tall dragon
#

so ur saving ur data directly to a file?

pliant oyster
#

yes

tall dragon
#

would not recommend that tbh

pliant oyster
#

yeah I learned that just now lol

tall dragon
#

because 1, in cases like this you will need to load everything into a map.

#
  1. its just bad for performance
pliant oyster
#

true

#

so should I redo it and put it all in a map?

tall dragon
#

i would cache ur data yea

pliant oyster
#

alr

tall dragon
#

then just save to file on shutdown & regular intervals

pliant oyster
#

alr

tardy delta
#

i guess the thing that you are saying breaks srp, the storage is not the piece of code that interacts with the database

#

i took a look at it again lol

grim ice
#

what did i say

tardy delta
#

then a class called SQLStorage implements Database, Storage

#

you were suggesting to create two interfaces: a storage one and a database one

grim ice
#

yes

#

and then a SQLStorage that obtains data from the sql database

tardy delta
#

i dont think its the responsability of the sqlstorage to also store the data in a type of cache

grim ice
#

it is imo

#

it provides your storage using sql

#

then a MongoStorage that provides storage with mongodb

#

maybe

#

i dont see how that breaks srp

#

if it had some another functionality like for example killing a player if they exist in a database

#

then that breaks srp

#

since it doesnt produce storage

#

and killing has no relationship to SQL or Storage

modern valley
#

I have a custom texture file in my resource pack which loads depending on the customModelData, but the texture doesn't work correctly It just shows a purple black block. But if a use a built-in texture suppose diamond, it works correctly. how can I fix this ?

tardy delta
#

something is wrong with your texture pack

#

anyways what methods should i put in the storage interface?

grim ice
#

well

tardy delta
#

you said to put the methods like loadUser in the storage interface which doesnt make sense

grim ice
#

what does loadUser do

#

does it give you information about the user

tardy delta
#

load the user from the database as it says

grim ice
#

if so put it in storage

#

if it doesnt give info about the user

#

in database

#

e.g getPoints()

#

will be in Storage

#

interface

tardy delta
#

some things doesnt make sense to me, the storage should be responsable for keeping the loaded objects in some sort of cache no?

grim ice
#

yeah

#

the storage uses loadUser()

#

and stores them in ur cache

tardy delta
#

it uses it but it doesnt define it in that place?

grim ice
#

no

#

the database is what loads the user

#

storage stores it

tardy delta
#

i dont think the database should interact with the storage itself 🤔

grim ice
#

it isnt

#

the storage is interacting with the database

#

or u can do

#

Storage(Database db)

tardy delta
#

mmye

grim ice
#

but keep that interface

#

SimpleStorage(Database db) implements Storage

#

SQLDatabase implements Database

tardy delta
#

lol i named the thing thats responsable for the database "storage"

#

and the storage "remotedatacache"

modern valley
tardy delta
#

do you have a json file referring to that custom png?

tardy delta
#

and a json file with the name of the item you want to replace + .json in the models/items directory?

modern valley
#

yea, I added it now it works 😄 tysm

pliant oyster
maiden briar
#

I want to get the next number dividable by 9 (for example I have 23 and I want to get 27), how to do so?

tardy delta
#

for loop

maiden briar
#

Ok the only option?

tardy delta
#

while loop

maiden briar
#

if(size % 9 != 0) is existing, I know

maiden briar
tardy delta
#
int i = 23;
while (i % 9 != 0) {
  i++;
}
sout(i);```
maiden briar
#

Ok sure, thanks

#

It is so easy

tardy delta
# grim ice SimpleStorage(Database db) implements Storage

imagine the storage would have a getUser(uuid) method, which interacts with the db if the user isnt present, the database has its response time so i worked with futures for my database methods so the getUser method would also need to return a future which makes t more complex

#

👉👈🥺

pliant oyster
#

anyone wanna not ?learnjava me and answer this, how do I sort a hashmap by values lmao, everything on google and youtube don't make sense to me

eternal night
#

You don't sort a hashmap

#

Hashmaps don't have the concept of order

pliant oyster
#

well how do I sort the values

eternal night
#

You can grab the values

tardy delta
#

what are you even trying to achieve?

eternal night
#

Stream those and call .sorted on the stream

#

Or store the values in a list

pliant oyster
pliant oyster
eternal night
#

Grab the entry set

#

new ArrayList<>(map.entrySet())

#

Then sort that list

#

Or stream the entry set

#

Really up to you

tardy delta
#

are there sorted maps?

wooden fable
#

Hey,

        final Listener listener = new Listener() {
            @EventHandler
            public void onClose(InventoryCloseEvent e) {
                if(Objects.equals(e.getInventory(), menu))
                    HandlerList.unregisterAll(listener);
            }

            @EventHandler
            public void onClick(InventoryClickEvent e) {
                if(Objects.equals(e.getClickedInventory(), menu))
                    e.setCancelled(true);
            }
        };

Is there any way to fix this problem:
'Variable 'listener' might not have been initialized'

pliant oyster
eternal night
#

Only really maps that are sorted by key

#

Values don't really make sense

tardy delta
#

ye

chilly haven
#

String enable = plugin.getConfig().getString("Class-Enable"); Here getConfig gives me a nullpointerexception But why tho?

tardy delta
#

plugin is null?

eternal night
#

Also shouldn't your Java runtime tell you what was null

#

Smells like 1.8

chilly haven
#

it is

#

1.8

tardy delta
#

mc 1.8?

chilly haven
#

ye

tardy delta
#

can you go to the shame corner please

chilly haven
#

what

#

1.8 is good

vocal cloud
#

denial

tardy delta
#

best thing i heard today

young knoll
#

Shame on you!
Shame on your cow!

eternal night
#

April fools on a new level

lapis widget
#

if you claim 1.9+ is good your in denial

vocal cloud
sonic cosmos
#
public void onCraft(CraftItemEvent event) {
...
  event.getRecipe().getResult().setAmount(1);
}

Why it doesnt work?

lapis widget
#

no @eventhandler

sonic cosmos
#

...

#

i have it but i dont paste it here

hexed hatch
#

you should like

#

paste the entire class

sonic cosmos
#
public class CraftItemListener implements Listener {

    @EventHandler(priority = EventPriority.LOW)
    public void onCraft(CraftItemEvent event) {
        Player player = (Player) event.getWhoClicked();

        if(!(event.getRecipe().getResult().getType().equals(Material.TNT)) && event.getRecipe().getResult().hasItemMeta()) return;

        for(int i = 1; i <= 9; i++) {
            if(event.getInventory().getItem(i) != null && event.getInventory().getItem(i).getAmount() < 64)
                event.setCancelled(true);
        }

        event.getRecipe().getResult().setAmount(1);
    }
}

young knoll
#

event.getInventory.setResult

#

You’re trying to change the recipe itself

#

Which is almost certainly immutable

tardy delta
#

.equals kek

sonic cosmos
#

it is for the test

tough crane
#

Hii , I have a problem with the libraries in the project structure of the open source plugins that I edit, can someone help me?

west oxide
#

is this how to check an object type ?

vocal cloud
#

yup

west oxide
#

ay ty

spring minnow
#

how can i store in a efficient way an item stack in something like a list or something?

#

because, if i do that by just storing the object, when the item changes, the .contains method won't recognize it anymore

midnight quarry
#

maybe add custom data to each itemstack

#

check out PersistentDataContainer

tardy delta
#

?dc

#

?pdc

spring minnow
#

oh that's actually a good way

#

i guess i'm stupid cuz i already knew about that but i just didn't think i could've use it xD

#

thanks

midnight quarry
#

np

sage dragon
hasty prawn
desert musk
#

trying to check for if any players enter a certain radius of an entity, what’s the best way to go about that?

#

and exist that radius i guess

vocal cloud
#

?jd-s

undone axleBOT
sage dragon
desert musk
#

yeah but what type of file should it be

#

like should it be a continual task

#

or is there some event type that i should use?

desert musk
#

tyty

#

taco man