#help-development

1 messages ยท Page 268 of 1

remote swallow
#

From what elgarl and frostalf said its per player but it wouldnt be hard

radiant cedar
#

oh so i can make diff players see diff weather and time

#

if thats easy i could do that

#

does anyone know how

wet breach
#

Yes

eternal oxide
#

Player#

wet breach
#

Its in the api for player

remote swallow
#

?jd-s Player

undone axleBOT
wet breach
#

Player has set time and setweather

remote swallow
#

Someone should make cafebabe accept stuff like that, ?jd-s Player sends the player jds link ect

quaint mantle
#

so, I need to add this witherSkull as passenger, how can I find the methods? is there some site where I can find out nms methods for 1.19.3?

        EntityHorse entityHorse = new EntityHorse(EntityTypes.Q, craftWorld.getHandle());
        EntityWitherSkull witherSkull = new EntityWitherSkull(EntityTypes.bh, craftWorld.getHandle());

it need to be nms because Im creating a thing that api does not support I guess

wet breach
#

Just because you need nms doesnt mean everything must be nms

quaint mantle
#

ok

#

got you

#

I need just to send to client a wither skull riding a horse

#

that is invisible

#

but their names visible

remote swallow
#

Isnt there a set passengers method for entities

echo basalt
#

there is addPassenger and removePassenger

wet breach
#

Why do you those entities invisible?

echo basalt
#

?nms

echo basalt
quaint mantle
#

some guy told me that this is the way

#

like in the plugin DungeonRealms

wet breach
#

You want an entity to have 2 name things?

quaint mantle
#

which is out of date

quaint mantle
echo basalt
#

๐Ÿคฆ

wet breach
#

Probably could do this with armor stands lol

quaint mantle
#

I've tried, but does not work

#

the entity name is gone

#

it shows only the passenger name

eternal oxide
#

have you tried the custom name/visible?

quaint mantle
#

yes

#

sir

#

when an entity has a passenger his name is gone

#

only the passenger name is what I can see

wet breach
#

Take a look at that and from that author packetentityapi

#

Should give you ideas in how to accomplish what you are wanting

quaint mantle
#

but isn't this only for a player name?

#

I need for mob names

tender shard
echo basalt
#

I have like 150 positive reviews on spigot and 4 followers

tender shard
#

well spigot != github

remote swallow
#

I have 0

#

Its very sad

wet breach
#

Because staring and following are two different things

fading spindle
#

how do i make it so if a player that has a certain attribute (in a hashmap) can get his item enchanted to sharpness 6 in ItemHeldEvent it seems pretty straightforward though i am having trouble with it

wet breach
#

If you give it a star it means you recommend it and want to subscribe to updates

remote swallow
sterile axle
#

check hashmap, if good then add an unsafe enchantment to item. what issue do you have with this? provide the code you have tried.

wet breach
#

Or notifications i should say

tender shard
wet breach
#

Well you seemed genuinely confused

sterile axle
#

throwback to "i know java!!!~ ๐Ÿ˜ค heres my github link showcasing my shitty code that screams to everyone i dont know java to prove to you that i know java!"

"whats a lambda????"

tender shard
#

wanna see some shitty code? check out my old open source plugins like ChestSort and you wanna die

wet breach
#

Fortunately lambda is not required in java

jagged monolith
tender shard
#

lambdas, streams and functional interfaces in general are the best thing that ever happened to java

echo basalt
#

streams nah

tender shard
#

and try-with-resources

echo basalt
#

lambdas ye

tender shard
#

streams CAN be very nice

wet breach
#

I dont use lambda in java

tender shard
#

but some people abuse them

echo basalt
#

I use lambdas all the time

tender shard
sterile axle
wet breach
sterile axle
#

How does a lambda hide behavior

wet breach
#

I cant really show you an example right now how it can

echo basalt
#

it makes an anonymous class

wet breach
#

At work

wet breach
#

But in some cases it does. Or it isnt straight forward in what it touches or does

#

Now that isnt true for all lambdas nor am i advocating to not use them. Just stating why i dont like using them. I have never had a problem or an inherent need for lambdas

echo basalt
#

what about futures

#

or have you never written extremely concurrent code ๐Ÿค”

quaint mantle
#

do you guys play w/ annotation processing?

wet breach
#

You dont need a lambda for futures or concurrent code

sterile axle
#

yeah im gonna need some sort of an example of what it is you don't like. im betting what you really don't like is shitty code written by noobs

echo basalt
#

man just creates new classes for everything

tender shard
echo basalt
#

except for lombok

#

my bae

#

I could never see myself writing an annotation parser

wet breach
sterile axle
#

lmao alright

wet breach
#

Yeah they want to certify me on the forklifts

#

But that is fine with me. Lover overtime pay

dusk flicker
#

OT is nice

wet breach
#

My wage goes from $22/hr to $34 an hour ๐Ÿ™‚

#

For overtime lol

#

Also overtime starts right after my shift since i have 10 hour shifts lmao

tender shard
#

a lambda doesn't hide anything

wet breach
#

At times it can hide implementation specific details.

#

Which for most isnt a problem until you have a problem with a particular lambda as it doesnt straight forward show the exact process in what is happening

tender shard
#
        myList.sort(new Comparator<String>() {
            @Override
            public int compare(String o1, String o2) {
                return o1.compareTo(o2);
            }
        });
        myList.sort((o1, o2) -> o1.compareTo(o2));
        myList.sort(String::compareTo);
#

all these three things do the same

#

why would anyone use an anonym class instead of the lambda or Method ref

echo basalt
sterile axle
#

I am so confused as to what exactly you think it would be hiding. I look forward to some concrete examples, because as it currently stands I'm simply not convinced. So we'll see.

tender shard
echo basalt
#

20/hr

tender shard
#

to code stuff?!

echo basalt
#

ye

#

it's minecraft plugins after all

#

people here are lucky to go over 8/hr

sterile axle
#

I too used to undervalue myself. But then I took an arrow to the knee.

remote swallow
#

Alex be out there charging 75/h

echo basalt
#

I'll raise myself to 25 next month

wet breach
echo basalt
#

on the 9th

tender shard
echo basalt
sterile axle
#

I charge flat rates. Hourly just lets the customer abuse you. Sure they balk at first, then go to some stupid kid who says they can code but can't. Then they come crawling back.

#

"Please."

"They said they could. They couldn't."

tender shard
#

not many do, but people I know since months do

wet breach
echo basalt
sterile axle
#

That's why we do a full requirements gathering session before providing a quote

tender shard
#

I mean 105โ‚ฌ minus company tax is only like 80โ‚ฌ. and then comes income tax, then you're down to 60โ‚ฌ

#

and the 105โ‚ฌ includes the 19% german VAT

wet breach
sterile axle
#

department of transportation?

tender shard
#

as lawyer I make more than twice as much per hour and I don't have to pay VAT or company taxes for that

velvet chasm
wet breach
#

So i cant be forced to work over 14 hours in a single shift or day

wet breach
sterile axle
#

I won't work more than 8 hours a day, and that's made clear to any prospective client before they sign the project contract

#

Also, it's probably fairly obvious at this point that the majority of my work is not MC related. Because this game is filled with kids using mommy and daddy's money, and they think $5 is decent pay. I don't even entertain them.

wet breach
#

I work 10 hour shifts because there is no night shift from friday to sunday

#

I am guaranteed 40 hours

#

Only way to give me those is if i work monday thru thursday 10 hour shifts

river oracle
#

?paste

undone axleBOT
tender shard
#

I always do it like this:

Someone asks me "how much would XYZ be?"
and I calculate, and think "hm maybe 10 hours, so let's say 1000โ‚ฌ". Then I think again because I know they suddenly have additional requirements and want this and that changed because they described it poorly, so I just say 2000โ‚ฌ instead of 1000โ‚ฌ.
Then 80% of people never reply again. But the remaining people say "alrighty, when would it be done?" and I think "hm probably one week". So I tell them "in 2 weeks". And then in 99% of cases it's done after exactly 2 weeks lmao

river oracle
wet breach
#

Always add extra

velvet chasm
wet breach
#

Alex seems to know this

tender shard
sterile axle
#

Block the main thread in onDisable.

tender shard
#

yes

river oracle
#

ok

tender shard
#

that's no problem

wet breach
#

Lol

tender shard
#

the server is going to wait for stuff anyway in onDisable

#

it's the last tick

river oracle
tender shard
#

you cannot schedule stuff anymore

river oracle
#

lmao

tender shard
#

it's no problem to now cause TPS drops

wet breach
#

Bleed it dry

remote swallow
velvet chasm
#

Well the new item appears

river oracle
echo basalt
tender shard
#

wrong reply

#

wanted to reply to Illusion

echo basalt
#

then I just say like

#

"That wasn't part of the original request and comes at an additional cost"

tender shard
#

and then they don't like you anymore and won't commission you again

echo basalt
#

then just copypaste like 200 utils and get it done in 30 seconds

tender shard
#

you are way better off by telling them in the first place that you are able to do it perfectly, but that it'll cost twice as much

quaint mantle
#

hey, is there a 1.19.3 protocol lib?

echo basalt
#

idiot customers are idiots

wet breach
#

Be back in a few minutes. Got to look like i am doing some work by checking some tires on trailers

#

Lol

remote swallow
#

What type of rate is best for commissions on the forums, flat rates for type + extra depending on stuff or hourly

tender shard
#

depends on your reputation

remote swallow
#

Yesh

#

Yeah**

velvet chasm
remote swallow
tender shard
#

and it depends on how good you are in estimating how long you will actually take

#

and in estimating on how stupid the customer is

wet breach
#

This is where you need to be real familiar and comfortable with your own skills or knowing how much you are able to do.

tender shard
#

if they really know exactly what they need, and you need exactly how long it'll take you, then go for a fixed price

#

otherwise, charge them by the hour

#

and do time tracking then

remote swallow
#

It sounds so simple when its put like that

#

Might learn some new stuff on the api soon

#

Like scoreboard teams and some other stuff

wet breach
#

It is simple. The part that can be hard to learn is not under estimating too much or over estimating

velvet chasm
solemn meteor
#

Is there a way to show a player that they have a potion effect without actually having the effect?

wet breach
#

Over estimate and you get no customers, under estimate and you are doing too much work for not enough

#

So its a real skill to learn

#

As it can be used virtually anywhere other the just coding lol

tender shard
# remote swallow Ah

when I started doing this stuff, I started with "10โ‚ฌ / hour" and that's just a waste of time. You can much rather charge 125โ‚ฌ per hour and after that, give your customer an exact breakdown of the time you actually worked. and tell them beforehand that it's gonna expensive, but that you're also gonna do it good. I usually don't send any invoices that are less than e.g. this

wet breach
#

Also the other thing that can be hard for some to learn. You dont need to chase every customer. If you give a price and the customer wants you to go lower learn to say no

tender shard
#

exactly

#

they should just go to someone else then

remote swallow
#

So what your saying is make it insanely cheap so i get everyone that doesnt want to pay more than 20$

tender shard
#

I once wrote an invoice about 129kโ‚ฌ but that's a few years ago and it was like 2 months of non-stop work. and it wasn't coding, it was a case against the german federal tax authority

wet breach
#

Lol

remote swallow
#

Damn

tender shard
#

after taxes that was roughly 50k and minus insurance and other expenses it was 40k

#

but yeah that was the best thing I ever did

remote swallow
#

What did thr tax authority actually do

tender shard
#

I am not allowed to say too much, but I'll try to summarize it "generally"

#

so it was about a company that acts nation-wide, and they do stuff like... well, like a restaurant, or bakery. but a franchise, acting over the whole country. and those ofc don't declare every single sale in their taxes.

wet breach
#

Yep. You need to factor in other things. In your case you need to factor in maintenance income for your computer if you are dead set on making money from coding. In fact you can even put that in invoices too

tender shard
#

they summarize up the sales for the whole months, for all their franchises, and declare that

#

but then then finance authority came up and said "WAIIIIIT

#

you deducted like... idk, I'll now make some numbers up, I don't remember it, but they said sth like:

#

"You deducted purchasing 1 ton of wheat for january, and you claim that you sold 3 tons of bread."

#

"But from our calculation, you could actually have made 3.5 tons of bread with 1 ton of wheat"

#

ofc there is no chance to proof how much wheat they actually used

#

so it went to court

#

and then the funny stuff happens

#

the judge asks you "so much wheat is actually needed to make 1kg of bread"

#

and then they ask some bakery dude and he says "idk, maybe 700 gram"

wet breach
#

And thats when the funny stuff came in and the show really began

tender shard
#

and the finance authority says "but see, they claim it took them 800 gram"

#

and then you say "yeah but sometimes a bit falls on the floor, and stuff"

#

bla bla

#

in the end we settled with an agreement or sth, I dont remember the sum. but yeah, stuff like that

remote swallow
#

Sounds annoying

tender shard
#

nah it's totally interesting. well if you're into that shit

river oracle
#

Question regarding Guava's LoadingCache RemovalListener. Is there a possible way to send a specific context to the RemovalListener in-order to allow me to make logic where the database saves run sync rather than async as they usually would, while the server is running?

wet breach
#

I bet its interesting when you get to do research into things not directly involved with your expertise

remote swallow
#

But anyway i should sleep, its almost 3 am

tender shard
#

the finance authority thinks:

  1. Dude deducted 1000โ‚ฌ from taxes for buying meat
  2. And he says one kebab contains 100 gram of meat
  3. But he only declared 9500โ‚ฌ in income instead of 10,000
  4. SO HE BETRAYED US FOR 500โ‚ฌ

What they don't wanna understand is that you sometimes have to throw meat away because you cannot store it indefinitely. Or because maybe some worker accidentally threw it on the ground, and ofc didn't tell the boss, etc.

And it's my job to tell a judge that that's how life works, and that you just cannot put everything into numbers

ivory sleet
#

you'd probably wna use caffeine for that, since iirc Guava's cache framework is very barebone

river oracle
#

I'll use caffeine in the future I guess. I'll just dump the map and save everything for now

tender shard
#

yeah taking a dump is always a good idea if you're fed up with stuff

ivory sleet
#

oh actually y2k, guava has RemovalNotification::getCause

#

but idk if thats what u meant

river oracle
#

so that would end up player leave eviction being sync as well

#

I could do some hacky static variable bullshit, but honestly... nah

fierce whale
#

Does anyone know how to add magicSpell plugin to library?
I tried to do that. but It always tell me "package com.nisovin.magicspells does not exist"

river oracle
#

you probably didn't shade it

#

use maven shade or gradle shadow plugin

#

if you use neither of those get with the program

fierce whale
#

shade..?

#

what is shading..?

river oracle
#

your putting all the contents of the library into your final jar

remote swallow
#

?google moment

undone axleBOT
fierce whale
#

ummm..

remote swallow
#

Google maven shade if you are using maven

#

If you use gradle look up gradle shadow plugin

#

If you dont use either use maven

river oracle
#

if you use neither ๐Ÿ’€ feels bad

fierce whale
#

okay let me find about it

quaint mantle
#

as you can see, this code spawns two horses, a Horse and a CraftHorse with nms, the Horse is consumed so I cannot see it for a second, that is ok, but it is a Horse, The CraftHorse turn into invisible but I still can see it for a moment, how can I send this packet horse invisible like the other one? please

    @EventHandler
    public void show(EntityDamageByEntityEvent event) {

        Entity attacker = event.getDamager();

        //CraftWorld craftWorld = ((CraftWorld) attacker.getWorld());
        //EntityHorse entityHorse = new EntityHorse(EntityTypes.Q, craftWorld.getHandle());

        attacker.getWorld().spawn(attacker.getLocation(), Horse.class, horse -> {

            horse.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1000, 1));
            PacketPlayOutSpawnEntity horsePacket = new PacketPlayOutSpawnEntity(((CraftHorse) horse).getHandle(), 1,
((CraftBlock) attacker.getLocation().getBlock()).getPosition());

            ((CraftPlayer) attacker).getHandle().b.a(horsePacket);
        });
    }

๐Ÿฅบ

edgy cobalt
#

So I'm working on a custom item plugin, and a very simple item is fking me over. No errors or anything, but what it's supposed to do is turn of the players gravity for 3 seconds then turn it back on. All it does is completely stop the server until the time is up. The tps goes super far down and animals don't move until the exact amount of time is up. Which is weird because all I did was turn of gravity for the player. It works with only turning the gravity on or off, so idk what the issue is.

#

`@EventHandler
public static void onRightClick(PlayerInteractEvent event) throws InterruptedException {
if (event.getAction() == Action.RIGHT_CLICK_AIR) {
if (event.getItem() != null) {
if (event.getItem().getItemMeta().equals(ItemManager.FallCatcher.getItemMeta())) {
Player player = event.getPlayer();

                player.setGravity(false);
                Thread.sleep(10000);
                player.setGravity(true);
               
            }
        }
    }
}`
sterile axle
#

O_O

drowsy helm
#

dont use Thread.sleep

sterile axle
#

oh no

drowsy helm
#

it pauses the main server thread

#

use a runnable

quaint mantle
#

you are telling the main thread to sleep

edgy cobalt
#

๐Ÿ’€

#

yeah I see that now ๐Ÿ˜ญ

#

thanks guys

undone axleBOT
edgy cobalt
#

ty

quaint mantle
#

how can I do that without nms?

#

other players cannot see this mob name

#

in my program, this is one of the rules

tender shard
#

Iโ€˜ll write an easier to understand blog post tomorrow

edgy cobalt
#

I think I got something working but thanks

quaint mantle
#

fvck off, I realize I'm telling with script kiddies, I've never work with minecraft seems I know more than you, only answers easy things, then pretend is not seeing my question and do blah blah blah I'll check all those nms attributes

remote swallow
remote swallow
#

They left lmfao

#

Someone got a bit angry they didnt get their question answered instantly and other people got help too

fierce whale
#

?paste

undone axleBOT
fierce whale
#

I couldn't find information about maven shading... (I'm not good at English) ๐Ÿ˜ข

remote swallow
#

What doesnt work

fierce whale
sterile axle
#

So what exactly did you try searching on Google for? Or did you even try?

fierce whale
#

Yeah I tried it for much time
I exactly wanna use magic spell plugin in my project

sterile axle
#

what did you try

remote swallow
#

What part of adding it doesnt work

fierce whale
#

I wrote dependency and repository of magic spells but it tell me Cannot "Cannot resolve com.github.TheComputerGeek2.MagicSpells:core:7e23bad82"

#

I wanna explain it in detail and fluently too. but English is so hard sorry ๐Ÿ˜…

remote swallow
#

Have you reloaded maven

fierce whale
#

Yeah I reloaded it

#

can I send image?

remote swallow
#

?img

undone axleBOT
fierce whale
#

ahha thx ๐Ÿ™‚

sterile axle
#

so did you click the "Clean up the broken artifacts data ..." text?

fierce whale
#

sorry but what is meaning of clean up?

sterile axle
#

Look at the bottom of your IDE. It has text right underneath "Cannot resolve ..."

#

click it...

fierce whale
#

ahha I clicked it

#

But It worked same

sterile axle
#

Click File then Invalidate Caches. Then Invalidate and Restart.

#

See if that helps.

fierce whale
#

Okay let me try

#

?img

undone axleBOT
fierce whale
restive mango
#

Given an entity type, how do you create a packet for that entity?

sterile axle
fierce whale
vapid grove
#

An error keeps appearing, dont understand waht for.

remote swallow
#

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

vapid grove
#

@remote swallow i was trying to paste it

#

discord crashed

#

?paste

undone axleBOT
remote swallow
#

F

vapid grove
#

Code block that errors:

ArrayList<Class<?>> regEvs = new ArrayList<>() {{
    add(CraftEvent.class);
    add(PlayerDamage.class);
    add(PlayerChat.class);
    add(PlayerJoin.class);
    add(InventoryFW.class);
    add(PaginatedUI.class);
}};

for(Class<?> cl : regEvs){ //Events
    try {
        Object cI = cl.newInstance();
        getServer().getPluginManager().registerEvents((Listener) cI, this);
    } catch (IllegalAccessException | InstantiationException e) {
        throw new RuntimeException(e);
    }
};
#

Related to this function in public class InventoryFW implements Listener

public InventoryFW(int rows, String name){
    inv = Bukkit.createInventory(null, rows * 9, name);
}
#

Any ideas?

remote swallow
#

Whats line 47 of Main.java

jagged monolith
#

21.12 05:06:58 [Server] INFO at me.emerald.serverplugin.Main.onEnable(Main.java:47) ~[?:?]

vapid grove
#

sec

jagged monolith
#

"main.java" You have called your plugins main class Main

#

?main

vapid grove
#

changing, ill lyk if that fixes it

#

@jagged monolith @remote swallow Error presists:
Line 47:

Object cI = cl.newInstance();
#

Class<?> cl

jagged monolith
#

I feel like it would be easier if you just pasted the full class.

vapid grove
#

The Main (now called setup) class or the InventoryFW

jagged monolith
#

Probably both.

vapid grove
#

setup

#

IF

#

Any clue?

fading spindle
#

any events called when a player gets banned

jagged monolith
fading spindle
jagged monolith
#

That would be the best way to do it.

quaint mantle
#

Help.. I tested a bug with my anti-cheat, and found:

  • Player's screen is NOT FULL SCREEN/MAXIMIZED
  • Player is in air w/ flight on in SURVIVAL mode
  • Player turns flight off
  • AntiCheat flags for flight as if they are idling in the air, not falling

This is not an AntiCheat issue, as it does not flag when their screen is full screen/maximized..

Any idea why this happens?

chrome beacon
#

The game doesn't care if you're full screened or not when doing movement logic

quaint mantle
chrome beacon
#

You're going to have to send your code then

vapid grove
#

Fixed the issue by the way, I just needed to register the events differently.

#

Registers on classcreation now

#

Unsure if that will cause lag tho... registering every time the class is made

chrome beacon
#

It's fine unless you create an instance of them multiple times

cobalt thorn
#

Hi a question is possible achieve change the texture of the chest to the Christmas one without changing the texture of all the chest?

sterile axle
#

maybe if you can somehow add data to the chest and then distribute a texture pack that targets that specific data on the chest? but i wouldnt be able to guide you there

cobalt thorn
#

i asked on the reddit r/optifine for help but currently not getting one

sterile axle
#

unfortunately i cant guide you as i havent done it before, sorry

wet breach
#

The only way i can think you could do it. Would be to intercept the chunk packet. but probably going to be more involved then you anticipate

sterile breach
#

hello
incompatible types: org.bukkit.inventory.ItemStack cannot be converted to boolean

if(current = null) return;
what?

cobalt thorn
#

and what are you trying to do

halcyon rock
#

@everyone

#

Do naruto plagin

sterile axle
#

Can you not

sterile breach
cobalt thorn
sterile breach
#

so how to check if item is null?

cobalt thorn
#

i have small info but i think you are trying to check if an item is present in that slot/gui or idk

for this try

if(current.getType() == null) return;

EDIT: the item can be even air this checks only if its totaly empty

sterile breach
#

i try

#

thats good thanks!

cobalt thorn
frail gale
cobalt thorn
cobalt thorn
#

i helped the dude

frail gale
#

if the item is null then getType will throw NullPointerException

cobalt thorn
frail gale
#

best way to check if an item is not null I think itโ€™s if (item != null && item.getType() != Material.AIR)

tender shard
#

you are better off with decompiling your dependencies and "mvn install"ing them yourself instead of using jitpack

rotund ravine
chrome beacon
#

Also that has already been solved

#

They used = instead of ==

rotund ravine
#

Oh thatโ€™s totally my bad just woke up and read it as == @chrome beacon

smoky tinsel
#

how can i make spiral projectil trail using BukkitRunable

rotund ravine
smoky tinsel
#

ye

#

i want to remove particle when isDead() or if block under projectile is not air

#

i mean cancel the runable

rotund ravine
eternal oxide
#

search in this channel for the user post and spiral particle. Both 7smile7 and myself posted code to do it

tender shard
#

does anyone have a list of all those "MHF" heads for mobs / entities?

#

I couldnt find anything proper

rotund ravine
#

?

#

Thereโ€™s also a list here https://minecraft.fandom.com/wiki/Head

Minecraft Wiki

A head is a decorative block. There are sixโ€Œ/sevenโ€Œ types of heads: player (Steve's head by default), zombie, skeleton, wither skeleton, creeper, piglinโ€Œ, and dragon.

tender shard
tender shard
#

well also same amount

#

well I'll just use that, and if something's missing, people shall just PR it themselves

tranquil dome
#

Is it possible to run a command as an offline player?

harsh totem
#

?learnjava

undone axleBOT
sterile breach
#

okkkay thanks ๐Ÿ‘Œ

harsh totem
#

You should learn java before you jump into developing plugins

tender shard
tranquil dome
#

Then is it possible to make the server think an OfflinePlayer is a Player?

tender shard
#

only if they are online

#

only thing you could do is to implement the Player interface yourself but that sounds like a very shitty idea

#

why would you need to run something as a player who's not online?

#

makes no sense at all

tranquil dome
#

And what if I store the player object, then perform a command after the player logs off

tender shard
#

why would you need that

#

also no, that won't work

harsh totem
tender shard
#

no

#

it won't

harsh totem
#

what

tranquil dome
#

I want to make a discord bot that so players can send commands from discord as themselves

tender shard
#

that will not work

tranquil dome
#

But I guess that's not possible then

tender shard
#

what you could do is this:

#

You could use NMS to load the player's .dat file, then you get a ServerPlayer object

#

on that you could call getBukkitEntity() to get a player

#

but this will fuck everything up because their connection will be null

rough drift
#

Make a blank connection?

tender shard
#

I mean, what types of commands do you expect players to even run while not online?

tranquil dome
#

Commands that display stuff, such as /balance or /list, and commands like /team invite, /trust

tender shard
#

then translate those commands somehow

#

balance -> balance <playername>

#

list doesn't even require any player

tranquil dome
#

Basically, players can not always log on, and it'd be nice to have the possibility to run commands on the go

tender shard
#

well as said, you COULD load their .dat file but I doubt that this will work fine in any way

#

in a similar way, you could get their whole NBT and then toss that into an existing ServerPlayer object that you created from scratch

#

or you just do new ServerPlayer(...)

#

I highly doubt it will work though

misty ingot
#
Configuration config = YamlConfiguration.loadConfiguration(configFile);
config.set("config-version", 1.3);

config.set does absolutely nothing

tall dragon
#

u need to save it after setting for changes to take affect in the file

misty ingot
#

if config-version is not in the config.yml, it will add it with value 1.3

#

but wont update if its already there

tender shard
#

it works exactly as expected

tender shard
misty ingot
#

this is what I am doing

tender shard
#

what is "config"?

tender shard
#

show the full code

#

oh I see

#

yeah you fucked up

#

you load the config yourself

#

then expect the JavaPlugin class to know that you changed your custom object

wet breach
tender shard
#

either save the config yourself, or use getConfig() instead of loading it manually

tender shard
misty ingot
#

I see.

wet breach
#

Which serveroperator is

tender shard
#

no

#

CommandSender extends ServerOperator

#

not the other way around

misty ingot
#
        // if config version is old, update it to current version
        File configFile = new File(getDataFolder(), "config.yml");

        if (getConfig().getDouble("config-version") != 1.3) {
            try {
                ConfigUpdater.update(this, "config.yml", configFile, Arrays.asList());
            } catch (IOException e) {
                e.printStackTrace();
            }

            // save changes
            getConfig().set("config-version", 1.3);
            saveConfig();

            // reload config
            reloadConfig();
            getLogger().info("Updated config file to latest version");
        }

is this good now?

tall dragon
#

no

tender shard
tender shard
#

just use getConfig()

#
getConfig().set("config-version", "1.3");
saveConfig();
#

that is ALL you need

wet breach
tender shard
#

no

#

they want to allow offline players to run commands

#

in "their" name

#

e.g. they want sth like this:

#

"mfnalex enters /balance on discord while not being online. now the server should execute /balance as if mfnalex would be online and entered it ingame"

wet breach
#

Well it would execute as console

#

If done from offlineplayer

misty ingot
#

aka the file in plugins/MyPlugin/config.yml

wet breach
#

So it is do able, just they need to modify their code and use offlineplayer

misty ingot
#

works fine

tender shard
wet breach
#

That wont really work without a middle plugin to do some translating but ideally better off with some custom plugin

tender shard
misty ingot
#

hold on i am confused

#

what method do I use to load my config file into a File object

tender shard
#

YamlConfiguration myYaml = YamlConfiguration.loadConfiguration(myFile)

radiant cedar
#

com.mysql.cj.jdbc.ClientPreparedStatement: INSERT INTO player_data(uuid, name, rank ,money, prestige, blocks-mined, level, plot, last-world, survival-world, location) VALUES ('55123b33-7dcb-4756-a7c2-31eb0691454d', 'Demopro', 0, 0, 0, 0, 0, '0 0 0 0 0 0', 'hub', 'world', '0 0 0 0 0')

#

why does this not add anything to my table

#

on sql

#

connection is made no problem

misty ingot
#

any errors?

radiant cedar
#

no

#

im just printing the prepared statement

tender shard
#

well you should execute it instead of printing it lol

radiant cedar
#

i do

tender shard
#

show your code

#

where you execute it

#

my guess is: you do executeQuery()

radiant cedar
#

whats the website

#

to print code

tender shard
#

?paste

undone axleBOT
radiant cedar
tender shard
#

you got no errors because you ignore the exception

#

print out the stacktrace in your catch statement

radiant cedar
jagged monolith
#

?paste

undone axleBOT
jagged monolith
#

Use that instead.

radiant cedar
#

use what

jagged monolith
#

The paste service. Instead of filling this channel with the error.

radiant cedar
#

oh okk

#

mb

radiant cedar
#

i cant find a syntax error

#

PreparedStatement statement = connection.prepareStatement("INSERT INTO player_data(uuid, name, rank ,money, prestige, blocks-mined, level, plot, last-world, survival-world, location) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");

tawdry cedar
#

Iโ€™m updating a plugin from 1.19.2 - 1.19.3 using a little bit of NMS. I got the source code from GitHub of this plugin, when I go into the NMS class for 1.19 theyโ€™re not using obfuscated methods so when I import the code to my IDE it canโ€™t find these methods. How is this possible? Am I being stupid?

eternal oxide
#

?nms

tender shard
#

who is "he"?

tawdry cedar
tender shard
#

you don't

eternal oxide
#

you didn;t run buildtools with --remapped

tawdry cedar
#

I have done this

#

Already

tender shard
#

"has errors"...

tawdry cedar
#

And the methods what arenโ€™t obfuscated show as an error

tender shard
#

if it has errors, fix the errors

tawdry cedar
#

Oml

#

Have you actually read what I said

tender shard
#

yes

#

you said "it has errors"

tawdry cedar
#

Clearly not

eternal oxide
#

have you?

tawdry cedar
#

Before that

#

Idiot

eternal oxide
#

ok, end of help

tender shard
#

yes I have, and then someone sent you MY blog post, which YOU did not read

#

then you complained about "it has errors"

tawdry cedar
#

Oml Iโ€™m not even continuing speaking to you, clearly you donโ€™t understand.

tender shard
#

now it's the time to apologize and then we can look at it again in a nice and more meaningful way

tawdry cedar
#

Youโ€™re speaking to me like I donโ€™t have a clue

harsh totem
#

chill out guys

eternal oxide
#

We know exactly why you have errors. I linked you to a blog that tells you the correct way to do things, you ignored it and became rude.

tawdry cedar
#

Literally I was saying

#

Iโ€™ve already ran remapped build tools

tender shard
#

so what is the error message

#

what does it say

eternal oxide
#

If they are using no obfs methods and you have errors on those method you have nor run BT with --remapped

tawdry cedar
#

I am not at my laptop right now but basically it doesnโ€™t recognise the methods when theyโ€™re not obfuscated

tender shard
#

noone can help you if you don't send the proper error message

eternal oxide
#

unless you are talking about packets and those names changed (for some)

tawdry cedar
#

I have the remapped jar in my BuildTools

eternal oxide
#

^

#

give us a method name it can't find

tender shard
#

yeah and tell us whether just intellij complains or whether it's actually maven that cannot find sth

small current
#

what is the block data for button and pressureplate

#

i want to check if a block is a pressure plate or a button

eternal oxide
#

getBlockData instanceof

tawdry cedar
#

Honestly I was trying not to be rude, but itโ€™s quite frankly irritating when people say stuff like โ€œjust fix itโ€. Like I try not to come to these help discords first like some do, and only use them if absolutely necessary. I am not new to Java at all, and know what I am doing mostly so I just found it a bit insulting. I apologise if I upset anyone there.

And the errors well I can tell you in a minute.!

radiant cedar
eternal oxide
#

missing ;

rotund ravine
#

We need all the errors in your first message to tell you your issue. Including your pom/gradle is also needed for a proper answer. Donโ€™t expect us to help without all the valid information @tawdry cedar

eternal oxide
#

If thats not it, show us the sql error you get

hazy parrot
wet breach
radiant cedar
#

i did make this for name and level

radiant cedar
misty ingot
#
    public void updateConfig() {
        YamlConfiguration config = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "config.yml"));
        getLogger().info(String.valueOf(config.getDouble("config-version")));
        if (config.getDouble("config-version") != 1.3) {
            try {
                ConfigUpdater.update(this, "config.yml", new File(getDataFolder(), "config.yml"), Arrays.asList("null"));
            } catch (IOException e) {
                e.printStackTrace();
            }
            config.set("config-version", 1.3);
            try {
                config.save(new File(getDataFolder(), "config.yml"));
            } catch (IOException e) {
                e.printStackTrace();
            }
            reloadConfig();
            getLogger().info("Updated config file to latest version");
        }
    }

ok so config-version gets inserted/updated but any fields that I add to the config.yml when compiling dont get added
previously it was the inverse (new values got inserted, config-version didnt get updated

wet breach
eternal oxide
eternal oxide
#

yes

wet breach
#

It isnt one for mysql

tawdry cedar
wet breach
#

Anyways they should try what i suggested

tawdry cedar
#

Also I have this in my pom.xml, as required.

#
                <groupId>net.md-5</groupId>
                <artifactId>specialsource-maven-plugin</artifactId>
                <version>1.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>remap</goal>
                        </goals>
                        <id>remap-mojang</id>
                        <configuration>
                            <srgIn>org.spigotmc:minecraft-server:1.19.3-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
                            <reverse>true</reverse>
                            <remappedDependencies>org.spigotmc:spigot:1.19.3-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
                            <remappedArtifactAttached>true</remappedArtifactAttached>
                            <remappedClassifierName>remapped-mojang</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-mojang.jar</inputFile>
                            <srgIn>org.spigotmc:minecraft-server:1.19.3-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
                            <remappedDependencies>org.spigotmc:spigot:1.19.3-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>```
#

And have ran a remapped version of BuildTools

eternal oxide
#

does auto complete not offer you alternatives?

wet breach
radiant cedar
radiant cedar
tender shard
#

@tawdry cedar send the errors as text message pls, imgur never loads for me

radiant cedar
tender shard
#

but I didn't find out why

#

lol

#

I also tried to rename all your columns, didnt help for me

#

and looked for invisible characters, but there weren't any

radiant cedar
#

lol

tender shard
#

maybe you have a wrong "comma char" somewhere or sth?

#

but then I also rewrote the whole thing from scratch with the names you used, and it still didnt work

#

I have absolutely no idea what's wrong

tender shard
tawdry cedar
tender shard
#

is that an IntelliJ/IDE error, or does it come from maven?

tawdry cedar
#

IDE

tender shard
#

try to run maven anyway, then post the full maven log

#

just run mvn clean package

#

?paste the maven log afterwards

undone axleBOT
radiant cedar
#
String sql = "SELECT * FROM player_data WHERE uuid = " + uuid;
ResultSet result = statement.executeQuery(sql);```

java.sql.SQLSyntaxErrorException: Unknown column '55123b33' in 'where clause'
#

is WHERE not a thing lmao hellp

misty ingot
#
    public void updateConfig() {
        YamlConfiguration config = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "config.yml"));
        getLogger().info(String.valueOf(config.getDouble("config-version")));
        if (config.getDouble("config-version") != 1.3) {
            try {
                ConfigUpdater.update(this, "config.yml", new File(getDataFolder(), "config.yml"), Arrays.asList("null"));
            } catch (IOException e) {
                e.printStackTrace();
            }
            config.set("config-version", 1.3);
            try {
                config.save(new File(getDataFolder(), "config.yml"));
            } catch (IOException e) {
                e.printStackTrace();
            }
            reloadConfig();
            getLogger().info("Updated config file to latest version");
        }
    }

ok so config-version gets inserted/updated but any fields that I add to the config.yml when compiling dont get added
previously it was the inverse (new values got inserted, config-version didnt get updated

tender shard
#

maybe your config updater is just fucked up

misty ingot
#

do you know a good one?

tender shard
tawdry cedar
#

The full log basically just spams this class file has wrong version 61.0, should be 55.0 Please remove or make sure it appears in the correct subdirectory of the classpath.

tender shard
#

you either

  1. use an outdated JDK
    or
  2. use an outdated version of the maven-shade-plugin (should be 3.3.0)
radiant cedar
#

[11:34:21] [User Authenticator #16/INFO]: UUID of player Demopro is 55123b33-7dcb-4756-a7c2-31eb0691454d
[11:34:21] [Server thread/WARN]: java.sql.SQLSyntaxErrorException: Unknown column '55123b33' in 'where clause'

#

it seperates - as columns

#

how do i prevent this

hazy parrot
#

are you saving uuids as varchars ?

radiant cedar
#

yes

hazy parrot
#

save them as uuid(dk if that exist in your database) or as byte array

radiant cedar
#

do i have to do ````uuid` ```

misty ingot
hazy parrot
radiant cedar
hazy parrot
humble tulip
#

U can store as string

#

That's fine

#

But your sql statement

#

Let's see

radiant cedar
tender shard
#
  1. the instructions file tells it which nodes you explicitly want to have quotes
#

e.g. messages, so that admins don't accidentally add special symbols that wouldn't work without quotes

#

and stuff

#

and that's it

humble tulip
misty ingot
#

right.

humble tulip
#

You should hse prepared statements

#

Use

tender shard
tawdry cedar
#

I changed it to 3.3.0 and then

#

Tag name: version Description : The version (or valid range of verisons) of the plugin to be used. Version : 4.0.0 is the error

radiant cedar
#

ty

tender shard
#

do you use intellij?

hazy parrot
tawdry cedar
humble tulip
radiant cedar
#

for everything?

#

why

misty ingot
tender shard
#

to get the FULL maven log, click the uppermost thing on the left side, and then you see the full log on the right side

humble tulip
#

Also results in faster execution i think

radiant cedar
#

like this?

hazy parrot
#

use placeholders

radiant cedar
#

?

misty ingot
#

whats all the symbols for btw

#

the $^.* etc

humble tulip
#

No

#

SELECT * FROM TABLE WHERE UUID = ?;

#

statement.setString(1,uuid.toString());

eternal night
#

โœจ SQL Injection โœจ

fluid river
#

good afternoon comrades

#

where are n(oobs)ewbies

#

show me

fluid river
#

like in permissions plugins

humble tulip
fluid river
#

`` for strings

tender shard
fluid river
#

? is for placeholders

tender shard
#

either you are not using mojang mappings, or the plugin source code does not use mojang mappings @tawdry cedar

#

so please send your pom and then we know the issue

misty ingot
fluid river
#

oh

#

my bad

tender shard
#

little bobby tables โค๏ธ

fluid river
#

๐Ÿ˜‰

tardy delta
#

There some site where you can test sql injection

fluid river
#

setting your son's age to string

tender shard
#

you only added "spigot" as dependency

tardy delta
#

Wondering how the db impl handles setting parameters

tender shard
#

but it should also have <classifier>remapped-mojang</classifier>

tawdry cedar
#
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.19.3-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
            <classifier>remapped-mojang</classifier>
            <exclusions>
                <exclusion>
                    <groupId>org.spigotmc</groupId>
                    <artifactId>minecraft-server</artifactId>
                </exclusion>
            </exclusions>
        </dependency>```
#

????

tender shard
#

oh sorry I didnt see you added both

tawdry cedar
#

Yeh I tried with one, and then added both

fluid river
tender shard
#

remove the first spigot dependency

misty ingot
tardy delta
#

True

tender shard
#

you must only have one

fluid river
#

how's ur calculator tho

tawdry cedar
#

When I was researching it I saw some people with two so ๐Ÿคทโ€โ™‚๏ธ

tender shard
#

yeah that's just plain wrong though

tardy delta
#

Implementing functions

tender shard
#

and also

#

do NOT exlude the "minecraft-server" thing

#

do it exactly as in my blog post

#

?nms

tardy delta
#

Time to refactor

tender shard
#

only add this one spigot dependency without any exclusions

fluid river
tardy delta
#

Im not using a queue

fluid river
#

i mean

#

how was it called

tardy delta
#

Implemented a char trie

fluid river
#

in your old code

tardy delta
#

Tokenlist?

fluid river
#

yeah

#

Tokens

tardy delta
#

Im only using those for storage and solving the expression

radiant cedar
#

"SELECT name, money FROM player_data ORDER BY money";

fluid river
radiant cedar
#

if name is a reserved keyword

tender shard
#

it isnt

radiant cedar
#

what should i add to beginning and end

#

but its different color on my ide lool

radiant cedar
#

should i add

#

do beginning and end

tardy delta
#

It's not supposed to be a graphical program

tawdry cedar
#

Ok ye that's fixed the issues, Istg I literally have tried it without both of them things before as well

radiant cedar
#

if it was reserved

tender shard
#

wait

fluid river
tender shard
#

name is reserved

hazy parrot
tardy delta
#

More like a standalone library

tender shard
#

usually you should wrap everything in quotes anyway

tawdry cedar
#

And it changed nothing, oh well now got to fix these other problems with the code itself lol

radiant cedar
tender shard
hazy parrot
tender shard
#

alternatively @tawdry cedar : Show line 88 of "NMSHandler"

#

does it say "WorldServer" or "ServerLevel" there?

fluid river
#

?

#

setString

tender shard
#

no, "name" and "level" are the column names

hazy parrot
#

you cant have pleaceholders in select afaik

tender shard
#

not the values

radiant cedar
# hazy parrot `\"name\", \"level\"` because you are already inside of string for statement

PreparedStatement statement = connection.prepareStatement("UPDATE player_data SET `name` = ?, rank = ?, money = ?, prestige = ?, blocks_mined = ?, `level` = ?, plot = ?, last_world = ?, survival_world = ?, location = ? WHERE uuid = ?");

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank = 0, money = 0, prestige = 0, blocks_mined = 0, `level` = 0, plot = '0.0 0.' at line 1

#

so i shouldd just use quotes

#

instead of `

tender shard
#
`name` = ?
#

etc

radiant cedar
#

i did this

#

and still this error

tawdry cedar
humble tulip
#

Add `

radiant cedar
fluid river
#

go for online SQL tester and select the db provider you use ๐Ÿ˜‰

tender shard
radiant cedar
tawdry cedar
#

final Registry<EntityType<?>> entityTypeRegistry = Registry.ENTITY_TYPE;

IDE Error:
Cannot resolve symbol 'ENTITY_TYPE'

fluid river
tender shard
#

the whole Registry thing is different now

tawdry cedar
radiant cedar
tender shard
#

you gotta go through NMS. let me check how I did it

#

1 sec

tawdry cedar
#

I am still pretty new with NMS tbh

#

Only been messing with it for about a year

tender shard
tawdry cedar
#

yes

tender shard
#

I'll show you an example from my nms library

humble tulip
#

Just change name to pname

tender shard
#

1.19.2

#

1.19.3

tawdry cedar
#

Alright ye how did you find that out though

tender shard
#

to find out the name, e.g. for Registry.BIOME_REGISTRY, you gotta decompile the 1.19.2 version. basically like this, I'll send a video in a sec

tender shard
#

basically you check how exactly "Registry.BIOME_REGISTRY" was declared in 1.19.2, and then you know the key name that you gotta use in 1.19.3

radiant cedar
#

@tender shard when u had problems with INSERT for specific columns and deleted

#

how did u fix this case for UPDATE

#

cus when i specify i get same error

tawdry cedar
radiant cedar
#

PreparedStatement statement = connection.prepareStatement("UPDATE player_data SET rank = ?, money = ?, prestige = ?, blocks_mined = ?, plot = ?, last_world = ?, survival_world = ?, location = ? WHERE uuid = ?");

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank = 0, money = 0, prestige = 0, blocks_mined = 0, plot = '0.0 0.0 0.0 0.0 0.0' at line 1

tawdry cedar
#

how the fuck did you get that lmao

tender shard
tender shard
tawdry cedar
#

wow no wonder why this has been so complicated

#

like that in your IDE

tender shard
#

don't you use IntelliJ?

tawdry cedar
#

I do

small current
tender shard
#

you can basically just enter any class name, e.g. "CraftPlayer"

#

then move your cursor over that

small current
#

there is nothing for button and pressureplate

tender shard
#

and press Ctrl+B / Cmd+B

tawdry cedar
#

No i get that but like

tender shard
#

then it decompiles the CraftPlayer class and shows you the source

tawdry cedar
#

It obviously won't work if it's an error

tender shard
#

yeah ofc you need the proper import

tawdry cedar
#

If you get me

#

So I will need to downgrade back to 1.19.2

#

Like you have the whole source code of a lot of NMS versions there is what I am saying

tender shard
#

oh yeah you don't have a multi module setup

#

well check out this:

#

?switchmappings

tawdry cedar
radiant cedar
small current
#

what is the block data for Button

radiant cedar
tender shard
tender shard
#

it's probably: Attachable and AnaloguePowerable

humble tulip
#

@radiant cedar rank is a reserved keyword

radiant cedar
#

wtf

humble tulip
#

Do `rank`

tender shard
#

just put ALL your column names into quotes, you should always do that anyway

frank kettle
#

Hey guys, I know player.updateInventory exists but is there a specific reason to use it ever.

I'm now setting an item in use to AIR and it's not working and seems like i need to updateInventory for it to update the item in use?

I've changed before inventories with the inventory.setContents and it did not require an updateInventory after it so is there specific reasons this is needed?

tender shard
small current
#

what is Attachable

#

what is AnaloguePowerable

frank kettle
humble tulip
#

Rotatable can be rotated

tender shard
humble tulip
#

Eg. Stairs

tender shard
#

attachable can be attached to sth, e.g. torches or signs

#

AnalogePowerable is stuff that can emit or transport redstone

#

e.g. a lever, button, or redstone itself

small current
#

so how can i check

#

if a block is a pressure plate

#

a material.toString contains ?

tender shard
tender shard
small current
#

what are those

frank kettle
#

thank you alex

small current
#

there is no getTag or whatever

tender shard
# small current what are those
    @EventHandler
    public void onPressurePlate(PlayerInteractEvent event) {
        if(Tag.PRESSURE_PLATES.isTagged(event.getClickedBlock().getType())) {
            event.getPlayer().sendMessage("You stepped on a pressure plate, or clicked on one!");
        }
    }
eternal oxide
#

Tag.PRESSURE_PLATES.isTagged ^

tender shard
small current
#

tysm

tender shard
#

what version are you on though?

#

many tags are only available in quite recent versions

small current
#

1.17

tender shard
#

that should work fine

#

most tags were added in 1.16 or so

small current
#

this thing is a life saver

#

thanks

tender shard
#

it indeed is

#

I still use Set<Material>s for most stuff because some people are still on 1.14 -.-

#

I still do it like this

small current
#

well im not publishing the plugin

tender shard
#

use the tags, that's what they were made for

small current
#

if i was going to publish it i would have used them

#

well they are useful

tender shard
#

wait so you mean you are NOT going to use the tags?

#

I am confused now lol

small current
#

i used it

tender shard
#

okkk

tawdry cedar
#

Like the methods have but the package name is the same

#

Like I don't get how that website tells me new methods

tender shard
#

hm well yeah you are in a shitty situation since the field names also havent changed

tawdry cedar
#

Guess I will just have to do what you are doing?

tender shard
#

my tip would be to just use recaf or something, then decompile the 1.19.2 vanilla server.jar, and the 1.19.3 one

tawdry cedar
tender shard
#

yeah that would definitely help

#

I mean

#

one sec I got a call

tawdry cedar
#

lol got to run build tools on a few other versions now

#

ok

hexed void
#

How can I create a Custom Entity in 1.19.2?

tender shard
#

the NMS one

tender shard
#

then yuo can just do the Ctrl+B thing lol

tawdry cedar
#

that

#

is smart

tender shard
#

anyway I hope you don't still think I'm an idiot, but as you see, it was very important to see the actual error. That I was asking wasn't meant offensively ๐Ÿ˜›

#

in case you already cloned jefflib, you must update it, I only just pushed the 1.19.3 module

#

like 30 seconds ago

misty ingot
#

?paste

undone axleBOT
misty ingot
tender shard
#

UUUUGH this fucking intelliJ update again installed this shitty "minecraft development plugin" D:

tawdry cedar
tender shard
#

alrighty no problem lol :3

hexed void
#

I'm sorry
How should EntityTypes be passed to the parent class?

tender shard
undone axleBOT
tender shard
#

and the included config file

tender shard
#

it's not possible otherwise

#

e.g. if your mob is hostile and can walk and only do melee, just make it ZOMBIE

#

if it's passive but can fly, make it a bat

#

etc etc

#

just choose something that's close to what you are doing anyway

hexed void
#
public class CustomSkeleton extends EntitySkeleton{

like this?

misty ingot
#

@tender shard ^^

misty ingot
#
stringlists:
  - "^disabled-worlds$"
  - "^dropped-head-lore$"

ignored:
  - "^config-version$"

doublequotes:
  - "^messages-.+$"
  - "^prefix$"
  - "^dropped-head-name$"
  - "^death-ban-broadcast-message$"

escape-newlines:
    - "^messages-.+$"
    - "^dropped-head-lore$"

this is my instructions file

primal goblet
#

i have this issue in my server [ Proxy ] lost connection to server.
all the members kicked evenly for no reason and the server is running normally
so how can i fix this?

tender shard
echo granite
#

Can anyone recommend a readable Scoreboard API with 1.19 support?

tender shard
#

god I hate the scoreboard system so much

misty ingot
#

@tender shard were you able to make anything of the errors?

echo granite
tender shard
#

I always do flat file configs

#

?paste

undone axleBOT
tender shard
#

that's why the config updater cannot do that

#

I think that admins agree that nested configs suck anyway

#

the screenshot looks way better than this

playerheads:
  drop-heads: false
  ...
#

because if you just once forget the indent, the whole config is rekd

hushed pawn
#

I have question
Something happend with -0.34 and it becomes 0.38, than same thing happened with -0.40 and it becomes 0.17
How to find out what happened?

tender shard
#

erm whut

#

looks like you are using some mutable stuff like locations or vectors, right?

misty ingot
#

wait so

tender shard
#

if not, I really have no clue what you talk about

misty ingot
#

lets assume that in version 1.2 of the plugin (which is downloaded by all users) the config is nested

#

and in version 1.3 it is not

#

will your code update it properly?

#

to being non-nested

tender shard
#

no

misty ingot
#

so what you are telling me is that

#

I fucked up

tender shard
#

it can perfectly update a flat-file manipulated old config to a flat-file new totally changed config

hushed pawn
tender shard
#

but not if something is nested

tender shard
hushed pawn
#

Yes

tender shard
#

and wdym with "-.34 changed to .38"

misty ingot
#

what would you recommend I do to make sure that everyone who updates the plugin gets a flat file config?

hushed pawn
#

-0.34 before calculation and 0.38 after

humble tulip
#

@tender shard ever worked with chunk packets?

hushed pawn
#

If your Y velocity -0.34 and you get hit it set your Y velo to 0.38

#

And if it -0.40 it set it to 0.17

tender shard
humble tulip
#

Have you tried modifying a chunk before sending it?

tender shard
#

Yes

humble tulip
#

Great!

tender shard
#

I never understood that website, i always use nms packets

humble tulip
#

I was reading this and tell me if I'm understanding correctly

tender shard
#

I hate protocollib

#

Its so much more complicated

humble tulip
#

Oh

hushed pawn
humble tulip
#

So how did you modify the chunks then?

misty ingot
#

@tender shard do you know how I could convert the nested config into flatfile if config-version is 1.2?

hushed pawn
#

I use it only for listening packets

humble tulip
#

My idea was to deserialize the packet, modify the chunk and rewrite my own packet