#help-development

1 messages · Page 1262 of 1

jagged thicket
#

yeah you could just store uuid at login if you want

#

no problem

quaint mantle
#

BUT

#

nvm

lean pumice
#

why i get this when i create a written book item with author, title and pages?

thorn isle
#

the book tag is invalid

slender elbow
#

i'm pretty sure that is not a thing and that message does not show anymore ever since data components

compact haven
blazing ocean
#

10 bucks that it's 1.8

thorn isle
#

i'll add 5 to that and say the message is from some DupeExploitFixerDeluxe plugin

lean pumice
compact haven
#

ViaVersion?

chrome beacon
#

Try not using ViaVersion/ViaBackwards

lean pumice
compact haven
#

I suspect that could cause problems, try to join on a client that’s the same version as the server

echo basalt
#

I'm incredibly confused

#

Can someone technical explain to me how lucko's server thread lock manages to get the code block to run inside the main thread

slender elbow
#

🪄 stop being confused ✨

slender elbow
#

did that work?

echo basalt
#

yuh

slender elbow
#

impressive

compact haven
#

erm I’ve never used it but to get a “code block to run inside the main thread” you toss it into the scheduler

echo basalt
#

I understand how to do it with a lambda

#

but opening a TWR block and it switching threads is black magi

#

I'm aware it blocks the current thread and unblocks it async but that shouldn't warrant a thread switch, it'll just block the TWR for a bit

compact haven
#

Ah I see what you mean

echo basalt
#

I guess unblocking makes everything that follows on that new thread? I dunno it just doesn't click w me

#

and why would everything outside the twr still be async

compact haven
#

I don’t think that it literally runs the code on the main thread, yeah

echo basalt
#

it claims to

#

unless it works in a funky way

compact haven
#

It just syncs them, I checked the impl

slender elbow
#

well, it doesn't run on the main thread

compact haven
#

I mean, you can test it by printing the current thread and comparing from outside the TWR

slender elbow
#

It blocks the main thread to run your code, it's synchronised, and releases the lock when it exits

echo basalt
#

it just blocks main, runs the code, releases

#

yeah

slender elbow
#

effectively, it "runs" on the main thread

#

it just has the same effect

compact haven
#

yeah I think this is the case ^

echo basalt
#

wack

slender elbow
#

that's kinda cool actually

echo basalt
#

7 years ago

compact haven
#

I suppose it’s when you want to run code now as opposed to on the next scheduler tick?

blazing ocean
#

hey that's just coroutines

slender elbow
#

it still has to wait until synchronisation can happen

compact haven
#

True

#

So what’s the use?

slender elbow
#

no lambdas

#

simpler code

compact haven
#

lmao so just to change the invocation method

echo basalt
#

looking for more menu lib inspiration just stumbled upon this

compact haven
#

I mean if it’s larger logic I try and toss it into a method and use a method reference, yeah?

compact haven
#

beautiful, just needs a few more ternaries

blazing ocean
#

all react code should be formatted like this

compact haven
#

🥺 Guys why does my html code only start after the gray line in my IDE

#

I need to scroll a lot every time I open a file

echo basalt
#

bindables have crazy memory leak potential ngl

eternal oxide
floral drum
#

maybe that’s where ### got his inspiration from, as I remember him saying that he basically made his commands similar to luckos

#

or event system

#

smtn like that

echo basalt
#

anyone got gui systems I can look at for inspirarion so far everything I found is.. eh

blazing ocean
#

not mine but my favourite one

#

@echo basalt ping

somber scarab
#

I have a question to all of you guys...

how often do you guys depend on other plugins when you develop? are there APIs you always have to consider when making inventory UI's for example? or score boards? or do you write everything on your own?

echo basalt
#

it ✨ depends ✨

worthy yarrow
#

I write everything my own because I love making things harder, reinventing the wheel, etc etc

echo basalt
#

I usually write my own libs but I look into others for inspiration

#

right now I don't see a menu lib that's as

#

uh

#

complex

somber scarab
#

I understand it depends, but how would you explain it to someone who wants to streamline their coding process

echo basalt
#

as the one I'm writing

somber scarab
#

aka me

worthy yarrow
#

Are you wanting to learn more or just get what you’re working on to well work

somber scarab
#

I wanna scale my plugins and don't want to make those mistakes that set you back months of work

blazing ocean
#

hi kat

echo basalt
#

Look for solutions that fit your use-case and if something matches it perfectly (or is saving you A LOT of time) go with it

blazing ocean
worthy yarrow
#

Hi rad

echo basalt
#

working on slot restrictions rn

#

I wanna be able to just

somber scarab
blazing ocean
echo basalt
#

getSlots("#").setRestrictions(SlotRestrictions.restricted())

worthy yarrow
blazing ocean
#

reminds me of a library that a server I used to work at used

echo basalt
#

For example for packet stuff I usually go with packetevents and make my own little handlers for things like holograms

blazing ocean
#

fucking horrible piece of bullshit

somber scarab
#

I have no issue building my own libs (only if no other reasonable options are out htere)

worthy yarrow
#

Exactly so just have a look around when you run into certain issues/tasks that may already have been addressed as it were

echo basalt
#

For menus I've tried many but none of them were perfect

#

and right now I need a lot of custom slot logic

blazing ocean
#

interfaces my love

somber scarab
#

my issue is that currently I rely on text commands to invite and start my games

echo basalt
#

Make your own infra

#

or use cloudnet + your own shit

#

that's how I did my (horrible) minigames in the past

somber scarab
#

but I think this just looks cheap. I want to make a menu with a list of lobbies and players and so on

somber scarab
echo basalt
#

infrastructure

#

for simple menus like that any lib will do

#

but for my target purpose rn (rpg) I need more than just a paginable menu

blazing ocean
#

is it that one server you showed me before

echo basalt
#

uh maybe

blazing ocean
#

you had gotten me out of bed for that one smh

somber scarab
#

so when you use a lib, the user will have to also install the same lib on their server? Just so I have this all straight

echo basalt
#

just shade it

worthy yarrow
#

^

somber scarab
#

so that's what shade's for...

worthy yarrow
#

Nothing wrong with that

blazing ocean
#

shade and relocate or use the libraries feature

somber scarab
#

does it package it all on one jar file (my plugin)?

blazing ocean
#

yeah

somber scarab
#

long with the lib logic?

blazing ocean
#

that's what shading does

#

the libraries feature downloads and loads the libraries at runtime

somber scarab
#

ahh that's wicked

#

I'll have to read about how to use it then

blazing ocean
#

it only supports maven central on spigot however

somber scarab
blazing ocean
echo basalt
#

hm

#

I was about to write osmething really cursed

#

but I thought about it for like a minute and figured out it isn't worth it

somber scarab
#

dont curse at me I'll cry

#

im very soft

blazing ocean
#

then you set the scope to provided in maven

#

i.e. ```xml
<dependency>
<group>org.jetbrains.kotlin</group>
<artifact>kotlin-stdlib</artifact>
<version>2.1.20</version>
<scope>provided</scope>
</dependency>

#

if I remember maven correctly

echo basalt
#
public interface Castable<T> {

  default T as(Class<T> clazz) {
    return clazz.cast(this);
  }

  default T as(T... hack) {
    // do the varargs hacK i forgot
  }
}
#

so I could like

#

getSlot("#").as(UpdatableMenuSlot.class)

somber scarab
#

man we're so cool.

#

coders are sick

echo basalt
#

but I want to make delegates for things like MenuSlots

#

and that'll shit the bed

#

so I can batch update slots without for loops :)

#

(they're hidden)

cosmic dock
#

do these mappings also fill out things like the function argument variable names?

sly topaz
#

What are you trying to do Karl

cosmic dock
#

oh last time I was like just commenting things out to debug something

#

and now I am wondering how I can save modifications to a .patch file
apparently git diff does, but that means there needs to be a repo with the files? 🤔

sly topaz
cosmic dock
#

from scratch I mean

sly topaz
#

Just check the script, it uses git am

cosmic dock
#

or how does Spigot make patches, doesn't it need a decompiled version

#

for git diff to even work?

sly topaz
#

Check buildata repo

cosmic dock
sly topaz
#

Si it just decompiles the Minecraft source, creates a git repository and applies the patches to it

cosmic dock
#

the script that creates .patch files

#

if it is git format-patch don't I need to decompile Minecraft

#

then upload it on a private repository or something

#

for git format-patch to work

eternal night
cosmic dock
#

like am asking how would one set just regular decompiled minecraft with patch files from scratch

remote swallow
#

Decompile minecraft with your decompiler of choice, apply mappings, copy add changes and use your diff application of choice to make the diff of it

#

Most things use per file patches for mc source

#

Spigot uses git patches as its applied ontop of cb and b

eternal night
#

Yea I mean, I'd just steal one of the existing setups

#

(obviously with proper attribution lol)

#

but they are all open source so just, grab dat

thorn isle
#

clown

fair rock
#

wtf is that

eternal night
#

omg @worldly ingot can you mint me a token

worldly ingot
#

Bet

#

?softban @timid acorn Spam bot

undone axleBOT
#

Done. Enough chaos.

eternal night
#

danke for the quick mod slap

worldly ingot
#

I'll send you that token later, buddy

eternal night
fair rock
rugged fern
#

does anyone know why its not aligned properly? like as title and description? ```java
TextDisplay display = (TextDisplay) location.getWorld().spawn(location, TextDisplay.class);
display.setCustomName("§b§lMission Board");
display.setCustomNameVisible(true);
display.setBillboard(Display.Billboard.CENTER);
display.setSeeThrough(true);
display.setPersistent(true);
display.setGravity(false);
display.setText("\n\n§7Click to view mission\n§7Shift-Click to view Top 5");

vocal gyro
#

Anyone can help me with this? I genuinely don't know what's wrong with this YAML file here:

recipes:
    saddle:
        structure:
            - "LLL"
            - "LSL"
            - " I "
        bindings:
            L: LEATHER
            S: STRING
            I: IRON_INGOT
        item: SADDLE

If I try to get recipes.saddle it just doesn't work

recipes.getConfigurationSection("recipes.saddle");

just returns null and I genuinely don't know what's wrong

worldly ingot
#

What is recipes there? If it's a ConfigurationSection for "recipes" in your YML, you don't need the recipes. in your path

worldly ingot
#

Is there any reason it's not just part of the text?

vocal gyro
worldly ingot
#

It's always the simple things

rugged fern
topaz steppe
#
15:24:19 [SEVERE] java.lang.RuntimeException: Invalid configuration encountered - this is a configuration error and NOT a bug! Please attempt to fix the error or see https://www.spigotmc.org/ for help.

15:24:19 [SEVERE]     at net.md_5.bungee.conf.YamlConfig.load(YamlConfig.java:73)

15:24:19 [SEVERE]     at net.md_5.bungee.conf.Configuration.load(Configuration.java:78)

15:24:19 [SEVERE]     at net.md_5.bungee.BungeeCord.start(BungeeCord.java:275)

15:24:19 [SEVERE]     at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)

15:24:19 [SEVERE]     at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)

15:24:19 [SEVERE] Caused by: while parsing a block mapping
 in 'reader', line 8, column 3:
      lobby:
      ^
expected <block end>, but found '<block mapping start>'
 in 'reader', line 12, column 4:
       dupe:
       ^


15:24:19 [SEVERE]     at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:654)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:57)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.comments.CommentEventsCollector$1.peek(CommentEventsCollector.java:43)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:136)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.comments.CommentEventsCollector.collectEvents(CommentEventsCollector.java:116)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:330)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:209)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:369)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:348)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:323)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:209)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:369)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:348)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:323)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:209)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:131)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:157)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:178)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:493)

15:24:19 [SEVERE]     at org.yaml.snakeyaml.Yaml.load(Yaml.java:434)

15:24:19 [SEVERE]     at net.md_5.bungee.conf.YamlConfig.load(YamlConfig.java:70)

15:24:19 [SEVERE]     ... 4 more```

its giving this error but idk whats wrong in the config


lines with error:

```  lobby:
    motd: '&1Just another BungeeCord - Forced Host'
    address: dal-1.hostfusion.co:8681
    restricted: false
   dupe:
    motd: '&1Just another BungeeCord - Forced Host'
    address: play.hydrodupe.net
    restricted: false```
vocal gyro
#

Is it possible to assign multiple material IDs to one letter on a ShapedRecipe?

worldly ingot
#

You can use a MaterialChoice

worldly ingot
topaz steppe
topaz steppe
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!

topaz steppe
#

how do i fix this error when joining another backend?

#

encountered exception: net.md_5.bungee.util.QuietException: Unexpected packet received during server login process!
1ac7017b227472616e736c617465223a

hazy parrot
#

Does anyone have an idea why my maven plugin goal is just skipped, there is no explanation even when using -X flag, i just get this message.

#

Or any idea how can i debug it

sullen marlin
#

What's your maven command

hazy parrot
#

mvn test, and goal is bound to test phase

sullen marlin
#

Iirc reporting goals can be a bit weird. But do you have an execution set in your pom?

#

Share your pom

hazy parrot
#

will share, just have to write build part out, can't copy from work laptop

#
<build>
  <plugins>
    <plugin>
      <groupId>io.qameta.allure</groupId>
      <artifactId>allure-maven</artifactId>
      <executions>
        <execution>
          <id>allure-aggregate</id>
          <goals>
            <goal>aggregate</goal>
          </goals>
          <phase>test</phase>
        </execution>
      </executions>
      <configuration>
        <reportVersion>2.30.0</reportVersion>
        <resultsDirectory>allure-results</resultsDirectory>
        <installDirectory>${rootDir}/.allure</installDirectory>
      </configuration>
    </plugin>
  </plugins>
</build>
sullen marlin
#

No idea sorry

#

Probably something to do with reporting

#

Can you run the plugin manually?

#

mvn io.qmeta etc

hazy parrot
#

yeah, but plugin is depending on reactorProjects variable from maven, so it have to be ran with all modules

sullen marlin
#

Are you building the reactor or just the module when you try and get the report

hazy parrot
#

reactor, im running mvn test on root module

sullen marlin
#

You might need to define the plugin in the <reporting> not <build> section

#

Worth checking if there's some example docs

hazy parrot
hazy parrot
#

still skipping..

meager marsh
#

in minecraft usung the /give command how do i get custom model data item that has numeric values in version 1.21.4+

quaint mantle
#

hey anyone here know how to make dns records onto one for like bedrock and java the ip will work for both ?
im talking about like custom domains not geyser

weak wasp
quaint mantle
slender elbow
#

I mean, the ip can totally be the same, the default ports for java v bedrock are different anyway so i don't see the problem

orchid gazelle
quaint mantle
orchid gazelle
#

so for example you got mc.example.com, when connecting via bedrock client, you'll get sent to whatever IP it resolves to :19132 and for java the same but :25565

weak wasp
#

You can't use DNS to specify port. Players will have to enter it manually to connect

quaint mantle
#

Na really

quaint mantle
#

Can I give a example of a ip like this

orchid gazelle
#

I have to take a look at my own dns records real quick lol

quaint mantle
#

Ok

quaint mantle
#

Idk how they make it use that ip for bedrock and java

orchid gazelle
#

@quaint mantle you can forward the SRV record of mc.example.com to port :1234 for your java network for example

#

you can make use of proxys to solve the problem for bedrock, but that gets a bit more complicated lol

#

iirc SRV records won't work for bedrock, it always expects 19132

weak wasp
#

That just advertises that you offer service on that port. You can have multiple ports in SRV records. MC will not use them when connecting...

orchid gazelle
#

the only thing you can do is proxy outside 19132 to a different local network port

#

I think

slender elbow
#

java edition will use the port offered by the srv record

orchid gazelle
#

Java -> SRV

#

Bedrock -> No SRV

weak wasp
#

If you have access to the routing you can port forward external port 19132 to internal port you use

quaint mantle
#

Can you like send images like I’m so sped when it comes to reading

slender elbow
#

lol

orchid gazelle
#

lol

#

sketchy paint

quaint mantle
orchid gazelle
#

I am afraid that's not how it works lol

weak wasp
#

There is nothing to associate Minecraft with the SRV record it's just an arbitrary port, it could be used for anything. Both Java and Bedrock don't even do a SRV lookup as far as I am aware, they just try default port unless specified.

slender elbow
#

java edition does do srv lookup

#

sigh

#

idk about bedrock and frankly idc either lmao

weak wasp
#

Like let's say you have a web server on port 8080. Putting port 8080 in your SRV record won't magically make web browsers connect on Port 8080, they will still use 80.

#

You can port forward though and have it work...

orchid gazelle
#

holy jesus

#

wtf is this

slender elbow
#

impressive

orchid gazelle
#

I have used that all the time

#

this is my SRV record for example. It automatically looks up for the port, and does not connect to target domain:25565 but to target domain:25601

weak wasp
#

I think I'm not thinking of SRV records correctly

#

You guys are right my bad. Apparently you could use 8080 to redirect web traffic

orchid gazelle
#

Client asks DNS "sir what port does your SRV offer?" -> Response ":25601 pliz" -> Client connects to target:25601

#

does not work for bedrock tho

#

fuck bedrock

#

lol

weak wasp
#

It's been a few years since I last hosted a domain...

slender elbow
weak wasp
#

What is the service called? Just Minecraft?

orchid gazelle
#

_minecraft._tcp.<subdomain>

quaint mantle
#

@orchid gazelle I got to go to bed so can you dm me what to do I’m fucking retarted

orchid gazelle
#

💀

weak wasp
#

Cool so you can have multiple subdomains on different ports...

orchid gazelle
#

sorry no I can't/won't do that lol

quaint mantle
orchid gazelle
#

I ain't no free sysadmin, I just dropped in here because I saw a question I was able to answer quickly

#

lol

quaint mantle
#

Ok just there was a lot of messages and I can’t understand

weak wasp
#

You need to make a SRV record for Java. Just search for how to do that...

orchid gazelle
#

depends on whatever their rest of the infrastructure is, realistically

weak wasp
cloud token
#

Hey @ashen turtle

I'm reaching out to ask if you could add me on Discord so we can talk for a bit. I really admire some of the plugins you've made and would like to have a quick chat with you.

raw abyss
#

does anyone know if it would be possible to make Player.hideEntity/Player.showEntity into an in game command. Like /hide (entity)@e[tag=test] (from)@p. Just an example, doesnt need to be exactly like that

blazing ocean
#

yeah of course

lean pumice
#

i dont find how to collapse this

mortal vortex
blazing ocean
#

three dots -> appearance

mortal vortex
#

wouldnt it be this?

lean pumice
mortal vortex
#

ohh my bad

blazing ocean
lean pumice
mortal vortex
#

Yeah what rad said, 3 dots up top

lean pumice
#

like this

#

but... why there is the package out?

blazing ocean
#

show your appearance stuff in the three dot menu thing

lean pumice
#

in this i get ok

lean pumice
#

xd

#

i have fix

mortal vortex
#

Whats the particle name for block breaking particles?

#

Formerly BLOCK_CRACK?

smoky anchor
#

I assume either one of these two

#

the first one

mortal vortex
#

ohh okay

#

same usage?

ocean gorge
#

how do i cancel the block damage event? using e.setCancelled(true) the damage continues anyway, the event is basically useless

smoky anchor
#

You mean the mining progress ?

ocean gorge
#

Yep

chrome beacon
#

Block damage is calculated on the client as well

ocean gorge
#

I supposed

chrome beacon
#

Use adventure mode or mining fatigue if you want to get rid of it entierly

ocean gorge
#

then the Bukkit event is useless

chrome beacon
#

It is not

#

It's very useful for making custom mining systems

#

Where you calculate block breaking server side

smoky anchor
#

Saying it's "useless" just because it does not work as you want is silly
It has other uses...

ocean gorge
#

I am attempting to destroy a tree whose base block must break in 13 seconds

chrome beacon
#

Mining fatigue it is

smoky anchor
#

mining speed attribute ?

chrome beacon
#

That could work as well

#

Depends on the version they're on

ocean gorge
#

are you telling me to use mining attributes? I've been trying to figure out how to use them for 2 hours 😦

young knoll
#

Player#getAttribute(Attribute.SOMETHING)

#

Don’t remember the exact name

ocean gorge
#

Ok i try it

#

Thx

quaint mantle
#

@orchid gazelle like this ?

ocean gorge
#

I can't find anything that fits my matches, I managed to slow down the breaking states, but only if I click the block once, if I hold it down it doesn't work properly

young knoll
#

Apply the attribute in the block damage event

#

Remove it when the block is broken or in the BlockDamageAbortEvent

rough drift
#

it won't work if you apply on block damage, you need to do it on player move, raycast (actually just use getTargetedBlock, I think that's a method?), then apply the mining speed multiplier for that block

young knoll
#

I figured it would work if you apply it on block damage

#

But might be delayed for laggy clients

rough drift
#

no, sadly

young knoll
#

Weird

ocean gorge
young void
#

how does itemsadder add custom armors to the game?

#

i want to implement a similiar logic

if the armor has a custom model data of like 555 it would retexture it to my own custom texture

drowsy helm
#

do you want to know how it applies the model data, or handles the item instances, etc?

young knoll
#

I believe they used the fancy pants shader in the past

#

Idk if they’ve moved to the new armor model components

drowsy helm
#

they probs have to support both

#

but components is way to go

young void
drowsy helm
#

for leather

#

you can probs decompile it and see how they do it

#

or just check out the generated resourcepack

young knoll
#

The shader is public

drowsy helm
#

oh its literally called fancy pants lmao

young void
#

oh the shader is literally called fancypants😭 😂

smoky anchor
#

I don't think that shader will work on latest + it's usefull only for animations nowadays iirc
using the equipment component is the way to go & is by far the easiest

young knoll
#

Doesn’t that only allow you to change the texture of the armor model

#

Not the actual geometry

smoky anchor
#

Yes
Does fancypants allow you to change the geometry ?

#

In any case, you're still quite limited by the amount of verticies (unless you wanna do some very weird shader magic)

young void
#

i think im headed the wrong direction.

im using armormechanics. it works alongside weaponmechanics which allows me to customize the damage attributes of guns to the armor

all i want to do is apply the texture to an armormechanics armor. but i can only change its custom model data and color.

there must already be a premade solution for this problem?

#

but yeah its confusing

smoky anchor
#

So... you're not developing a plugin ?

young void
smoky anchor
#

Then you're in the wrong place, should be in #help-server And next time describe what you're doing properly
But they have their own discord server, so go and ask there

wet breach
young void
smoky anchor
#

no it's not :)

vague swallow
#

?whereami

vague swallow
#

💀

vague swallow
#

Is there an easier way to make a player a light source when holding a torch than placing light blocks at his location?

chrome beacon
#

Not really

vague swallow
#

With ProtocoLib or NMS?

chrome beacon
#

Still need to send blocks

thorn isle
#

yeah no way around it, the unmodded client only draws light from blocks; so you have to place blocks of some sort, and light blocks are the best choice

smoky anchor
#

"easier" ? No
"prettier" ? Yes, you can use core shaders to create more realistic lights, so you could make "dynamic lights" too most likely. At least for player.

autumn wadi
#

Hey, i bought an Plugin but it diddnt arrived

pliant topaz
#

You need to contact the author of the plugin (the person you bought it from)

rough drift
#

if I set a player's respawn location, will it work like vanilla, checking for a valid spawn location or not?

thorn isle
#

i think not

#

but tryitandsee

manic delta
#

🤔

blazing ocean
#

Is there a way of getting a classloader which includes all plugins on the server? Do I just impl URLClassLoader and add all plugin's class loaders into there?

XY: trying to do SPI lookups across all plugins - could probably also use bukkit's service manager now that I think about it

blazing ocean
#

wtf is a paper

molten hearth
#

paperspigot

tall rune
#

I have a plugin I want to make some edits to this plugin, how can I compile this plugin I keep getting errors

remote swallow
#

use the source code

tall rune
# drowsy helm What errors

almost all lines give an error, first I decompile it, then it gives an error even when I try to convert the decmopile file into a jar file, if you want I can send you the plugin file

chrome beacon
#

Do you have any experience with Java

#

and did you add the required dependencies to the project like I told you to

drowsy helm
#

“Gives an error” is super vague

#

But yes, having the source would be ideal

chrome beacon
#

I'm going to assume they just ran a plugin through the decompiler and didn't add dependencies

#

causing everything to error out

thorn isle
#

IS ERROR HALP

tall rune
chrome beacon
#

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

chrome beacon
#

or if you're short on time

#

?services

undone axleBOT
mortal hare
#

when you write code for backend applications do you guys model your data in rich data models or anemic ones

edgy moth
#

how to Make dependency For My Plugin

chrome beacon
edgy moth
#

@chrome beacon

thorn isle
#

the local scrum master may disagree

chrome beacon
edgy moth
#

Yes, I want to rely on it properly.

chrome beacon
#

Run the maven install task on the plugin you want to depend on

#

Add the plugin to the plugin.yml and then to your projects pom

#

That's it

edgy moth
#

Hmm to become like this <dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

#
           <groupId>org.spigotmc</groupId>
           <artifactId>spigot-api</artifactId>
           <version>1.21.5-R0.1-SNAPSHOT</version>
           <scope>provided</scope>
    </dependency>```
chrome beacon
#

Like that but with the dependency info you specified in the pom of the dependency project

orchid furnace
#
        String teamPrefix = getTeamPrefix(e.getPlayer());
        e.setFormat(teamPrefix + "§f" + e.getPlayer().getName() + "§f: " + e.getMessage());

    }```

does anyone know why the chat format doesnt set when they say anything including "%"
chrome beacon
#

Don't concat the message (and player name) like that

#

Read javadoc note

orchid furnace
#

is there an event for when endermen steal blocks?
Edit: EntityChangeBlockEvent

tight shuttle
#

Hello, I saw on a boat racing server that they found a way to make no boat collision, can someone tell me how they did this? (there's no boat collision + we don't see anybody on the track it's like we're on a solo server while we're not)

thorn isle
#

paper iirc has a cancellable collision event for entities and vehicles; spigot might as well

#

this + the showEntity/hideEntity api to hide the boat should make the boats invisible and intangible

#

not sure how to go about hiding the players though, as doing hide on a player also removes them from the tab playerlist

young knoll
#

There’s an option for that in the packet

#

But not in the api

knotty gale
#

Ok so in a hashmap, the first value is kinda like the ruler of the second? Like you check if the first variable has the second. And you check if the 2nd variable is in the first. Right?

rough ibex
#

are you talking about implementation

#

or usage

#

impl: the first value is hashed to provide an index into the array of values, essentially

knotty gale
#

I am talking about just in general use
If i want to keep track of a list of lets say games with their individual starter, I could use the first variable as "games" to have a list of those, and the second would just follow the first around to be the extra information for it, right?

sullen marlin
#

Kind of? A hash map is a key and a value. You have a label (key) and look in the box with the label for the contents (value)

wet breach
knotty gale
#

Is it possible to have 2 values for 1 key? Like if i want to keep a set of scores for each key is it possible?

#

for instance:
Game 1: 10-0
Game 2: 5-5

wet breach
#

No, you cant have duplicate keys. However the value of the key can be another collection or even another hashmap

#

So you can have a list as a value and store multiple values for that key which i think answers your question?

#

But you wouldnt be able to store 2 int variables on their own on the value though as if you tried you would just overwrite the old value for the key

knotty gale
#
class Data {
        String score1;
        String score2;
    }

so is this a good way of doing it? Then just doing .put and call data?

wet breach
#

Sure, you can store an object that contains such things as a value

knotty gale
#

ok tysm

#

wait, so now I wanna know how I define each of these variables inside data for each specifc game

wet breach
#

Just be aware that unless you update the obects in the hashmap you can have old values or stale objects so its best you implement a mechanism that gets rid of that stuff if necessary or maintains your hashmap

knotty gale
#

ok

knotty gale
#

ok

wet breach
#

Use new object like you normally do when creating a class object

knotty gale
#

I wanna have a hashmap for every world in the server, what would be an effective way of looping through each?

#

I am using a multiverse plugin

wet breach
#

Here is a class from my plugin that should help with how to create objects and put them into the hashmap and looping

#

Its mit licensed so do what you will with it lmao

knotty gale
#

oh bet tysm

#

really helped me understand

mortal vortex
rough ibex
#

brainrot

quaint mantle
blazing ocean
ocean gorge
#

do you know why when i create a new project it doesn't let me compile the jar? every time i have to create the project on an older version of IntelliJ and then reopen it in the new version

blazing ocean
#

"it doesn't let me compile the jar"?

ocean gorge
#

🤷‍♂️

blazing ocean
#

well you can't run it

#

use your build tool to build it

ocean gorge
#

Good

#

i directly changed the "Run" configurations

proud badge
#

would block.setType reset the BlockData too? If I have a log thats facing a certain direction, then replace it with another log, would the direction it's facing be reset?

mortal vortex
#

Yes

#

get the data. and then copy it over

lean pumice
#

with aikar i have created a class that have more command in one using CommandAlias, at the end of it i want create an universal help command of those command. i tried to use @HelpCommand but it not working

merry cove
#

setting an item in the gui updates automatically even while open, right? or do I need to reopen?

mighty wind
#

um, i have this code from like 5 years ago i found

#

PlayPacket packet = new PacketPlayOutAnimation(((CraftPlayer) p2).getHandle(), 1);

is there an equivalent of this in 1.21.4

chrome beacon
#

And what does that do

strong parcel
#

Is this a chest inventory that has a resource pack and multple slots mapped to the same function for the larger buttons?

chrome beacon
#

Depending on needs the texture is part of the font or an item texture

#

^^ watch this

thorn isle
#

tl;dr yes

strong parcel
#

Thanks!

unborn hollow
#

How would I be able to put items in that 4x4 crafting grid in the player's inventory?

rough ibex
#

you mean 2x2

unborn hollow
#

2x2*

drowsy helm
#

But you’re gonna to have to apply it periodically through some scheduler

pseudo hazel
#

?services

undone axleBOT
smoky anchor
#

yes it does

left jay
#

i got this runnable here that is supposed to give the player some absorption hearts after 3 seconds of not taking damage, but for some reason the hearts are not coming thru. any1 knows whats up?

drowsy helm
left jay
drowsy helm
# left jay Yeah it is

unless your MAX_ABSORPTION attribute is less than 20, theres no reason this shouldnt work

left jay
drowsy helm
# left jay

how are you verifying the line is executing?

left jay
#

I had a line there before that printed a message when getting to the absorption line

stiff crag
#

how to remove the plugin name at the start of the command, bukkit btw

drowsy helm
stiff crag
#

so how do servers remove it?

#

I just want it to be command name

#

like how minecraft has it /xp instead of /minecraft:xp

#

@drowsy helm

drowsy helm
#

You will have both variations available. Im not aware of any way other than cancelling packets to remove the latter

stiff crag
#

for my plugin I just have /kit:kit

#

and I'm not sure how to remove the prefix at the stat for it just to be /kit

drowsy helm
#

So /kit doesnt work?

#

The whole reason they have the version with the plugin name prefix is to prevent command collisions but it shouldnt matter if no other plugins are using that command

stiff crag
#

it does the problem is I want to remove /kit:kit from the command chat

#

It looks ugly imo

left jay
drowsy helm
drowsy helm
#

For something so trivial it sounds unlikely

alpine urchin
#

you guys doin god’s work 🙏

azure zealot
#

is it possible to bind spigot on unix domain socket?

sullen marlin
#

no, I think I had a patch for it ages ago

blazing ocean
#

why though

#

can't even connect to that

sullen marlin
#

bungee

blazing ocean
#

I mean, I guess

#

but just don't expose the backends and you're good to go

somber scarab
#

could I pay someone to make me a nice overview with markdown for my plugin?

#

I think mine looks ass

#

I hope this doesnt count as advertisement

#

(DO NOT DOWNLOAD, just look at my horrible formatting :3)

sly topaz
#

would probably be good to introduce a wiki given the overview doesn't tell you much of anything in regards to commands, permissions or configuration of the plugin though

#

oh there's a documentation tab now

wet breach
sly topaz
#

it is probably not hard to implement either, but nobody has taken the time to look at that so

left jay
rigid sable
#

Why can't i upload premium plugins, I have 2nd authentication on, 21 positive ratings and 80 messages

young knoll
#

Do you have 3 free plugins

blazing ocean
rigid sable
rigid sable
#

Nevermind it unlocked on its own after 10 mins for some reason

young knoll
#

The guidelines do say it takes up to an hour

wet breach
#

the reason it is a pain is that netty only supports unix sockets with native transport ( Epoll and KQueue) which is not available on windows

#

so if you want windows support you will need to exclude netty from the equation

#

also there is some other things too but that is one of the major issues

blazing ocean
#

does windows even support unix sockets

wet breach
#

yes

#

windows 10 +

drowsy helm
wet breach
#

it was a requirement for being able to support having linux subystem

sly topaz
#

though I am surprised netty doesn't yet support native transport in windows given the primitives for it have existed in windows since forever

wet breach
#

also, using netty for unix sockets isn't very intuitive either last I recalled

sly topaz
#

I'll check it out once I finish moving

#

anything networking is my personal hell as I do not get along with networking related programming at all but I'll try lol

wet breach
#

lol

slender elbow
#

at least for a year, but probably for longer

slender elbow
#

the power of abstraction 🪄✨

narrow kraken
#

Yo I am new to coding and I want to Launch a Player Holding an Axe in the sky. Then I want to switch the axe with a mace. Wich I was able to do but I want to switch back to the axe after the player is back on the ground but I can’t figure out how to check if the player is back on the ground

warm mica
smoky anchor
#

nah, check velocity instead I say

#

there are few problems with just a block check
number one, you can't check directly below the player 'cause player may land on an edge so you'd need at least 4 checks.
2: The fact that if you use scale attribute this will break.
3. im lazy but non collision blocks

slender elbow
#

I like your list numbering style

wooden hollow
#

please help me viaversion doesn't work on my bungeecord someone write to me privately

jagged thicket
smoky anchor
narrow kraken
smoky anchor
#

idk, start repeating task after the player is launched, keep checking if their Y velocity is very near zero then do your things and cancel the task

mortal vortex
#

How exactly is it that MCMMO knows the difference between naturally spawned logs, and player placed logs (mining logs after placing does not give skill xp but natural blocks do). Is this done by making each block a PersistentDataContainer? I considered this, but it seems to trivial and lag inducing? Is it just like a set with a fixed length of recently placed blocks?

smoky anchor
#

It... seems to be open source ?
Could just check the source :D

mortal vortex
#

mb

smoky anchor
#

Seems to be using bitset to see if a block was manually placed, custom file

mortal vortex
#

but anyways, the reason im asking is because in principle i need to do something similar, to check if a block was a player or natural. would assigning pdc to each block be stupid?

smoky anchor
#

very

#

that would be a LOT of data

warm mica
smoky anchor
#

A bitset per subchunk with optimizations would be much better, but the custom file bitset is best (to my knowledge)

mortal vortex
#

shit gng

#

thank yall

#

ong gang

#

ts was pmo so bad icl man idek what i woulda done w out u gng

smoky anchor
#

did you have a stroke or did I

mortal vortex
#

gng idek atp tbh

#

gng we all had a stroke gng

#

🥀

smoky anchor
#

I hope you recover from this soon

eternal oxide
#

I smell burnt toast

smoky anchor
# narrow kraken Thx

Remember the "very near zero"
I believe the player always has some downwards velocity due to.. gravity and how the game works.

azure zealot
azure zealot
#

If you can using them should be better

#

But as md_5 discards the good patches, i cant use it anyway🙃

azure zealot
granite forum
#

hello! I am having an issue to import vault using gradle, anyone knows why? Cannot resolve symbol 'milkbowl' (using import net.milkbowl.vault.economy.Economy; ) and my build.gradle is:
`
plugins {
id 'java'
id("xyz.jpenilla.run-paper") version "2.3.1"
}

group = 'vgamerv'
version = '1.0'

repositories {
maven { url 'https://jitpack.io' }
mavenCentral()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven {
url "https://maven.enginehub.org/repo/"
}
}

dependencies {
compileOnly 'io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT'
compileOnly "com.github.MilkBowl:VaultAPI:1.7"
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.13-SNAPSHOT'
}

tasks {
runServer {
minecraftVersion("1.21")
}
}

def targetJavaVersion = 21
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'

if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
    options.release.set(targetJavaVersion)
}

}

processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
`

#

anyone knows why this might happen?

#

I've just searched my eyes out and still can't find anything

vast ledge
granite forum
vast ledge
#

Could you also move the jitpack maven under mavencentral()

vast ledge
#

Most likely not the issue, but semantics bother me xD

#

You might have to shade the vault API, but I'm unsure, as I haven't used it in a while

granite forum
eternal oxide
#

don;t shade vault

granite forum
#

what can I do then?

eternal oxide
#

should only need jitpack repo and vault dependency from github to work

vast ledge
#

It's been a while since I used vault, have you reloaded the gradle?

granite forum
vast ledge
#

Could you give a larger stack trace?

eternal oxide
#

I'd also have jitpack as your last repo

granite forum
vast ledge
#

When you refresh gradle, it should go through your dependencies and download them, if you're not getting an error there then something else is wrong

slender elbow
#

does it show up normally when you run ./gradlew dependencies ? and not with a FAILED note

granite forum
#

the thing is that it just doesn't want to import net.milkbowl.vault.economy.Economy;

slender elbow
granite forum
eternal oxide
#

the import is red? clear caches and restart

vast ledge
#

Oh btw change the version of the compile only to 1.7.1

granite forum
eternal oxide
#

in the IJ file? menu

granite forum
#

nvm, found it

vast ledge
#

Or you can run gradlew cleanBuildCache afaik

granite forum
#

got rid of the cache and its working fine, thank you very very much

#

I really appreciate everyones help

torn shuttle
#

this thing will be the end of me

#

I can't solve fully solve this matrix bs

#

no matter what I do

#

I can get it really close, but it always falls apart somewhere

umbral ridge
#

is manual chunk loading necessary or does teleport() handle that

torn shuttle
#

you can just teleport players, the game will sort it out

slender elbow
#

also i'm pretty sure Location#getChunk() loads the chunk so isLoaded would've always returned true 😄

torn shuttle
#

it does

#

I can patch and patch and patch it but then the math never truly works out

#

the biggest core issue is just how , without applying any transformations to do raw data, the "0" value for the y axis is 180 degrees offset from the blockbench value

#

if I solve that everything else i can resolve

#

but I can't just rotate the entire thing by 180 because the entire skeleton is then incorrect, and I can't rotate each bone by 180 (normally) because then each child is incorrectly rotated

#

if I rotate the yaw of the underlying display entity then the rotation matrix is no longer in sync with what is being represented

sly topaz
#

I am confused as to why you can't just rotate the Y on the transformation matrix of the display entity before passing in the blockbench-given matrix

torn shuttle
#

because bones have children, so the child will then start rotated by 180, and rotate 180, meaning it is now incorrectly rotated

#

also they are only incorrect locally, not for the skeleton, meaning that if the parent bone rotates by 180 the child bone might now be way off somewhere incorrectly because it will suffer from the parent bone's rotation

#

basically I would have to find a way to rotate each bone individually in a way that does not affect downstream rotations

sly topaz
#

how do you get the blockbench matrix?

torn shuttle
#

the closest I've gotten it to work was rotating outside of the matrix system, so basically just rotating the final result outside of where the math is done, but because rotation order matters that causes other serious problems

#

and also the matrix is just rotating incorrectly due to being out of phase

smoky anchor
#

I'm really tempted to give this a try one day.
I already did this thing once in my own engine, should not be that difficult since we have display entities.

torn shuttle
#

because of this one problem

#

otherwise there would be no reason for it to be any kind of problem

smoky anchor
#

the 180 rotation ?

torn shuttle
torn shuttle
# smoky anchor the 180 rotation ?

well, the fact that blockbench on its own has 2 reference systems, one for posing and one for animating, and then minecraft has a third system

#

blockbench isn't even internally consistent

#

it translates and rotates elements differently between the model creation screen and the animation screen

smoky anchor
#

So, local and world rotation/translation ?

torn shuttle
#

no

#

like if you go positive on the Y axis while posing the model it goes in one direction, and then if you do the same axis to the same bone and go positive it now rotates in the opposite direction

#

or how the X axis translates in one direction when in the model creation screen, but the opposite direction when you're animating for positive and negative coordinates

#

if you think that doesn't make any sense, yeah, it doesn't

smoky anchor
#

LMAO

torn shuttle
#

so as you might imagine

#

it's hard

#

this part I can fix easily

#

because it's just that the values are flipped

smoky anchor
#

yeye

torn shuttle
#

the really fucked up part is the way the Y axis is just offset by 180

smoky anchor
#

I guess that explains this part of my old code XD

torn shuttle
#

it causes a never-ending stream of problems

smoky anchor
#

Is this your FreeMinecraftModels ?
Is the problem in the current master branch ?

torn shuttle
#

I could push it out

#

but yes it's fmm

smoky anchor
#

If you push it and give me the test model you have I could see if I can figure anything out.

#

What version is this for ?

torn shuttle
#

in theory any

#

well

#

after like

#

1.19.4 or something

#

but I am testing with base 1.21 since mojang did a lot of very funny haha things with display entities

#

like flipping them

smoky anchor
torn shuttle
#

yeah

#

very funny haha moment

#

thanks mojang

smoky anchor
#

ty for branch

torn shuttle
smoky anchor
#

<3

torn shuttle
#

knock yourself out

torn shuttle
# smoky anchor <3

fyi in the current branch I am only testing with dynamic entities, I broke something about static ones that I've not gotten around to looking at

#

it doesn't really matter since the system should ultimately be shared by the two in the exact same way

smoky anchor
#

Unresolved dependency: 'com.magmaguy:ResourcePackManager🫙1.3.0-SNAPSHOT'
No worry, I'll build it myself

torn shuttle
#

the closest I've gotten it is the previous commit to the current latest, but it's all jank and that compounds into a lot of bs

#

oh let me push that out

smoky anchor
#

oh that was quick lol ty

torn shuttle
#

I recommend you get that one too

#

lets you test without having to manually manage resource packs

smoky anchor
#

FFM depends on RPM and RPM depends on FFM ?
How does that work

torn shuttle
#

pretty sure it's all soft depends

#

they have some linked features

smoky anchor
#

I mean the code, in pom

torn shuttle
#

yeah what about it

smoky anchor
#

Just that I've never seen anything like it, if it works it works so idc lol

torn shuttle
#

the only reason it's not just one plugin is because there's not a 100% overlap between people who want plugin A and plugin B

smoky anchor
#

Finally got it to compile, silly lombok

hushed spindle
#

villagers will attempt to replenish trades even if they're not traded, right?

#

or am i remembering incorrectly

smoky anchor
#

Magma, any suggestion on how I can get all the entities to actually display ?
Testing on 1.21.4

torn shuttle
smoky anchor
#

They are somewhere
But I can't see them ?

#

Sometimes

torn shuttle
#

can't say I've had that as far as I can remember

#

man

#

once again I have this code just so close

#

I can taste it

manic delta
low marlin
#
@EventHandler
    public void onInventoryClick(InventoryClickEvent event){

        Player p = (Player) event.getView().getPlayer();
        Bukkit.broadcastMessage("test: " + event.getRawSlot());

        if (event.getRawSlot() == 5){
            event.setCancelled(true);
            p.updateInventory();
        }
    }

I have this code, When I try to take off an helmet it cancels once but when I try to take it off again it doesn't run anymore, any ideas why and how to fix?

real lagoon
low marlin
#

I tried but somehow it didn't work

smoky anchor
#

There should not be any need to update the player inventory

low marlin
#

I update it because when the player tries to take the item out of the helmet slot it cancels the event but the item is still in the cursor slot

smoky anchor
#

You're not testing this in creative, are you

low marlin
#

let me guess

#

creative breaks it

#

AHHH MANNNN

smoky anchor
#

Creative does not play well with inventory stuff

low marlin
#

I'm checking

smoky anchor
#

Creative inventory is handled on client mostly

low marlin
#

well

#

I am stupid

#

thank you

real lagoon
#

Lol

smoky anchor
#

Ok Magma, fuck your dysfunctional animation system, imma use my own design :D
-# (read as "I'm too dumb to figure out how yours works")

torn shuttle
#

you just have to look at BoneTransforms and TransformationMatrix btw

#

one handles all the transforms, the other is just a utility class to centralize the math part of it

smoky anchor
#

Ye I already figured as much ty

torn shuttle
#

I mean otherwise it just tries to emulate how a game engine would do it, there's not really anything to it

smoky anchor
#

What teleport_duration do the entities have ?
Feels like 3 or something high. Makes these "fast" rotations and translations together look bad.

torn shuttle
#

there's a significant interpolation which is why I use packets to avoid it

smoky anchor
#

That... no ?
The interpolation is there 'cause the entities seem to have high teleport_duration
If you set it to 0 then there will be no interpolation for teleporting

#

You can't "disable" it just 'cause you use packets

torn shuttle
#

there is a different interpolation system built into some entities that can be avoided for some versions through packets but I don't care to explain it further

smoky anchor
#

Ye that's enough for me actually :D
Guess it's something I am not aware of, that's fine.

tiny mountain
#

Hey there Im struggling a lot with skull meta, I have a part in my plugin to use reflection to adapt the methods depending on the version, but since 1.21 it does not seem to work, I tried taking a look to 1.21 spigot API but can't find the methods I should use now to apply the texture...
Can anyone tell me what methods should I call now ?
I did some tries but I get no error, the GUI open, the playerHead is there but absolutely no texture.
Im working with texture urls to do it maybe that's not what I should use now ?

#

this is the part I'm talking about atm, I know it is not clean at all but i spent days trying so many things that it is a pure garbage now :

        try {
            // ======== 1.20.5+ Reflection ========
            Class<?> profileClass = Class.forName("org.bukkit.profile.PlayerProfile");
            Class<?> texturesClass = Class.forName("org.bukkit.profile.PlayerTextures");

            // Create profile
            Method createProfile = Bukkit.class.getMethod("createPlayerProfile", UUID.class, String.class);
            Object profile = createProfile.invoke(null, UUID.randomUUID(), "CustomHead");

            // Set texture via URL
            Method getTextures = profileClass.getMethod("getTextures");
            Object textures = getTextures.invoke(profile);

            String httpsUrl = url.replace("http://", "https://");
            Method setSkin = texturesClass.getMethod("setSkin", URL.class);
            setSkin.invoke(textures, new URL(httpsUrl));

            Method setTexturesMethod = profileClass.getMethod("setTextures", texturesClass);
            setTexturesMethod.invoke(profile, textures);

            // Apply to skull
            Method setPlayerProfile = SkullMeta.class.getMethod("setPlayerProfile", profileClass);
            setPlayerProfile.invoke(meta, profile);

        }
young knoll
#

I don’t think anything has changed since 1.18

smoky anchor
#

How do I do simple hot-swap with plugins ? 1.21.4
Any guide ?

torn shuttle
tiny mountain
grand pike
#

Hi! I'm trying to override the getPassengerAttachmentPoint of an ItemDisplayer.
I would like to make it so that multiple players can sit on the same ItemDisplayer, but not all in the same point (center). For this reason, following a bit what happens in Boats and Minecart, I'm looking for a way to create a Packet Entity of type ItemDisplayer that Overrides this method. What I noticed is that the server actually updates the Passenger's Attachment Point correctly, but the player does not see this change. Maybe because I don't know what specific packet I have to send to the user in order to see it via client. I sent ClientboundSetPassengersPacket, ClientboundSetEntityDataPacket, ClientboundEntityPositionSyncPacket, ClientboundMoveEntityPacket.PosRot, but none of them contain this data. It seems that it is something almost completely handled by the client, but I think there is a way to pass some data so that the client interprets it in the right way. Would anyone like to collaborate with me to find a solution? Thanks!

    protected @NotNull Vec3 getPassengerAttachmentPoint(@NotNull Entity passenger, @NotNull EntityDimensions dimensions, float scaleFactor) {
        Seat seat;

        if (!(passenger instanceof ServerPlayer player))
            return super.getPassengerAttachmentPoint(passenger, dimensions, scaleFactor);

        seat = getSeatOf(player.getBukkitEntity());
        if (seat == null)
            return super.getPassengerAttachmentPoint(passenger, dimensions, scaleFactor);

        return seat.getVec().yRot(-getBukkitYaw() * (float) (Math.PI / 180.0));
    }```
smoky anchor
rotund ravine
grand pike
smoky anchor
#

Ok I spent 5 hours on this
I don't understand how I even managed to create 2 blockbench model loaders that support (basic) animation
'cause what I'm seeing right now is making no sense :D

dawn flower
#

why do some forums say that using InventoryHolder to identify inventories causes performance issues? and what should i use

manic delta
#

i was reading a post above the other day is it possible to remove messages from player chat right?

#

using audience and stuff like that

dawn flower
#

yes and no

smoky anchor
#

"remove messages from player chat"
no
you can send a bunch of empty lines to "clear" the chat

dawn flower
#

yes u can

#

1 sec lemme find it

thorn isle
dawn flower
#

and what should i use

smoky anchor
dawn flower
#

it won't work on players in older versions tho if you have viabackwards

manic delta
#

yea ill ask there

thorn isle
#

speaking of paper, paper also allows you to pass false to getHolder such that it doesn't copy the backing tile entity

manic delta
#

lol

#

how i say

#

they should suck

#

in english

#

im not native

#

i dont think suck them is ok

dawn flower
#

i can't get what you're trying to say but np if you're not native

manic delta
#

like i dont care about them

#

haha

dawn flower
#

i think you're trying to say "sucks to be them"

manic delta
#

idk

#

yes

#

that

#

thank you

dawn flower
#

yw

smoky anchor
#

@torn shuttle now I understand your pain

echo basalt
#

living in portugal does that to a mf

young knoll
dawn flower
#

i'm convinced there's a command for everything

#

anyways thanks

sullen marlin
thorn isle
#

i have his liver

echo basalt
#

I gave him a cup

#

might or might not've been poisoned

thorn isle
#

the rest of his organs i'm not sure about

torn shuttle
#

stuck on a rotation problem

echo basalt
#

annoyed I left

#

haha

sullen marlin
#

Then we can go see that in the cinema

smoky anchor
sullen marlin
#

Implying that mc follows normal math

torn shuttle
#

this is at the stage where I can't ask anyone for help without a 30 minute primer on the nature of the problem, so they would really have to care to fix it

#

I have tried many, many resources

#

it's also advanced enough mathematics that it's relatively unlikely anyone who hasn't done at least a small amount of college-level mathematics would probably not fully understand

#

at least here you don't learn about matrices in highschool iirc

#

definitely not how to rotate, translate and scale them

young knoll
#

Are you still struggling to animation

torn shuttle
#

yeah

#

the best I could manage was a patchwork solution

#

which I was trying to solve

young knoll
#

I mean I don’t know if mine ever worked with all animations tbh

#

I didn’t test it that extensively

torn shuttle
#

I'm starting to wonder if it's even possible honestly

smoky anchor
#

A frickin datapack can do it, a plugin surely has to too

torn shuttle
#

can it though

#

a datapack wouldn't do it this way

#

I can get an animation system working just fine

#

I just can't cleanly bridge this gap

thorn isle
#

no clue what you're doing but this is a fairly comprehensive suite of math/programming on matrices and rotations

torn shuttle
#

I very much doubt anything in there would help my specific case

thorn isle
#

try it and see

#

i wouldn't know since i don't know what that case is

#

but give it a shot; when i did my 3d rendering engine, i used this site extensively

#

much better than the relevant wikipedia articles for sure

torn shuttle
#

I already have a fully functioning animation system

#

what it doesn't do is that it can't resolve the fact each bone is individually rotated 180 degrees away from what it should be, which causes all kinds of downstream issues, nor does it resolve the fact blockbench has two different reference systems for posing and animations

thorn isle
#

since you've almost certainly tried this already, what's the issue with adding a 180 degree rotation in between each bone in the correct order?

torn shuttle
#

you're now cascading 180 degrees downstream

thorn isle
#

supposing that is the intended rotation of the parent bone, that is only desirable, no?

torn shuttle
#

each individual bone has incorrect defaults

#

so you need to modify each bone without affecting any child bones

#

which I am doing in postprocessing but that causes even more issues

thorn isle
#

link to the relevant code and a sample model demonstrating the issues and i'll fiddle with it once i'm sober

torn shuttle
#

model is near the post I linked to before

thorn isle
tight compass
#

When does the client not respond to encryption request?

thorn isle
#

barring you being in the wrong protocol state to begin with, as of 1.20.5 or something, the vanilla client always responds to the protocol encryption request

tight compass
#

You sure?

#

Because uh

#

It aint

#

I've verified through tcpdump that this is the packet I'm sending the client, and it's not sending me an encryption response

ac 1 1 0 a2 1 30 81 9f 30 d 6 9 2a 86 48 
86 f7 d 1 1 1 5 0 3 81 8d 0 30 81 89 2 
81 81 0 be 2c d5 20 fc ac ff 3b 81 89 d 7b 90 
93 5c 59 a3 75 7e 7d ed 6d 1b 41 7 8c 91 8c 55 
94 4f 48 ee bd 10 f8 3e c5 f2 af 98 a4 10 44 98 
84 bd dc e9 fe 48 80 92 c6 1c 4b 10 2b d1 37 a9 
50 3b 3e 6e a d4 f6 ba ed c5 1e 9e 7f c9 9d dd 
bc 50 79 e3 66 1e b9 52 a9 fd 12 9f 1c 98 a1 86 
90 6 ac e bb ec 8 e2 2a 67 f0 a0 18 fc 6c 95 
fe c6 50 76 94 b1 15 ee 30 a4 ab b6 57 44 65 2 
d2 e0 49 2 3 1 0 1 4 62 79 74 65 0
#

Should be the length, packet id, server id, public key, token, and verification flag

stiff crag
#

How to remove plugin name before command?

vast ledge
#

Wdym?

#

something like /craft?

stiff crag
#

yeah instead of like /pluginname:craft

vast ledge
#

type /craft in chat

#

it should resolve

stiff crag
#

no no like if I had a command that was /pluginname:command I want to shorten it to /command

chrome beacon
#

You can just do that

stiff crag
#

the thing is I don't like additional commands in my chat

chrome beacon
#

It's done automatically?

vast ledge
#

It should be auto generated by default, the /pluginname:command should only be used if you want to run the command from a specific plugin

drowsy helm
vast ledge
chrome beacon
#

There's a setting where you can disable that ^

#

Command will still work if you type it out though

stiff crag
#

I've checked through the plugin.yml under the commands section

#

but the only one was send-namespaced: false

young knoll
#

It’s a spigot setting

stiff crag
#

but that just bugs the plugin

young knoll
#

Tho that’ll disable them for all plugins

thorn isle
stiff crag
#

yeah I would like to exclude the plugin name at the start of every command

vast ledge
#

Probably a bit overcomplicated
v

If you wanted to you, you could listen to the TabComplete packet or what it's called, and remove the version of your command with the plugin name in it, and the continue the packet

chrome beacon
#

Send namespaced in the spigot.yml ^^

west hemlock
#

does anyone currently need a developer I am looking for work

stiff crag
#

ight hold on

vast ledge
#

?services

undone axleBOT
tight compass
#

?paste

undone axleBOT
chrome beacon
tight compass
grave dirge
#

e

vast ledge
#

f

wet breach
#

g

worthy yarrow
#

h

vernal oasis
#

What's the best place for learning about nms packets stuff?

blazing ocean
#

actually doing it

#

reading the protocol wiki as well

vernal oasis
#

I want to modify the player name is all

blazing ocean
#

zero need for packet stuff

vernal oasis
#

Or some way to get the simplevoicechat icon/status

trim quest
blazing ocean
#

?protocol

undone axleBOT
trim quest
#

thank you very much

mortal vortex
#

is PlayerSwapHandItemsEvent for offhand?

jagged thicket
mortal vortex
#

ohh lmfao

#

i didnt bother reading

umbral ridge
#

Incorrect string value: '\xAC\xED\x00\x05sr...'?? my db uses utf8mb4_unicode_ci

#

it's not binary data

#

is it a bug?

mortal vortex
umbral ridge
#

what the heck am i doing wrong

#

is it encrypted then somehow? and hikari doesn't support it?

#

Data truncation: Incorrect string value: '\xAC\xED\x00\x05sr...' for column minecraft.homes.PlayerId at row 1

#

wait a second!

#

the solution was that i didn't do toString() at UUID. should have done that

young knoll
#

Why is your uuid a varchar :(

umbral ridge
#

what should it be :(

#

JISHUNA(255)

young knoll
#

At least make it a fixed length char

umbral ridge
#

it was before yeah, 36 chars

#

or 32 dont remember XD

#

but then iwas dealing with a bug

sullen marlin
#

You’re calling setObject on a varchar column

#

Use setString

mighty wind
#

i have a noob issue ive never rly figured out how to fix - if i log out/the NMS mobs are unloaded and re loaded later in a chunk they lose their smarts. is there a way to fix this

chrome beacon
#

Listen for the mobs spawning and then replace them with your own/modify them as needed

mighty wind
#

oh ok, so thres no way to just have them persist

chrome beacon
#

Not that isn't very intrusive

mighty wind
#

im gonna have a closed map with mobs spawning at an event area, and like obviously just NPCs that sit around safe zones.
not sure if never unloading chunks is a bad idea or if u even can do that

chrome beacon
#

or the chunk version of that method

#

Do note that more chunks loaded takes more resources on the server

mighty wind
#

i am not quite sure how it works

blazing ocean
#

don't crosspost

umbral ridge
#

hey where is player when he's in the respawn menu? does it exist as an entity in the world?

eternal oxide
#

he is in the world but may not exist in teh getPlayers

#

there is a getPlayer in the death/respawn event

wicked estuary
#

Hey can someone help me? i have multiverse-core plugin and i got a world SURVIVAL and SPAWN but the problem is when player is creating portal to the nether in world surivval and gets into it everything is fine but when a playerr wants to leave the portal is creating in the world SPAWN instead of SURVIVAL could someone help?

robust helm
weary sphinx
umbral ridge
#

you could make a custom command class loader right?

eg.: have command classes that extend TabExecutor in a specific directory and then could you load it dynamically (at runtime) into the plugin?
and they have to be compiled

obtuse roost
#

anyone know how to use perlin noise generators properly? my attempts fail weirdly when trying to use it

blazing ocean
#

at that point just make an annotation processor

trim quest
#

?gui

silent slate
#

Hey, is there a guide thats still valid for 1.21 on the topic of sorting players in the tab list?

chrome beacon
#

I don't think that's changed in years