#help-development

1 messages · Page 1180 of 1

granite burrow
#

Oh my, I feel dumb. Thank you so much. I need to do more research into game profiles IG

timid berry
river oracle
#

you're not setting the ItemMeta back

timid berry
#

maybe its the purple

#

no

#

its not the color

#

im not sure whats wrong

#

something is happeing to the item cuz normal swords dont have that space

#

but text wont show

rough ibex
#

run /data get on it

#

see what the lore is coming out to

echo basalt
#

/data get @s SelectedItem

#

would be 10x faster to learn the spigot API but he's deciding to rawdog it

timid berry
#

that commaned does not work

#

but

#

running it on my self

#

shows it kind of

#

customenchatattempt2:venom

#

oh there /data works

rough ibex
#

the lore isn't being set

timid berry
rough ibex
#

getLore() returns the set lore

#

It may be returning an empty list?

#

hard to say when you only post screenshots of 10 lines

#

instead of your actual source code

timid berry
#

because that code sets the lore

rough ibex
#

okay so post the rest of it

#

it may be ran at all

#

you're asking me to work with very limited context

timid berry
#

see that extra space

#

its not there if i dont modify anything

#

so i know the lore is being modified

#

just not to what i want

rough ibex
#

your /data says otherwise

#

it says there is no lore component at all

timid berry
#

is it a client issue?

rough ibex
#

no

#

/data is reporting what the server knows

timid berry
rough ibex
#

well your code says a lot of things

#

such as: i need a formatter

timid berry
#

thats irrelevent

rough ibex
#

indeed

timid berry
#

okay i got it

rough ibex
#

yes?

timid berry
#

yes

#

it works

rough ibex
#

now please refactor it

#

a lot of indents here...

timid berry
#

thats alot of work

rough ibex
#

this is 50 lines

#

about 25 of actual logic

#

also naming conventions

timid berry
#

spaces help me organize

timid berry
rough ibex
#

ithink is literally not indented at all

#

that's a poor attitude towards your code

timid berry
#

im just say

#

theres no point

#

or use

#

ill fix indeent

river oracle
#

this person does not care, they never read anything I say fail to follow well outlined guides and refuse to improve their java knowledge before continuing

timid berry
#

but names r okay

river oracle
#

so Shrug

#

not worth the fight

rough ibex
#

you're not going to write good code in the future if the code you write now continues to be awful

timid berry
#

u guys just keep saying

#

learn java

rough ibex
#

your java is not enough

#
            Player player = (Player) commandSender;``` this sticks out like a sore thumb
timid berry
#

in java

rough ibex
#

one with enough java knowledge would know the naming conventions

#

like not naming your class 'venomcmd'

#

does this need to be public and open?

#

the fact you're naming it '2' signals you don't have a version control system

echo basalt
#

(you're in denial because doing the process itself takes longer than just achieving what you want right now)

#

(even if it takes 1.5x longer to do anything)

timid berry
#

chat in anvilview event

#

what is the first and 2nd slot?

rough ibex
#

getView

#

getItem

timid berry
rough ibex
timid berry
#

u right

rough ibex
#

javadocs

timid berry
#

i was tryna out random combos

rough ibex
#

you mean you were trying out

#

having enough java knowledge also means being able to read javadocs

timid berry
#

I know how to read it

#

so for my project structures i have the mainfile then i have a folder called enchants where each enchant i want is a file like venom.class

#

now I can only have one event handel

#

so im thinking of giving

#

every single enchant file

#

the event

#

to processes it

#

(like in the file it will check if the enchant book that the player wants to use matches it)

#

idk whats the better way to do this

#

but anyways after I pass off e to venom

#

i cant access certain parts of it

nova notch
#

why is an AnvilView named e, the event for preparing anvil is called envil, and your class name for venom is all lowercase???

#

youre passing in an Event and then casting it to a player???

timid berry
#

oh yah ignore that

#

i think its time for me to get sleep

#

my brain will work better in the morning (it wont)

nova notch
#

im not even religious but lord have mercy on anyone reading your code

#

dont just name things random bullshit like e because no one knows what a single letter means, unless its like catching an exception or something

#

it also doesnt even save time because autocomplete exists

rough ibex
#

passing events to a file (I know as some in-memory abstraction)

#

ideally you would have your config files read into their own discrete objects

#

and a flexible config system

glad prawn
#

He used sleepiness to cover up his lack of knowledge of Java

rough ibex
#

you might say he needs a cup of java to learn java

glad prawn
#

Lol

timid berry
#

why would i lie

#

if i wanted to cover it up

#

it would just deny it

#

like every

#

other single time

glad prawn
#

🤫

echo basalt
#

rookie numbers

#

nvm you got more work hours than me :(

timid berry
#

I do some spigot dev during school break too

#

That’s why my hours are a lot sometimes

echo basalt
#

I don't go to school GigaChad2

#

@blazing ocean are you proud

blazing ocean
quaint mantle
#

then yeah its p good

#

if its per week, you can do better.

#

I get like 6-7+hrs a day

echo basalt
#

it's per week

#

I know I can do better but at the same time I've kinda ran out of things to do

quaint mantle
#

same

#

I just code a Hypixel Skyblock remake these days

echo basalt
#

Nowadays if I'm coding I'd like to get paid for it

quaint mantle
#

I dont like to get paid for coding

#

It puts immense amount of stress on me

echo basalt
#

Personal projects don't bring me much. Sure exposure and portfolio is fine but I'm already good

blazing ocean
quaint mantle
#
  • i am not good enough to do paid projects
echo basalt
#

I am, womp womp

quaint mantle
#

I mean just look at my code.

echo basalt
#

There comes a point where you can do a lot in very little time

quaint mantle
#

Yea

echo basalt
#

So pushing yourself for 30+ hours a week takes a toll on your mental because you're thinking a lot more and throwing shit at the wall a lot less

remote swallow
#

You mean like getting a redbull and a kebab and eating it in about 2 min

quaint mantle
echo basalt
#

~70% of my code works first-try

quaint mantle
#

Pretty much me too

#

I just try to design code better so it takes time

echo basalt
remote swallow
#

Kekw

echo basalt
#

you appreciate it a lot less and it just kicks in all at once

blazing ocean
#

Illusion do you ever eat something that's not takeout

echo basalt
#

ur mum

blazing ocean
#

no u

echo basalt
#

I'll prob go to the store today and get some frozen pizzas n shit

#

also 90% of my meals are delivered, not takeout

#

you really think I go outside?

quaint mantle
#

yeah

echo basalt
#

learned last week that lidl has pizza pockets

blazing ocean
echo basalt
#

I'm doing an active effort to have less food delivered and just eat more frozen stuff

#

mostly because I'm 19 and I'm spending at least a minimum wage in food every month

#

and that's too much

#

I can instead spend half of that in food and the other half in other stuff 😏

#

like christmas gifts

#

and alcohol

remote swallow
#

More monitors

echo basalt
#

sure

blazing ocean
echo basalt
#

microwave / bake

#

I have an air fryer too

#

I don't really use oil when I "cook"

#

if I do I just dip a napkin and use it to coat a frying pan

#

then fry my egg or whatever

remote swallow
#

I would hope you don't, keyboards and computers aren't compatible with oil

echo basalt
#

genz humor type shit

#

go back to doomscrolling

#

but yeah back to working for money

#

I wouldn't really say I'm having fun when coding anymore so there's zero excuse for me to work for free

timid berry
#

Those who know 💀

nova notch
#

shit is so good and so easy to make

quaint mantle
summer scroll
patent quarry
#

Hello I'm trying to create a BlockData with only the tag open for a barrel.
So I typed : BlockData toAdd = Bukkit.createBlockData("minecraft:barrel[open=true]");
But then when I parse the 'toAdd' blockdata I have a new tag in addition : facing=north.

Someone know why (maybe its a bug) and how I can create a clean BlockData with only the tag I specified ?

sullen marlin
patent quarry
#

Okay so I think I can't create a Barrel item that has only the tag open

sullen marlin
#

Yes you can, it just needs to be manipulated appropriately

patent quarry
#

but with merge I cant delete the tag facing ?

sullen marlin
#

Well you'd merge it onto the existing block which has the facing yeah you want

patent quarry
#

I dont want any facing

sullen marlin
#

A barrel will always be facing somewhere

patent quarry
#

not when it is an item

#

it can be undefined

#

/give @s barrel[block_state={open:"true"}]

#

It places an open barrel and the facing it determinated when the player place it

sullen marlin
#

I've pushed a fix

patent quarry
#

Damm that was fast, thank you !

#

The method Bukkit.createBlockData("minecraft:barrel[open=true]") still generate the unpecified tag

sullen marlin
#

toString shows all tags

patent quarry
#

Okay it's fine thank you md_5

patent quarry
#

getBlockData(Material material) applies also the defaultData that is why I was confused, in my testing code at first I get the data from one item and then parse it into another.
I opened a suggestion ticket for that https://hub.spigotmc.org/jira/browse/SPIGOT-7963.

patent quarry
#

Since I work on the barrel : /give @s barrel[container=[{slot:0,item:{id:apple}}]]
by any chance, is there a way to read the container tag?
Otherwise I will try to do a PR

young knoll
#

I think so

#

With BlockStateMeta

patent quarry
#

Ty I tried, but I see nothing maybe something in my side, I will double check

young knoll
#

Cast the state to container

fading drift
#

for my network wide party system should I be caching parties for each spigot server and then write communication between servers to update their cache when a party changes for example a player leaves

#

or should I just database lookup every time I need to get a party

#

first one i’m guessing tbh

young knoll
#

You probably want something like redis

fading drift
#

yeah I wrote that framework already

#

so it’s chill

#

just dreading actually rewriting the party system

#

I want to have a party manager class but not make it fucking massive

#

cus of all the if checks to check if player is in a party or checking for owner or checking party size etc

#

any tips to avoid this

sly topaz
#

just look at how other plugins do it

fading drift
#

true

sly topaz
sonic goblet
sly topaz
fading drift
#

I can keep it all inside command code I think

#

tbh

#

and just have party manager only accessing like the database and the list

patent quarry
fading drift
#

props to that guy the code looks really well written

#

is there much performance negligence by looping through a map of parties every time I need to get the party of a player?

#

or should I keep a player uuid to party id map somewhere

sly topaz
#

I mean, if you don't expect to ever have a ton of parties, it shouldn't be an issue, but the fact that you have to loop over anything when you got a key-value map definitely strikes as a code smell

wise chasm
#

Is there a way to obtain a list of all permission groups with spigot api, instead of using a permissions plugin api like luckperms?

sly topaz
#

if you extend yourself a little with Vault, you could do Permission#getPlayerGroups

#

but generally, you'd want to use luckperms API anyway, nobody sane is using anything else

wise chasm
fading drift
sly topaz
#

use something like a BiMap if you don't want to keep two maps around

fading drift
#

interesting

charred flicker
#

package de.thenobrainguy.serverplugin.lobby;

import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

public class LobbyPlayer extends JavaPlugin implements Listener {

@Override
public void onEnable() {
    getServer().getPluginManager().registerEvents(this, this);
}

@Override
public void onDisable() {
   
}

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    Player player = event.getPlayer();
    Inventory inventory = player.getInventory();
    ItemStack itemInSlot5 = inventory.getItem(4);

    //
    if (itemInSlot5 != null && itemInSlot5.getType() == Material.ENDER_PEARL) {
        if (event.getClickedBlock() != null) {
            player.sendMessage("block");
        } else {
            player.sendMessage("air");
        }
    }
}

}

why is Material do not work

blazing ocean
undone axleBOT
quaint mantle
#

Anyone familiar with attributes for a Minecraft version which is about a decade old?

kind hatch
#

@pseudo hazel It got approved.

pseudo hazel
#

awesome, thanks for your efforts 👍

#

one step closer to a feature complete API 😛

sly topaz
quaint mantle
worldly ingot
#

You don't in 1.8

#

API was added for that in like 1.13 or something

quaint mantle
#

I see

upper hazel
#

which event to use to change the biome into a snow biome AFTER generating a chunk and its buildings so that it snows instead of rains.

sly topaz
#

RegionAccessor#setBiome, World is a RegionAccessor

worldly ingot
shadow night
sly topaz
shadow night
shadow night
sly topaz
#

nowadays with cached method handles, you get same speed as direct access

sly topaz
#

yeah, method handles avoid having to check for access on each invocation by having a trusted lookup instance, so it is pretty much the same as directly calling a method yourself

shadow night
#

That's amazing

#

Ah I love reflection

pure dagger
#

how to make a command execute every day at the same time

chrome beacon
timid berry
#

how do i trigger this event?

#

its not printing anything to the console

remote swallow
#

compile properly first

timid berry
remote swallow
timid berry
#

can i not add lore to a book?

zealous osprey
#

Idk, but may I suggest not overriding the lore, but instead adding to the existent one?

zealous osprey
#

Oh you are applying it to the book, not the item. Sorry

fair rock
#

The error tells you about the enchantment not the lore. Customenchattempt2, Line 40

Idk what you doing in addGlow but he dont like it

timid berry
#

Oh right

lost matrix
#

Could someone throw a spoof implementation of ServerGamePacketListenerImpl for 1.21.3 at me?
For NPCs

sullen marlin
#

Wdym

lost matrix
#

I've used an implementation with a dummy connection so that i can add it to a ServerPlayer

    this.nmsPlayer = new ServerPlayer(MinecraftServer.getServer(), world, gameProfile, ClientInformation.createDefault());
    this.nmsPlayer.connection = new PlayerConnectionSpoof(this.nmsPlayer);
lilac dagger
#

you can just give the connection of the player if it's packet only

#

but this is pretty interesting

blazing ocean
lilac dagger
#

this works too

blazing ocean
lilac dagger
#

it's packet only

#

it's fine 😄

blazing ocean
#

well for me it wasn't fine

lilac dagger
#

it's one of these packets who need the connection anyway

#

and i looked it up and it doesn't need it for much

#

ye

#

this is why i think

#

it was really safe for me to just pass the player connection

inner mulch
#

does some1 know how wynncraft made their character selection, so that the player cant move its head? (with no lag, you cannot move at all)

lilac dagger
#

something boat related maybe?

inner mulch
#

can you not move the head in a boat?

lilac dagger
#

i think so? not sure actually

remote swallow
#

spectating an armor stand possibly

lilac dagger
#

oh yeah

#

spectating is a good one

inner mulch
#

couldnt i then leave with shift?

lilac dagger
#

you can cancel it

inner mulch
#

thank you guys, im gonna try it with armor stands

lilac dagger
#

good luck 😄

blazing ocean
#

e.g. you can spawn the boat at y=10000 but have the camera be at y=20

#

(yarn mappings)

sullen marlin
#

That's pretty slay

blazing ocean
#

thank you

alpine urchin
#

what

#

say "you don't deserve it" if i'm slay

blazing ocean
alpine urchin
#

@blazing ocean thx

young knoll
#

Does anyone know more about the new custom model data conditions

blazing ocean
#

pretty sure they're just model conditions

young knoll
#

Specifically, I know there’s a condition for when the player is hovering over the item and holding shift

blazing ocean
#

not CMD conditions

young knoll
#

Is it possible to somehow change the lore with that condition or only the model

blazing ocean
#

They're rendered client-side

#

so no

young knoll
#

Sadge

brittle geyser
#

[21:01:34 ERROR]: [global] TIMING_STACK_CORRUPTION - Look above this for any errors and report this to Spigot unless it has a plugin in the stack trace (TimingIdentifier{id=Minecraft:plot_46 - doChunkMap} did not stopTiming)

young knoll
#

?whereami

blazing ocean
brittle geyser
blazing ocean
#

i heard it's a great prerequisite for asking for help

brittle geyser
#

what should i do?

blazing ocean
#

please

#

just

#

read the message

brittle geyser
#

(TimingIdentifier{id=Minecraft:plot_46 - doChunkMap} did not stopTiming)

kind hatch
#

Start from the top

blazing ocean
#

mf

fading drift
#

what’s with the rudeness

kind hatch
#

I propose every time a stacktrace that tells you to report the bug to whatever fork shows up, that we halt the server and force the user to acknowledge they have read the error message by forcing them to type in the full message. (Which would include the name of the fork)

blazing ocean
#

100%

brittle geyser
#

???

nova notch
# brittle geyser ???

Look above this for any errors and report this to Paper unless it has a plugin in the stack trace

brittle geyser
#

and

nova notch
#

bruh

blazing ocean
#

"and"?

kind hatch
#

lmao

blazing ocean
#

dude

brittle geyser
#

what do you want from me

kind hatch
#

Are you incapable of doing what that message said?

blazing ocean
#

you've got to be trolling

kind hatch
#

Report this issue to paper

#

Cause its their software

brittle geyser
#

there is no difference

#

paper/spigot

blazing ocean
kind hatch
#

Mods

#

Ban this guy

brittle geyser
#

no mods

#

a

#

moderators

#

pon

blazing ocean
young knoll
#

Did you

kind hatch
young knoll
#

Edit your error to replace paper with spigot

nova notch
#

LMAO

wraith delta
#

Hmm, could an IDE be wrong? feel like my code is right, done this method plenty in other projects

young knoll
#

I mean it’s a static method

#

You should access it statically

wraith delta
#

Doesnt matter what combo, seems to get it wrong

brittle geyser
#

How to run world creating task asynchrounosly?

young knoll
#

You don’t

#

Spigot doesn’t support creating worlds async

brittle geyser
#

i need it

#

why

#

paper does?

young knoll
#

No idea

blazing ocean
#

idk man you might just wanna ask paper

#

little suggestion

brittle geyser
#

what is problem to create world asynchrounosly?

brittle geyser
#

and just say me it

#

i need to rewrite whole bukkit/spigot ?

#

who has hypixel server jar

blazing ocean
#

that is not something that is supported by the API in spigot

blazing ocean
floral drum
nova notch
#

this guy is not real

brittle geyser
nova notch
#

i think ai is smarter tbh 😭

kind hatch
#

You sure fucking act like it

blazing ocean
brittle geyser
#

exactly

young knoll
#

@worldly ingot can give you the hypixel server jar

blazing ocean
#

i need it for a school project

floral drum
#

I need it for educational purposes only

young knoll
#

My grandma is sick and needs it to get better

blazing ocean
#

the world will explode if you don't send the hypixel server jar to HYPIXELSERVERJARURGENT@radsteve.net

blazing ocean
lilac dagger
#

obv jk 😄

thin isle
#

has someone found a way to change player tags (tablist & above head) with ProtocolLib in 1.20+?

chrome beacon
#

someone has yes

#

What part are you having problems with

blazing ocean
#

just send a player info update packet

cedar saffron
proper cobalt
#

i know this is paper but im banned from paper discord,
is there a way to use Placeholder.parsed() on something that is ALREADY a component

nova notch
#

have you considered not being banned

#

like how do you even accomplish that

proper cobalt
#

idk i cant rmember

chrome beacon
#

Some people just can't avoid breaking rules

proper cobalt
#

i dont even think i did

chrome beacon
#

If you're banned

#

you did

proper cobalt
#

idk man could u help w my problem tho

nova notch
#

try asking paper 👍

proper cobalt
#

i just realised im not banned

#

im tweaking

#

i just rmember being banned

nova notch
#

good job

sly topaz
#

that is also not Paper-specific API, but adventure's so it should be fine to ask anywhere really

nova notch
#

i just thought it was funny that you were "banned"

proper cobalt
#

like i cant call mm#deserialize cuz that takes a string and placeholder

#

but i have a component and placeholder

chrome beacon
#

You can convert it from component to mini string

proper cobalt
#

how

chrome beacon
#

replace placeholder

#

and then convert it back

proper cobalt
#

eya

#

yea

#

that sounds good

chrome beacon
#

Check the adventure docs

proper cobalt
#

ahhhh

#

long

sly topaz
#

there should be a better way to do this, give me a second

chrome beacon
#

probably

proper cobalt
chrome beacon
#

Practice reading the docs in the meantime

young knoll
#

Adventure does have a replacement system

#

But it’s more complicated

sly topaz
sly topaz
proper cobalt
#

what im trying to do is fix legacy code

#

and yes it used the wierd text replacement system

#

but surely theres a btr way now

young knoll
#

Dont componentify it early

#

:p

sly topaz
#

the best way for that is really the text replacement system

proper cobalt
#

aight thx for the help guys

sly topaz
#

ideally as Coll said, you keep it as a string until all the mm placeholders are parsed

proper cobalt
#

aye

sly topaz
#

if you do want to convert it into a mm string and back like Olivo suggested, i.e. for chat messages which you have no control over

#

you just have to MiniMessage#serialize then deserialize

mortal vortex
#

is it okay to ask paper questions here?

echo basalt
#

?whereami

mortal vortex
#

Yeah I understand that, but is it that big a difference

slender elbow
#

have you considered asking in the paper discord?

mortal vortex
#

They scare me

slender elbow
#

weirdge

young knoll
#

Emily especially

#

She’s extra spooky

#

I mean look at that profile banner

slender elbow
#

oh I forgot to change it back

#

fixed

young knoll
#

That’s not less spooky

sly topaz
#

rather than asking if it is allowed, just ask the question and hope for the best

#

you'll either get mocked for not asking on the proper discord or just get help

young knoll
#

Or both

forest shuttle
#

Hey, I have something of a bit dumb question I don't know if anyone here can help me:

So, I've created this custom entity that performs several actions, and I want it to keep doing its thing even when no players are nearby or when they're offline.
Initially, I thought about tracking the ChunkUnloadEvent and canceling it if the entity is within that chunk. However, I discovered that since Minecraft 1.14, ChunkUnloadEvent can't be canceled anymore.
As a workaround, I set setForceLoaded(true) on the chunk and then scheduled a runnable to set setForceLoaded(false) after a couple of seconds to prevent the chunk from being force-loaded indefinitely, as I believe this method works in vanilla Minecraft. But then I realized that ChunkUnloadEvent.getChunk().getEntities() often returns an empty array because entities are unloaded separately...
So, I tried the same approach with EntitiesUnloadEvent (which also can't be canceled). But I'm encountering two issues:

  • As far as I know, there's a limit on how many chunks can be set as force-loaded.
  • These workarounds seem somewhat sketchy to me.

So far, I haven't found a better solution. I'd be interested to hear if anyone else has faced a similar issue and how they managed to tackle it in a more elegant way...

junior geyser
forest shuttle
#

It's a custom NMS entity with an extensive codebase and AI.
It acts essentially like a player.
For something simpler like a "Farming entity," that approach might have been ideal, but due to the amount and complexity of the actions I don't find feasible to pre-calculate all possible interactions.

junior geyser
wispy steppe
#

Is there any API for detecting when a player's warden warning level changes (not anger level, but the warning level which leads to a warden spawning)? Or perhaps once a warden spawns a way to tell which player caused it to spawn?

#

Seems like no but wanna validate in case I'm missing something

forest shuttle
#

Seems like trickery might be needed for now :D

mortal vortex
#

Why does this shit happen? i've invalidated caches, thrice

young knoll
#

Is your dependency set up correctly

mortal vortex
#

Yeah man it builds fine.

#

even @NotNull which is an annotation?

#

wtf

#

This project was maven, i did my best to piece by piece convert it to gradle. but clearly something is off

mortal vortex
#

it builds fine

worthy yarrow
#

Is your IJ updated? @mortal vortex

#

IJ likes to fuck around 😄

barren peak
#

does player.isInWater() return true only if a player is standing in water block or does it also return true if they are standing in the rain

wide cipher
#

my plugin.yml looks like this ```name: Skonic
version: '${project.version}'
main: ca.nagasonic.skonic.Skonic
api-version: '1.19'
depend:

  • [Skript, ProtocolLib]
    softdepend:
  • [Citizens]but it can't find the dependencies, even though i have them in my server[15:43:30 ERROR]: [ModernPluginLoadingStrategy] Could not load 'plugins\Skonic-1.0.5.jar' in 'plugins'
    org.bukkit.plugin.UnknownDependencyException: Unknown/missing dependency plugins: [[ProtocolLib]]. Please download and install these plugins to run 'Skonic'.
    at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:82) ~[paper-1.19.4.jar:git-Paper-550]
    at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:39) ~[paper-1.19.4.jar:git-Paper-550]
    at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.19.4.jar:git-Paper-550]
    at org.bukkit.craftbukkit.v1_19_R3.CraftServer.loadPlugins(CraftServer.java:431) ~[paper-1.19.4.jar:git-Paper-550]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:273) ~[paper-1.19.4.jar:git-Paper-550]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1104) ~[paper-1.19.4.jar:git-Paper-550]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-550]
    at java.lang.Thread.run(Thread.java:1583) ~[?:?]```
sullen marlin
#

?whereami

mortal hare
#

i came back to this after a while again 😂. Ok if business logic would strain the database that could be shifted to an application, then why do we really use foreign keys or primary keys? After all, these are data constraints which check if id is unique both to a row and to table, which is kind of a business logic?

#

doesnt this imply that some logic like data integrity checking with constraints should be preferred to do on database to not ruin the database outside external custom sql client

echo basalt
#

sql glazer fr

mortal hare
#

im pretty sure primary key constraints are really not needed, but you should prefer them. and if you're missing an performance from primary key constraint, you can always create INDEX for that column manually, because all PRIMARY KEY does is it adds PRIMARY KEY constraint to check if the key uniquely identifies the column within a table and a dedicated INDEX to speed up lookup times for it

summer scroll
#

Is there in any way to modify block break speed for specific tool?

mortal hare
#

you just need to apply that attribute to specific itemstack

summer scroll
#

Maybe I need to dynamically add/remove attribute based on block that player interacts?

mortal hare
#

i havent touched api for a while so im not really sure

summer scroll
#

Well thank you, it's a start for me.

wide cipher
sly topaz
#

either do:

depend:
  - Skript
  - ProtocolLib

or:

depend: [Skript, ProtocolLib]

not both

timid berry
#

why is the code saying the item has the lore even tho it my client does not see it

timid berry
#

oh

graceful oak
#

Ive been playing around with item displays and trying to use them instead of armor stands but the movment doesnt feel very fluid when im rotating. Is this something I can fix or am i better off still using armor stands at this point

timid berry
timid berry
#

do i set the cursor item to null?

#

i mean

#

get rid of the ehcnated book

sly topaz
# timid berry works thanks

the reason this happens is because creative inventory is mostly client-sided, so click events don't quite works as one expect. There's InventoryCreativeEvent though so you may try handling it with that if you care about creative interaction

timid berry
#

after the sword has been enchanted

sly topaz
#

the event happens before the action happens, so yes, just set the cursor to air

#

just make sure to test it doesn't get bugged or anything

sly topaz
graceful oak
# sly topaz how are you rotating the item display
Bukkit.getScheduler().runTaskTimer(MinevolutionCore.getCore(), new Runnable() {
            private float angle = 0.0f; // The current angle of the rotation
            private long lastTime = System.currentTimeMillis(); // Last time we updated the angle
            private Quaternionf targetRotation = new Quaternionf(); // Target rotation (for interpolation)
            private final float rotationSpeed = 1f; // Degrees per second
            private final float slerpAlpha = 1f; // Interpolation alpha for smoothness

            @Override
            public void run() {
                // Delta time in seconds (time between ticks)
                long currentTime = System.currentTimeMillis();
                float deltaTime = (currentTime - lastTime) / 1000.0f; // Convert to seconds
                lastTime = currentTime;

                // Calculate the angle change based on the speed and delta time
                angle += rotationSpeed * deltaTime;
                if (angle >= 360.0f) {
                    angle -= 360.0f; // Wrap the angle around when it exceeds 360 degrees
                }

                // Update the target rotation with the new angle
                targetRotation = new Quaternionf().rotateY(angle);

                // Get the current transformation
                Transformation transformation = itemDisplay.getTransformation();

                // Perform smooth rotation using slerp
                transformation.getLeftRotation().slerp(targetRotation, slerpAlpha);

                // Apply the updated transformation
                itemDisplay.setTransformation(transformation);
            }
        }, 0L, 1L).getTaskId();
#

This is the smoothest I could get it to work

sly topaz
#

the reason people use it display entities is to take advantage of client-side interpolation

graceful oak
#

Doesnt look horrible but could look better with armor stands

sly topaz
#

right now you're not taking advantage of interpolation by doing it server-side

graceful oak
sly topaz
#
private final long durationInTicks = 20L;
 
Bukkit.getScheduler().runTaskTimer(MinevolutionCore.getCore(), new Runnable() {
    private float angle = 0.0f; // The current angle of the rotation
    private final float rotationSpeed = 1f; // Degrees per second

    @Override
    public void run() {
        // Calculate the new angle
        angle += rotationSpeed * (durationInTicks * 50 / 1000.0f);
        if (angle >= 360.0f) {
            angle -= 360.0f; // Wrap the angle around when it exceeds 360 degrees
        }

        // Compute the target transformation
        Transformation transformation = new Transformation();
        transformation.setLeftRotation(new Quaternionf().rotateY((float) Math.toRadians(angle)));

        // Apply the transformation with interpolation
        itemDisplay.setInterpolationDuration(durationInTicks); // Total duration for interpolation
        itemDisplay.setInterpolationDelay(-1); // No delay
        itemDisplay.setTransformation(transformation);
    }
}, 0L, durationInTicks).getTaskId();
#

try something like this

graceful oak
#

Ill give it a try

sly topaz
#

ah I forgot to divide the duration for the interpolation duration, should be in ticks

graceful oak
#

So if I understand correctly this will give it a new position to rotate to and sets the duration of the rotation to start until the next fire of this run?

sly topaz
#

it's actually kinda borked since I just edited your code halfassedly lol

#

the intent is for it to do a full rotation every 1 second

graceful oak
#

I mean I understand the concept so I dont mind playing around a bit I didnt even know about the interpolation I just saw a slerp and figured that was the way to go lol

#

Ok I got it working thanks looks way smoother

timid berry
echo basalt
#

dawg no one cares

summer scroll
sage patio
#

any idea what packet should i send to change display name of an armorstand?

echo basalt
#

iirc index 3 is a boolean determining "custom name visible" and number 4 is an optional of a text component

#

might have the indexes switched up

#

nvm I'm entirely wrong

sly topaz
#

I spent way more time fidling with that timer method than I reasonably should have lol

#

@graceful oak not sure if you ended up doing it in various cycles, but that above snippet does it in 1 cycle and it is pretty smooth

orchid trout
# timid berry

why are you showing off after you were helped with each step of the process

eternal oxide
#

Look at what I copied papa!!

sly topaz
#

they were glad they got it working and wanted people to see, that's all

#

if you don't care then just go about your day, no need to make the shitty comment

eternal oxide
#

Its good to be proud, it pushes you to do more.

clear elm
#

How can i add an hologram to an block

eternal oxide
#

TextDisplay, ItemDisplay, BlockDisplay

clear elm
#

i mean a text that is over the block

#

like a name tag

pseudo hazel
#

textdisplay

eternal oxide
#

TextDisplay

clear elm
#

thanks

jade oasis
#

someone able to help me with a plugin thing im trying to do

young knoll
#

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

jade oasis
#

ah

#

my bad

#

Right now im trying to do a /staffmode plugin which i managed to make it go into spectator mode but when i run the command it doesnt take me out of it and im having trouple setting that up im wondering if someone knows what to do for it to take me out of it

young knoll
#

Set the gamemode to something other than spectator?

jade oasis
young knoll
#

?paste

undone axleBOT
jade oasis
#

i can send links here?

#

ah there

eternal oxide
#

you else code will never run

jade oasis
#

how come

young knoll
#

That if statement will always be true when a player runs the command

jade oasis
#

what can i do to fix it

smoky anchor
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

smoky anchor
#

forgot this one is long af sorry

young knoll
#

Have an if statement that checks the gamemode instead

jade oasis
#

i tried putting if statement but i couldnt find what i feel like i was meant to be looking for

eternal oxide
#

p.setGameMode(p.getGameMode() == GameMode.SPECTATOR ? BameMode.CREATIVE : GameMode.SPECTATOR);

#

that will toggle between the two modes

jade oasis
#

so get rid of the things under else as that isnt needed

jade oasis
eternal oxide
#

p.sendMessage(p.getGameMode() == SPECTATOR ? "You are a Spectator" : "You are in Creative");

jade oasis
#

thank you very much

jade oasis
eternal oxide
#

I don't do DMs

jade oasis
# eternal oxide I don't do DMs

understandable ig ill ask here from your experience since im new would me trying to make a /turn command plugin help more also learn more since i wanna make that but dk if its something that would be hard

eternal oxide
#

Creating any plugin is good experience.

noble current
#

there is any way that I can pay someone to upgrade a plugin?

eternal oxide
#

?services

undone axleBOT
jade oasis
eternal oxide
#

I've no idea what a turn plugin is

jade oasis
#

/turn IGN would turn a player 180 degrees

eternal oxide
#

it would a good experience as you'd have to learn about teleportingf a player and calculating directions/vectors

jade oasis
#

is there any videos on this kinda thing or should it be easy me learning from full scratch

hushed spindle
jade oasis
hushed spindle
#

i mean not just 180 degrees but any rotation

#

its a new command

#

so maybe you dont even really need to make a turn command

jade oasis
#

if you wanna send me the link to it ill look but also thinking of my own custom 1 cause it also teaches me yk what i mean

hushed spindle
jade oasis
quaint mantle
eternal oxide
#

no, depends on your java version

young knoll
#

Now you get an ugly error when it’s not a player

quaint mantle
#

Was that for me? or?

#
if(!(commandSender) instanceof Player)) {
//Do the magik here
}
young knoll
#

You might as well do the casting inside the instanceof

#

Provider you aren’t on an ancient version

quaint mantle
#

Ah

#

I use an ancient version khajiit

young knoll
#

?howold 1.8.8

undone axleBOT
quaint mantle
#

Quite young

sonic goblet
#

We’re approaching a decade

young knoll
#

Half the 1.8 players are younger than 1.8

#

?howold 1.8

undone axleBOT
quaint mantle
#

?howold 1.7

undone axleBOT
quaint mantle
#

Fun

slender elbow
#

?howold 1.5

undone axleBOT
glad prawn
#

?howold 0

undone axleBOT
quaint mantle
#

Version 0 was never public 😔

mortal hare
#

i swear to god

#

that oracle apex

#

is so shitty product

#

how is missing comma doesnt emit validation error here

#

i've spent an hour trying to see why my query doesnt work

#

debug doesnt show anything

#

no console logs nothing, no STDERR, no STDOUT

#

f.... terrible

proper radish
#

So let's say I am making a DB table for players' cosmetics, where each cosmetic has its unique ID.
If I design it denormalized, it would look like this:

--------+----------------
UUID_1  | (null)
UUID_2  | [1,5,23]
UUID_3  | [5,12,45,50]

In this case, I'm storing all the player's cosmetics in a single column. To store the equipped cosmetics, I put it at the beginning of the array, so:

  • UUID_1 has no cosmetics.
  • UUID_2 has 3 cosmetics (1, 5, 23), with 1 being equipped.
  • UUID_3 has 4 cosmetics (5, 12, 45, 50), with 5 being equipped.

I *understand *the "Benefits of Normalization," but let's assume the average amount of cosmetics for each player is 5. This means I would store n(5) cosmetics for each player. If I have, for example, 300K offline players, I will need to store around 1.5 million UUIDs.

Wouldn't this negatively affect scalability? Or is it still better to use a normalized design like this:

 UUID + Cos + Eq
-------+----+---
UUID_1 | 1  | 0
UUID_1 | 24 | 0
UUID_2 | 6  | 1
UUID_2 | 31 | 0
UUID_3

Which design do you think would scale be better for large datasets like 500K offline players?

mortal hare
# proper radish So let's say I am making a DB table for players' cosmetics, where each cosmetic ...

well its a tradeoff between querying and insertion performance

with normalized dataset you can do more advanced SQL queries by selecting values by specific condition.
with non-normalized form you will be able to efficiently store the cosmetics, but you lose the ability or querying that easily

if you're looking for a way to serialize data from the game and then deserialize at load and there's no further operations with it, i would prefer the first one, as it is more efficient approach for large volumes of data, since you wouldnt use custom SELECT's, JOIN's or UPDATE's

#

although it could be cumbersome if you lets say would want to purge some type of cosmetics from specific players

#

i would say maybe try to benchmark this

#

see if those UUID's really cause some performance issues

#

after all, primary keys are being indexed

#

so it shouldnt be really a problem for insertions or select operations

#

but it probably needs some testing

proper radish
#

i am storing uuids as bytes tho

#

so it takes 16 instead of >=32

mortal hare
proper radish
#

then i will cache all the data when player joins

mortal hare
#

well then first option should scale better

proper radish
#

so when the game starts i will get the cosmetic from the cache not the db

mortal hare
#

since you would only use the database for persistent storage

#

and not for querying implicit data from it

#

what you can do is kind of hybrid approach, is to maybe retrieve the data from db, deserialize it, cache it and then transform it into normalized form

#

depends on how you will cache it tho

proper radish
#

alright so now :

1

 UUID -+- Cosmetics
--------+----------------
UUID_1  | [1,5,23]
UUID_2  | [5,12,45,50]

In this case, I'm storing all the player's cosmetics in a single column. To store the equipped cosmetics, I put it at the beginning of the array, so:

or 2

 UUID + Cosmetics + Eq
------+-----------+----
UUID_1 | [1,5,23] | 5
UUID_2 | [4,7,29] | 4
mortal hare
#

in this latter case i think it doesnt really matter which you choose as it wouldnt save much anyways, equipped in the second version will use integer tho in this case so it will probably use 4-8 bytes at most

eternal night
#

I'd really suggest benchmarking this

ivory sleet
#

Multivalued attributes are in generally considered bad right in terms of normalization practices

#

kinda makes it nosql

mortal hare
ivory sleet
#

that too

eternal night
#

Like, this seems like such a common usecase, I would not be surprised if the sql implements correctly optize this

mortal hare
#

he's asking whether normalization would impact performance at 300k UUID datasets, with many to many relationships, around ~ 1.5 million UUID's

jade oasis
#

should i be using p.getlocation etc or player#getLocation#getYaw for a command plugin that turns a player 180 degrees when the command is typed in chat

mortal hare
#

i would probably develop a benchmark with puts dummy data inside a db

eternal oxide
#

Player#getLocation() then nodify the yaw and teleport the player

mortal hare
#

and then i would run a plugin

#

to see if that impact it in any way significantly

#

in a normalized form first

jade oasis
mortal hare
#

and then if there's something wrong i would denormalize it

ivory sleet
#

Unless we just care about physical storage where there is a definite answer

mortal hare
ivory sleet
#

sure for now, but if u’re talking about horizontally scaling it to support 500k users chances r u gonna be interested in more complex queries and data analysis in the future

mortal hare
#

so in this case imo non-normalized form would make more sense, but if his database engine can handle that much UUID's in normalized form without a hitch then does it really matter at this point to develop complex application level deserialization

mortal hare
#

try to push 300 K UUID data

#

test it with a plugin

#

if it does lag i would do some optimizations like denormalize some parts which impact the most

#

i highly doubt that it would really do much difference, but idk, it all depends on database engine and the hardware the plugin runs on

ivory sleet
#

Yup

mortal hare
ivory sleet
#

but also might be worth routing nosql if u don’t care about data relations

pseudo hazel
mortal hare
mortal hare
#

which turn out mostly shit

#

IT DEPENDS™️

rough drift
#

™️

frail willow
#

How do I write a tab completer that allows me to complete a pattern just like typing //set <pattern>

mortal hare
#

it depends

#

again

jade oasis
mortal hare
#

im not sure which one is pitch and which one is yaw

#

tho

#

i cant remember

#

but you can figure it out by rotating the camera up and down and in the sides

#

you just set those yaw and pitch values for the player via bukkit api you get from this debug screen and that's it

#

you've rotated player model

eternal oxide
#

Not quite

#

to rotate/move the player you have to alter teh Location object and then teleport the player

jade oasis
#

tryna figure out what to type and where to type it cause i want it like a staff command so when a staff does /turn <player_name> it roates the player 180 degrees

hushed spindle
#

making commands is piss easy but if you're not doing the bare minimum of learning java basics you're gonna struggle with everything

mortal hare
#

i mean commands are part of bukkit api, so he might be not used to bukkit api

hushed spindle
#

no hes literally just new

jade oasis
#

true

mortal hare
hushed spindle
#

if your only goal is to make a quick turnaround command you might as well ask chatgpt

jade oasis
#

i got suggest this video series for spigot development which ive been watching

jade oasis
pseudo hazel
#

wdym

#

then ask chatgpt for java plugin code

#

but

mortal hare
hushed spindle
#

you might not have asked the right question

pseudo hazel
#

using chatgpt without knowing why its suggesting things is a terrible habit

jade oasis
hushed spindle
#

:I

#

might?

mortal hare
#

yeah, javascript scripting is only supported for bedrock version of minecraft

pseudo hazel
#

lmao

#

java is not javascript

#

please

mortal hare
#

if you want to develop for Minecraft: Java Edition, you would need to use Java, not JavaScript

jade oasis
#

im stupid i need all the help i can get lol

pseudo hazel
#

they are completely separate

mortal hare
#

JS community really should drop javascript name altogether

#

and just use Ecmascript

shadow night
#

Real

mortal hare
#

it causes too much confusion among users

pseudo hazel
#

they should just call it webscript or whatever

shadow night
#

NodeScript fr fr

mortal hare
#

as we have WebAssembly

#

why not just call ECMAScript WebScript

#

sure JS is being used outside the web

#

but all knows that JS's prioritized on the web

pseudo hazel
#

right tool for the right job kinda thing

#

(but JS isnt the right tool for any job)

mortal hare
#

i've heard from some influencer that he doesnt call JavaScript ECMAScript mostly because it sounds like a name for skin condition 😄

shadow night
#

"Java is as similar to Javascript as Car is to Carpet"
- Silk, 2021

pseudo hazel
#

but thats what the world got used to

#

haha thats a great quote

mortal hare
pseudo hazel
#

ecmascript sounds like a ligma joke

hushed spindle
#

try asking it "I need a minecraft java spigot plugin with a single feature: a command with 1 optional parameter taking in a player name. i need the command, when executed, to turn the command executor(or player, if given) around by 180 degrees. the command should send an error message back to the command executor if the given player (if any) is invalid. or, if the optional player parameter is omitted, send an error message to the command executor if the command executor is not a player. can you do that for me?"

#

should be good

jade oasis
#

Kk hold on

pseudo hazel
#

thats literally programming but wihtout the syntax

shadow night
#

Lol

hushed spindle
#

yes thats the point

mortal hare
hushed spindle
#

i just tried being as specific as possible

pseudo hazel
#

if they can figure out how to write that kind of text, they can learn to write java code

hushed spindle
#

just let the guy ask the question whats the worst thing that can happen

pseudo hazel
#

yeah

mortal hare
#

i guess

#

sorry for my 🤓 points

hushed spindle
#

yeah you're a real nerdy nerd bro

mortal hare
jade oasis
#

Asked it umm anyone got the pastebin link

mortal hare
#

?paste

undone axleBOT
hushed spindle
#

guh

jade oasis
#

Cheers

hushed spindle
#

lets see what chatgpt cooked up

jade oasis
pseudo hazel
#

wait I just got a genius idea

#

what if you askled chatgpt to make a paste link for it xD

#

I wonder if its able

#

probably not

hushed spindle
#

not too bad but it kinda forgot to make this an actual plugin

pseudo hazel
#

alrght now you gotta try and put the code in a plugin

hushed spindle
#

and some method names are wrong

#

i assume you already have an IDE to program in so you can probably fix these small mistakes yourself

#

after that you can check if it actually works

#

it wont, because its turning you around by 360 degrees, lol

pseudo hazel
#

wdym its rotating 360

hushed spindle
#

in turnPlayer its adding or subtracting 360 to your yaw

pseudo hazel
#

yeah after it added 180

hushed spindle
#

oh wait nvm

#

yeah i read wrong

pseudo hazel
#

the comment says its adding 360 to normalize the yaw

hushed spindle
#

seems fine

pseudo hazel
#

whatever that means

#

doubt its needed

hushed spindle
#

yeah its probably not necessary

jade oasis
#

So it only needs some editing before testing

hushed spindle
#

yeah prob

#

i mean this is just the class command

#

if you still have chatgpt open you can ask "this is a good start, but you've not fully understood my question. i need this to be a plugin as well, so could you modify the given code such that the TurnCommandExecutor also extends JavaPlugin, and register the command in onEnable()?"

#

in case you dont know how to do that yourself

mortal hare
#

although copilot seems it can

#

but its limited

pseudo hazel
#

right but can it make pastes

mortal hare
#

it doesnt even have codeblock support, i doubt that it would support pastes

hushed spindle
hushed spindle
#

you can do that yourself

jade oasis
#

Yh

quaint mantle
acoustic pendant
#

Hey, if I create a file during run time (Or load that file) should that be async? Also when retrieving data from a .yml during run time, should that be async?

quaint mantle
glossy laurel
#

Can I fully dress up the dude in the smithing table?

acoustic pendant
#

So not necessary for it to be async?

quaint mantle
#

Yep

acoustic pendant
# quaint mantle Yep

However, file could be big, (maybe 100-300 lines if the player plays actively)

#

Does that matter or not?

quaint mantle
#

Well it's few hundred ms for load and configurations are usually cached.

wide coyote
#

retreiving from a yaml config is quite cheap, as long as it is already loaded, bukkit loads the values to a hash map

acoustic pendant
#

I see

wide coyote
#

loading and saving is more expensive and should be done async

acoustic pendant
#

I see

#

I'll create and load files async then

#

But retrieving not necessary

wide coyote
#

yeah

timid berry
barren peak
#

in block break event how do you get the item used to break the block

#

since it could be offhand or mainhand

elfin socket
#

how would the player break a block with their offhand?

barren peak
#

i realised that

#

also is there a way to modify the itemStack isSimilar method to ignore durability

elfin socket
#

I'm a beginner, but I would recommend either making your own version of that method, or Mixins(I wouldn't recommend this)

barren peak
#

alr

elfin socket
#

or, before comparing, make them both at full durability. that way it doesn't matter what durability it is, it will always be full when checking

barren peak
#

i'll just make my own comparison its easy enough

elfin socket
#

I wish I wasn't banned from PaperMC

#

I said smth about taxes and got banned, couldnt find any way to appeal

slender elbow
#

appeal link in community guidelines

elfin socket
#

where would that be?

eternal night
elfin socket
#

i probably shouldnt be clicking on links as quickly as I just did

slender elbow
#

bro is desperate

umbral ridge
#

emilyy emilyyoss emilios

#

emilia

jade oasis
#

only got the bottom error now

fair rock
#

setYaw returns void, but you need a location

Location rotated = player.getLocation().clone();
rotated.setYaw(newYaw)
player.teleport(rotated);

jade oasis
#

line 57?

fair rock
#

Idk if you moved something

jade oasis
#

i didnt use that paste since its within a plugin its like on another class

fair rock
#
        // Set the player's new yaw (turn them around)
        player.teleport(player.getLocation().setYaw(newYaw));
#

Line 57
setYaw returns void, but you need a location

Location rotated = player.getLocation().clone();
rotated.setYaw(newYaw)
player.teleport(rotated);

#

As i said

jade oasis
hushed spindle
glossy laurel
#

Can I fully dress up the dude ||(armor stand)|| in the smithing table?

hushed spindle
#

maybe with nms

#

but probably not

glossy laurel
#

ic

jade oasis
hushed spindle
#

learning spigot is not gonna help if you dont know how java works

#

learning java first will be kinda boring but its required

jade oasis
glossy laurel
undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

hushed spindle
#

yeah that

velvet prawn
#

hey

hushed spindle
#

no

velvet prawn
#

how i can make a "Elytra Glide without Elytra" with the spigot api?

#

does somebody know it?

hushed spindle
#

ItemMeta#setGlider(true)

velvet prawn
#

which itemMeta?

hushed spindle
#

any

velvet prawn
#

and then to false again after stop gliding?

hushed spindle
#

any item's item meta can be modified to make it a glider

velvet prawn
#

or instantly to false?

frosty relic
#
        final ServerPlayer serverPlayer = ((CraftPlayer) player).getHandle();
        final Level level = serverPlayer.level();


        final BlockPos fakePos = serverPlayer.blockPosition().above();

        final BlockState signState = Blocks.OAK_SIGN.defaultBlockState();
        level.setBlockAndUpdate(fakePos, signState);
        
        final SignBlockEntity fakeSign = (SignBlockEntity) level.getBlockEntity(fakePos);
        final SignText signText = fakeSign.getFrontText();
        int i = 0;
        for (final String line : withLines) {
            signText.setMessage(i, Component.literal(line));
            i++;
        }
        fakeSign.setText(signText, true);
        fakeSign.setChanged();
        
        serverPlayer.connection.send(new ClientboundBlockUpdatePacket(fakePos, signState));
        serverPlayer.connection.send(new ClientboundOpenSignEditorPacket(fakePos, true));
    }```

Is there something i'm missing? it always open the sign empty, with no lines, only happens in new 1.21
hushed spindle
#

but you dont have to turn it off after the player is done gliding

#

depends on what you want ig

velvet prawn
hushed spindle
#

well there's LivingEntity#setGliding

#

then you can make an entity glide without them wearing an elytra or gliding item

velvet prawn
#

it doesnt work

#
        event.setCancelled(true);
        user.getPlayer().setVelocity(new Vector(0, 20, 0));
        user.getPlayer().setGliding(true);
#

i just get boosted on top

hushed spindle
#

this should be paired with an EntityToggleGlideEvent listener where you cancel the un-gliding of the entity since the server immediately removes the effect

velvet prawn
#

ohh

worthy yarrow
#
public FileManager(NormalDiscGolf normalDiscGolf) {
        this.obstacleFolder = Paths.get(normalDiscGolf.getDataFolder().getPath(), "obstacles");
        try {
            if (Files.notExists(this.obstacleFolder)) {
                Files.createDirectories(this.obstacleFolder);
            }
        } catch (IOException exception) {
            exception.printStackTrace();
        }
    }```

If the obstacleFolder does not exist because the data folder of the plugin doesn't either, would the creation call as a consequence create the data folder as well?
pseudo hazel
#

yes

#

createDirectories creates all subdirectories up to and including the obstacleFolder starting from your work dir

worthy yarrow
#

It's all of them right?

#

Ah yes

pseudo hazel
#

yep

jade oasis
#

@hushed spindle do you believe asking chatgpt to make a command log kinda system and have it upload in pastebin or is that too big of a plugin for it to do

rough drift
#

?tas

undone axleBOT
hushed spindle
#

generally speaking the more you do with chatgpt the worse it gets

jade oasis
chrome beacon
#

Pastebin does have a decent api to work with

#

Though I don't see why you would use it to log commands

hushed spindle
#

its not a good idea no

#

for your experience level i see no reason to want a logging system

#

also, you wont learn much using chatgpt

chrome beacon
#

When you use gpt for info you loose out on learning a very important skill

#

Which is how to find good information and solve problems

jade oasis
quaint mantle
#

I was wondering if it is possible to change a weapon's attack damage on 1.8.9?

hushed spindle
#

if attributes dont exist then no

chrome beacon
#

Attributes do exist in 1.8

#

No idea if it's part of the API or not

#

Doesn't look like it

#

You will need NMS

frigid falcon
#

Hey, I was just wondering I'm currently trying to develop some sort of one time elytra plugin. the problem im facing is that a few years ago I believe i was using the PlayerToggleFlightEvent, but now it doesnt trigger when no elytra is equipped. Is there any equivalent event?

orchid gazelle
#

answer @frigid falcon , bro's really down bad rn

chrome beacon
pseudo hazel
#

im guessing there is no actual elytra?

orchid gazelle
#

^

pseudo hazel
#

otherwise idk why teh fact that you need an elytra now is an issue

frigid falcon
orchid gazelle
#

bro wants an event to trigger a gliding state without having an elytra equipped

frigid falcon
#

Yesss

chrome beacon
#

Client won't like that

orchid gazelle
frigid falcon
orchid gazelle
#

if anything, you'd probably need a custom event for double-jumps and then somehow force a gliding state

pseudo hazel
#

its probably a side effect of some optimization or something

#

or it was assumed that its a bug that has now been fixed

#

i.e. there is 0 reason for the toggleflight event to be called when you dont wear an elytra

frigid falcon
pseudo hazel
#

not sure

#

idk the exact conditions of your plugin

#

maybe you can detect a jump and see if they are already in the air?

#

idk what version you have

frigid falcon
#

Hmm could be a way

pseudo hazel
#

latest should have the input events

frigid falcon
pseudo hazel
orchid gazelle
pseudo hazel
#

but like idk when these events exactly get called

#

yeah thats something you have to try

chrome beacon
#

The toggle flight event only gets triggered when the player can fly

#

I do not remember a version where that hasn't been the case

#

Plugins doing double jumps for example would enable player flight and then listen for the event

frigid falcon
#

Ahh I can remember my old code

#

Thank you very much

frosty relic
#

im sending the PacketPlayOutOpenSignEditor packet to a player, but the sign UI immediately closes once opened, anyone know why?

try {
    Constructor<?> blockPosConst = PacketUtil.getClassNMS("BlockPosition").getConstructor(double.class, double.class, double.class);
    Object blockPos = blockPosConst.newInstance(player.getLocation().getX(), player.getLocation().getY(), player.getLocation().getZ());

    Constructor<?> packetConst = PacketUtil.getClassNMS("PacketPlayOutOpenSignEditor").getConstructor(Objects.requireNonNull(PacketUtil.getClassNMS("BlockPosition")));
    Object packet = packetConst.newInstance(blockPos);
    PacketUtil.sendPacket(player, packet);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException e) {
    e.printStackTrace();
}```