#help-development

1 messages · Page 1854 of 1

quaint mantle
#

you

#

have your dependencies all right?

young knoll
quaint mantle
#

the default scope should be compile

#

so why dont it compile with the plugin/

young knoll
#

You need to add the shade plugin

#

I think, idk I don't use maven

fleet imp
#

So the shade plugin is a spigot plugin, yes?

#

like, do i add it to my plugin, or my mc sevrer

young knoll
#

No

#

It's a maven plugin

quaint mantle
#

why do you need the shade plugin anyway?

#

just put the <scope>compile</compile> is okay isnt it?

young knoll
#

Don't think so

quaint mantle
#

tho it is default so idk why it is making error

fleet imp
#

ok, i have the plugin in my pom.xml, how do i "shade" a jar

young knoll
#

See the page I sent

ivory sleet
#

Yuh compile is basically the gradle equivalent of implementation

#

So should be shading if you add the plugin

rough basin
#

aye Conclure

#

Can you help me?

ivory sleet
#

?ask

undone axleBOT
#

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

rough basin
#

sorry i was so rushed

fleet imp
young knoll
#

Apparently all you need to do is add the plugin

#

So it should work if you have stuff set to compile

fleet imp
#

kk thx

golden turret
#

gradle: use shadowjar, change compileOnly to implementation

young knoll
#

mhm

#

maven: use maven-shade and change compile to... well, compile

fleet imp
#

Shade plugin: what is the goal "shade". Maven doesnt know what it means and neither do i. Its in plugins>exicutions>goals

quaint mantle
#

paste ur pom

#

you dont even need the maven shade plugin bro

drowsy harness
#

components with a click action doesn't work in 1.18 for me, any ideas why?

textComponent.setColor(ChatColor.YELLOW);
textComponent.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://myurl.com"));

player.spigot().sendMessage(textComponent);```
sullen marlin
#

Did you disable them in your client settings

drowsy harness
drowsy harness
proven sierra
#

Jeg snakker norsk hehehe

drowsy harness
#

ahhh

#

Norwegian is meh :(

proven sierra
#

Nei, det er så bra

drowsy harness
#

Jag tycker inte så

#

=P

proven sierra
#

🤬

proven sierra
unreal quartz
#

Firing up google translate

stone apex
#

Players are still dying for the first time they enter this plot world, I've tried teleporting them above the block but they just die instantly. I only have eventhandlers causing them to be teleported, and eventhandlers catching the world change event

mellow gulch
stone apex
#

I will, it's an odd bug to have though idk why it doesn't happen anywhere else on the server... Or maybe it does.

proven sierra
unreal quartz
#

Yes

stone apex
#

There is no code other than player.teleport() and it's just instantly killing them, but only the first time they enter the plotworld. I wonder if PlotSquared kills players that don't have a plot lol

mellow gulch
#

i had a bug once where setting their max health to less than 3 hearts then teleporting them would kill them, strange stuff happens sometimes but if nobody knows a solution sometimes you just need to turn to janky work arounds

stone apex
#

My plugin basically uses P2 to like create plots, worldguard to paste schematics down, and my plugin teleports ppl to their "hideout" (plot)

drowsy harness
# proven sierra kan du sende ut komponent json

TextComponent{text=> Tryck här för att öppna kartan.,BaseComponent(color=, font=null, bold=null, italio=null,underlined=null, strikethrough=null,obfuscated=null,insertion=null, extra=null,clickEvent=ClickEvent(action=OPEN_URL,value=https://myurl/#), hoverEvent=null)};

proven sierra
#

Ah yeah

#

Click event is not on the text it’s after

#

Try using component builder API perhaps? Is that possible here

#

No idea why it’s parsing like that but it shouldn’t do unless I’m misreading

#

Maybe someone will come and correct me but looks wrong to me

drowsy harness
#

it could be a fault on my part

#

eh

#

but i'll try

#

with the buildr

proven sierra
#

Jeg skal prøve det

stone apex
#

Okay does anyone want to join and click a button and see if they die on my server I hope the bug is fixed

drowsy harness
young knoll
#

Weird

stone apex
#

And I can't do it myself because this bug appears when a players purchases a plot for the first time

proven sierra
#

Jeg er prøve nå

drowsy harness
#
                .color(ChatColor.YELLOW)
                .append("» Tryck här för att öppna kartan.")
                .event(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://randomurl.se/"))
                .create();

player.spigot().sendMessage(componentBuilder);```
young knoll
#

That looks correct code wise, you are adding it to the component that has the text in it

proven sierra
#

Oh hey frostalf

#

Gone lowercase I see

wet breach
#

do you not have access to console or something? if you do just set yourself as normal perms

stone apex
#

I really gotta code a system to reset plots, it's all custom code

young knoll
#

Does the p2 method not work

stone apex
young knoll
#

Delete your data

wet breach
proven sierra
#

Not when I spoke here, I swear!

stone apex
proven sierra
#

Not in IRC either if memory serves, but I have no idea at that point

wet breach
stone apex
#

I will just wait til the next person joins to see if they die lol

proven sierra
#

ahh i see

#

been doing anything cool with cyber tech recently hehe?

wet breach
proven sierra
#

bet you found the log4j thing interesting

stone apex
#

At least I am coding

wet breach
young knoll
#

Like updating spigot

proven sierra
#

never thought it was either - I imagine the most anyone could work out to do in the time it was known is crash a server and/or their own client

#

i reckon governments knew it way before disclosure but maybe that's just the pessimist in me :p

young knoll
#

Oh gosh

#

Wannacry moment

wet breach
proven sierra
#

why am I vulnerable when I'm running my chmod 777 server as root!

wet breach
#

as I said, if you knew proper sysadmin stuff not overly serious 😛

proven sierra
#

fuck you spigot

#

@drowsy harness jeg velger for [whatever the word for download is]

#

(jeg forgor)

wet breach
proven sierra
#

venter!

#

fiowqjgiwqh

#

jeg er dum

wet breach
young knoll
#

Governments sus

proven sierra
#

They probably have tons of exploits, but ones for log4j would get them into most Java software

drowsy harness
proven sierra
#

minecraft

#

laptop on hotel wifi hehe

drowsy harness
#

ah

wet breach
#

the bug was just a plus

#

😛

proven sierra
#

hahahaha

young knoll
#

👀

proven sierra
#

hvordan er min norsk

#

jeg lærer :p

#

The original works for me

drowsy harness
#

bruh

proven sierra
#
    TextComponent textComponent = new TextComponent("» Tryck här för att öppna kartan.");
    textComponent.setColor(ChatColor.YELLOW);
    textComponent.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://myurl.com"));

    player.spigot().sendMessage(textComponent);

This on 1.18.1

drowsy harness
#

is it something server side then?

proven sierra
#

So I was wrong about how the toString looked. lol

#

Uhhh

#

More likely client

young knoll
#

Are you using a fork

proven sierra
#

I had fresh 1.18 + tw // ||paper|| 1.18 server

drowsy harness
#

ye i am

wet breach
#

as for the government knowing about exploits they definitely do, just its not the governments job to do a private corporations job

young knoll
#

No

drowsy harness
#

but it worked for 1.17

#

so

proven sierra
#

What fork

young knoll
#

But if they don’t report it to said corporation, how can they fix it

stone apex
drowsy harness
#

purpur

proven sierra
proven sierra
drowsy harness
#

i'll check

young knoll
#

Because then it gets leaked :p

proven sierra
#

Don't see it on their GH issues

wet breach
# stone apex It might not be that difficult. It's why I'm bringing it up here. You don't need...

I am not saying creating something isn't difficult. You said it isn't easy to remove someones data. I said that might just be a design flaw since you said everything was custom. As far as removing data about a player on a spigot server, yes you absolutely can do it and is relatively easy. As far as whatever data is stored on whatever it is you are keeping track that is on you. Don't get upset over a tiny comment

#

I am not saying F off, just if you want to get upset about it, just know in the end I really don't care either way

stone apex
#

It's just not even that simple, idk what you call data

#

It's like they get an upgradeable mansion

unreal quartz
#

Sounds like data to me

wet breach
#

sounds nice to get an upgradeable mansion

proven sierra
#

data? I hardly know her

young knoll
#

Can I get one in real life

proven sierra
stone apex
#

I already have the system online on a production server with a tiny bug

#

I don't need useless java code that removes their hideouts

young knoll
proven sierra
#

death does not sound like a tiny bug

young knoll
#

I’m telling Santa

proven sierra
#

and it sounds like you do

stone apex
#

It only happens once and then never again?!

#

This is why I am here

proven sierra
#

death usually only happens once

wet breach
stone apex
#

You are just trolls, this is for development chat

#

I am trying to seriously figure out what is happening in the spigot code

#

A simple teleport did not ever do this pre 1.18

proven sierra
#

your* code

young knoll
#

Oh god, GDPR on spigot server

stone apex
#

I use player.teleport()

#

This is not my code having an issue lol

young knoll
#

Well it isn’t spigot

#

Someone would have reported it

stone apex
#

I patched it with player.setInvulnerable but it's just not a good idea

#

Well this is fruitful thanks

wet breach
#

so players die when they teleport?

#

if that is the case, might want to look at anything that modifies their health or regen stuff

young knoll
#

Making them invuln for a tick is fine

#

Not ideal, but it’s a perfectly fine work around

mellow gulch
# stone apex Well this is fruitful thanks

i'd suggest trying to find a minimal way to reproduce the bug, and if you can, then report it as a bug
but if it isn't a bug then the setInvulnerable idea i provided is the only jank patch i can think of

quaint mantle
#

do u guys think that the log4j exploit effects spigot?

young knoll
#

Which one

quaint mantle
#

any

young knoll
#

Well

#

Spigot released a patch for it

#

So no

unreal quartz
#

?log4j

undone axleBOT
wet breach
quaint mantle
#

ok thx

stone apex
#

I don't understand this

#

Code is already hard enough, socializing is too

wet breach
#

they are making it a point that it isn't spigot's code that is causing your players to die

#

at least not directly anyways

stone apex
#

I believe he was referring to me just wanting help and not having the strength to do it myself

#

As it seems most of the chats are in this place, very watered down

proven sierra
#

o.o

unreal quartz
proven sierra
young knoll
#

Teach me

unreal quartz
#

Ouch

proven sierra
#

are you in uni now bishop? been a while

wet breach
#

just do keep in mind that support/help here is voluntary

mellow gulch
#

i've been operating under the assumption that spoon feeding info to people is a bad idea

unreal quartz
proven sierra
#

nice

#

i had my cambridge interview last month

stone apex
#

Friction is unnecessary is my point. gnite

proven sierra
#

don't think i'm getting in. lool

buoyant viper
unreal quartz
#

At least you had the balls to apply

wet breach
proven sierra
#

is what it is ¯_(ツ)_/¯

#

likely going to warwick I think

#

assuming I get grades

unreal quartz
#

And I know a person who kept telling me she bombed her Oxford interview for Maths and lo and behold she got in

wet breach
#

cya later @stone apex some rest sometimes is beneficial to figuring out the problem

proven sierra
#

yeah but I got uhh

#

very low entry exam scores

#

4.5 was my score average between the two papers, 6.5 is average offer :p

wet breach
#

I really have no clue about your problem specifically or where to look in regards to it, but that is how custom code stuff goes though

unreal quartz
#

Rip

proven sierra
#
  • average interview so unlikely unfortunately
young knoll
#

You’ve just gotta believe

wet breach
proven sierra
#

i don't think beliving at this point helps much hehehe

#

they've likely already decided who is getting in

unreal quartz
#

The University of Minecraft

proven sierra
#

and are just torturing us for a month to tell us

unreal quartz
wet breach
#

there is legit some businesses created just to get back at others XD

unreal quartz
#

Actually no

proven sierra
unreal quartz
#

It's october

young knoll
#

To be fair believing hasn’t gotten me anywhere, but it hasn’t hurt

proven sierra
#

All interviews have been had by now

unreal quartz
#

Yeah I just realised lmao

#

I thought it was December for some reason

proven sierra
#

The delay is likely just for the pooling stuff

outer sorrel
#

im trying to make a bossbar that displays the time and the previous time like
1am - 1:30am - 2am - 2:30am - 3am
but whenever the time is 6:30am it displays two 6am's

6am - 6am - 6:30am - 7am - 7:30am

https://bin.birdflop.com/poyonutora.cpp

young knoll
#

Apparently java is cpp now

wet breach
#

o.O

wet breach
#

the front or the back? lmao

young knoll
#

Those paste sites never get the Lang right

buoyant viper
young knoll
#

Oh no water gun

wet breach
outer sorrel
#

when the issue happens 6:30am

wet breach
#

that isn't what I am asking. What I am asking more specifically is are you trying to display in game time or real world time?

buoyant viper
#

looks like in-game?

outer sorrel
#

from the world ticks

#

using getTime

young knoll
#

Hmm

#

Maybe because 24000 and 0 are both 6am

outer sorrel
#

yea something like that probably

#

but not sure how to fix exactly

wet breach
#

assign both those to be the same

eternal oxide
#

0 to 23999

wet breach
#

or do that

young knoll
#

Mc time is weird

#

Because 0 isn’t midnight

wet breach
outer sorrel
#

oh wait i figured out something which might be it

#

in ```java
if (i < 0) {
timeBarString.append(prefix).append(TimeBossUtil.getTimeFromTicks(Math.floor((time + (i) * tickInterval) / tickInterval) * tickInterval));
} else if (i > 0) {
timeBarString.append(prefix).append(TimeBossUtil.getTimeFromTicks(Math.floor((time + Math.abs(i) * tickInterval) / tickInterval) * tickInterval));
} else {
timeBarString.append(prefix).append(TimeBossUtil.getCurrentTimeFromTicks(time / tickInterval * tickInterval));
}

young knoll
wet breach
#

2400 in the real world really doesn't exist. Some people use it, but in reality 2400 is actually 0000

young knoll
#

Yeah

outer sorrel
#

in the first if statement when "i" is -1 and -2 they both equal 0.0

young knoll
#

But still, 0:00 in the real world is midnight

#

In minecraft 0:00 is sunrise

outer sorrel
#

better example

(800 + -2 * 500) / 500
(800 + -1 * 500) / 500

they both equal 0

#

simplified maths from my thing

unreal quartz
young knoll
#

Yeah

#

It’s just a pain sometimes

wet breach
#

or just stick with real world time 🙂

young knoll
#

Like when trying to convert to real world hours

wet breach
#

converting to real world hours really isn't that hard o.O

unreal quartz
#

Synchronise minecraft time with time servers

young knoll
#
  • 6000 % 24000 iirc
#

Something like that

wet breach
#

I just do the math

#

20 ticks in every second

#

so I mean really not that hard 😛

next fossil
#

How do you convert from a DataWatcher to SynchedEntityData?
SynchedEntityData sed = npc.getEntityData();
It keeps giving me errors saying its a DataWatcher object, but there is none for the new Mojang Mapping itself
I keep getting NullPointerExceptions too because of it

gentle oriole
#

Where can I download javadocs 1.18.1?

outer sorrel
wet breach
#

either use buildtools to produce the javadocs or just use spigots url for the api

sullen marlin
#

That wiki page sucks

gentle oriole
#

Can anyone generate one for me? Im on my phone and I don't have access to my laptop rn. And when I get access to my laptop, my internet is probably down at that time.

wet breach
# outer sorrel why would this happen tho, its so annoying

depends on what kind of number object backs the math in the end. If it is int's then you only have whole numbers since that is all int's handle. If you go with double you get more digits to work with, and float even more then that XD

sullen marlin
#

There's --generate-docs to buildtools

#

And also they're all on nexus

outer sorrel
young knoll
#

Welp

wet breach
#

longs are not doubles or floats

young knoll
#

Rip whoever made that page

gentle oriole
sullen marlin
#

They're all there

unreal quartz
sullen marlin
#

And fourthly you can just add the source to your ide, since buildtools already downloads it

#

And fifthly your ide should also just give you the option to download if using maven or gradle

#

Certainly netbeans does

wet breach
young knoll
#

I think there are wiki pages for that too

gentle oriole
#

I just download download javadoc.jar then open it?

sullen marlin
#

Depends what you want to do with it

outer sorrel
sullen marlin
#

Most ides should just let you attach a jar

wet breach
outer sorrel
#

oh wait

#

yea i just realised

young knoll
#

Casting to int truncates

gentle oriole
#

Is there any way i can convert it to like a pdf file

sullen marlin
#

No, javadocs are html websites

#

It would be like a 5000 page pdf

young knoll
#

You could save the raw HTML as a pdf

gentle oriole
#

How can I open a jar file in chrome?

young knoll
#

Do what now

wet breach
#

just extact the files from the jar

#

and double click index.htm

gentle oriole
#

Ah so its extractable

wet breach
#

all jars are 🙂

young knoll
#

Every jar is

#

They are just zips

gentle oriole
#

Ok thanks👍

outer sorrel
#

seems to work now

#

thanks

#

casting is annoying soemtimes

wet breach
#

just fyi int double and floats etc

#

generally have a method to convert already

#

just depends if you need them decimals or not 😛

outer sorrel
#

k

rough basin
#

How to input something in BukkitRunable?

unreal quartz
#

Huh

rough basin
#

damn always my bad english want to kick me

wet breach
#

lol

rough basin
#

um like this

mellow gulch
#

(stuff in parent scopes)

unreal quartz
#

with an anonymous inner class like that you can just have a final local variable outside it for whatever you're trying to pass in

mellow gulch
#

^^ya what they said

wet breach
#

generally anything can access final, it is more of a question are you going to be able to change it?

mellow gulch
#

i wasn't the one with the question

wet breach
#

you were the one talking about final

#

I was clarifying it more XD

mellow gulch
#

k

rough basin
unreal quartz
#

If you're accessing a field in the enclosing class then you will probably mess it up

wet breach
rough basin
#

I thought it was a simple loop, but Scheduler Programming is quite difficult. Thanks

kind hatch
#

I'm working with maven multi modules and can't seem to get my jar to compile properly. My final jar is only ~150KB when it should be around ~350KB. It's like it's missing the main part of the plugin. Still trying to figure out how to use maven correctly, but the project is on gitlab. Would appreciate some help.
https://gitlab.com/Nothixal/hugs-multi-module

wet breach
#

if not, that would be why

kind hatch
#

I thought I was. Should the shading have to happen in the core module?

wet breach
#

it should happen in which ever has all the modules as a dependency

#

and for in the dependency tags, make sure they have the tag to compile

#

if they are set as provided, then shading plugin won't shade them in

kind hatch
#

Yea that was it.

#

Didn't have it in the right pom.

opaque plaza
#

I want to use the mojang mappings for NMS, but running Build Tools again with the --remapped flag changes nothing in my local maven repository. It gives me this warning while running the jar:
[WARNING] The requested profile "remapped" could not be activated because it does not exist.

rough basin
opaque plaza
sullen marlin
#

INFO] Installing /root/projects/minecraft/BuildTools/Spigot/Spigot-Server/target/spigot-1.18.1-R0.1-SNAPSHOT-remapped-mojang.jar to /root/.m2/repository/org/spigotmc/spigot/1.18.1-R0.1-SNAPSHOT/spigot-1.18.1-R0.1-SNAPSHOT-remapped-mojang.jar

mellow gulch
sullen marlin
#

Clearly worked fine

#

What is your issue

opaque plaza
#

When I try to import spigot using maven, it uses the spigot mappings

#

the names are like EntityPlayer

sullen marlin
#

Did you import the remapped-mojang classifier

opaque plaza
#
<dependency>
     <groupId>org.spigotmc</groupId>
     <artifactId>spigot</artifactId>
     <version>1.18.1-R0.1-SNAPSHOT</version>
     <scope>provided</scope>
     <classifier>remapped-mojang</classifier>
</dependency>
#

yeah

sullen marlin
#

Post your entire pom

opaque plaza
sullen marlin
#

idk then

opaque plaza
#

checking /work/decompile-latest/net/minecraft in the buildtools directory, the stuff there also uses the spigot mappings

sullen marlin
#

maybe your IDE is bugged

#

refresh caches or something

opaque plaza
#

yeah that was it

#

sorry to bother lol

mellow gulch
#

np

mellow gulch
neat trellis
#

Is there a way to use custommodeldata for a totem of undying effect?

neat trellis
#

yes but I want to just play the effect not give the item

mellow gulch
#

oh srry, didn't understand your question

neat trellis
#
player.playEffect(EntityEffect.TOTEM_RESURRECT);

this plays the totem effect

mellow gulch
#

(i for some reason didn't see the word effect at the end of the sentance)

#

im unsure about how the actual effect works

neat trellis
#

this animation

#

it works with custom model data but im wondering how I can implement it as just playing the animation with the custom model

#
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_STATUS);
packet.getIntegers().write(0, player.getEntityId());
packet.getBytes().write(0, (byte) 35);

try {
    ProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);
} catch (InvocationTargetException e) {
    e.printStackTrace();
}

I used protocollib to play the animation also but im not sure how to add custommodeldata

mellow gulch
#

i avoid protocol lib, so can't help you out with that part, but looking at this link (and your code) it looks like it only sends a byte instead of an itemstack, so i would imagine that the custom model data is probably lost

neat trellis
#

Yea thats why I was wondering if there was another option than protocol lib because the animations are stored as bytes

#

35 is totem

#

but player.playEffect(EntityEffect.TOTEM_RESURRECT); also doesnt allow for itemstack

mellow gulch
#

if the resurrect totem acts like how the guardian effect works then there is probably a particle effect for it also, and that particle effect might take an itemstack, but idk, imma look cuz im curious now

rough basin
#

Perhaps this is the last question. Can I pass additional variables in runTaskTimer()?

neat trellis
mellow gulch
neat trellis
#

that sucks, its alright I didnt need it but I think it looks cool and unique

mellow gulch
#

no need to always only use anonymous runnables

rough basin
#

Thanks bro

mellow gulch
#

np

next stratus
# sullen marlin Post your entire pom

Why doesn't spigot use gradle by the way? Maven is extremely outdated and should be left behind but a lot of new devs think it's the best thing ever and it's a pain to work with.

sullen marlin
#

Maven is extremely outdated and should be left behind

#

that's your opinion

next stratus
#

But it is?

#

It's like 20 years behind

sullen marlin
#

last commit: yesterday

#

sure seems like 20 years

next stratus
#

Maven takes up like 5 or 6 lines to get the spigot api gradle is 1

#

Just becomes a long messy file once you add more and more things in.

#

I'm sure if you did a vote upon moving spigot to gradle more would be in favor of moving than sticking with maven ngl.

buoyant viper
#

would probably just 50/50 idk

sullen marlin
#

I'm not getting into this argument

#

and literally no one touches the pom.xml except me

next stratus
sullen marlin
#

which is only 500 lines of a project that is more than 100k lines

buoyant viper
#

just make ur own spigot fork and gradlefy it

#

idk

next stratus
#

Is the spigot project not allowed on github by the way?

young knoll
#

That exists

sullen marlin
#

well what about the pom needs changing?

#

its a list of dependencies

junior briar
#

can i access persistent data of offline players?

young knoll
next stratus
#

I just find it messy, it's like a whole code block for each dependency where as gradle has it as a one liner.

sullen marlin
#

whether it says compile org.ow2.asm:asm:9.2 or <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> <version>9.2</version> <scope>compile</scope> </dependency> is hardly earth shattering

junior briar
#

not good ):

young knoll
#

I’ve thought about expanding the offline player functionality

#

But that’s a task for another time

next stratus
#

Yes but when you got 3 or more of the bottom one then it's gonna get a bit messy where as a single like for each is easier to manage

buoyant viper
#

make it a task for Maows Piping org @young knoll ezpz

young knoll
#

I’m in that discord

sullen marlin
#

<dependency><groupId>org.ow2.asm</groupId><artifactId>asm</artifactId><version>9.2</version><scope>compile</scope></dependency>

young knoll
#

It’s uhh... going well

sullen marlin
#

one line, problem solved 🙂

kind hatch
#

lmao

buoyant viper
#

then we make a new library, piping-pdc

next stratus
young knoll
#

No idea

#

Ask MD

#

Or a lawyer

next stratus
#

I mean, couldn't spigot do what paper is doing and upload patches? That's allowed.

young knoll
#

That’s what they do

next stratus
#

But not on github?

#

Way more people use github than any other git sites.

young knoll
#

Meh

#

Stash works fine

buoyant viper
#

isnt the stash for the cla or something

young knoll
#

Hmm?

buoyant viper
#

to avoid what happened to bukkit in the first place

young knoll
#

That’s what the CLA is for

buoyant viper
#

or is that solely BuildTools purpose

young knoll
#

That as well

next stratus
#

I thought they got over all that tho

young knoll
#

Over what

next stratus
#

The dmca shit

young knoll
#

Yes, and

next stratus
#

That was 2014 iirc?

young knoll
#

The CLA I believe is in place to protect against it happening again

#

And buildtools is there because you still can’t legally host Mojang code online

buoyant viper
#

yeah

young knoll
#

Which is why it’s hosted in patches and buildtools sews them together

buoyant viper
#

its probably just not worth moving the codebase back over to github at this point

next stratus
#

I wish md 5 would work with paper to just release one version with all of their changes built in instead of having to wait

young knoll
#

I’d assume so

quaint mantle
young knoll
#

MD and the paper team have different

#

Eh

next stratus
young knoll
#

Philosophies when it comes to spigot

quaint mantle
#

well i remember it was hardcoded only for the totem. maybe try make another texture for the totem lul

young knoll
#

I guess is the word

buoyant viper
#

philosophies and priorities probably

mellow gulch
young knoll
#

Yes

#

The biggest one, to my knowledge, is backwards compat

quaint mantle
buoyant viper
#

meanwhile @ paper: deprecating bukkit api left and right

#

xd

next stratus
young knoll
#

MD does let others work on it

#

Lul

buoyant viper
#

many people contribute to spigot?

sullen marlin
#

you have no idea what you're going on about

quaint mantle
#

mdaddy finally here

next stratus
#

The paper team said that you prefer to do it all yourself.

buoyant viper
#

why should the paper team speak for md

next stratus
#

That's what they said in a livestream, I'm only saying what I heard from them.

sullen marlin
#

and if you want to have a say in how the project is developed, then become a contributor

young knoll
#

It actually is all md. Choco, Doc, Me, everyone else that has contributed

#

We are all actually md

next stratus
#

I mean, there's a lot of nms stuff you also need to learn to maintain it right?

young knoll
#

He’s a hive mind

next stratus
#

Tbh, I should be careful at what I say because md could just ban me from the spigot site at any time

young knoll
#

Lol

#

If you don’t break a site rule, I doubt that will happen

buoyant viper
#

just dont talk abt paper ;^)

young knoll
#

Well

next stratus
#

I don't think i have broken a rule

young knoll
#

Don’t go recommending paper to everyone

next stratus
#

Why not

young knoll
#

Mentioning it won’t immediately get you executed

quaint mantle
#

i do think it does break some back compat?

young knoll
#

Because this isn’t the paper discord?

quaint mantle
#

*backward compatibility

young knoll
#

It does

buoyant viper
#

oh?

young knoll
#

Wait

#

Paper or spigot?

buoyant viper
#

paper

quaint mantle
#

like what? just ask, if you know

next stratus
#

I mean, there's no point trying to recommend it a lot of people already use it so...

buoyant viper
#

i thought it only deprecated methods for now

young knoll
#

I don’t think paper explicitly breaks anything from spigot

#

Yet

next stratus
#

Paper just fixes the bugs in spigot

quaint mantle
#

okay then it kinda same spigot

young knoll
#

If it does it’s not intentional

buoyant viper
#

not possible, spigot is perfect

#

😎

young knoll
#

Well, no

quaint mantle
#

nothing bad other than deprecate methods and stuff?

young knoll
#

But spigot fixes the bugs in spigot

#

That’s why we have a Jira

next stratus
#

I just wish spigot would fix the load times ngl

kind hatch
mellow gulch
next stratus
young knoll
#

I believe paper load times are due to async chunk loading

#

But in the end, when running a production server it doesn’t really matter

next stratus
#

Would it ever be possible to get the speed of 1.12 again in new updates?

young knoll
#

Maybe

#

A lot of that is down to Mojang

mellow gulch
buoyant viper
young knoll
#

I’m gonna smack ya

next stratus
#

It's just getting slower and slower each update. Something needs to be fixed in either the spigot api or Minecraft end.

buoyant viper
#

youch

young knoll
#

It’s minecraft

buoyant viper
#

oh the speed issues are definitely mojangs fault

next stratus
#

Every update is adding 5 seconds on the load time lol

young knoll
#

I’m not going to sit here and say Mojang is perfect

#

But they do at least try to optimize things over time

next stratus
#

Mojang isn't perfect ofc not

young knoll
#

1.18 was a big one

#

Because the world is now 320 blocks tall

next stratus
#

I think they need to focus on server side now don't they?

#

Like how fast things work backend etc

young knoll
#

Sorry

kind hatch
#

They've been slowly improving it over the last 3 updates.

young knoll
#

384 blocks tall

kind hatch
#

They being mojang

young knoll
#

I love the new cave stuff

#

But that extra height isn’t exactly great for performance

next stratus
#

It's sad that the community have to try and fix their messups

young knoll
#

Name a game where the community doesn’t

next stratus
#

Hm... True

young knoll
#

The community is huge

#

Way bigger than the dev team will ever be

next stratus
#

Do you think if all of the devs worked together we could rewrite spigot from the ground up?

young knoll
#

Sure

#

But what would you gain

#

Contribute to the spigot that already exists

quaint mantle
kind hatch
young knoll
#

Fair enough

quaint mantle
#

because they are too busy with adding vanilla-like features, maybe they dont have time to optimize?

young knoll
#

They do

#

They optimize every update

#

But they also add more content every update

#

It’s a constant game of cat and mouse

#

With a code base that’s 12 years old and was made by someone else

kind hatch
#

I mean, they've been rewriting most of it for a while now.

young knoll
#

Yep

kind hatch
#

Ever since 1.14 really.

sullen marlin
#

how long people gonna hold onto the notchcode thing

young knoll
#

I mean

#

I assume there is still some left

#

Probably not much

sullen marlin
#

< 1% would be my bet

young knoll
#

Was notch well versed in java

kind hatch
#

Well enough to make the game.

sullen marlin
#

plus the game performs far worse now than it ever did

kind hatch
#

It's no secret that he's not the best java developer

sullen marlin
#

so if anything notch code was an improvement 😉

young knoll
#

Idk about that

kind hatch
young knoll
#

If you reverted all the code back to what notch had

#

I don’t think the game would run better

sullen marlin
#

boot up beta 1.7 and see 🙂

young knoll
#

Beta 1.7 had far less features

kind hatch
#

There was one really cool feature notch made back in the day. The super resolution screenshot tool. Wish that was in the game today.

young knoll
#

Ah yes the mega screenshot

kind hatch
#

The isometric world screenshots were also really cool.

quaint mantle
#

how to make a cool name

young knoll
#

I’m sure mods can do it

quaint mantle
#

okay

#

what mod

young knoll
#

I wasn’t talking to you

quaint mantle
#

ye i know

young knoll
#

What do you want a cool name for

quaint mantle
#

idk

#

just a cool name

young knoll
#

Sir Bartholomew Gregorius III

quaint mantle
#

okay thanks.

kind hatch
#

Write a cool name generator lol

buoyant viper
young knoll
#

I do find it odd that Mojang turned down Jellysquid for a job

kind hatch
young knoll
buoyant viper
kind hatch
#

Fair enough

buoyant viper
#

actually, i just like cyberbullying in general

young knoll
#

Bullying big companies is fun

sullen marlin
#

you say mojang and microsoft like they are different things

buoyant viper
young knoll
#

They are

sullen marlin
#

lol

young knoll
#

The Mojang team is still the Mojang team

#

Even if Microsoft owns them

quaint mantle
#

lets go steal some code from 1.8 and put in 1.18, you will see the performance is unbelievable

kind hatch
#

I mean yes, Microsoft owns Mojang, but they have let Mojang develop instead of taking over like they normally do.

young knoll
#

I mean

#

I’m sure they have influence on them

#

But Mojang wasn’t just completely absorbed, it’s still a distinct team of people

young knoll
#

Are you copying it via code

#

If so, do it off the main thread

#

Yes

burnt current
#

Hey quick question: I am currently programming that players can claim chunks through my plugin by placing a specific item in the chunk. This will then store the id of the chunk (chunkX + "." + chunkY) under the person's name in a MySQL data table. Now, however, for certain scenarios, e.g. if the chunk has been claimed by another player or you have claimed it yourself before, I wanted to have the player always send a message regarding this and wrote the following lines of code for this:

if(MySQLMethods.getPlayernameByChunkid(chunkID) == null) {
                MySQLMethoden.addChunkId(player, chunkID);
                player.sendMessage("You have claimed this area with the id " + chunkID);
            } else if(MySQLMethods.getPlayernameByChunkid(chunkID).equals(player.getName())) {
                player.sendMessage("You have already claimed this area");
                return;
            } else {
                player.sendMessage("This area was already claimed by another player");
                return;
            }

The getPlayernameByChunkid method searches the database for which player this chunkid was stored under, based on the given chunkid.
My problem now is that the code right after the first if query is never executed. Even if no player was saved under this chunk. So the plugin doesn't seem to identify an empty table row as null. Does anyone maybe know how I can do this correctly?

kind hatch
#

Maybe cache the result of the method then use it for your comparisons.

#

That way you don't have to query twice and still have accurate information.

hybrid spoke
burnt current
#
public static String getPlayernameByChunkid(String chunkID) {
        try (Connection conn = main.getDataSource().getConnection();PreparedStatement stmt = conn.prepareStatement(
                "SELECT  playername FROM playerdata INNER JOIN chunks ON playerdata.id = playerid WHERE chunkid = ?;"
        )) {
            stmt.setString(1, chunkID);
            ResultSet rs = stmt.executeQuery();
            if(rs.next()) {
                return rs.getString("playername");
            } else
                return "";
        }catch (SQLException e) {
            e.printStackTrace();
            return "";
        }
    }
young knoll
#

It never returns null

#

It returns “”

hybrid spoke
#

^^

burnt current
#

Yes I also just noticed that

burnt current
#

Okay it works. Thank you so much for your help

mortal hare
#

i wonder if using ChatColor.RESET is easier for client to compute clientside than ChatColor.WHITE

#

which one do you guys prefer use to reset color to white

#

i would use reset if im reseting underlines, italics, etc

#

but is it any different in clientside for color rendering

#

just out of curiosity

opal juniper
#

i imagine any difference is negligible

spiral light
quaint mantle
#

isnt reset basically change the word to normal font and set the color white?

#

let me check

mortal hare
#

yes it does

#

but client should have some kind of buffer

#

to hold formatting information

quaint mantle
#

i guess none :?

mortal hare
#

hypothetically this could mean that ChatColor.RESET just flushes that buffer, thus saving negligible performance

#

or it could be in reverse

#

anyways

#

im gonna use RESET only for resetting for all of the formatting

#

WHITE for changing the color

#

but this still makes no sense in legacy formatting since, &c&lHello &dworld! would not render the world! text fragment in bold

#

anyways, bullshitting here, because i haven't opened MC client code myself

#

this is just a theory

#

a PREMATURE OPTIMIZATION THEORY

quaint mantle
#

like from 1.8, maybe pre 1.8 too idk

spiral light
dark arrow
#

how ot hide the enchants name from an item

spiral light
#

itemmeta -> itemflags

dark arrow
#

ok

gentle oriole
#

how do I know if World is Night or Day?

spiral light
pale bear
#

is there a way to create a entity without spawning it?

hybrid spoke
spiral light
pale bear
#

hmm ok thanks

hybrid spoke
spiral light
#

not my result tho^^

hybrid spoke
#

but you posted it^^

spiral light
#

just showed that its 1000 times faster to google first ^^

hybrid spoke
#

no you showed the solution in bad

spiral light
#

if you write it in one line he wouldnt understand it ^^

hybrid spoke
#

then let him understand it

spiral light
#

i am not here to show the smallest complicated fastest method for something ^^ if he understands this simple small snippet he can modify it to smth smaller

spiral light
#

you want to copy a world async ?

zealous osprey
#

A question I'd have:
I'd like to add a delay to a certain part of my plugin which is contained in a for loop.
I'd like to delay the second for loop though, problem is that I want that for loop to finish before continuing with the rest of the code, cause atm it just kinda skips that for loop since the outer for loop continues.

spiral light
#

you want to delay the inner loop but want to run the next loop after the first one finished ?

mortal hare
#

i dont understand the problem correctly

#

you want to delay inner loop

#

but what then

#

sounds like you need BukkitRunnables

spiral light
#

and only copy laggs ?

#

do you create the World or only copy it ?

#

hmmm just cloning files async should not lagg that much .... only if you create the the world2 then

eternal oxide
#

File copy is resource heavy. Your server will lag even if you do it async, unless you rate limit the copying

spiral light
#

so you create the new World too ?

#

ok your description of the problem is just terrible and you did answer wrong before

eternal oxide
#

this is not teh overworld you are trying to unload I hope

spiral light
eternal oxide
#

You can;t unload any of the main worlds. Its blocked in code

pearl glade
spiral light
#

but its not the copy that laggs ... its the WorldCreation that laggs

#

you cant do smth against that.

eternal oxide
#

try setting to not keep spawn in memory, then unload, copy, load

spiral light
#

you can listen for WorldInitEvent and setKeepSpawnInMemory to false

#

this would stop loading the world spawn region while creating the world

#

it will load if you join the world

zealous osprey
spiral light
#

having smth that is that laggy will freeze your server too ?

#

getWorld().setKeepSpawnInMemory

spiral light
#

you can try to use paper ^^ but there is nothing else you can do there

gentle oriole
spiral light
#

well you can modify the server-jar and create a better system ^^

rapid rock
#

where do i post bungeecoord help

hybrid spoke
rapid rock
#

there

lean gull
#

hey so earlier i was putting protocollib as a repo in my plugin, and i thought i was doing something wrong so i stopped the pom.xml reload midwsay, and this has been stuck like this since. does anyone know what i should do about it?

spiral light
#

restart ?

lean gull
spiral light
#

just do it like you stopped a pom-reload that will never be that dangerous

lean gull
#

?

#

ok it's gone now

#

i opened and closed

spiral light
#

i hope you closed and then opened

lean gull
#

oh wait

#

lmao

#

closed and opened*

#

anyways another question: when should i be using packets and when should i be using events?

spiral light
#

events whenever possible

#

packets never

#

packets only if api does not contain that function you want to do

lean gull
#

are packets faster than events?

#

for listening

spiral light
#

they are very unsafe between versions

#

probably faster but why do you need that ?

delicate cargo
#

doese.getCurrentItem() return the clicked item?

glossy venture
#

On which event?

#

Probably yes, but there can be exceptions

lean gull
# spiral light probably faster but why do you need that ?

custom blocks and cosmetics with a resource pack
blocks - uses noteblock blockstates, so i need to cancel noteblock blockstate updates
cosmetics - uses armorstands, so i need to teleport the armorstand to the player as fast as possible

delicate cargo
#

on inventory click event

#

this is correct, right?

#

it will return the clicked item, right?

glossy venture
#

I think

#

So yes probably

spiral light
delicate cargo
#

alr ty

tulip coral
#

how can i do that dupers working

young knoll
#

What

lean gull
#

what's the packet for when a blockstate updates?

young knoll
lean gull
#

yeah i thought so too

#

so if i cancel that for noteblocks, they wont change from when they are placed to when they are broken, right?

young knoll
#

Probably

#

There’s an event for that

lean gull
#

i was told to use packets

young knoll
#

I mean

#

I guess it’s a bit faster

#

Multi-block change packet also exists

quaint mantle
#

does anyone know how to spawn mobspawner particles like spigot used to

#

back in the olkder versions

#

the block particle effect

rough basin
#

What if I want to continuously input Entity to runTaskTimer when using runTaskTimer() in BukkitRunnable?

ivory sleet
#

Then do that (:

lean gull
#

what's the difference between mutli block change packet and block change packet?

quiet ice
#

I think one is bundled and as such saves on bandwidth, but I do not know for sure

young knoll
#

One is for multiple block changes

#

In the same chunk in the same tick

lean gull
#

how do i get the block from the block change packet tho

spiral light
#

if you have nothing switch to google and search for catching packets for players first

lean gull
#
        manager.addPacketListener(new PacketAdapter(this, PacketType.Play.Server.BLOCK_CHANGE) {
            @Override
            public void onPacketSending(PacketEvent event) {

                PacketContainer packet = event.getPacket();

            }
        });```
#

this is what i got

spiral light
#

oh... protocollib

lean gull
#

ye

spiral light
#

probably packet.getData or smth and then read the block

#

its probably an integer saved to the packet for the type and the position should be with a method

lean gull
#

there's packet.getBlockData

#

there's also the varint blockid

spiral light
#

try and error ^^

lean gull
#

idk how

#

i tried broadcasting the getBlockData

#

with the .toString

#

it just sent the same thing

spiral light
#

what does getblockData return ?

lean gull
spiral light
#

would be easier if i had protocollib - idk

young knoll
#

getBlockData and then read

#

Or readSafely

lean gull
#

what?

young knoll
#

They are methods

lean gull
#

im very new to packets, could you elaborate?

young knoll
#

getBlockData#read?

spiral light
#

its not packets which is your problem... you dont even use packets... you use an API for packets

#

and for that API there are docs you can read ....

lean gull
#

im supposed to put something inside read()

dusk flicker
#

What does it tell you to put?

spiral light
#

put in true

dusk flicker
#

All of this has Javadocs, you can check them for yourself

lean gull
#

int fieldindex

fervent gate
#

?paste

undone axleBOT
spiral light
#

then its 0 or 1 or 2 or 3.... try and error

fervent gate
#

Why is the Chest line producing a npe?

dusk flicker
#

And check the Javadocs for what it wants

spiral light
#

yeah i know it must be 0

dusk flicker
#

Rather than just guessing

spiral light
#

best way to learn is making mistakes

dusk flicker
fervent gate
#

getBlock isn't null, because I can log that

#

lemme try for location

dusk flicker
#

If you are talking about like 6, that is

fervent gate
#

the one after line 6. But I logged the variable deathchest

#

and that returned a block

#

and the type was CHEST

#

which is good

dusk flicker
#

Can you show the npe?

#

Someone else will have to help you, I got to get back to work sorry

fervent gate
#

sure, lemme build the plugin again

#

ok, np, thx anyway

spiral light
#

player shouldnt be null too ^^

#

or else the event wont exist

lean gull
#

to cancel a onPacketSending thing i do event.setCancelled(true); like any normal event, right?

spiral light
#

probably wrong Chest import ... which import do you have ? @fervent gate

spiral light
lean gull
#

why u mad

fervent gate
fervent gate
fervent gate
lean gull
#

how do i check the event type of the block change? like i want it to only cancel the event if it's a blockstate update, not a place event or a break event or whatever'

spiral light
fervent gate
#

import org.bukkit.block.Chest;

spiral light
#

because there are 2

fervent gate
#

I need the second one?

spiral light
#

no

#

the second one would be
block.data.type.Chest chest = (block.data.type.Chest)block.getBlockData()

fervent gate
#

mk

#

What could be causing the npe, because I can log the location as well

spiral light
#

which line is NPE ?

fervent gate
#

It prints up to line 6

spiral light
#

there cant be a NPE if deathLocation is not null

young knoll
#

What line is the NPE

spiral light
young knoll
#

It tells you

fervent gate
#

17

#

I think

#

pretty sure

spiral light
#

can you send full class ?

fervent gate
#

sure

spiral light
#

and which line there is now NPE ?

fervent gate
#

35

spiral light
#

this makes no sense

#

there is no deathLocationS

young knoll
#

That shouldn’t compile

fervent gate
quaint mantle
#

Ide should warn that

fervent gate
#

It logs in chat and it spawns a chest on deathlocation

spiral light
#

i get this error

#

and not NPE

fervent gate
#

it is a eventexception: null for me, but the error is in a link

slow oyster
#

Huh, so I'm working on a Villager Reputation API for a PR and I just realised that Villager trade reputation is per trade, so you actually get more rep if you trade for an item 1 by 1 rather than an entire stack... seems strange

young knoll
#

Read the caused by part

spiral light
lean gull
#

apparently block change packet does not include blockstate updates, does anyone know which packet does?

fervent gate
young knoll
#

No

fervent gate
young knoll
#

The caused by part

#

You know what, just send the error

fervent gate
#

Caused by: java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_18_R1.block.CraftBlock cannot be cast to class org.bukkit.block.Chest (org.bukkit.craftbukkit.v1_18_R1.block.CraftBlock and org.bukkit.block.Chest are in unnamed module of loader java.net.URLClassLoader @46ee7fe8)

spiral light
young knoll
#

There you go

fervent gate
#

the error is already in this chat

young knoll
#

You can’t cast block to chest

fervent gate
#

Oh ok, then how do I get that chest?

spiral light
#

Chest deathChest = (Chest) deathLocation.getBlock().getState();

#

Chest deathChest = (Chest) deathLocation.getBlock().getState();

#

Chest deathChest = (Chest) deathLocation.getBlock().getState();

fervent gate
#

yea ok

#

trying that now, thx

red sedge
#

how can i remove all recipes

spiral light
#

just making sure you can see it now 😄

red sedge
spiral light
young knoll
spiral light
#

or vanilla recipes

red sedge
red sedge
#

how do i do tbat

spiral light
young knoll
#

Bukkit#recipeIterator

spiral light
#

check the iterator for recipes with namespacedkey where namespace=minecraft

young knoll
#

Just calling .remove on the iterator should work, if not use removeRecipe

red sedge
#

Bukkit.recipeIterator().remove();?

spiral light
#

it creates a now one ... so maybe not

young knoll
#

Do you know how to use an iterator

red sedge
#

no

rough basin
#

Can you find what is static?

last ledge
#

String password = plugin.getConfig().getString("Account" + player.getName());

Config.yml:

  Frolic_gamers: "test"```
spiral light
last ledge
#

I'm trying to save player's data

spiral light
young knoll
#

No

chrome beacon
young knoll
#

Because Account is not the same as Accounts

#

Also you need a .

last ledge
young knoll
#

...

chrome beacon
young knoll
#

Type the same word

rough basin
#

oh i used static plugin

#

i will change it quickly

spiral light
#

it litterly tells you where the problem ist

#

you run detectTarget.Function()
but detectTarget is the class itself so it can only use public static methods

#

but you want a public <not static> void method

#

public static void start... would be right there

young knoll
#

Why is the class lowerCamelCase

#

Ahhh

quaint mantle
#

DeTeCtTaRgEt

red sedge
#
Iterator recipeIterator = Bukkit.recipeIterator();
        while (recipeIterator.hasNext()) {
            Bukkit.removeRecipe((NamespacedKey) recipeIterator.next());
        }```
quaint mantle
#

Isnt it way better?

young knoll
#

Recipe is not a namespaced key

#

You can’t just cast it to one

red sedge
#

kay so make it a namespaced key?

young knoll
#

No

#

Check if the recipe is keyed

#

And then cast to keyed

#

And then read the javadocs for the method to get the key from a Keyed object

red sedge
#

if the recipe is keyed?

spiral light
#

if(recipe instanceof Keyed)

red sedge
#

im so sorry im so confused

#

dont i need the namespacekey to have the recipe

quaint mantle
#

?learnjava when

undone axleBOT
red sedge
#

kay not helpful

young knoll
young knoll
#

I’d you don’t know java, don’t go making plugins

#

Trust me

#

You already have the recipe

last ledge
#

Um I want to create a field in config.yml from command. For eg if player is new and joined the server, a field should be created by his name, for example Frolic : password

young knoll
#

Don’t

red sedge
young knoll
#

Use uuid

#

Yes you do

last ledge
#

yeye UUID

red sedge
#

I have a recipeiterator

candid galleon
#

Bukkit#crashServer

young knoll
#

Yes

last ledge
#

but how do I make custom fields

young knoll
#

And Iterator.next() is a recipe

red sedge
#

and im not sure what im suppose to do rn

spiral light
last ledge
#

UUID : Password

red sedge
young knoll
#

No

#

It’s a recipe

spiral light
red sedge
#

oh

last ledge
#

just need to know how to create from command

spiral light
red sedge
#

is it because of the uh minecraft:recipe