#help-development

1 messages · Page 2001 of 1

sterile token
#

That why I ask

ivory sleet
#

Yeah

young knoll
#

I don’t think I’ve ever used that

ivory sleet
#

Well here it’s just a Set<String> it seems like

young knoll
#

I always use the vault API to add perms

brave sparrow
#

Contains exists in every Collection

arctic moth
#

lags like crazy

solar sable
#

wdym?

brave sparrow
sterile token
arctic moth
brave sparrow
#

@solar sable make a hash set of all the words you don’t want, then iterate through all the words in the message and check if the set contains them

brave sparrow
brave sparrow
#

Contains exists on every implementation of a Collection

ivory sleet
young knoll
#

A blocks location is the lower corner

arctic moth
young knoll
#

Lower corner

arctic moth
#

lol

#

so just add 0.5 to each?

young knoll
#

Yes

brave sparrow
#

@sterile token every one of those has to have contains

young knoll
#

That’ll be the middle

arctic moth
#

and also im getting like 2 tps from this is there a better way

sterile token
brave sparrow
#

You don’t iterate through the set @sterile token

#

You iterate through the words in the message

young knoll
#

2tps from using the physics event?

brave sparrow
#

And check them against the set

young knoll
#

I didn’t think it was that bad

arctic moth
sterile token
solar sable
#

okay then how do i make it into multiple words?

ornate hollow
#

What is the recommended way to get the world time, the API docs are kinda confusing to me, is it World#getGameTime() since World#getTime() sends only hours?

ivory sleet
#

String::split in principle

sterile token
brave sparrow
#

It’s the CPU

sterile token
#

Lol really?

brave sparrow
#

RAM doesn’t make your server run faster, it gives it more memory to store things in

arctic moth
#

im getting like 6 tps without doing anything, but its not my pc being laggy and my games got 400 fps (hosting locally rn while testing)

hasty prawn
sterile token
#

Its has doble xeon. 16 cores each one. In total 32 cores and 64 threads. Im still not happy

arctic moth
#

lol

prisma needle
#

Using display name in death messages

arctic moth
#

i just turn around to a giant hole

brave sparrow
#

It doesn’t matter how many cores you have

sterile token
#

Hmn

brave sparrow
#

Minecraft is single threaded for almost everything

#

Only chat and networking are on separate threads

young knoll
#

Chunk gen

sterile token
brave sparrow
#

Yeah fair

ivory sleet
#

Server and client

sterile token
#

I have read that spigot was multi threaded

young knoll
ivory sleet
#

Altho it uses some other threads for graphics and rendering (client only)

#

But ye

brave sparrow
chrome beacon
brave sparrow
#

Spigot is not a rewrite of the minecraft server

#

Which is what would need to happen for it to be multithreaded

arctic moth
#

so ummm blockphysicsevent is for whatever reason updating the entire world, thats why its lagging so bad

#

but idk why

sterile token
#

But Runnable arent from spigot?

ivory sleet
#

Nope

sterile token
#

I have seen that Bukkit Runnable exista

#

...

ivory sleet
#

That’s just a subclass of runnable

sterile token
#

So either confused

ivory sleet
#

Well spigot has a queue of runnables

#

(Not literal runnables necessarily)

#

But actions

#

And then it just runs those actions every tick

sterile token
#

Wait java is multi physic Thread

sterile token
#

🤔

ivory sleet
#

No

sterile token
#

But Runnable are multi threaded...

ivory sleet
#

Nope

sterile token
#

😂

hollow bluff
#

Is there anything that can end up cancelling a player from healing without the actual event?

#

cuz somehow I managed to do that -_-

ivory sleet
#

Verano there are two substantial multithreading/async notations

#

concurrent and parallel

#

concurrent means two things runs seemingly at the same time, but in reality they don’t

#

parallel means that two things can run exactly at the same time

#

which is possible if you for instance have two cores

sterile token
#

He?

ivory sleet
#

In Java you can’t really decide whether something is guaranteed to run in parallel, we simply have concurrency to deal with merely

sterile token
#

Java threads != threads?

ivory sleet
#

Computer threads

#

^

brave sparrow
#

There’s virtual threads and physical threads

sterile token
#

Which are virtual?

#

I dont understand

brave sparrow
#

Virtual threads are managed by each being given a share of the core’s time

#

Two virtual threads can’t actually execute at the same time

solar sable
sterile token
#

I now that each core has 2 Thread

young knoll
#

This is a physical thread

ivory sleet
#

"hi amxyar".split(" ")

brave sparrow
#

@sterile token this is all more complicated than it needs to be for this explanation though: even if you run something async in spigot, if it’s async it can’t modify anything on the minecraft server

#

You can’t, for example, spawn a mob async

#

Or set a block async

#

Or teleport a player async

#

That can all only happen on the main thread

young knoll
#

Unless you are using a certain fork

sterile token
#

Oh that why when I call async tatabase tps goes down

#

😩

solar sable
brave sparrow
#

You’re supposed to hit the database async

sterile token
#

I git async and have tps problems

brave sparrow
#

Otherwise your TPS would drop and your whole server would just stop until the database finishes and responds

young knoll
#

Taterbase

#

🥔

brave sparrow
#

Async has nothing to do with your TPS dropping

sterile token
#

How you know?

brave sparrow
#

TPS is calculated on the main thread

#

It doesn’t factor in any other threads

solar sable
#

i know im doing it wrong but still how do i do this

if (e.getMessage().toLowerCase(Locale.ROOT).contains("bad word".split(""))) {
            e.setCancelled(true);
sterile token
#

Im not idiot I know what ima saying

brave sparrow
#

And yet

#

You’re not listening

#

TPS is how many times the main thread can “tick” the server in a second

#

Async threads are not ticked by the main thread

#

Therefore they have nothing to do with TPS

sterile token
#

Im saying that when I call async func using bukkit Runnable tps goes down

viral crag
solar sable
#

its a curse/slurs word detector, basically a swear detector to make people not swear in the chat

brave sparrow
#

Are you processing the data on the main thread or the async thread

sterile token
solar sable
#

ye ik im not gonna send the word

#

ok fine

#
if (e.getMessage().toLowerCase(Locale.ROOT).contains("bitch".split(""))) {
            e.setCancelled(true);
brave sparrow
#

Are you processing that object on the main thread? Or the async thread?

solar sable
#

anyways thats not my point

brave sparrow
#

No no no

#

What

#

Why are you doing split inside contains

hasty prawn
#

That seems like a job for regex

sterile token
somber hull
solar sable
#

i just want to make it detect more than one word in just one

#

i just copied and paste it a lot but that seemed like a mess

somber hull
#

😎

arctic moth
#

so anyone have the slightest clue why blockphysicsevent is updating the whole world every time it gets triggered

sterile token
somber hull
#

What’s the code

brave sparrow
#

String[] messageWords = e.getMessage().toLowerCase().split(“ “);
for (String messageWord : messageWords) {
if (badWords.contains(messageWord)) {
// I’m a bad word!
}
}

somber hull
somber hull
sterile token
somber hull
#

?

sterile token
#

lmao you are trolling

somber hull
#

Ye

sterile token
#

Please let go back

somber hull
#

Yes

#

Yes

#

Back on topic

#

Except he’s like polish or smthng and doesn’t speak English very well

sterile token
#

Why when fetching json object with 20-30 node for each user async from mongo let tps down?

#

I still dont understand

arctic moth
brave sparrow
viral crag
somber hull
arctic moth
somber hull
#

Ye

#

My b

sterile token
arctic moth
brave sparrow
arctic moth
#

and unstableblocks is stuff like air and liquids, stable blocks is stuff like bedrock and barriers and tile entities

brave sparrow
#

Wasn’t talking to you

#

Lol

brave sparrow
#

But I’m sensing sarcasm there

#

Yeah

#

Lol

arctic moth
brave sparrow
#

Just checking

somber hull
#

And could you show where blocks get put into unstable blocks

brave sparrow
#

To be fair I can often diagnose the problem without the code

somber hull
#

Also why do you have a bunch of checks for the same block

solar sable
arctic moth
arctic moth
somber hull
#

My b

arctic moth
solar sable
#

its not what i want it to be and its probably because I dont get it :/

somber hull
#

Or the material

brave sparrow
arctic moth
#

wdym

brave sparrow
#

What are you confused about

somber hull
#

Idk

#

I gotta do homework

#

One sec

brave sparrow
#

I’ve also been doing this for 7 more years than some of the people asking those questions

arctic moth
somber hull
#

Oh

#

I see

#

@arctic moth

viral crag
arctic moth
#

like if i break a block on the surface it opens a cave like 40 blocks underground

somber hull
#

If a faking block is spawned

#

Oh nvm lowonespresso has the reason

brave sparrow
undone axleBOT
arctic moth
brave sparrow
ornate hollow
#

Creating a plugin that returns some json data from the minecraft server, so far this is the response:

{
    "players": {
        "max": 20,
        "online": 1,
        "list": [
            {
                "name": "ProNoob2016",
                "id": "06805a42-80d0-463d-bf71-51b1e1317cd4"
            }
        ]
    },
    "world": {
        "seed": -5894899104137508167,
        "time": 17312
    },
    "plugins": [
        "CoreProtect",
        "LuckPerms",
        "Vault",
        "WebExtension",
        "SamiPlugin",
        "Essentials",
        "EssentialsSpawn",
        "EssentialsChat"
    ],
    "version": "git-Paper-232 (MC: 1.18.2)"
}

Anything i should add more?

arctic moth
#

well also placing

#

lol

brave sparrow
#

BlockPlaceEvent

somber hull
#

Blockplaceevent

#

Lol

#

Wtf

#

Just check for both

dire salmon
#

lol

arctic moth
#

couldnt i use physicsevent and check if its instanceof blockplaceevent or blockbreakevent

brave sparrow
#

No

somber hull
#

No

arctic moth
#

then do the other checks

#

why not

brave sparrow
#

BlockBreak and BlockPlace are not physics events

arctic moth
#

oh

somber hull
#

Lol

brave sparrow
solar sable
viral crag
solar sable
#

idk if that can help

ornate hollow
brave sparrow
young knoll
#

I’ve used the physics event for add gravity to blocks before

ornate hollow
#

async in a new thread on every http GET call (/api/status)

solar sable
#

and also the "badWords." cause that had a red mark

young knoll
#

I just kept the check very simple

#

Iirc it was just a hashset.contains on the material

brave sparrow
#

Like we told you earlier

#

That’s probably accurate

solar sable
#

I agree

brave sparrow
#

?learnjava

undone axleBOT
dire salmon
#

i learned using sololearn, its not bad

arctic moth
#

lol ik that list is cringe

brave sparrow
#

Yes you could

#

You want to make sure the event wasn’t cancelled first though

arctic moth
#

ok lol

young knoll
#

Woo ignoreCancelled

#

You’re missing a )

#

Smh

#

Much better

brave sparrow
#

Pls Set<String> stringSet

#

My eyes are bleeding

young knoll
#

Why stop there

#

Just use Object

brave sparrow
#

No

#

That’s the wrong direction

#

Set has all the methods of HashSet and is the abstract representation

#

So you can switch out the implementation easily at any time

#

Make it a TreeSet or whatever

#

Or an ImmutableSet

young knoll
#

And with object you can switch it to anything

brave sparrow
#

Or a synchronized set

young knoll
#

:D

brave sparrow
#

But you don’t have the methods of Set

arctic moth
#

lol this is whats left of the world after that blockphysics thing

#

it was just running in the background

young knoll
#

I think I see your tps issue

arctic moth
young knoll
#

It does look cool though

hasty prawn
#

668000 LOL

#

thats a few

arctic moth
#

668k falling blocks xD

brave sparrow
#

like I said

#

It’s called a LOT more than you think

#

Lol

young knoll
#

Plus

#

Removing a block in the event

#

Will call the event again

brave sparrow
#

Every time a leaf decays

#

For example

brave sparrow
#

yes

young knoll
#

I have used it just fine for block physics

#

Just gotta be very careful

arctic moth
#

lol this would make a cool map ngl

young knoll
#

And not spawn 680k entities

arctic moth
#

sad 4 tps

#

oh its just still recovering

#

its going up

young knoll
#

Natural spawned leaves decay if there is no log nearby

brave sparrow
#

It’s a massive PITA

young knoll
#

Oh?

viral crag
#

not only leaf decay, you also have blockfade Called when a block fades, melts or disappears based on world conditions
Examples:

Snow melting due to being near a light source.
Ice melting due to being near a light source.
Fire burning out after time, without destroying fuel block.
Coral fading to dead coral due to lack of water
Turtle Egg bursting when a turtle hatches

arctic moth
young knoll
#

Turtle hatches
Entire world collapses below the baby turtle

arctic moth
#

wait how the hell did i just get monster hunter ahievement

arctic moth
viral crag
#

didnt you just kill 700k entities?>

arctic moth
young knoll
#

The one thing I never did with my gravity blocks

#

Is make stone affected

arctic moth
#

oh thats why

#

more

#

smh didnt get killed

#

instantly goes to 20 fps

#

*tps

young knoll
#

Honestly we need that in vanilla

#

Let me call up Mojang real quick

arctic moth
#

lol

#

i had to do /kill @e[type=falling_block] twice for them to all die

#

yes

#

sad now it doesnt work :(

#

¯_(ツ)_/¯

#

and the function is still the same as earlier

#

ok so it works sometimes

#

but not other times

viral crag
#

you are doing less

arctic moth
#

its like random now

#

oh both my functions are called onBlockUpdate

#

lol

#

still didnt fix

#

placing works but breaking is random

viral crag
#

what event are you listening for?

arctic moth
#

blockplace and blockbreak lol

#

also blockbreak updates the block broken but i can fix that easily

#

im just not sure why its so random

#

sometimes it breaks, others it doesnt

#

like it works on certain x and z coords but not others

#

ok so i think i found out why

#

its not updating the one above it

#

unless it does

#

lol i dont understand this

#

so it only updates when someone breaks a block next to the one that needs updating but when that one updates so do the ones above it

#

i have no clue whats happening rn

woeful crescent
#

is there any way to simplify clickable TextComponents as a string?

#

or is it like a separate packet

arctic moth
#

despite having affectedblocks.add(block.getWorld().getBlockAt(block.getLocation().add(0, 1, 0))); it updates literally everything except it

sage dragon
west oxide
#

hey everyone,
so i have an sql table to store players info and i am stuck wanting to do the following tasks (there was way more but these i couldnt find any solution on the internet) :

  • reset a certain parameter to default (for example points to 0 for all players)
  • get the amount of players registred in the database (something like Array.size();)
    -get the player with the most points or the top 10 etc...

if anyone knows the answer to any of these questions i will very much appreciate it.

woeful crescent
#

are lists of UUIDs ConfigurationSerializable?

arctic moth
#

oh wait i think ik why

#

so its getting the block state before the loop hits it

#

any way to make it get the updated version of the block?

#

ig i could make a list of locations and then at each location get the block but itd be more tps intensive

radiant cipher
#

anyone know how to find the build.gradle file when it's autogenerated in intellij?

ancient jackal
#

in the project directory

radiant cipher
#

where

arctic moth
arctic moth
#

nope

ancient jackal
#

that is amven

arctic moth
#

didnt change anything

young knoll
#

Pom.xml

radiant cipher
#

yeah I got it open

#

where would build.gradle be?

quaint mantle
#

Nowhere

arctic moth
#

lol

ancient jackal
#

gradle and maven are separate

arctic moth
#

gradle and maven are 2 different types

ancient jackal
#

maven > gradle

arctic moth
#

ye what he said

radiant cipher
#

I see

quaint mantle
#

Just do terminal; mvn clean install and it will build your project.

ivory sleet
quaint mantle
ivory sleet
#

no

quaint mantle
#

Or if you have gradle installed you can do ; gradle init which will make gradle files for you.

ivory sleet
radiant cipher
#

so wait

#

I'm following tutorial does anyone have an idea of what to do here if pom.xml is the gradle file?

young knoll
#

Conclure vs imagine

#

Fight

#

Pom.xml is not a gradle file

ivory sleet
#

I mean we all know gradle is objectively better don’t we

young knoll
#

Find a maven tutorial

#

?maven

undone axleBOT
ancient jackal
#

maven is 1000x better

young knoll
#

Maven is verbose and smelly

quaint mantle
#

But much more easy to use especially for beginners.

ivory sleet
#

Untrue

#

It’s just as easy as gradle

radiant cipher
#

very confused

lost matrix
#

Both are trash

quaint mantle
#

🤣

eternal night
#

real devs use makefile and javac

ancient jackal
ivory sleet
#

Of course gradle can become complex, but it can be really simple also

radiant cipher
#

so do I need to get the build.gradle file from somewhere else?

lost matrix
#

I hate them equally

#

or ant

young knoll
#

You have a maven project

ivory sleet
young knoll
#

Maven projects have no build.gradle

#

Either follow a maven tutorial, or make a new gradle project

radiant cipher
#

ok but the tutorial I'm following\

#

says there should be a gradle file

#

using maven

young knoll
#

Then they are insane

lost matrix
#

Although maven still has a much bigger community and therefore more online support even for more niche problems.

ivory sleet
#

That’s an absurdly despicable and clearly horrible tutorial you got yourself then sadly

lost matrix
radiant cipher
#

here imma just post the tutorial

#

docs

ivory sleet
#

Oh god

radiant cipher
#

in the $wrld payment thing

#

xDD

#

it's for a comm I swear

#

I don't really use maven

#

so is the tutorial just insane or is there a gradle file hidden somewhere?

young knoll
#

Lol it doesn’t even run on spigot

radiant cipher
#

yeah it's on paper

#

should I go to that discord then?

eternal night
#

oh god an nft minecraft project

#

it is starting

lost matrix
young knoll
lost matrix
young knoll
#

You can buy a world as an NFT

radiant cipher
#

yeah ok peaceee

eternal night
#

it is too cringe for me

#

welp they made it to paper

young knoll
#

“Each world is unique and one of a kind.”

#

What a good selling point

arctic moth
#

im getting null stackoverflow errors randomly

#

with like spammed stack trace

eternal night
#

providing an error is very useful

#

to identify the problem

arctic moth
#

ok lol

lost matrix
#

?npe

#

npe when?

arctic moth
#

its probably cuz its nested

#

but i cant see the original error

lost matrix
#

Main.class*

arctic moth
#

updateNearbyBlocks(nblock, false);

#

lol

lost matrix
#

with context

young knoll
#

Let me guess

young knoll
#

You break a block inside a block break event

arctic moth
#

um not rlly

#

it changes type

#

and it only seems to happen when its a large amount of blocks being changed

lost matrix
#

I see a recursion....

arctic moth
#

lol

young knoll
#

Yay recursion
Yay recursion
Yay recursion

lost matrix
#

And use 3 nested for loops instead of manually adding every location

arctic moth
#

and i was too lazy to make that

#

mainly the only thing i need fixing now is why does the one for .add(0, 1, 0) not work

#

like the one above it never gets updated

#

i just noticed sus generation

#

lush caves in mansion

young knoll
#

Where’d the floor go

arctic moth
#

um

dire salmon
#

Wha

arctic moth
#

...

young knoll
#

You made the floor collapse didn’t you

quaint mantle
young knoll
#

You’re killing my resale value!

arctic moth
quaint mantle
arctic moth
#

do /locate mansion and use spectator

#

for me its at 261 73 5402

quaint mantle
#

thx

#

I will check this out

arctic moth
#

did i just get the one super rare room

#

yep

quaint mantle
#

woah

arctic moth
#

why is that on a pvp domain

#

lol

#

?paste

undone axleBOT
quaint mantle
#

NPE

#

show la code

#

the code

#

to see what you did

#

yes

arctic moth
#

even though this plugin i made is rlly buggy and shit its still so fun

quaint mantle
#

you have more than one

#

I dont know how to do anything with a obfucator or what that means lol

#

ohhh

young knoll
#

It’s a silly thing people use to try and protect code

quaint mantle
young knoll
#

It is silly

quaint mantle
#

ohhh

young knoll
#

It will always be at most a minor hindrance

quaint mantle
#

so thats how bukkit got it

young knoll
#

@vagrant stratus likes obfuscators

arctic moth
#

when u "accidentally" punch one block

quaint mantle
#

oof

#

when you spend 50 years just looking for the mansion and you finally find it lol

young knoll
#

Imagine trying to make a base with that plugin

#

:p

arctic moth
#

good luck

quaint mantle
#

THATS THE PLUGIN????

arctic moth
#

pretty much

vagrant stratus
#

Which obfuscator is used? Probably easy to de-obfuscate

quaint mantle
arctic moth
vagrant stratus
#

Probably already dealt with iirc lol

quaint mantle
arctic moth
#

lol ill just like post it on spigot and dm u it when im done

quaint mantle
#

I would also like to see the code pls

#

bc I am curious boi

arctic moth
#

you can see the code

#

when its done

quaint mantle
#

nice

#

:)

vagrant stratus
#

Send a random jar obf'd with it @quaint mantle
I can quickly check against a tool I have

arctic moth
#

or next time i get error spam

young knoll
#

I intend to include gravity for more blocks in my realism plugin thingy

#

But like

#

Probably just dirt and stuff

arctic moth
#

i swear smth is off about this seed

#

rare mansion room, mansion in lush cave

#

so weird

young knoll
#

That’s just one of the circle caves

arctic moth
#

also this

young knoll
#

But in the side of a hill

arctic moth
young knoll
#

Yeah

vagrant stratus
young knoll
#

You’ve never seen those circle rooms while mining

#

They were more notable before 1.18

arctic moth
quaint mantle
vagrant stratus
arctic moth
#

wait do they grow on grass

young knoll
#

They grow in caves

#

Sometimes caves are at the surface

arctic moth
#

still

#

its moss

#

moss hates grass

#

at least irl

quaint mantle
#

thx to you now I am going to think about that the entire time... not allowing me to sleep until I have figured out the entire science between moss and grass

arctic moth
#

lol giant cave at y 100

young knoll
#

A rolling grass gathers no mods

#

The new caves are great

quaint mantle
young knoll
#

The new terrain is so much more interesting

#

Even if modded still has some cooler terrain

quaint mantle
#

it is nice :)

arctic moth
#

i wonder if i should test my pc....

#

pc explodes

young knoll
#

Is stone a stable block

arctic moth
#

no

quaint mantle
#

my pc can be replaced with a shoe thats how slow it is

young knoll
#

Oh good

arctic moth
#

same

#

my monitor just started flickering

#

fuck

young knoll
#

You’re going to cause the apocalypse when mining

quaint mantle
#

lol

arctic moth
#

my screen is like flashing lol

#

hehe what ram

#

awww no fun it stopped halfway through

#

error spam be like

quaint mantle
#

if you see me using syder ide just know that anaconda downloaded it and I wanted to try it

quaint mantle
#

yes

arctic moth
#

i use pycharm and atom for python

quaint mantle
#

I use pycharm

#

but anaconda just downloaded spyder ide so I wanted to see how it looks

arctic moth
#

lol when u use multiple ides

#

i hate spyder

#

its cringe

quaint mantle
#

its that bad?

arctic moth
#

no it just has horrible fonts and coloring and stuff

quaint mantle
#

my eyes are going to die today

young knoll
#

Using a spider to develop a snake

quaint mantle
#

lol

#

why...

#

why is there no package manager

quaint mantle
#

lmao

arctic moth
#

and yes that is a psu failure

quaint mantle
#

what even is this

#

WHERE IS THE PACKAGE MANAGER

arctic moth
#

thats also why i hate spyder

quaint mantle
#

never again

#

never again am I opening that

arctic moth
#

lol its funny how the image is still loading

#

anyways why am i getting this

buoyant viper
#

wtf is anaconda

quaint mantle
#

as long as that broken plugin still works idc lol

arctic moth
quaint mantle
buoyant viper
#

o

#

i wonder if python on macos still ships with IDLE

quaint mantle
#

I think it does

arctic moth
#

lol yep

#

its just sad that u need venvs just to use it cuz its that easy to break

quaint mantle
#

This is the IRS you owe $900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

#

scammers are dumb

arctic moth
#

like one wrong package import on the main env and ur screwed

#

pip is such a bad package manager

quaint mantle
#

yes lol

arctic moth
#

but bruh i havent gotten like any solutions to why it updates every block except the one above and why im getting an error when it updates a lot of blocks

#

i got a partial solution to the second thing

#

cuz col told me not to change blocks in blockbreakevent but idk what to do instead

#

and the first one i have no idea ¯_(ツ)_/¯

young knoll
#

They taught us python for our programming 101 course

#

With IDLE

arctic moth
#

lol

#

welp ima go now lol

#

ew i say lol way too much

dusk flicker
#

just dont obfuscate it

vagrant stratus
young knoll
#

That’s why I write my code in skript

#

Literally unbreakable

stuck flax
#

Whats the best way of doing Username -> UUID for an offline player/player that has never joined the server

hexed hatch
#

The virgin obfuscator vs the open source chad

vagrant stratus
young knoll
#

Preferably async

vagrant stratus
#

lol they brought up another obfuscator, which I immediately linked a de-obfuscator for

patent horizon
#

workaround for this?

#

pretty sure its a paper function, i need a spigot alternative

young knoll
#

Add a tag to it and listen for the pickup event

patent horizon
#

what event

young knoll
#

EntityPickupItemEvent

stuck flax
quaint mantle
#

cdoe not work ```java

class public void 8 {

voi dpublic st@tic Main(strig[}agrs)
{
print(helloworldplswork)

)

}```

wispy moth
#

How to get spigot.yml

young knoll
#

Run the server

#

And it will generate

quaint mantle
#

step 2 scroll

#

step 3 find

#

step 4 click

#

step 5 click

#

step 6 you have it

wispy moth
#

👍

river oracle
#

mayb error on ide tr reload i

quaint mantle
#

the patience you have to actually read that lol

river oracle
#

ohb Wait! you have an extra )

#

delete that!

flint coyote
#

di u chek iteret conec ?

river oracle
#

make sure ur connected to the internet

flint coyote
#

Kinda obvious. How to say hello to the world without internet

river oracle
#

🤷‍♂️ you can't smh

hasty prawn
young knoll
#

You’d have to do that on each mob

#

And it would apply to all items

#

But yes that is an option

hasty prawn
#

They were already using the Paper alternative so I assume they've handled all those situations

subtle pewter
#

Does anyone know if there is an extra run command to make the bungee jar file?

young knoll
#

For bungee?

sterile token
#

I get bungee jar from build tools

#

😂

subtle pewter
#

to make the proxy jar file

young knoll
#

I imagine you just do the standard maven build steps

#

mvn package or whatever

sterile token
#

Or vía commands: mvn package (building the jar) or mvn shade (building a shaded jar with all dependencies inside)

sterile token
#

Check if it works

#

Take in care

#

You should build a shaded a jar

#

Because if your bungee jars doesnt contains inside the dependencies you will have NoClassFoundException

golden turret
#

did someone worked with cem before? do you know how to remove all entity animation inside a .jem?

warm light
#

is there any way to save the full config in hashmap?
I have a lot of keys in config.yml

sterile token
#

RRS spigot yanl system is already a Hashmap

#

Where you have keys and values

#

But it doesnt work exactly like that

young knoll
#

You can just getValues on the root afaik

warm light
#

I am trying to make auto config update
this is how it will work:

save all keys and values from config.yml to a hashmap
then reset config.yml
save value to config.yml from the hashmap

sterile token
#

No

#

Hmn

#

I would directly create a new file and them copy from old to new one

#

Wouldnt be better?

warm light
#

do you have a demo?

sterile token
#

No sorry

#

But did you check any auto update files system? Prob you can find examples

#

And take in care that if the api that manage files update goes down your plugin need to keep running
With your backend online or offline should run

limber mica
#

what can I use if I can't use int for 9218383018467213784512 not using string

young knoll
#

Long?

limber mica
#

no

young knoll
#

BigInteger

limber mica
#

thank you

#

worked perfect

#

how can I check if ResultSet can't find data from the Statement?

#

like if there is no data in the db

#

I know that it doesn't return null

young knoll
#

It’ll be empty

#

So next() will return false

limber mica
#

So then if I used a while loop it wouldn't go through

young knoll
#

Mhm

limber mica
#

Is there a reason why when I add the variable into the query and there is a space it cuts out the first part of it

#

let's say I had water gun it becomes gun

young knoll
#

Are you using prepared statements

limber mica
#

no using Statement

young knoll
#

You should use a prepared statement

#

With ? Placeholders

limber mica
#

This is how I do it Statement stmt = connection.createStatement();

night torrent
#

public void onKill(EntityDeathEvent event)
{
Player p = (Player) event.getEntity();
if(event.getEntityType() == EntityType.CHICKEN)
{
p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_FALLING, 30, 2));
}
}

I'm trying to make it so when you killa chicken, you get slow falling. I put it in minecraft and nothing happens

young knoll
#

Well you are casting the entity to player and then checking if they are a chicken

#

But besides that

#

Did you register the event

night torrent
#

uuuhhhhhh

young knoll
#

Did you @EventHandler it

night torrent
#

yes

young knoll
#

Are there console errors

night torrent
#

"Could not pass event EntityDeathEvent to OnSpawn"...

young knoll
#

There ya go

#

You can’t just blindly cast the entity to a player, you have to check first

#

Also you probably want to use entity.getKiller for the player anyway

night torrent
#

I actually tried that, no autofill poped up

#

wait

#

can you get in a vc?

#

hello?

limber mica
cobalt tinsel
night torrent
young knoll
#

Oh boy

cobalt tinsel
#

If you only put getEntity you will be trying to add slow falling yo the chicken

cobalt tinsel
night torrent
#

oh

cobalt tinsel
#

Just add getKiller

night torrent
#

alr

young knoll
limber mica
#

cursor?

young knoll
#

Yes

night torrent
young knoll
#

The cursor is the current row the result set is on

limber mica
#

im lost then why its returning false

cobalt tinsel
night torrent
#

🙂

cobalt tinsel
#

But remove the if

night torrent
#

IT WORKED!

cobalt tinsel
#

Then make Entity dchicken = event.getEntity();

night torrent
#

ok

cobalt tinsel
young knoll
#

You don’t need a variable for the entity

#

If you are just accessing it once

#

However you should null check the player

night torrent
#

oh just in case a random chicken dies?

cobalt tinsel
#

Yes

night torrent
#

alr

cobalt tinsel
#

Your if should be

#

Wait

#

Theres any other event like when an entity kills other entity?

young knoll
#

Killer is always a player iirc

#

Non player killers aren’t tracked

night torrent
#

so i dont have to null check?

cobalt tinsel
#

No

limber mica
#

Why is doing if (!rs.next()) { lbalblabla } else { while (rs.next()) { blbalb } } returning false even though data is there?

cobalt tinsel
cobalt tinsel
night torrent
#

bet

#

thanks guys

cobalt tinsel
#

🙂

night torrent
#

oh wait one last thing

#

does the duration: '30' mean ticks?

young knoll
cobalt tinsel
#

I'm pretty sure it's seconds

young knoll
#

So if the result set only has 1 row, the whole loop won’t run

#

It’s ticks

night torrent
#

i figured

#

i killed a chicken and it was very short lasting

limber mica
#

so are you saying I should have the while loop above and outside the if

cobalt tinsel
night torrent
#

20 ticks per 1 seconds

ancient jackal
#

not even generally actually, that is how iterators are

night torrent
#

i looked it up

young knoll
#

Yes

cobalt tinsel
limber mica
#

yes to me?

young knoll
#

20 ticks is 1 second at normal speed

#

Also resultSet doesn’t have a hasNext

#

You can reset the cursor with beforeFirst() though

ancient jackal
limber mica
#

hm okay coll

young knoll
limber mica
#

so how should I do this

ancient jackal
young knoll
#

You can just do the while loop, if it’s empty it just won’t do anything

limber mica
#

well

#

I want it to do something

#

If its empty I want it to add data and of course if is not empty update data

young knoll
#

You can keep your current code then

#

And just call resultSet.beforeFirst after } else {

#

Or use a do while instead so it doesn’t skip the first one

limber mica
#

wym use a do while instead of beforeFirst?

young knoll
#

do while won’t advance the cursor until after it’s first cycle

#

So it won’t skip the first row

limber mica
#

so wait

#

should i just have the do while

#

inside the else

young knoll
#

Yes

carmine nacelle
#

Working on updating an old plugin which I had to decompile from a jar,

public class CustomBee extends EntityBee {
    private String beeName;
    
    public CustomBee(final Location location, final String beeName) {
        super(EntityTypes.g, ((CraftWorld)location.getWorld()).getHandle());
        this.setPosition(location.getX(), location.getY() + 1.0, location.getZ());
        this.setCustomName((IChatBaseComponent)new ChatComponentText(ChatColor.translateAlternateColorCodes('&', beeName)));
        this.setCustomNameVisible(true);
        this.setHealth(20.0f);
        this.setAge(-32768);
    }
    
    public void setBeeName(final String beeName) {
        this.beeName = beeName;
    }
    
    public String getBeeName() {
        return this.beeName;
    }
}

The first line is giving me 'x()' in 'net.minecraft.world.entity.EntityInsentient' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type, this used to work.. any ideas?

#

it's been a bit.

night torrent
#

wait how do i replenish one hunger point

carmine nacelle
#

For Mojang mappings, do you have to use buildtools? or can you just use maven?

eternal night
#

for any form of server internals you need to run build tools locally

young knoll
#

You need buildtools to get the mapped jars

brave sparrow
carmine nacelle
#

wot

#

does it contain nuclear launch codes or somethin

eternal night
#

it contains mojang owned assets ?

carmine nacelle
#

Everybody can get them tho

brave sparrow
eternal night
#

I mean same reason you are currently not hosting a bunch of mp4s of current movies on your public web server

#

lol

brave sparrow
#

That’s specifically stated in the terms of the mappings

carmine nacelle
#

idk how this shit works

young knoll
#

Yeah and everyone can get windows too

brave sparrow
#

That doesn’t make it legal

young knoll
#

To be fair a site with all the textures exists

#

And Mojang doesn’t mind as long as they don’t run ads

carmine nacelle
#

i had all this working a while ago but the decompiler didnt include my old pom sadge

young knoll
#

Maybe they just want to be extra protective of their bad code

carmine nacelle
#

lmao

#

b.x.randfnct.a.f

brave sparrow
#

“# (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula.”

carmine nacelle
#

sooo...do the mappings just mean like

#

how the obfuscated shit is linked to the real names

brave sparrow
#

And you can’t provide a download link for the server mapped or otherwise because that’s mojang’s code

carmine nacelle
#

java -jar BuildTools.jar --rev 1.18.2
so this will download the mapped jars too

brave sparrow
#

No

#

It will build them

eternal night
#

run it with --remapped

brave sparrow
#

^

carmine nacelle
#

interesting..

#

weird how thats not included in the post

brave sparrow
#

It’s new

eternal night
#

fairly certain it is

carmine nacelle
#

hmm

eternal night
#

the --remapped parameter

carmine nacelle
#

it kinda is

brave sparrow
#

Mojang just started giving the mappings out within the last few years

carmine nacelle
#

but it doesnt say you HAVE to use it

brave sparrow
#

You don’t have to use it

#

If you aren’t using NMS you don’t need it

eternal night
#

but then you don#t get mojang mapped server lol

brave sparrow
#

Which doesn’t matter if you aren’t using NMS

#

And @carmine nacelle if you ARE using NMS with the remapped server, you have to also do the step to transform your plugin back

#

Since the live server won’t be remapped and none of the classes or methods will exist

carmine nacelle
#

im using nms

young knoll
#

Which is mean because it doesn’t have a gradle option

#

Big sad

carmine nacelle
#

yeahhh

brave sparrow
#

Otherwise it won’t work

carmine nacelle
#
<plugins>
            <plugin>
                <groupId>net.md-5</groupId>
                <artifactId>specialsource-maven-plugin</artifactId>
                <version>1.2.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>remap</goal>
                        </goals>
                        <id>remap-obf</id>
                        <configuration>
                            <srgIn>org.spigotmc:minecraft-server:1.18.2-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
                            <reverse>true</reverse>
                            <remappedDependencies>org.spigotmc:spigot:1.18.2--R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
                            <remappedArtifactAttached>true</remappedArtifactAttached>
                            <remappedClassifierName>remapped-obf</remappedClassifierName>
                        </configuration>
                    </execution>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>remap</goal>
                        </goals>
                        <id>remap-spigot</id>
                        <configuration>
                            <inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
                            <srgIn>org.spigotmc:minecraft-server:1.18.2--R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
                            <remappedDependencies>org.spigotmc:spigot:1.18.2--R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
#

this?

brave sparrow
#

That appears to be it yes

carmine nacelle
#

bruhhh now my "EntityBee" and stuff isnt working

brave sparrow
#

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

carmine nacelle
brave sparrow
#

It would appear the remapping has not worked

carmine nacelle
#

rip.

#

wish i remember how i did all this last time..

brave sparrow
#

Well for one thing I believe 1.18 requires Java 17

#

And your compliance level is set to 16

carmine nacelle
#

ok i changed that

#

i built my main plugin with maven

carmine nacelle
#

then my 2nd plugin depends on the first one

#
        <dependency>
            <groupId>com.squallz</groupId>
            <artifactId>CadiaCore</artifactId>
            <version>2.3</version>
        </dependency>
#

but this in my 2nd plugin isn't finding my main one

brave sparrow
#

Are you trying to get EntityBee in the second one?

carmine nacelle
#

Yeah

brave sparrow
#

That’s why it doesn’t work then

#

You have to do the remapping in both

carmine nacelle
#

its not related to my main one tho, its saying it cant find stuff in my main and not importing it right with a jar.

#

EntityBee is just from the main spigot jar tho

brave sparrow
#

Correct

carmine nacelle
#

its in my secondary plugin not the main one

brave sparrow
#

But you’ve done the remapping in your second one?

carmine nacelle
#

yes

brave sparrow
#

Compare your Pom to the one in the site I just linked

#

See what’s different

carmine nacelle
#

spigot vs spigot-api...?

#

oh

#

they have both

#

I think now its just having an issue with my custom one not resolving with maven

#

my "parent" plugin

brave sparrow
#

Very possible

#

Have you run mvn install on your parent one?

carmine nacelle
#

ahh that was it, forgot install

#

fuuuuuuuuuuu

#

my pom is the same except im using 1.18.2 instead of 1.18

brave sparrow
#

Open up your “external resources” and see what’s inside

carmine nacelle
#

external libraries?

#

on the left

brave sparrow
carmine nacelle
#

What am I looking for...?

#

I see remapped stuff

brave sparrow
#

Then perhaps EntityBee is the wrong name

carmine nacelle
#

shouldnt the nms name

young knoll
#

It’ll be the remapped name

#

Isn’t it like

#

BeeEntity

brave sparrow
#

Let me check

carmine nacelle
#

there's one for just "Bee"

#

import net.minecraft.world.entity.animal.Bee;

#

but that also requires changing it to "EntityType" instead of "EntityTypes"

#

this worked as-is in 1.17

brave sparrow
#

Should be just Bee

#

Looking at the actual code

young knoll
#

Ahh okay they don’t have an affix

#

Makes sense

carmine nacelle
#

So it was changed?

brave sparrow
#

I’m looking at pre-obfuscated code so YMMV

#

But that does appear to be the case

carmine nacelle
#

hmm

#

well its more readable this way i guess

#

but

#

ChatComponentText also isn't resolving anymore

young knoll
#

I feel like you were unmapped before

brave sparrow
#

If I check the git history of Bee when I get to my desk I doubt it’s been renamed

carmine nacelle
#

this.setCustomName(new ChatComponentText(ChatColor.translateAlternateColorCodes('&', beeName)));

#

I mean..it's possible I guess...? I dont think any of this would've worked without the mappings tho

brave sparrow
#

Spigot used to have nms without the mappings

#

Using their own names for stuff

carmine nacelle
#

hmmm..

carmine nacelle
#

For just that part?

#

"IChatBaseComponent" isn't even showing as a thing that exists rn

#

I was doing stuff with getting/setting the bee's home hive, getting their pollen levels and stuff so I think thats why I needed nms...?

#

Yeahh its showing IChatBaseComponent in 1 of my projects but not the other... 🤔

#

The project it works in is importing

import net.minecraft.network.chat.IChatBaseComponent;

but the other project doesn't resolve that...

brave sparrow
#

Presumably because it isn’t called that

carmine nacelle
#

Wot

#

why would the name change between 2 projects using the same version

brave sparrow
#

Is one remapped and the other not?

carmine nacelle
#

yeah

brave sparrow
#

That’s why

carmine nacelle
#

So can it not be used in the remapped?

young knoll
#

Correct

carmine nacelle
#

bruh

young knoll
#

Because that isn’t the remapped name

carmine nacelle
#

how do i find the remapped name..

brave sparrow
#

BaseComponent

carmine nacelle
#

theres a couple different ones

#

one makes me implement a method..

brave sparrow
#

Context clues

carmine nacelle
#
        this.setCustomName(new BaseComponent(ChatColor.translateAlternateColorCodes('&', beeName)) {
            @Override
            public BaseComponent duplicate() {
                return ChatColor.translateAlternateColorCodes('&', beeName)
            }
        });

this seems...wrong.

#

because it is

brave sparrow
#

Why did you make it a class

carmine nacelle
#

That's what it imported

#

automatically

brave sparrow
#

Probably TextComponent then

tidal skiff
#

is it possible to set the animation time of a redstone particle because for my purposes it disappears way too slow

carmine nacelle
#

u right

#

bruhhhh WorldServer must've been renamed too... REE