#help-development

1 messages ยท Page 422 of 1

young knoll
#

Because the other classes arenโ€™t records

remote swallow
#

on my 1.19.4 jar, obsfucated it exsists

tender shard
#

don't you need a custom TypeAdapter for your class?

young knoll
#

Well, points for honesty

icy beacon
eternal oxide
#

then I suggest you learn. it's a type of class your decompiler doesn;t know about

remote swallow
icy beacon
#

didn't think of that

tender shard
#

talking to them is a waste of time, we already explained 7 times what the issue is, they just keep saying "my decompiler is not the issue"

tall dragon
#

.

#

bruv

young knoll
#

You mean like this

tender shard
#

we told you 8 times already, the issue is that your decompiler doesn't understand records

#

even md_5 told you that in your bug report

icy beacon
#

this feels like an extended troll

tender shard
#

yeah Imma block them now

icy beacon
#

LMAO

#

anyways

#

alex, do you know how to create a typeadapter? if not, that's fine, i'll look up a tutorial

remote swallow
#

you mean like this

eternal oxide
#

Because it can't understand it it can't de-compile it

remote swallow
icy beacon
#

yep, but I do need to override methods and i'm not sure what to put in their body

tender shard
#

it's like spigot's ConfigurationSerializable interface

icy beacon
#

thanks

tender shard
#

Gson's builtin "generic" serialization thing only works for public fields or stuff that has obvious getters/setters, iirc. might be wrong though

icy beacon
#

this'll be a long ass type adapter ๐Ÿ’€

remote swallow
#

ye

#

type adapters are painful

tawny remnant
young knoll
#

Because a player is not a projectile

#

You need to get the projectile and then get its shooter with getShooter

#

Then check if that is a player

quaint mantle
#

import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding;

public class MyMacro {

private static Minecraft mc = Minecraft.getMinecraft();
private static KeyBinding gKey = mc.gameSettings.keyBindJump;
private static KeyBinding aKey = mc.gameSettings.keyBindLeft;
private static KeyBinding wKey = mc.gameSettings.keyBindForward;
private static KeyBinding dKey = mc.gameSettings.keyBindRight;

public static void execute() {
gKey.setPressed(true); // press the 'g' key to enable
wait(1000); // wait for 1 second
gKey.setPressed(false); // release the 'g' key

  // repeat the following three actions
  for(int i = 0; i < 3; i++) {
     aKey.setPressed(true); // press the 'a' key
     wait(18000); // hold for 18 seconds
     aKey.setPressed(false); // release the 'a' key

     wKey.setPressed(true); // press the 'w' key
     wait(5000); // hold for 5 seconds
     wKey.setPressed(false); // release the 'w' key

     dKey.setPressed(true); // press the 'd' key
     wait(18000); // hold for 18 seconds
     dKey.setPressed(false); // release the 'd' key
  }

}, startTime, repeatTime);

private static void wait(int ms) {
try {
Thread.sleep(ms);
} catch (InterruptedException e) {
e.printStackTrace();
}
}

}

im trying to make a macro for skyblock ( garden )
18 sec a key, w for 5 sec, d for 18 sec, w for 5 sec again, repeat this loop also hold down the mouse button to break
but i can't make it into a .jar ๐Ÿ’€ can any1 help wtf i do now ive the codes already

remote swallow
#

you sure thats spigot?

young knoll
#

Itโ€™s not

oblique falcon
#

wwhat is public record lol

#

never heard of it

eternal oxide
#

in what context?

oblique falcon
#

in the screenshot above there is a text public record

young knoll
#

Itโ€™s just a class to hold data

remote swallow
#

everyone seems to be finding java 15 docs

eternal oxide
#

15 is when it was added

remote swallow
#

i love when paper user dev just decides to yeet nms classes

#

its like so fun

young knoll
#

Seems like a you issue

remote swallow
#

whats craft server in newer versions

young knoll
#

CraftServer

eternal oxide
#

craft server as it's bukkit

remote swallow
#

so fun

#

the even funner part was this worked like 3 hours ago

young knoll
#

Ew 1.17

#

Also canโ€™t you just read that from server.properties

remote swallow
#

idk

#

i totally didnt steal it from jefflib

eternal oxide
#

run a clean/mvn clean on your project

remote swallow
#

just did, now waiting for paper user dev to do its thing

eternal oxide
#

noobs using paper ๐Ÿ™‚

remote swallow
#

non noobs use gradle

eternal oxide
#

if you don;t like living in a cave like me

young knoll
#

Heh

#

Epic got noobed

tardy delta
#

gradle goes brr

remote swallow
#

josh shut, you use gradle too

tardy delta
#

who is josh

remote swallow
#

coll

tardy delta
#

i use gradle too and it goes brr

remote swallow
#

gradle is fun

#

very speedy

tardy delta
#

and thats everything

young knoll
#

I donโ€™t really find maven much slower

remote swallow
#

i also dont have to type 9 million tags to add 1 plugin

young knoll
#

But xml hurts to look at

remote swallow
#

mvn package takes 10 seconds normall

tardy delta
#

kotlin syntax hurts even more

remote swallow
#

gradlew build takes 2

young knoll
#

I mean

#

Both are basically the same thing

#

Gson is more common for data though

vocal cloud
#

JSON is faster than YAML

tender shard
#

since you should do IO stuff async anyway, it doesn't matter whether parsing takes 0.002 seconds or 0.004 seconds. I'd use YAML if it should be editable/readable for admins, otherwise it doesn't matter what you use

vocal cloud
#

Preferably a db impl if it's not going to be read by people

tardy delta
#

using gson to load 1100 files went brr

#

just did it manually

#

i have been scammed, i thought mc had 1000 items but there are only 700

lost matrix
#

My take:
Persitence: Json
Configuration: Yaml

molten hearth
#

my take: everything: json, dumb-proof: yml

remote swallow
#

i use toml for all my configs

tardy delta
#

bully this man out

echo basalt
#

For persistence I just use proprietary formats honestly

#

Unless I'm using a database

tardy delta
#

i always use a database apart for config files

#

recently switched to mongodb but the syntax bothers me

echo basalt
#

Just abstract it

tardy delta
#

in what way

worldly ingot
#

Some database interface with methods to get/set values, different implementations for different database architectures

worldly ingot
#

Yeah so exactly what you have now, but make that an interface and extract all the methods

#

Change that class to DatabaseMongo or something

tardy delta
#

i only have one storage type so i thought to not make an interface for that

worldly ingot
#

Generally a good idea to give server owners an option, especially for public plugins

#

I recently did it for VeinMiner, though I still don't support Mongo

eternal oxide
#

future proof

worldly ingot
#

I could, in theory, support it though lol

worldly ingot
#

๐Ÿ‘Œ perfect

sacred mountain
#

hello the java server is just so inactive i cant find anything so if anyone can help me with an offtopic question id really appreciate it:
I'm trying to make an online multiplayer turn-based game (inspired by chess.com), and it currently works as a standalone program, except i can't figure out why external clients cannot connect to my local socketserver. The structure is a relatively simple one (accept socket, create thread, do stuff).

I'm using a ServerSocket instance on my pc on a random port (55285 atm), and the client connects with my ipv6 and the port. It allows me to connect but no one else externally. Then i search stackoverflow and find something to do with pinging the address first, and figure out i can't even ping my own ipv6 (unknown host), so im a bit stuck.

Another idea i had in mind was to use some sort of database instead of a server

tardy delta
#

now that i look at it, it goes brr

sacred mountain
#

bit broad

#

which part

eternal oxide
#

didn't forward the port at your router

sacred mountain
tardy delta
#

wait ur hosting it on ur own pc?

sacred mountain
#

yeah which may be an issue

#

deciding whether to move it to an ubuntu machine

#

its just for me and my friends

tardy delta
#

and no need to flush after calling println afaik

sacred mountain
#

cropped out ip

#

locally, both client and server work

tardy delta
#

packet based programming ๐Ÿ˜

sacred mountain
#

is that a good thing?>

hazy parrot
#

Just quick suggestion, why dont you use smth more convinient, websocket for example

quaint mantle
sacred mountain
#

the program is a standalone java swing app

hazy parrot
#

Websocket instead of plain socket

sacred mountain
sacred mountain
#

nothing is on the web

hazy parrot
quaint mantle
#

Oh

hazy parrot
sacred mountain
#

just imagine it's a chess game, it's relatively similar

#

so it's not too complicated, but has to be realtime

hazy parrot
#

Websocket is the way

sacred mountain
#

ok i see it

#

hmm

hazy parrot
#

I have it implemented in some app, if you want I can send you

sacred mountain
#

sure that would help give me an idea on implementation

hazy parrot
#

It's just for sending server stats in real time

sacred mountain
#

it looks quite clean

hazy parrot
#

It's using javalin library ^^

sacred mountain
#

would this completely remove the server aspect

#

or do i still need that

hazy parrot
tardy delta
#

wait whats WebSocket used for?

#

Socket should be enough no?

sacred mountain
#

yeah i dont know

#

it's just my friends just get connection refused: connect as the error

hazy parrot
#

Plain java socket is oldschool

sacred mountain
#

yeah oldschool but idk how exactly to implement websocket

#

@ServerEndpoint(value="/chat/{username}")

#

that's the annotation on baeldung

hazy parrot
#

Yeah, it depends on library

sacred mountain
#

but i think it's implying through the explanation that i understand a lot more about sockets

#

i have a feeling i have the wrong end of it

#

We also specify the URI where the endpoint is deployed. The URI is defined relatively to the root of the server container and must begin with a forward slash:

quaint mantle
tardy delta
sacred mountain
#

no clue

quaint mantle
sacred mountain
#

is there a way to do it with just sockets?

quaint mantle
sacred mountain
#

instead of redoing it in another thing

quaint mantle
sacred mountain
#

because currently i am able to connect, just my friends arent

#

thats like the only problem

quaint mantle
sacred mountain
#

oh

quaint mantle
#

Also note, usually on sockets, you must specify an option or otherwise the socket will pretty sure close the in/out after a message has been sent

#

I don't remember which option was it, but was available on SSLSocket or smth like that (I haven't touch java sockets a long time ago)

#

?paste

undone axleBOT
tardy delta
#

what does that verified thing mean

quaint mantle
#

Args

icy beacon
#

who's bernardbertels

#

it sorta feels like they're post farming but idk

#

just on the verge of publishing premium plugins, they are

#

and they've been on spigotmc since 2018 lol

#

like i don't wanna berate them but they're acting weird

quaint mantle
tardy delta
#

hmm

quaint mantle
remote swallow
#

how do iget one of those

tardy delta
#

and whats the point of that?

quaint mantle
#

Security

#

And trustness

remote swallow
quaint mantle
#

You can configure your repositories to only accept signed pulls

#

So anyone except the person with the certificate can push

quaint mantle
remote swallow
quaint mantle
#

Or use the Ubuntu WSL

quaint mantle
#

You must generate one, read the point 2

tender shard
quaint mantle
tender shard
#

why? you sign every commit with it anyway

quaint mantle
#

Well, I actually tough it was not the public key

tardy delta
#

could be me

quiet ice
#

Signing is nice. if it is only for that badge

#

I sure as hell wouldn't have set it up if it was for nothing

quaint mantle
#

I didn't even know it gives you the badge of "verified" on each push ๐Ÿ˜‚

quiet ice
#

Sure, there is the security aspect but I don't think anyone is taking security seriously

sterile token
#

Hi, after some long sleeping and going early to bed. I get up with all my energy and i fixed mostly 90% of the redis library. Just having an NPE issue which i cant find the specific reason, because the property im triyng to get from the json, is there

quaint mantle
#

A lot, I made a runtime security checker for one of my plugins

sterile token
tardy delta
#

here you go: (void*) 0

quaint mantle
tardy delta
#

nullpointer

quiet ice
#

Do you mean that thing that is scheduled for removal?

quaint mantle
quaint mantle
tardy delta
#

SecurityManager

river oracle
#

SecurityManager

quiet ice
#

java.something.SecuritySomething

quaint mantle
#

Nono, I made a different thing

sacred mountain
#

guys

river oracle
#

Gals

sacred mountain
#

i did some painful router stuff, anyone available to test my applciation

quaint mantle
#

It checks the runtime to allow access some parts of the API of one of my plugins, as my plugin use a modular API (instead of allowing any plugin to access it)
It manages player accounts and some stuff, and I want to log everything is done in the API and who does it

remote swallow
sacred mountain
#

since my friends are all dead

tardy delta
#

my program didnt want to compile cuz i used the secutiry manager ๐Ÿ’€

sterile token
# quaint mantle Can you share the NPE?

Debugg messages:

[Jedis-Listener] Received from channel=plugin-sync sender=proxy-1 receiver= packet={"packet":"{\"user\":\"michael\",\"text\":\"Hi everyone\",\"uniqueId\":2}","sender":"proxy-1","receiver":""}

Exception is:

Exception in thread "pool-1-thread-1" java.lang.NullPointerException
  at dev.alex.net.redis.core.listener.RedisListener.onMessage(RedisListener.java:41)
  at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:156)
  at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:125)
  at redis.clients.jedis.Jedis.subscribe(Jedis.java:7908)
  at dev.alex.net.redis.core.services.BrokerService.lambda$new$0(BrokerService.java:32)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  at java.lang.Thread.run(Thread.java:748)
river oracle
sacred mountain
tardy delta
#

apache

quiet ice
remote swallow
#

apache a-something

sacred mountain
quiet ice
#

(aka UnsafeValues)

river oracle
#

No one can beat unsafe

quaint mantle
quaint mantle
sacred mountain
#

it makes me feel like such a cool and experienced programmer naming my methods "adapter" "parser" "validate"

#

when in reality it just like

river oracle
#

Lol

sacred mountain
#

splits a string

tardy delta
quaint mantle
sacred mountain
tardy delta
#

get the hell out of here error

sterile token
# sterile token Debugg messages: ```json [Jedis-Listener] Received from channel=plugin-sync sen...

Code of causing the issue:

@Override
public void onMessage(String channel, String data) {
  // Ignoring wrong channel
  if (!broker.getChannel().equals(channel)) return;

  // Parsing the payload
  Payload payload = broker.getRedis().getInfo().getGson().fromJson(data, Payload.class);
  if (payload == null) throw new RedisException("[Redis] An invalid payload was received");

  JsonObject packet = broker.getRedis().getInfo().getGson().fromJson(data, JsonElement.class).getAsJsonObject();

  System.out.println("[Jedis-Listener] Received from" + " channel=" + channel +
                " sender=" + payload.getSender() + " receiver=" + payload.getReceiver() + " packet=" + packet);

  // Ignoring self data
  if (payload.getSender().equals(broker.getServer())) return;

  // Ignoring wrong server
  if (!payload.getReceiver().isEmpty() && !payload.getReceiver().equals(broker.getServer())) return;

  // Parsing the packet
  Class<? extends Packet> type = broker.getPackets().getRegistered(packet.get("uniqueId").getAsInt()); // Line 41
  if (type == null) return;

  // Dispatching the packet
  broker.getEvents().dispatch(broker.getRedis().getInfo().getGson().fromJson(packet, type));
}
quaint mantle
sacred mountain
#

ngl

quiet ice
tardy delta
#

variables my man

sacred mountain
#

i made a whole library for myself. I used around 10% of the methods

sterile token
#

karma i sent the code of the RedisListener, i didnt do it before. Cuz discord has text limitations

quaint mantle
sacred mountain
#

just write in base65536

sterile token
tardy delta
#

what npe?

#

JsonElement#getAsInt?

sterile token
tall dragon
#

making a nice packet sending system with redis are we?

#

did that too once. whole bunch of fun

sterile token
sacred mountain
#

i once did it for multiserver stuff

#

like rank sync

#

made a whole core for a server that i never even played on ๐Ÿ’€

sterile token
#

Yes im doing this library, so then i can use it on many plugins i will code on a future

#

But so far need to find the explanation about the NPE

tall dragon
#

i did it with lettuce, like it way better

sterile token
#

Because the uniqueId element from the packet json is not null

#

It was first thing i checked from the debug

#

Karma algo i really aprreciate your help, you have been helping since yesterday

quaint mantle
#

What happens when you print packet#get(uniqueId) before reading it?

sterile token
#

Okay is giving NPE while parsing the element

quaint mantle
#

Maybe the packet is not being parsed correctly

#

What happens if you print directly the packet element?

#

Oh, you are already doing it

tall dragon
#

maybe the uuid is now invalid. when i did this i had the issue that redis did some weird stuff internally and my packets would end up different

quaint mantle
#

He's not using UUID, he's using ID

sterile token
#

lol how the fuck is null, the uniqueId if the payload received contains it?

#

If you see the packet json object, from the Payload contains the uniqueId property

quaint mantle
#

I think your packet is receiving some kind of "formatting"

Try fetching it like this:
packet.get("\"uniqueId\"")

sterile token
#

oh dont tell me its issue caused to primitives types

quaint mantle
#

I don't know

sterile token
#

Cuz i used to have something like this before but while getting another json object, from a json object

tall dragon
#

why is the data escaped like that

quaint mantle
#

I printed json from gson lot of times, and never seen it printing things such as \"key\": value

sterile token
tall dragon
#

print the json before u send as well

#

see what it looks like there

quaint mantle
#

I faced a similar problem, on javascript ๐Ÿ˜‚

sterile token
quaint mantle
#

The issue was I was storing a json object as string in another json, then stringifying, which was causing the object to be "stringified" twice

#

Or something like that

sterile token
#

oh ok

quaint mantle
#

But that's not the case, you are not setting json data in a json

#

You are sending a json

sterile token
#

Wait ill publisher code

#
@Override
public CompletableFuture<Void> publish(Packet packet) {
  return CompletableFuture.runAsync(() -> {
    Payload payload = new Payload(packet, redis.getInfo().getServer(), redis.getInfo().getGson());
    payload.setReceiver("");
    try (Jedis jedis = redis.getClient().getResource()) {
      jedis.publish(this.channel, redis.getInfo().getGson().toJson(payload));
     }
  }, redis.getInfo().getExecutor())
    .thenAcceptAsync((result) ->
      redis.getInfo().getLogger().info("[RedisBroker] Sent to channel=" + this.channel + " packet=" + packet.getUniqueId()))
    .exceptionally(error -> {
      throw new RedisException("[Redis] Packet " + packet.getClass().getSimpleName() + " couldn't be sent", error);
      }
    );
  }```
tall dragon
sterile token
tall dragon
#

right, just before you send it

sterile token
#

Just to see smth, i will replace Gson#toJson() to Gson#toJsonTree() on the publisher code

#

I cant find the problem tho

#

The json sent and received, are exactly the same

#

๐Ÿ’€

tall dragon
#

weirdly escaped?

sterile token
#

Yes

#

They are scaped like that while sending and receiving

tall dragon
#

how ru making ur gson

#

show me that

sterile token
#

the instance?

tall dragon
#

y

sterile token
#

ok

tardy delta
#

Objects.nonNullOrElseGet

tall dragon
#

try new GsonBuilder().disableHTMLEscaping().create()

#

psuedo code

#

not sure if thats exactly correct but along those lines

tardy delta
#

Objects.isNull lol

sterile token
#

ok

sacred mountain
#

GUYS IT WORKS

sterile token
#

has nothing to do with my issue

tardy delta
#

i should ask you

sacred mountain
#

sadly i have no friends to test the next part with

sterile token
#

My issue is something related to how json is being converted to string and then parsed back from String

tall dragon
sterile token
#

Same problem tho

tall dragon
#

hmm weird

sterile token
#

Yeah that why

#

Doesnt make sense, cuz the data being sent and recieved are the same

#

Also, if its a data parsing issue, must be giving issues while parsing the Payload object and not on that line

tall dragon
#

okay how are you parsing rn

sterile token
#

right

#

?paste

undone axleBOT
sterile token
tall dragon
#

can u try this?

final JsonParser parser = new JsonParser()

JsonElement json = parser.parse(jsonData);
sterile token
#

ok

#

For parsing the payload or packet?

tall dragon
#

huh

#

not entirely sure what this is about

sterile token
#

i add it to the packet parsing

sterile token
tall dragon
#

is that "packet" not already a parsed JsonObject?

sterile token
sacred mountain
#

anyone got any ideas on why my socket server throws an exception "Connection reset" when my friends close the program, but my own check (if reader.read() == -1) only works when I disconnect locally

tall dragon
sterile token
sacred mountain
#

saw that somewhere

#

it will always return true

sterile token
quaint mantle
sacred mountain
sterile token
quaint mantle
sacred mountain
#

according to some dude on stackoverflow that will always return true unless the server socket isnt working

sterile token
quaint mantle
#

Instead of parsing the JsonElement toString, what happens if you parse it through a Gson#toJson?

#

How can you null check this?

quaint mantle
#

Does redis#getInfo#getGson return a Gson object you've build?

sterile token
quaint mantle
#

Try creating a new gson instance, instead of using the redis one

sterile token
quaint mantle
#

In the publish method

#

Try creating a new gson instance

sterile token
#

ok

quaint mantle
#

And print the data before using the Jedis#publish method

sterile token
#

And same NPE tho ๐Ÿ˜ก

tall dragon
#

wait a second

#

shoulnt u be doing get element "packet" and on that get uniqueid?

sterile token
#

What?

#

also i forget to share the payload class ๐Ÿคฆโ€โ™‚๏ธ

#

I also try, using gson.toJson() , but the same problem

tall dragon
#
JsonObject obj = packet.get("packet").getAsJsonObject();
int id = obj.get("uniqueId").getAsInt();```
#

i mean this

quaint mantle
#

how do i set the texture property of a skull?

quaint mantle
#

You are right

#

The json string is "packet": {...

sterile token
#

Nop, now a different exception

#

๐Ÿ’€

tall dragon
#

well thats progress

#

xD

sterile token
#

shity jsons ๐Ÿ˜‚

tall dragon
#

which is why i did not use json for mine :>

sterile token
#

this is previous code i was using

tall dragon
#

that looks right

sterile token
#

that code was working perfect

#

I will move to that old code tho

#

And see what happens

#

Thanks tho

#

If have any other issue i will back, thanks a lot for both of you man

#

Now appeared conclure

ivory sleet
#

nvm

sterile token
#

oh haha

ivory sleet
#

my discord lagged

sterile token
#

hi conclure

ivory sleet
#

hai

sterile token
#

hru?

#

Im fine figthing against json parsing

ivory sleet
#

decent :>

sterile token
#

oh nice, did smth happened to U?

#

this discord really miss you, you are to be really good man here*

civic topaz
#
@Override
public List<Block> getRoadBetweenPlots(Plot firstPlot, Plot secondPlot) {   
  List<Block> blocksBetweenPlots = new ArrayList<>();         
  return blocksBetweenPlots;
}

@Override
public List<Block> getAllRoadBlocks() {    
  return this.allRoadBlocks;
}

Would anyone have an idea how I implement the getRoadBetweenPlots to get from the getAllRoadBlocks() method all the blocks that are between the two plots?

ivory sleet
#

lol, we have other talented people who help others here

sterile token
#

Also if you r making a plot plugin, you can make average of both of them WorldEdit and WorldGuard

#

So then you can allow people easly to enable plot mobs killins, commands, etc by the use of the world guard flags

civic topaz
sterile token
civic topaz
sterile token
#

Also take in care that Blocks are not weak reference, im not sure how to explain that

civic topaz
#

ehh okay? Thanks

tall dragon
tall dragon
#

meaning this?

quaint mantle
#

Maybe getting the center of both plots, and add x/z to both of them (plot size).
Get the space betwen those locations and then get the blocks in that space

civic topaz
tall dragon
#

and not these parts?

quaint mantle
civic topaz
tall dragon
#

ok what ur plot code looking like? im guessing you have some kind of Plot Object

tall dragon
#

what does getX, getY return

#

the corner of the plot perhaps?

civic topaz
# tall dragon what does getX, getY return
int x = (int) Math.floor((double) location.getBlockX() / (this.getPlotSize() + this.getRoadSize()));
int z = (int) Math.floor((double) location.getBlockZ() / (this.getPlotSize() + this.getRoadSize()));
tall dragon
#

hmm one way you could probably do it is to find the middle of the 2 locations

#

the 2 locations being plot 1's mdidle and plot 2's middle

#

that should effectively return you the middle of the road between those 2 blocks

tall dragon
#

then simply construct a rectangle of the appropiate size using that block

tall dragon
civic topaz
#

okay thanks

tall dragon
#

hope that makes sense ?

#

then u can just expand that middle block to the appropiate size to get the entire road

quaint mantle
#

Guys Can I Get Some Assistance Here

#

Its Very Important

tall dragon
#

well

#

ask

quaint mantle
#

And If Someone has been banned how do i undo it

tall dragon
#

Book Banning?

#

not familiar with what that even is

tardy delta
#

clearly sunday, my pr isnt getting accepted

#

saturdays are about 2 hours

remote swallow
# tall dragon Book Banning?

overloading a book with stuff so its too big for the server and means a player cant login without minecraft kicking them

tall dragon
#

wasnt that fixed?

#

i guess not ;d

#

well they could limit the amount of data a book can hold. im not there's already plugins out there that provide this functionality

#

or they could make it themself.

tardy delta
#

people got nothing better to do

civic topaz
tall dragon
#

next part would be a little tricky

#

u would need to get all the blocks around that location like this

#

but in order to do that you first need to figure out in what direction to expand

echo basalt
#

well, these are squares right

tall dragon
#

the part hes trying to get is a rectangle

echo basalt
#

ah

limpid nexus
#

Ray casting?

#

OH well thats what I know it as when i have used it in game development.

#

basically you use the player as the center point and shoot beams out and that gives you a general consesus of what is currently around you.

echo basalt
#

I'd rather use mathemathical functions for the plot road system honestly

#

as in

limpid nexus
#

Fair enough.

echo basalt
#

every 20 blocks there's a gap area of 5 blocks where it's road, type deal

#

you just gotta find patterns

#

or just asking chatgpt

tall dragon
echo basalt
#
public String getType(int x, int z, Dimensions plotDimensions, Dimensions roadDimensions) {
    // Calculate the size of each plot including roads and edges
    int plotSizeX = plotDimensions.width + roadDimensions.width;
    int plotSizeZ = plotDimensions.height + roadDimensions.height;
    // Calculate the position of the given coordinates relative to the plot area
    int relX = Math.floorMod(x, plotSizeX);
    int relZ = Math.floorMod(z, plotSizeZ);
    // Check if the given coordinates are within a plot
    if (relX >= 0 && relX < plotDimensions.width && relZ >= 0 && relZ < plotDimensions.height) {
        return "plot";
    }
    // Check if the given coordinates are on an edge
    if (relX == plotDimensions.width || relZ == plotDimensions.height) {
        return "edge";
    }
    // Otherwise, the given coordinates must be on a road
    return "road";
}
green prism
#

Help? Even if the Boat location is equal to one of the two endLine corners, it doesn't return true. I'm using 1.19.4

private boolean isInFinishLine(Location location, Map.Entry<Location, Location> endLine) {
        System.out.println(Commons.getStringLocation(location) + " COMPARED TO " + Commons.getStringLocation(endLine.getKey()) + " AND " + Commons.getStringLocation(endLine.getValue()));

        Location corner1 = endLine.getKey();
        Location corner2 = endLine.getValue();

        // Create a BoundingBox object with the two corners
        BoundingBox boundingBox = BoundingBox.of(corner1, corner2);

        // Check if the location is inside the bounding box
        return boundingBox.contains(location.toVector());
    }```
tardy delta
#

ok if i can trust this site

#

๐Ÿ’€

late sonnet
#

Not รฑ?

echo basalt
#

well

#

shouldn't matter much but still

green prism
# echo basalt shouldn't matter much but still

This was my old method, it doesn't work as well

private boolean isInFinishLine(Location location, Map.Entry<Location, Location> endLine) {
    Location corner1 = endLine.getKey();
    Location corner2 = endLine.getValue();

    double minX = Math.min(corner1.getX(), corner2.getX());
    double maxX = Math.max(corner1.getX(), corner2.getX());
    double minY = Math.min(corner1.getY(), corner2.getY());
    double maxY = Math.max(corner1.getY(), corner2.getY());
    double minZ = Math.min(corner1.getZ(), corner2.getZ());
    double maxZ = Math.max(corner1.getZ(), corner2.getZ());

    return location.getX() >= minX && location.getX() <= maxX
        && location.getY() >= minY && location.getY() <= maxY
        && location.getZ() >= minZ && location.getZ() <= maxZ;
}
echo basalt
#

maybe Y level checks?

#

like just print out the values and see what's going wrong honestly

green prism
dry yacht
# quaint mantle How Can I Stop People From Book Banning On My Server

Check the player inventory for books in the PlayerLoginEvent and just remove the book if it's malicious. For stopping the creation of these books, you can also just check the book in the PlayerEditBookEvent. I guess that's all you can do. You could also remove all malicious books at once in a little maintenance period where you just iterate and process all player data files, that's up to you tho.

echo basalt
#

floating number stuff

#

maybe

#

how are you printing such values

green prism
#
    public String getStringLocation(final Location l) {
        if (l == null) {
            return "";
        }
        return l.getWorld().getName() + ":" + l.getBlockX() + ":" + l.getBlockY() + ":" + l.getBlockZ();
    }
    private boolean isInFinishLine(Location location, Map.Entry<Location, Location> endLine) {
        System.out.println(Commons.getStringLocation(location) + " COMPARED TO " + Commons.getStringLocation(endLine.getKey()) + " AND " + Commons.getStringLocation(endLine.getValue()));

echo basalt
echo basalt
green prism
# echo basalt print the absolute XYZ, not the floored block version

smth like this?

        System.out.println("Location: " + location.getX() + ", " + location.getY() + ", " + location.getZ());
        System.out.println("EndLine Start: " + endLine.getKey().getX() + ", " + endLine.getKey().getY() + ", " + endLine.getKey().getZ());
        System.out.println("EndLine End: " + endLine.getValue().getX() + ", " + endLine.getValue().getY() + ", " + endLine.getValue().getZ());
echo basalt
#

well

#

with less ugly code

green prism
#

haha

green prism
# echo basalt with less ugly code

[17:57:50 INFO]: [BoatRaces] [STDOUT] Location: 122.57116997185557, 74.0, -517.8404439255617
[17:57:50 INFO]: [BoatRaces] [STDOUT] EndLine Start: 122.0, 74.0, -520.0
[17:57:50 INFO]: [BoatRaces] [STDOUT] EndLine End: 122.0, 80.0, -518.0

#

well

#

I could cast int and the problem should disappear

echo basalt
#

well

green prism
#

well

echo basalt
#

your Z axis is off

green prism
#

but it isn't idk

echo basalt
#

hm

#

maybe check if the boat's hitbox intersects yours

green prism
#

wa

#

what?

echo basalt
#

like

#

instead of just checking if the boat's location is within bounds

#

check if any part of the hitbox is

green prism
#

how is it possible?

echo basalt
#

boat.getBoundingBox().contains

#

type deal

#

you might need to rotate the hitbox by whatever

green prism
#

smth like this?

        Location corner1 = endLine.getKey();
        Location corner2 = endLine.getValue();

        // Create a BoundingBox object with the two corners
        BoundingBox boundingBox = BoundingBox.of(corner1, corner2);

        atomicreturn boat.getBoundingBox().contains(boundingBox);```
#

Well, it's not working

serene sigil
#

how to make an npc (Citizens api) look at wherever you are standing, but it appears client side only, so its different for each player

echo basalt
#

boundingbox.contains(boat.getBoundingBox

echo basalt
serene sigil
#

wdym?

echo basalt
#

npc.getOrAddTrait(LookClose.class)

serene sigil
#

just that?

green prism
echo basalt
#

still not?

green prism
echo basalt
#

lovely

#

try using my Cuboid#contains(Cuboid other) method instead

#

it does partial inclusion

#

instead of full inclusion

green prism
#

So, you're suggesting me to copy-paste a whole class just for a method!?
Sure, no problem ๐Ÿ™‚

echo basalt
#

p much

#

you can just copypaste the method and make it fit BoundingBox, up to you

green prism
#

how does it work?

#

private boolean isInFinishLine(Boat boat, Map.Entry<Location, Location> endLine) {
Cuboid cuboid = new Cuboid(endLine.getKey(), endLine.getValue());
return cuboid.contains(boat.getLocation());
}

echo basalt
#

it literally just checks if any of the axis intersect

green prism
echo basalt
#

yeah that works

#

actually

#

BoundingBox boatBox = boat.getBoundingBox()
Cuboid boatCuboid = new Cuboid(boatBox.getMin(), boatBox.getMax());
return cuboid.contains(boatCuboid)

echo basalt
#

grr

#

make a constructor

green prism
#

pretty sure that the method doesn't actually exist

#

Okay haha

echo basalt
#

literally the same as the location constructor

green prism
#

YOU'RE AMAZINGGGGG

#

thank you

#

so

#

so

#

much

echo basalt
#

:)

latent depot
#

Any way to create dynamic resource packs? Basically I'm writing a small lib and would like to change the server resource pack based on if another plugin called a function in mine

tardy delta
#

could just include all those textures in the resource pack and bind it to custommodel data

#

if its about items tho

#

not sure about other stuff

latent depot
#

not something I can do, I'm afraid

#

(due to how my plugin works)

eternal oxide
#

dynamic RP would only be possible if your MC server/plugin has access to your hosted website to upload files.

latent depot
#

hm

#

I'll see if something's possible, but I'm not sure how this would work if I'd like to share the plugin

patent socket
#

Bump, please reply to me or ping me if you have an answer

eternal night
#
    private Dialogue plugin;

-    public DialogueCommand() {
+    public DialogueCommand(final Dialogue plugin) { 
        this.plugin = plugin; //here
    }
remote swallow
eternal night
#

damn ๐Ÿ˜ญ

rough drift
#

How could I depend on multiple nms versions when using moj maps?

eternal night
#

maybe I'll join you on the ignored list epic kekw

eternal night
#

^

rough drift
#

It's that time again

#

new module time babyyy

remote swallow
#

maven or gradle

rough drift
#

nah I know how

remote swallow
#

ah

rough drift
#

you know what

#

I'll deal with nms later

#

It's not important rn actually

#

(Can't be bothered to set it up lmfao)

remote swallow
#

no idea, havent touched redis

sterile token
#

Oh my has

#

I confused you

#

With the other guy who was helping me today

#

The pink color confused me

sterile token
patent socket
eternal night
#

you'd pass this

#

which is the instance of Dialoge you want

#

or well, your main class

undone axleBOT
sterile token
#

Doesn't he need to use di?

#

Yeah i suppoused someone was going to tell him that

patent socket
tawdry echo
#

When you set parameters in constructor then you need to provide when you use, its logical

gleaming pulsar
#

Is it possible to get the tags of an entity in java code here? (Example, if I kill an enemy, and it has tag "moebius", award 50 exp)

/summon minecraft:zombie ~ ~ ~ {CustomName:'[{"text":"Z"}]',Health:300,Tags:["moebius"],Attributes:[{Name:"generic.attack_damage",Base:8f},{Name:"generic.max_health",Base:300f}],display:{Name:'[{"text":"Z","italic":false}]'}}
patent socket
#

Ok, so my plugin command is fully developed. However, how can I make it show up to be used in a command block?

dry yacht
remote swallow
#

need to use 127.0.0.1

#

shouldโ„ข๏ธ be able to

tardy delta
#

why do you need mysql if its for localhost anyway?

hazy parrot
#

Why not

tardy delta
#

mongo syntax is shit

#

and i use sql

patent socket
civic topaz
patent socket
#

So I have a command which utilizes the args[0] and args[1] values. However, is there any way I could make args[1] be the rest of the arguments merged into one, because args[1] will contain spaces, and spaces separate arguments?

eternal oxide
#

String.join

patent socket
# eternal oxide String.join

Right, but can it automatically join the rest of the arguments, like can String.join join the values of args[1] through args[100]?

tall dragon
#

if u rlly want to keep it in an array u can use Arrays.copyOfRange(array, from, to) but not sure why you would want that

tardy delta
#

would it make sense to spread parsing 1000 json files out to a forkjoin pool?

#

should probably benefit cuz its io?

patent socket
#

I am using this line player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(this.word)); Can player be something like @a or @r?

smoky oak
#

uuid aint a string, maybe its getting hung up on that

tardy delta
#

it needs a.. ..K

dry yacht
quaint mantle
#

sorry for the caps

river oracle
#

?eventapi

undone axleBOT
smoky oak
#

does anyone know why my logger just... stopped working? a restart fixed it but it was still a very weird glitch
the last message in the logs was me executing a command, but when i tried /plugman reload it didnt show that one

steep scroll
#

I am trying to make certain blocks incapable of dropping items. I do not know what is going on.

#

`@EventHandler
public void onBreakBlock(BlockBreakEvent e){
if(e.getBlock().getType() == Material.IRON_BLOCK ||
e.getBlock().getType() == Material.GOLD_BLOCK ||
e.getBlock().getType() == Material.GOLD_ORE ||
e.getBlock().getType() == Material.DIAMOND_BLOCK ||
e.getBlock().getType() == Material.EMERALD_BLOCK ||
e.getBlock().getType() == Material.IRON_ORE ||
e.getBlock().getType() == Material.DIAMOND_ORE ||
e.getBlock().getType() == Material.COAL_ORE ||
e.getBlock().getType() == Material.EMERALD_ORE ||
e.getBlock().getType() == Material.NETHERITE_BLOCK ||
e.getBlock().getType() == Material.RAW_GOLD ||
e.getBlock().getType() == Material.RAW_COPPER ||
e.getBlock().getType() == Material.RAW_IRON ||
e.getBlock().getType() == Material.TNT ||
e.getBlock().getType() == Material.CHEST ||
e.getBlock().getType() == Material.CHEST_MINECART ||
e.getBlock().getType() == Material.TRAPPED_CHEST){
e.getBlock().getDrops().clear();

    }`
eternal oxide
#

make a Set

#

also ^

patent socket
eternal oxide
#

args.length

quaint mantle
undone axleBOT
eternal oxide
#

String.join(" ", Arrays.copyOfRange(args, 1, args.length -1)))

quaint mantle
#

Dude am not gonna learn lava for some simple thing

weak meteor
#

๐Ÿ’€

river oracle
#

?services

undone axleBOT
quaint mantle
#

bruh

river oracle
#

you can't just create stuff without code

smoky oak
river oracle
smoky oak
#

Unreal

patent socket
quaint mantle
river oracle
quaint mantle
#

You still need to know what you are doing tho

#

Otherwise blueprints are useless

#

Trying to code without knowing to code, is like trying to make a fire, without knowing what fire is

#

You may eventually make fire, and learn what fire is, but is better to learn, then apply this knowledge to expand your first knowledge

smoky oak
#

shhh

#

let him suffer

quaint mantle
#

Poor man ๐Ÿ˜ˆ

river oracle
#

in the age of technology! One needs to obtain knowledge!

quaint mantle
#

Literally internet is the base of knowledge, also you must be cautious, but still

smoky oak
quaint mantle
winged anvil
river oracle
#

nah

#

I don't use vim

quaint mantle
#

How to close vim editor, please help ๐Ÿ˜ข

smoky oak
#

:q

quaint mantle
#

No one knows

quaint mantle
#

There Has To Be A Public Fix Out There Somewhere

winged anvil
#

vims fire

smoky oak
smoky oak
#

by increasing the 3MB limit to 30 lol

cinder spindle
#

Hey, can you help me?

smoky oak
#

so its still possible but literally 10X harder

quaint mantle
#

well

#

fuck mojang

quaint mantle
#

it aiant fixed

winged anvil
smoky oak
quaint mantle
#

my server willl be still in danger

#

for a while

quaint mantle
#

Isn't there any log or smth?

#

I mean

#

The spigot log file

#

Maybe the issue is only on the console

smoky oak
#

well it is but

#

command line should be more robust than this bruh

#

[19:46:49] [Server thread/INFO]: Moterius issued server command: /crate forceopen testcrate Moterius
[19:47:42] [Server thread/INFO]: Moterius issued server command: /plugman reload EnchantmentShards
it stopped logging between those two lines

#

it is still in the log file itself after the server stopped

river oracle
#

but yeah bookban was fixed in 1.14

#

iirc

quaint mantle
smoky oak
#

for a certain definition of 'fixed'

quaint mantle
#

wtf

#

who used that suck ass version

quaint mantle
#

Plugman is very old

dry yacht
quaint mantle
#

@dry yacht am sorry for this attiude

#

just book banning is ruining my server

smoky oak
quaint mantle
#

and am furious

smoky oak
#

the commands worked

#

the logger stopped writing to console

quaint mantle
#

Well, you only have one option ๐Ÿ˜ˆ
Create your own logger (jk)

I have no idea of what could be happening

#

I'm pretty sure is plugman

#

But there's no reason for it to be causing it

smoky oak
#

well then why did it work earlier

dry yacht
quaint mantle
#

If we only had logs of logger

smoky oak
#

nods sagely

quaint mantle
#

Not joking, we could see what's going on backend

smoky oak
#

log settings to finest maybe

quaint mantle
#

Hmmm

#

I don't think that would fix the problem

#

In fact it would be worst, you would see almost anything in console

smoky oak
#

exactly

#

thats the point

quaint mantle
#

Maybe the loading of your plugin is throwing something

#

After runing that, doesn't the server eventually crash?

smoky oak
#

why would it

#

that just means the plugin doesnt load

quaint mantle
#

Wait, that's something

#

After running the reload, the server works fine?

#

Like, you can join and run other commands

smoky oak
#

well yes

#

like i said

#

the issue is the logger suddenly stopping writing to console

quaint mantle
#

After reloading your plugin with plugman

smoky oak
#

when, not after

#

and after it worked a few times beforehand

quaint mantle
#

I have literally no idea what's going on

eternal oxide
#

why would you want the string size though?

tardy delta
#

hmm a forkjoinpool is kinda useless when you just submit a runnable right

patent socket
#

I am using this line player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(this.word)); Can player be something like @a or @r?

tardy delta
#

theres a method in the Bukkit class for that

smoky oak
#

what does a forkjoinpool do anyways

tardy delta
#

selectEntities

#

it steals work from other workers

#

as far as i know

#

could probably use a normal threadpool

#

rn it takes a second to load 1100 files

quaint mantle
#

guys

#

any way to clear someone's inv while their offline

eternal oxide
#

yes but not easily. either use NMS/GameProfile or direct edit the player dat file

eternal oxide
#

then no ๐Ÿ™‚

river oracle
#

delete the player data file

tardy delta
#

uhh how would that possibly throw an interrupted exception?

worldly ingot
#

shutdownNow() on another thread

tardy delta
#

probably want to call shutdown but i also want to block it

young knoll
#

Shutdown the OS

#

That'll make sure it shuts down

tardy delta
#

cause an access violation in the jvm uwu

#

alex is a specialist in that

#

people dont understand m2 is just the form factor

#

:(

#

256 isnt much

light parcel
#

Is PlayerQuitEvent called no matter how a player is disconnected i.e. even if kicked or an exception occurs?

eternal oxide
#

if your laptop can support it get a second HD

#

SSD

#

kepe your OS and apps on main, then all data on second

#

disable any swap files on the primary SSD

tardy delta
#

how does that work bruh

#

reader closed ig

#

ah yes loaded 874 files in 244ms ๐Ÿ’€

#

how is it still 234ms when i give it 100 threads

#

dont question the 100 threads

twilit roost
#

Im confused af
I even tried doing my own get

viral temple
#

what version added config comments support? was it 1.18?

remote swallow
#

one of the 1.18's

#

yaml comments

#

YamlConfig.setComments and stuff

eternal oxide
#

yaml comments are #

viral temple
hazy parrot
#

He is asking about parsing

twilit roost
#

is there some event when server under proxy connects onto proxy?

warm mica
#

the cpu is doing nothing else than waiting, more threads just make it wait more

tardy delta
#

and what if i add all those paths to a list and then distribute it to a threadpool?

#

lemme guess, that wont do anything

tawny remnant
cinder spindle
#

Hey, can you help me?

tardy delta
#

did you execute package?

cinder spindle
#

oops I didnt

tardy delta
#

what returns null

tawny remnant
#

when do you toggle the boolean

tardy delta
#

a boolean cannot be null

#

paste entire stacktrace

#

yes

#

?paste

undone axleBOT
torn shuttle
#

uh quick sanity check, do placed banners on the ground count as blocks for the block they are in?

tardy delta
#

is dataEvents null?

torn shuttle
#

ah I think I found the issue, accidentally eval'ed a blockstate with a material

gilded tangle
#

Do any of you know how this is in 1.19.3? In the 1.16.5 this had still worked ๐Ÿ˜ฌ

tardy delta
#

ah WindowsDirectoryStream#iterator goes brr

worldly ingot
#
  1. That class still exists, just make sure your dependency is correct. Maven/Gradle is preferred because it handles dependency magic for you
  2. What's wrong with Bukkit#setMotd()?
young knoll
#

Smells funny

tardy delta
#

i thought that was minestom for a sec

#

it has MinecraftServer.getServer() too

young knoll
#

It's as if NMS is the same

#

Well maybe, idk if they followed mojangs naming

worldly ingot
#

I sincerely doubt it, but what else do you call a class that represents a server for Minecraft?

gilded tangle
worldly ingot
#

Oh, my bad. It's under the ServerListPingEvent lol

#

If you listen to this event, you can call setMotd() there instead

gilded tangle
#

I would have to change it in the PlayerQuitEvent

worldly ingot
#

Why's that?

gilded tangle
#

My system does get from the motd information how a game has ended

worldly ingot
young knoll
#

Big brain

#

MOTD as data storage

worldly ingot
#

If you're trying to do some cross-network stuff, that sort of information should be kept in a database. Redis, SQL, something of the like

young knoll
#

Well, data transfer

worldly ingot
#

Probably Redis for the sake of fast, in-memory key-value pairs. Or pub/sub for that matter

gilded tangle
#

Just started with programming xd

tardy delta
#

:o

sleek pond
#

Interesting that you chose motd as your storage medium lmao

young knoll
#

It's creative, I'll give them that

gilded tangle
#

Also found this in a plugin from 1.16, do you guys have any ideas for this? :/

worldly ingot
#

Don't even really know why that exists. Seems all the wool is separate anyways

#

It depends on where it's used

tawny remnant
warm mica
#

This annoys me since years

warm mica
terse ore
#

one quesiton guys, I made a custom world generation but when the server restarts it just resets the way it generates to vanilla Minecraft, what could be a way of making it permanent

#

setting the world generator every time the plugin gets enabled?

eternal oxide
#

set it in onLoad not onEnable

warm mica
#

I think multiverse has a feature for that

terse ore
#

what about the bukkit generator: thingo in bukkit.yml

eternal oxide
#

You have to set it before worlds load

terse ore
#

would that be a good idea? (never used it btw)

terse ore
#

how do I set a world a world creator?

young knoll
#

You don't

#

A worldcreator makes/loads a world

terse ore
#

hmm

tawny remnant
terse ore
#

it will load the world as it already exists?

young knoll
#

Yes, that is how you load it

#

Kinda weird but

terse ore
#

would it clone it or load it?

young knoll
#

public World createWorld()
Creates a world with the specified options.

If the world already exists, it will be loaded from disk and some options may be ignored.

#

Load

terse ore
#

hmmm

#

ty

#

I still need to get better at reading docs

gilded tangle
#

Last error in the plugin, does anyone have an idea how I can update this?

warm mica
#

There is literally no benefit in doing that

gilded tangle
#

A friend of mine wrote the plugin back then, my task is just to get it working again xd How can I do that without nms? ๐Ÿ˜ฎ

warm mica
#

Using e.g. world.getBlock(x, y, z).setType(color, applyPhysics);

#

Spigot automatically creates the blockdata for you, meaning that you actually also don't need the map

#

You are now setting the type twice, this doesn't make sense

#

Oh

patent socket
gilded tangle
#

world.setBlockData(location, blockData);
is red underlined ๐Ÿ˜ฆ

#

1.19.3

#

oh

undone axleBOT
gilded tangle
#

do not understand what you mean :/

#

i use BlockData

patent socket
#

How can I send an error message if only one out of two arguments are provided?

gilded tangle
#

oh

#

sorry

patent socket
#

I am using this line player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(this.word)); Can player be something like @a or @r?

kind hatch
#

That was eclipse? lol It looks like the default intelliJ colors.

tall dragon
#

the code highlighing is clearly eclipse tho

gilded tangle
#

ok sorry my mistake, have imported the correct now ๐Ÿ˜ฌ

terse ore
#

world already exists

[23:35:08 INFO]: [Generation] Loading deep_dark
[23:35:08 ERROR]: [Generation] Error initializing plugin 'Generation-1.0.jar' in folder 'plugins' (Is it up to date?)
java.lang.IllegalStateException: Cannot create additional worlds on STARTUP
        at com.google.common.base.Preconditions.checkState(Preconditions.java:502) ~[guava-31.1-jre.jar:?]
        at org.bukkit.craftbukkit.v1_19_R2.CraftServer.createWorld(CraftServer.java:1164) ~[purpur-1.19.3.jar:git-Purpur-1930]
        at org.bukkit.Bukkit.createWorld(Bukkit.java:782) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.WorldCreator.createWorld(WorldCreator.java:474) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at dev.akex.generation.Generation.onLoad(Generation.java:58) ~[Generation-1.0.jar:?]
        at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:59) ~[purpur-1.19.3.jar:git-Purpur-1930]
        at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:18) ~[purpur-1.19.3.jar:git-Purpur-1930]
        at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:36) ~[purpur-1.19.3.jar:git-Purpur-1930]
        at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[purpur-1.19.3.jar:git-Purpur-1930]
        at org.bukkit.craftbukkit.v1_19_R2.CraftServer.loadPlugins(CraftServer.java:442) ~[purpur-1.19.3.jar:git-Purpur-1930]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:309) ~[purpur-1.19.3.jar:git-Purpur-1930]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1117) ~[purpur-1.19.3.jar:git-Purpur-1930]
young knoll
#

I believe you just canโ€™t load worlds that early

#

I could be wrong tho

terse ore
#

When should i load them?

young knoll
#

Not startup

#

Use the standard POSTWORLD load

terse ore
#

idk what's theat let me gooogle

young knoll
#

Itโ€™s the default value for load:

tardy delta
#

๐Ÿ’€

patent socket
young knoll
#

You parse @a or @p or whatever using that method

#

And get a list of matching entities in return

#

It can also use a name or a uuid

#

Or @e[type=creeper,distance=..100] or whatever fancy selectors you desire

tardy delta
#

checking bans on uuid? pre login doesnt have a player instance available

young knoll
#

Use async player pre login

#

It also allows you to easily deny it with a kick message

#

No

tardy delta
#

it has #disallow(reason, message)

patent socket
young knoll
#

Bukkit.selectEntities(source, โ€œ@pโ€)

#

For example

#

The source being any entity

#

Or a command block

#

Or console

#

Anything that implements command sender

onyx fjord
#

Weird that it uses string

young knoll
#

What else would it use

tardy delta
#

would be too much work to implement it with a class ๐Ÿค“

young knoll
#

I mean minecraft parses it from a string

#

Soโ€ฆ

onyx fjord
#

U still have to know the magic selectors

tardy delta
#

just a quick wiki search

young knoll
#

I mean itโ€™s more designed for player input I imagine

#

If you want to grab a bunch of entities yourself itโ€™s probably slightly faster to use world.getEntities and filter manually

quaint mantle
#

what type of inheritance type does a interface have?

eternal oxide
#

other interfaces

quaint mantle
#

Sorry I mean relationship

eternal oxide
#

re-word your question

quaint mantle
#

What relationship does a class have when it implements an interface

winged anvil
#

is a

sullen marlin
#

it is an implementation

quaint mantle
#

md that's not a relationship type

sullen marlin
#

is this a test or something

quaint mantle
#

No

winged anvil
#

like is-a or has-a?

eternal oxide
#

yeah I've no idea what he's askign either

sullen marlin
#

probably some sort of object oriented programming course / uml terminology

winged anvil
#

yeah

river oracle
#

composition or sumthing iirc

winged anvil
#

speaking of tests is there like a library or something for writing tests for plugins

quaint mantle
winged anvil
#

โค๏ธ

quaint mantle
river oracle
#

is this some programming test

#

I just code programs

winged anvil
#

lmfaooo

#

holdup i gotta show yall this

#

idk if ive ever seen anyone write this but

quaint mantle
river oracle
#

a work quiz??

#

wtf ya'll do at work

quaint mantle
#

No

young knoll
#

I took an entire course on this stuff in college

#

Does that mean I remember it?

#

Nope

winged anvil
#

do yall ever do like ```
int a = 10;
int b = ++a;

river oracle
quaint mantle
#

why not just do a++?

winged anvil
#

lmaooo

buoyant viper
#

one adds after the get

#

one adds before the get

young knoll
#

a++ returns a then increments

#

++a does the opposite

eternal oxide
#

the above would be a= 11, b = 10

quaint mantle
eternal oxide
#

actually no, thats wrongh