#help-development

1 messages · Page 1179 of 1

young knoll
#

The server also does that

timid berry
#

sure things the player can see that move more then 20 ticks in a sec will be bugged

#

yes

#

but

#

why did the spigot authors

#

continue?

#

wouldnt the server be more efficent

young knoll
#

Why would they not?

timid berry
#

if it was higher?

#

games llike csgo use 64

#

ticks

young knoll
#

Sure, if the server could magically handle that

timid berry
#

well

#

its not like

#

we cant modify it

young knoll
#

Sometimes hitting 20 is a struggle

#

Of course now we have the /tick command anyway

timid berry
#

oh yahn

mortal vortex
remote swallow
#

To properly have a higher tick rate you have to modify a lot, path finding is tick based and a lot more

timid berry
#

is the way of making configs in bungee the same as

#

spigot?

young knoll
#

Hey it still works at higher tick rates

#

They just go zoom

mortal vortex
#

In BungeeCord, you use net.md_5.bungee.config.Configuration and net.md_5.bungee.config.ConfigurationProvider instead of Bukkit's FileConfiguration.

timid berry
#

chat how do i make sure i can get the player count without it error when trying to get it from turned off servers?

eternal oxide
#

a "turned off server" will have no players

timid berry
#

will it show errors tho?

#

when it tries to get the size of a

#

turned off spigot server?

eternal oxide
#

I'm guessing you are getting an NPE?

young knoll
#

Presumably it just won’t be in getServers()

mortal vortex
#

Yeah, getServers() returns all the connected Servers. It simply won't have an entry if it's offline.

timid berry
#

Object apiurl = ConfigurationProvider.getProvider(YamlConfiguration.class).load("config.yml").get("apiurl");

#

is this how i

#

get values from the config

#

and set as variables?

mortal vortex
#

um

#

no.

timid berry
#

i see

#

how i feel when pressing tab on idea does not make things work

mortal vortex
#

Here I'll dm you what I normally use. Just like the Config Util class I setup.

timid berry
#

okay!

mortal vortex
#

Look over it. It'll help

#

But tbh I haven't used bungeecord in ages. Other than that I can't help much

mortal hare
#

so i've just started thinking about relational databases lately and im very stuck on the idea of putting business logic on the database, basically creating headless application of your logic on the database with procedures triggers using SQL.

Here's my point on this:

  • Sure this could induce vendor-lock in, but knowing that there's plenty of good relational open source database servers, i dont think that's an issue anymore.
  • You and your business wouldnt need to reinvent the wheel in the long run, when you want to migrate your app to some kind of other technology like moving from Laravel to Java and backforth, as if you write standard SQL procedures and triggers, you can make cross compatible code between SQL databases. Also SQL code from 20 years ago would work just fine in today's world.
  • You eliminate the latency of multiple SQL statements to access the same data for calculations within the client. Its just more performant overall
  • Its not as if your project doesnt utilize the database technology anyways, so why not embrace it?

What do you guys think? I personally now then i think about it i adore the idea of creating headless low level version of business logic application in the database and leaving the clients to build the best user experience around it, acting like thin clients around low level database logic.

#

well unless your computation is very very expensive to compute on the database server i dont see a reason, to not compute it. Its not as if big corporations run all the database operations from one big dedicated server. they use bunch of caching technologies and CDN's to deliver to the clients, thus you can scale the SQL code from cache databases too.

In that case, I think tying business logic with particular protocols which are open to the public use is kinda bad (like HTTP, since it still has to follow MVC approach to handle business logic). Isolating logic as much as you can from external technologies in a way of blackbox design which computes the results you want from a database and then spits back to the technology you want to open to the public, like an API sounds like a good approach.

warm mica
#

You are suggesting to turn a sql into a http server?

#

I'm not really sure what you are suggesting, but graphql is probably what you are looking for

mortal hare
#

SQL servers is just one of the solutions for this as most of the applications rely on them anyways and they can be pretty scalable and maintainable to run at least.

#

using SQL server for your business data logic handling or general purpose language with low level interface to get the computed results from database seems to me the most robust approach for handling maintainability in the long end, since you wouldnt need to touch business logic code if protocol related stuff changes, you would maintain only the glue code between your business logic black box application and the technologies which you are using for UX

#

another way of thinking is that you should treat your business logic as as a shared object (.so) or dynamic linked library (.dll) file within your project

#

you use that .dll in the glue code that invoke that particular logic wherever you want (HTTP services, RPC, etc)

wet breach
#

What you are wanting is a custom sql client

#

Which is a thing

mortal hare
#

we have procedures and triggers, which are basically more than enough for basic business needs

wet breach
#

Right but you still need something to allow communication. Its not like you can just connect to the database directly and it start doing things like front end. A sql client could show front end and simultaneously be directly connected ie logged in to the db server.

mortal hare
#

you develop thin clients around headless SQL application

wet breach
#

Otherwise your alternative is restful api's

#

But amazon aws is basically your calling though

#

What you describe is basically what it tries to do and provide lol

mortal hare
#

i just dont kind of get it why people use SQL servers only for storage and data integrity, its just wasteful

#

SQL can do procedural programming in itself

wet breach
#

Because at its core that is the purpose of things like mysql

mortal hare
#

so why bother introducing latency with multiple requests

#

when you can develop couple triggers and procedures

#

and store the business logic there

#

and most importantly you implicitly ensure the data integrity from outside factors too, you wouldnt need to rely on separate application to input the data properly most of the time

wet breach
#

Well it depends how well you know what you are working with. Mysql supports unix sockets and literally can handle millions of queries with just a few hundred megs of ram

#

There is virtually no latency with unix sockets

summer scroll
#

Hey guys, need a little help here. I'm developing a hunger game minigame plugin and I wanted to glow teammates only, but I encounter a problem where everytime player's metadata got updated (changing running state, sneaking state, etc.) the glow got removed and I found a way to reapply the glow by simply listening to those events, but it doesn't feel smooth at all because of the flickering, what would be the best approach to this to avoid the flickering issue?

echo basalt
#

packet interception

#

Might not work due to async entity getting but whatev

mortal hare
# wet breach Well it depends how well you know what you are working with. Mysql supports unix...

its more of a maintainability part that gets me. SQL syntax has been stable for a while now. You can run 10-15yr old SQL on multiple DB's and get the same result, as long as its standard SQL syntax.

If you have custom sql client which then gets used within multiple technologies that fine, as long as you wouldnt access database externally.

but i just dont get why would you write code in Web based technologies like PHP or JavaScript with bunch of libraries which tend to break quite constantly as web technologies improves at rapid pace. Its not as if your business code should tell what HTTP status code return. Its your custom sql client's responsibility to do that, not your business logic application's.

summer scroll
mortal hare
#

Separation of concerns should be applied in such cases. "Glue code" for bridging the gap between HTTP server and your business logic should be developed as separate packages

echo basalt
#

I feel like the vendor lock-in problem is mostly applicable here. I write my code to support as many database types as possible because realistically some are more fit as a solution than others

#

Switching from SQL -> Mongo should be as painless as possible

#

As something like MySQL -> Postgres -> Planetscale would

mortal hare
echo basalt
#

SQL is made to operate as a persistent storage server. Making your SQL server do most of your business logic introduces strain in the database that could be shifted to the application. Scaling your application consumes a different ratio of resources than scaling SQL

#

For example if your operations rely on processing a lot of data you'll probably allocate more compute power to your application and at a large scale you might run your application on purpose-built boxes with that in mind

#

Where you might, for example. use a small HDD / Flash drive and keep everything in memory

#

Attempting to scale SQL like that can cause issues as you need more compute but you're building for storage

mortal hare
echo basalt
#

Microservices

#

You get to scale the parts of your application that need to be scaled with the hardware they need and the database acts as a database with no vendor lock-in

mortal hare
echo basalt
#

You can then run them on whatever cloud provider you want

mortal hare
#

with certain frameworks or libraries

echo basalt
#

You can easily switch database types as long as your code isn't complete garbage and you get pretty much no latency if you run the database in the same datacenter as the microservice

#

Private bandwidth is pretty much unlimited and latency is astronomically low

#

Price is slightly steep but not as steep as serverless and you can turn it up and down based on demand

wet breach
umbral ridge
#

Hi frostalf

echo basalt
#

hi frosty imma order lego

wet breach
#

While sql may support what you are talking about you are forgetting you need to have something designed for the things you are talking about. mysql for example is something made already and is well known and works quite well for what it was designed to do. To make somethin like what you are talking about you either need to find it or make it and making it might seem easy but maybe not if scaling is a concern or optimizations etc

mortal hare
#

i think stating sql in this convo is a mistake here since i dont think that's the point here really is. The point is that i wanted to make its seems pretty reasonable in the long end to make your business logic as an application which acts like a blackbox and develop custom clients for it to suffice for different cases you need, if you need to expose it under web technologies, develop a client for HTTP server with custom routes, need RPC, develop a client for it etc

#

the main point i'm trying to make is that your business logic code part shouldnt depend on the protocols you have no control of

#

and only the "glue code" part should be maintained

echo basalt
#

I feel like your business logic should rely on standard protocols, not proprietary ones

wet breach
echo basalt
#

You get the benefit of being able to hire people that don't want to immediately rewrite your entire project

#

You also don't have control over the database implementation you're using, do you?

wet breach
#

I guess what you are asking is why people dont develop custom servers or applications? Answer to that is time and money.

echo basalt
#

Make sure to optimize for engineering time and money $$

#

Hiring engineers to maintain your proprietary mess is gonna cost more than to run it the traditional way

wet breach
#

Or take a lot more time

mortal hare
# wet breach And which protocols do you not have control over?

lets say i've written my business using HTTP server technologies like PHP, and now business wants to use that logic on some kind of thing which completely doesnt need HTTP protocol, and now that thing needs to depend on http protocol to properly run that business code. Now you need to rewrite your code in something else or make a wrapper around that application which is really a workaround around a problem which wouldnt have existed if you separated your code from the protocol itself

wet breach
#

That it is, it does not rely on a protocol to operate

mortal hare
#

well kind of, but its web oriented

#

you usually run php with Laravel which uses MVC design but fair point

wet breach
#

I dont use laravel

#

If laravel is the limiting factor then it would be that framework at fault not php itself

#

But i dont use frameworks with php exception being maybe bootstrap as i dont like making auth myself

#

I have used php for ssh and other protocols. It just depends what it is you want it to do and php can serve content over those protocols as well not just obtain data.

#

But it also depends on the server you are using to serve php too

#

But then we get into other things that can sudo replace a web server entirely

#

Like routers

#

Routers can do a lot with protocols as long as you program the protocol into the router which is not difficult. I have done it with mc and you can let the router handle what to do with the packets directly

#

So i have used a router to basically be a bungee without bungee

#

But you would never know the difference lol

#

Since php has a cli and is not entirely dependent on a web server you could just remove the web server entirely if it doesnt serve your purpose with whatever you are doing with php

mortal hare
#

unless you expose your framework app as a http service in such cases, you cant do much

#

you just cant run such applications in "headless, standalone mode" thats independent from http

#

i meant it just a compromise over dev speed

#

but it backfires in the long end

wet breach
#

Ok, well i wont disagree with that last point but most of that stuff is unnecessary and are used because that is what someone with php knowledge only would know how to use and setup. Reason why system admin is a job title and even specific courses in school to learn how to do lol

#

Reason not everyone goes the router protocol route is because not everyone has control over the firewall and even if you do you need a person who is knowledgeable in networking. So you have other stuff that gets used instead. Mainly because of limitations lol

mortal hare
#

it might sound like conspiracy but i believe why there's frameworks like these is kind of a planned obsolesence from the companies who use such flashy tech which design the products so that they can milk the money out of the customers for the maintenance of the product

wet breach
#

Well it isnt a conspiracy that they want to lock in customers to their tech. However there is another side to it which involves contracts

#

Most companies cant offer support for stuff that isnt theirs or if they do its limited support

#

Its not a good business practice to offer guarantees if the guarantee is on something you dont make or have control over the final product of it

#

So you end up with frameworks that are company specific. But then you also have the free market trying to make it easier on the developer so you end up with more and other frameworks lol

granite pasture
#

Hey! I'm trying to make an ArmorStand look at player, so I used setRotation but seems that the pitch is ignored, yaw works good. Also I used setHeadPose and that worked perfectly, I don't want to use setHeadPose because I want that the position of the entire ArmorStand to look at the player. I'm using Spigot 1.21. Pitch is really important to me.

mortal hare
# wet breach So you end up with frameworks that are company specific. But then you also have ...

i believe using frameworks for business logic is just bad overall, isolating it as much as you can from frameworks and only using frameworks or protocols for glue code should be really ideal. Unless your trying to push product to the consumer fast or the product should be mediocre at best, in the long term you would spend more time maintaining the business logic due to changes in the framework. Isolating it from the UX part could save lots of time updating the app to be deployed properly, due to how much less code would be touched, since only the glue code would only need to be fixed

#

im repeating myself, but i get your points

#

imho things like a next.js or laravel might work for short-time, but after a while you get constant need to update your codebase to be compatible with the latest framework versions

#

it becomes a burden where it shouldnt if you separated the logic from the framework itself and left only the code thats reponsible for bridging the gap between the app and the framework

earnest girder
#

Is it possible to update an item’s meta (lore & custom data container specifically) without causing the item update animation when a player is holding it?

mortal vortex
#

But without NMS, I do not believe it to bbe possible

summer scroll
#

Is there an api to check if the block can be stripped using axes?

blazing ocean
#

There might be a tag for that

echo basalt
#

🤔 applying a translation to a text display causes it to just disappear.. hm

blazing ocean
#

and are you sure you're setting it as a translation and not rotation/scale?

echo basalt
#

pretty sure I am yeah

#

0, 2, 0

blazing ocean
echo basalt
#

Yes

blazing ocean
#

what version?

echo basalt
#

1.21.1

blazing ocean
#

they're outdated

#

oh hm

echo basalt
#

23 works fine

#

if everything's shifted it'd break

#

Best I can do is use reflection to fetch the display entity data synchronizer and use it to create the value

#

feels like overkill

blazing ocean
#

does it show up in f3+b?

echo basalt
#

zero hitbox, pretty sure it doesn't

#

might be worth spamming more packets

#

I do send add entity / name packets like every second

blazing ocean
#

or, mixins at least

#

I'd probably try that just to be sure tho

echo basalt
#

what I got rn

blazing ocean
#

also, why not just use the API for this? hideByDefault or sth

echo basalt
#

Need these do be per-player

#

and that's a lot of entities to manage with bukkit

#

which can cause world leaks if I'm not handling it with care

#

and lots of setPersistent(false) calls

#

chunk saving etc

#

cba

#

hm, seems like my customer found an error that's completely unrelated

#

I'll take that ig

summer scroll
#

Guys, how can I make the player's name to follow the color from the prefix?
I'm using scoreboard team.

lilac dagger
#

ChatColor.getLastColor

#

altho it doesn't support hex

#

there's getDisplayName but i couldn't get it working

#

ohh

#

you need team.setColor

summer scroll
#

ohhh

#

Damn that will definitely break something on my plugin because of how I set it up xd.

#

How does plugin like TAB modify that, the player name can be bold or whatever?

lilac dagger
#

i'm not sure if you can have it both bold and colored now

#

sure, but this won't edit it above the player

summer scroll
lilac dagger
#

i'm not entirely sure how tab does it

#

i think it might be set display name but it didn't work for me int he scoreboard

summer scroll
lilac dagger
#

i think tab is open source no?

#

i think they use nms not sure

summer scroll
lilac dagger
#

both are nms

#

the color being reset is only a bukkit thing

#

i have this code that changes the player name

summer scroll
lilac dagger
#

i guess so

#

you can learn from tab

#

maybe the developer found a way around this

lilac dagger
#

is it normal for Player#getCompassTarget to return null during player join?

#

even tho the method is marked as non null?

summer scroll
lilac dagger
#

i just skip it if it's null right now

#

the delay is not worth it, causes some other problem

summer scroll
#

even a tick?

lilac dagger
#

yup

#

i have a method that does some thing when the party leader joins

#

it is also an issue that on join i don't have direct access to this method to delay it only

#

it'll be nice for this to work during join that's all

sonic goblet
nova notch
lilac dagger
#

pretty much lol

upper hazel
#

why wrong with this error? Invalid key. Must be [a-z0-9/.-]: snowdrop:location_key-75_64_69_world_snowdrop-block

#

i not have forbidden chars

eternal oxide
#

_ is not in that list

pseudo hazel
#

it is

#

but discord is using markdown

eternal oxide
#

ah

upper hazel
#

lol

eternal oxide
#

Your sanitizeKey method looks a little broken

smoky anchor
#

new NamespacedKey(plugin, this.key + "_" + suffix)
And the key is private final NamespacedKey key;
which will include the : character

#

I think this is the error ?

upper hazel
#

oh

#

yea

#

thenks lol

smoky anchor
#

Also, I see no reason for this keys.computeIfAbsent(sanitizeKey(keySuffix)
Could just use the keySuffix, no need to do regex stuff in this case, which I believe is fairly slow

upper hazel
#

regex is slow?

smoky anchor
#

I've been taught it is :D
Or at least doing Pattern.compile or whatever
Which I assume the replace method might do, I do not really know
But the point is that you're doing something pointlessly

upper hazel
#

i see

#

package name protection simular to namespaceKey protection?

#

if someone will create forbidden package name for world

boreal wedge
#

can anyone tell me where can i find spigot api docs for 1.18.2? I only find 1.21.3

boreal wedge
#

tysm

boreal wedge
#

so I'm a newbie and learning to develop spigot plugins so by the following code i expected that whenever i right click on poppy flower it will be changed to diamond but unfortunately it doesn't change and even didn't throw any error in console how can i achieve this behavior

    public void onInventoryClick(InventoryClickEvent e) {
        if (e.getWhoClicked() instanceof Player player) {
            var clickedItem = e.getCurrentItem();
            if (clickedItem.getType() == Material.POPPY) {
                player.sendMessage("You clicked the flower!");
                if (e.isRightClick()) {
                    clickedItem.setType(Material.DIAMOND);
                    ItemMeta diamondMeta = clickedItem.getItemMeta();
                    diamondMeta.setDisplayName(ChatColor.AQUA + "DIAMOND");
                    clickedItem.setItemMeta(diamondMeta);
                }
            } else if (clickedItem.getType() == Material.BEEF) {
                player.sendMessage("You clicked the beef!");
            } else {
                player.sendMessage("You clicked something else.");
                player.sendMessage(clickedItem.getType().toString());
            }

        }

    }```
valid basin
#

Non spigot related question.

How would one go on securing the Java application (client side anticheat for a server) so it can't be reverse engineered and bypassed by modifying the source code of the application

#

I'm looking to create it in Java not C based languages

boreal wedge
#

umm i was watching a youtube video and it just worked for him

lilac dagger
boreal wedge
#

let me try

#

tf it worked in survial but not in creative??

worthy yarrow
#

Common issue

#

Gotta handle for when the player is in creative as well

sly topaz
#

creative inventory doesn't send all the necessary packets, so it is unreliable

boreal wedge
#

hmm noted tysm

sly topaz
#

there's InventoryCreativeEvent or something for creative inventory clicks specifically

boreal wedge
#

really

#

let me check

worthy yarrow
#

^ it's still a little wonky

#

but should work with your code

boreal wedge
#

yup it worked

worn totem
#

I donated 10 dollars how can I change my name

worthy yarrow
#

?support I assume?

undone axleBOT
sly topaz
#

?name

worthy yarrow
#

Maybe when optic or choco is around they can handle that

sly topaz
#

?changename

undone axleBOT
#

Name changes on the forums are granted to those who have donated to the project. Donations are processed manually and generally take up to 24 hours. The donation widget can be found on the home page of SpigotMC at: https://www.spigotmc.org/.

worthy yarrow
#

Ah nice

sly topaz
wet breach
#

nor can you prevent reverse engineering

#

otherwise don't you think mojang would have done that with MC by now?

slender elbow
#

tbf it isn't in mojang's best interest given that they are open about letting people mod the game either way

wet breach
#

well its microsoft, never know

#

but yes you are right

valid basin
wet breach
#

that isn't how that works

slender elbow
#

but ultimately, anything a client can get their hands on cannot be fully trusted and will eventually be tampered with

valid basin
wet breach
#

jar signing just lets an application know that the jar has most likely not been modified and can be trusted

#

it doesn't prevent modification

lilac dagger
#

there are pretty damn good obfuscators

valid basin
slender elbow
#

but ultimately nothing is impenetrable

#

experienced hackers will always get in your way

#

it's just an arms race

wet breach
#

no matter the obfuscator it will never hide the java bytecode

valid basin
#

I believe better protection needs to be done but idk if it's possible with Java

lilac dagger
#

well, you can just ask nicely to not get your stuff hacked

quaint mantle
valid basin
#

Server side ac is horrible bro

wet breach
valid basin
#

Maybe it'd be good if it works together with client side

wet breach
#

everyone assumes you must run everything in java in the server

slender elbow
#

you cannot trust anything a client gets their hands on, so the solution is to not let that happen at all

valid basin
#

But even polar (best ac on the market) has bypasses

worthy yarrow
#

So doesn't every ac

wet breach
#

it depends

#

not everything can just be bypassed lol

worthy yarrow
#

Debatable imo

#

There's always a loophole

wet breach
#

not always, it just depends what kind of server you are trying to put ac on

#

everyone wants hardcore pvp, which is probably the most difficult to do ac on

#

however, since I don't care about pvp that much, I set limits lower 😉

worthy yarrow
#

I meant more in a general context, whatever your game might consider cheating I'm sure there are ways to hop over the ac

wet breach
#

well for some things, but not everything

#

also, heuristics are your friend in regards to AC

valid basin
#

But I suppose even if I create memory integrity check. Some good hacker could bypass it with a custom driver or hardware

wet breach
#

especially if pvp is involved

valid basin
#

Like arduino

wet breach
#

have a large enough data set and its almost impossible to get passed heuristics

wet breach
chrome beacon
#

Clientside anticheats will get bypassed

#

You can never trust the client

#

also forcing your users to install some random program to join your server???

lilac dagger
#

but how hard can you make the job of a hacker so he can't bother anymore?

wet breach
chrome beacon
#

Some people find breaking systems like that fun and a challenge

wet breach
#

as well as it passes the time

valid basin
#

In Java it's harder but not impossible

wet breach
#

since we are dealing with java I can make it to where it doesn't run such things

valid basin
#

Like traditional memory scanning

valid basin
#

Bro I'll make it and you try to crack it

wet breach
#

anything you make in java can be modified to where it doesn't run

valid basin
#

If you crack it props to you

wet breach
#

I can read bytecode and do bytecode manipulations

#

so I guess good luck getting around hiding bytecode and prevent bytecode from being intercepted and changed

#

also, you don't have control over which JVM gets used either

#

to include custom ones

valid basin
wet breach
#

no it does not

quaint mantle
wet breach
#

you can't do a runtime integrity check if I modified your code to simply never get the opportunity to launch it

valid basin
wet breach
#

not even

valid basin
#

Otherwise you can't join the server

wet breach
#

I can fake the data 🙂

shadow night
#

And I can too

wet breach
#

I get it, you don't want to accept that Java simply isn't a language that was never designed to prevent reverse engineering and the sorts

#

but that is just how it is

valid basin
#

I could create ByteCode hash check to see if it's modified and then it doesn't run the program

chrome beacon
#

Then you just remove that check

shadow night
#

Anything that runs on my computer is something that I can modify
If it has a check that checks whether something has been modified, I remove the check

wet breach
#

there is no check you could put in place that I wouldn't be able to remove before the client runs

chrome beacon
#

or spoof the data sent like frostalf said

shadow night
#

In short: you cannot control the client

valid basin
#

Bro what if I create a loader and make it so it verifies it externally on my vps for example?

#

And if there's no connection it doesn't run

vagrant stratus
#

yo nerds, quick question. Any idea on if there's a python lib to render a skin?
Need it for something

eternal night
shadow night
#

Doesn't change anything kek

shadow night
valid basin
#

I guess c++ is the way then

vagrant stratus
#

An entire website just to render stuff? Yikes

wet breach
shadow night
vagrant stratus
#

It's README's also fucked KEK

valid basin
shadow night
wet breach
#

someone probably already has

chrome beacon
#

^^

#

It already has been

shadow night
valid basin
#

Nobody has completely. Unless it's private

shadow night
#

Most cracks like that will stay undisclosed, available only to certain groups of people so the developers cannot easily fix it

valid basin
#

Publicly no

shadow night
#

If you post your crack publicly, you are gonna get it patched very quickly

blazing ocean
#

Gotta love when people say that Java is immune to cracking KEK

#

Me when recaf:

shadow night
valid basin
blazing ocean
#

Yeah cus the dev said it's uncrackable kek

wet breach
#

anything that runs on my system is under my control fyi. You can't stop me from doing memory dumps, poking at the binary code or using disassemblers to get an idea of some of the things it does etc.

shadow night
blazing ocean
vagrant stratus
#

that's the only repo I can go off of anyways it seems @wet breach
I've got a bunch of downloaded skins & was hoping to do a quick python script so I don't have to suffer w/ looking at the downloading forms lol

shadow night
shadow night
quaint mantle
#

Just hire more moderators 🗿

valid basin
#

I wish Java had better protection against ByteCode manipulation tho

vagrant stratus
#

I'm not even sure that site handles dealing with the skin texture id KEK

vagrant stratus
#

wait no, it can. These aren't B64'd though lol

shadow night
wet breach
#

hence why it doesn't have said protections because it wasn't needed for that audience

vagrant stratus
#

ugghhh gotta re-b64 them when loading ig
fucking hell

valid basin
#

Wasn't mars rover made in Java?

shadow night
wet breach
#

yeah maybe not lol

blazing ocean
#

I don't think the mars rover needs to be better protected against bytecode manipulation

vagrant stratus
#

Actually, I don't think I hate myself that much lol

blazing ocean
#

I think they'd rather need to be able to do that

blazing ocean
#

So it really doesn't prove your point

chrome beacon
valid basin
#

I wasn't even trying to prove my point btw. I just said that mars rover is made in Java

wet breach
shadow night
wet breach
#

the original target audience simply didn't require such things lol

quaint mantle
wet breach
#

however Java became popular and more people became interested and its audience grew but there isn't a way now to add such things into java

#

especially without breaking everything in some update

slender elbow
#

if anything, the platform makes it easier to do such things

wet breach
#

however it is more probable that the mars rover gets attacked by another rover though since at the present moment mars is currently inhabited by nothing but robots

shadow night
vagrant stratus
#

I'll just suffer w/ the downloaded forms

wet breach
#

I am sure people would love that

vagrant stratus
#

Some of these are so quite complex, so I was hoping there was a rendering library lmao

shadow night
wet breach
#

exactly

shadow night
#

I really wanna see space gladiators

#

that would be so fucking cool

wet breach
blazing ocean
wet breach
#

they can add it to the list of things they didn't think would happen but did

vagrant stratus
wet breach
#

could always make another script

#

to feed the files for you

vagrant stratus
#

Probably easier to just modify the three.js code lol

#

Find the code, feed it into ChatGPT, ask it to do the thing

#

progress 😎

eternal oxide
#

ChatGPT please evolve into SkyNet

wet breach
vagrant stratus
#

Yea, it's nice. I dunno three.js though kek

#

or where the code to get the skin even is lol

#

oh it's in the html.
Hmm

#

I definitely need to figure something out though, I have 3.7k+ of these lol

#

Found one which uses JavaFX, gotta install an older version of Java.
Hopefully this does what I need, probably won't support newer skin types but that's (hopefully) an easier fix since I actually know Java lol

vagrant stratus
#

Used maven libraries still errors unless there's an actual install I can use which doesn't massively change stuff lol

vagrant stratus
sly topaz
#

there are distributions that bundle javafx still, like Azul Zulu or Bellsoft

vagrant stratus
#

Eh. Trying to figure out that repo. example didn't work locally.
Guessing I have to throw it under XAMPP

#

nope 😄

river oracle
#

Also don't forget to use Java modules I've run into issues not using then

#

Idk if that still holds though

vagrant stratus
#

lol already got rid of that repo kek
probably just gonna deal with the downloaded skins. Don't got the money to commission someone for exactly what I need, and I've spent enough time trying to get third-party stuff to work

rough drift
#
for (final var player : Bukkit.getOnlinePlayers()) {
   if(shouldUpdate(player)) { // Checks if the player's UUID is in the "to update" set
     // Edit one item in their inventory 
   }   
}
```Would this be too heavy to run every say 5 ticks
chrome beacon
#

That's fine

chrome beacon
#

but keeping a direct reference to the player 🔫

rough drift
lilac dagger
#

assuming should update has a list of uuids

rough drift
# lilac dagger assuming should update has a list of uuids

yeah, it's an example ig, the actual code is way more lightweight (iterate over an object list and check if one of three bools is true, has an UUID in case I need to get the player and update the inventory), but I figured "if this is light enough then the lighter one is fine"

#

the actual thing is like

#
for (final var user : this.userManager.listUsers()) {
    if (user.optionsChanged() || user.languageDirty() || user.themeDirty()) {
        user.updateItem();
    }
}
lilac dagger
#

oh this us cool

pure dagger
#

why final

river oracle
pure dagger
#

why

river oracle
#

It's not necessary

#

But it's not bad nor is particularly useful or particularly not useful

pure dagger
#

okay

lilac dagger
#

i like the idea of final, but not that much in local variables

#

i feel like intellij let's you know if a variable* changes

robust helm
#

chat how do u log stuff in a server network? I was going to use log4j with Loki as central log and stdout for everything but got no idea if thats smart.
Also I made a LoggingAPi which simply configures log4j and not sure if its smart

sly topaz
#

I like splunk more but only because I have never had to pay their licensing myself lol

pure dagger
#

how to create custom enchantment book? it needs to be added in anvil

robust helm
teal plume
#

any premium plugin ideas?

eternal oxide
#

chess

teal plume
#

D

worthy yarrow
#

Checkers

eternal oxide
#

use no AI mobs for chess pieces

worthy yarrow
#

Use custom modeled pieces

#

Make it giant chess

eternal oxide
#

Call it "Slave Chess" where you have to beat the pieces with a stick or use a leash to make them move.

twilit coral
#

Chess was done already tho

#

Jpenilla has a good repo

eternal oxide
#

make it unique, every time you whip a piece to make it move play an oooohhh sound

nova notch
#

wtf

eternal oxide
#

lol

#

We never give serious suggestions for premium plugins

nova notch
#

who's we bro u the only one saying chess with slaves 😭

eternal oxide
#

Its a royal we

pure dagger
#

lol

brittle geyser
#
Caused by: java.lang.IllegalArgumentException: Not bootstrapped (called from registry ResourceKey[minecraft:root / minecraft:game_event])
eternal night
#

?paste

undone axleBOT
eternal night
#

the whole thing pls

river oracle
#

or you can use PDC, personally I'd go with the NMS approach but depends on the person

pure dagger
#

how with pdc, how to do it so it will work in anvil

river oracle
#

I think you'd use

#

PrepareItemAnvilEvent

#

or ItemPrepareAnvilEvent

#

its called omsething like that

pure dagger
#

are you talking about this

river oracle
#

es

brittle geyser
river oracle
pure dagger
#

lol thats funny

sly topaz
#

I'd just make a datapack

slender elbow
#

2022

pure dagger
#

who u talking to

#

you bot

#

both

river oracle
#

@slender elbow exposed as GPT confirmed

you bot
even this guy knows it

pure dagger
#

bruh

#

xDDD

#

😭 what

cedar saffron
wide cipher
#

trying to get custom heads, get this error when modifying item stacks.

#
        notNull(item, "item");
        notNull(base64, "base64");

        UUID hashAsId = new UUID(base64.hashCode(), base64.hashCode());
        return Bukkit.getUnsafe().modifyItemStack(item,
                "{SkullOwner:{Id:\"" + hashAsId + "\",Properties:{textures:[{Value:\"" + base64 + "\"}]}}}"
        );
    }```
#

how can i fix?

sly topaz
wide cipher
sly topaz
#

hm, the API doesn't support using the base64 value directly

chrome beacon
#

Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...

#

^^ covers how to do heads with modern api

sly topaz
#

I hate how they're parsing the json lmao

#

but welp, if it works

wide cipher
#

thanks

sly topaz
#

doesn't the client do caching based on the UUID used there

#

if that's the case, it's probably better to not use the same uuid all the time, but I don't know for sure

young knoll
#

I generate the uuid based on the texture url

slender elbow
#

I don't

sly topaz
#

thanks for sharing with us this piece of your infinite wisdom

slender elbow
#

😌

timid berry
#

is there an updated guide
on creating custom enchants

river oracle
timid berry
river oracle
#

One sec I stg I posted jt earlier

chrome beacon
#

You can just use a datapack

timid berry
#

no datapack

river oracle
#

NMS easier lowkey ngl especially if you wanna bundle with your plugin

chrome beacon
#

Yeah

#

Someone really should add a good way to load datapack from plugin

chrome beacon
#

So we don't have to resort to nms

river oracle
eternal night
chrome beacon
river oracle
#

Nvm nvm

chrome beacon
#

Spigot plugins might also load too late

#

Not entierly sure though

river oracle
#

It's just a ton of work and for me not worth the time or consequences of that work

eternal night
#

dew it, I am sure it'll be merged as fast as chocos component support COPIUM

young knoll
#

The server itself loads too late

#

Because Mojang

chrome beacon
#

Can the Paper bootstrapper do it

eternal night
#

yes

river oracle
young knoll
#

I believe so

chrome beacon
#

Alr good to know

sly topaz
#

you'd have to get configuration phase working before even beginning to implement something like this which is kinda annoying

young knoll
#

?

#

It works fine?

river oracle
eternal night
#

I left as a reviewer 💪

young knoll
#

wtf

river oracle
sly topaz
young knoll
#

Y2K always ruining my dreams

eternal night
#

config stage is indeed fucked on spigot

river oracle
#

You can always reopen it it's all done

eternal night
#

just, don't use config stage

river oracle
#

I'm just done maintaining it

eternal night
#

because config stage sounds like reloading COPIUM

young knoll
#

Smh making me maintain your old code

eternal night
#

and it is a tad weird

sly topaz
eternal night
#

see, thats why you aren't a spigot maintainer

sly topaz
#

Spigot should really try to push more experimental API, PRs list be looking a lot like wayland repo

eternal night
young knoll
#

MD doesn’t have time to merge new features anymore

#

Mojang keeps changing things every 2 months

#

!!!!!!!!

eternal night
#

Yea, the constant mini feature drops make life a bit rough for the ecosystem

#

but, eh, its fine

young knoll
#

By fine

#

Do you mean

eternal night
#

Well, you just might need a team larger than one maintainer for the job

#

but that is just my opinion

young knoll
#

Hear that @mdee5, he’s volunteering

sly topaz
#

I mean, the important undelying systems haven't changed a lot with these releases, so in the end it just comes to fixing compile time errors as well as adapting a few patches

timid berry
sly topaz
#

there's a ton of work being done for item components and what not but spigot doesn't have API for that so it shouldn't be a problem lol

river oracle
eternal night
#

Well it has whatever it calls that ItemMeta#getXComponent bs

timid berry
#

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier> <!-- Important! -->
</dependency>

#

do i just put this

young knoll
#

Mojang has gone ham with item components

river oracle
#

read the article please

young knoll
#

Not that I’m complaining

sly topaz
#

not trying to undermine md's hard work or anything, just the current state of affairs being rather frustating

river oracle
#

I'm not going to walk you through what it tells you to do

young knoll
#

I can finally make an edible Diamond sword that looks like tnt

eternal night
#

Yea. If I was just one guy maintaining spigot and, yknow, make a living, I doubt there would be more work on the PR queue either

sly topaz
#

I like the new overlay stuff

young knoll
#

I haven’t even looked into that a ton yet

sly topaz
young knoll
#

But I know it’s quite powerful

eternal night
#

ehhh

slender elbow
#

but it also has a ton more activity

sly topaz
#

while it is true that it'd be better with more human resources being able to take a hand at it, it ultimately falls apart when considering one has to have way too much knowledge in order to fairly review and merge these anyway

young knoll
#

And then you get differing ideas into the mix

sly topaz
#

and lots of bikeshedding 😛

young knoll
#

That’s why they wouldn’t let me on the paper team, I wanted to rewrite it in JavaScript

#

But apparently that doesn’t align with their long term goals for the software, smh

river oracle
#

yeah I mean good thing I'm not in charge or we'd all be using ViewBuilders right now for literally everything

#

want to check if the player joined? Well their is an InventoryView builder for that

young knoll
#

“Why does this potato have an inventory view?”

river oracle
#
MenuType.POTATO.builder()
 .check(player)
 .logic((ItemStack possiblePotato) -> {
 player.getInventory().addItem(possiblePotato);
}).build().open();```
#

@eternal night sneak peak at CabernetMC Api 😉

#

just showing you what ya'll are up against

eternal night
#

sorry I was busy with comparing commits in the past 2 weeks KEKW

eternal night
river oracle
#

surely that can't be hard

#

you can just hand count spigots KEKW

young knoll
#

His feeling are very fragile

#

Like a piece of

#

Paper

eternal night
#

indeed Sadge

#

tbf it is a bit unfair because all our update work is separate commits

#

but in the last 3 weeks, paper is chilling at 50 commits vs craftbukkits 16

sly topaz
# eternal night was just too hurt by this

lol, for the record, I do recognize that the magintude paper works at is completely different when compared to spigot, but it still suffers from much of the same problem

eternal night
#

For now ™️

river oracle
#

yeah wait till they bring in John Developer

slender elbow
#

what are you talking about

river oracle
#

he's going to go crazy

slender elbow
#

spigot is perfection

eternal night
#

tbh, the worst part about paper is the fact that rebasing and reviewing patches is annoying

slender elbow
#

you're annoying

#

i am sorry, that was mean

#

i love you

eternal night
#

thanks shy

timid berry
#

man

#

buildtools takes ages

river oracle
#

slow computer?

#

or slow internet?

#

it only takes like 2-3 minutes usually

sly topaz
#

it takes like 3 mins to me and I run a potato

timid berry
#

i dont know

#

java -jar BuildTools.jar --rev 1.21 --remapped

young knoll
#

The worst part about paper is they keep releasing builds which means userdev has to run again

timid berry
#

i did this

sly topaz
young knoll
#

Smh you better compensate me for all this CPU usage

eternal night
sly topaz
#

well, more targeted than it is now, rather, paperweight was a huge step forward I'm sure

river oracle
young knoll
#

Paper soft spoon

#

Coming with hytale, elder scrolls 7, half life 3, and me getting a girlfriend

eternal night
#

coll

#

imma bet you a full minecraft account (not mine, I'll buy you a new one)

#

that soft spoon will be here before component PR is merged KEKW

slender elbow
#

hytale will come after half life 3

#

i have info

river oracle
young knoll
#

Idk you guys have been talking about this spoon for a while

#

Probably since they hytale teaser tbh

eternal night
#

fair fair

#

but you gotta think of it that way.
Every update we have to do with spigots ferflower fork is another day we get more depressed and delusional

sly topaz
#

last time I was on Paper's discord, there did seem to be actual progress towards turning off the tap, if one may call it that rather than just the hype around it that has been around for years

eternal night
#

paperweight-core iirc is ready yea

#

userdev and patcher (fork plugin) are not iirc, but they should be somewhat easy

young knoll
#

Are you prepared for 1000s of people complaining their spigot plugins aren’t working

eternal night
#

Well, see, that won't really happen

#

hence soft spoon

timid berry
sly topaz
#

it won't happen immediately rather

timid berry
#

i did the build tool

#

stuff

#

and added it

eternal night
#

Yea

timid berry
#

pom.xml

#

is no longer

#

red

sly topaz
#

at least until I make my PR "remove all deprecated spigot methods"

timid berry
#

but my code is still red

eternal night
#

the legacy text methods are gonna be the last ones to go Sadge

eternal oxide
young knoll
#

But when it does happen

#

Are you ready

eternal night
#

yes

#

everytime it happens imma pull a coll and

timid berry
eternal night
timid berry
#

"clear cache"?

eternal oxide
#

file menu

young knoll
#

Fair enough

river oracle
eternal night
#

that would be worse than removing KEKW

young knoll
#

Minimessage explodes with the § character

timid berry
#

this?

river oracle
#

its okay § is but a suggestion

young knoll
#

And by that I mean it just yells at you and refuses to do its one job

eternal night
#

We just cope that we'll get hava string templates by then

young knoll
#

Smh

eternal night
#

at which life is good

sly topaz
# timid berry

before doing that, did you add special source properly to your pom, and did you sync the changes

timid berry
#

is this concering

timid berry
#

before i compiled and added the spigot1.21.1

#

it was allred

#

but now its normal

#

in the pom.xml^

sly topaz
#

and you can sync by pressing the floating button that pops up when you change your pom

barren peak
sly topaz
#

?skull

river oracle
#

I got it

timid berry
young knoll
#

Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...

timid berry
#

oh its just the null

#

ignore

river oracle
#
final PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID());
final PlayerTextures textures = profile.getTextures();
textures.setSkin(new URL("http://textures.minecraft.net/texture/3bb612eb495ede2c5ca5178d2d1ecf1ca5a255d25dfc3c254bc47f6848791d8"));
profile.setTextures(textures);
final ItemStack item = new ItemStack(Material.SKULL);
final SkullMeta meta = (SkulLMeta) item.getItemMeta();
meta.setOwningProfile(profile);
item.setItemMeta(meta);
sly topaz
#

why does that use URL ugh

river oracle
#

ik 😭 its so annoying

timid berry
#

idk what happend but these went red again

sly topaz
#

URL does a bunch of unexpected stuff upon initialization

sly topaz
#

?paste

undone axleBOT
timid berry
#

what does this mean when i press the sync logo?

sly topaz
#

did you run buildtools with --remapped

timid berry
#

yes

sly topaz
#

show us your pom then

#

wait

timid berry
sly topaz
#

why did you add the spigot jar

timid berry
#

in libraries

#

from file

river oracle
#

it should be spigot

#

why did you not just read the guide I sent earlier

#

?nms

sly topaz
river oracle
#
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.20.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
            <classifier>remapped-mojang</classifier> <!-- Important! -->
        </dependency>
#

from the guide you shuold beable to see what you did wrong

sly topaz
#

the spigot-remapped-mojang artifact gets installed to your local maven repository when you execute buildtools with the remapped flag

timid berry
sly topaz
timid berry
#

i had it here

#

like in the guide

river oracle
#

yeah and so why did you switch to spigot-api

timid berry
#

because it was there before

timid berry
#

i had 2

#

spigot

#

and spigot -api

sly topaz
#

I said to remove spigot-api not spigot

river oracle
sly topaz
#

did you sync again

#

well, it is recognizing craftserver now at least

#

is it called MinecraftServer in mojmap or something else

timid berry
#

im not sure

#

im following this

sly topaz
#

hm

#

do you still have the file you added in libraries perchance

#

if so, remove that

timid berry
#

still there

grave plover
#

see closely

timid berry
#

ine

#

mine

#

raft

#

wow

grave plover
timid berry
#

wow

#

its like a chain of reactions

#

u fix one thing

#

and everything else

#

gets fixed

#

thanks

grave plover
#

in Germany you would say, "Gänsehaut"

grave plover
timid berry
#

gansehaut

sly topaz
#

would've never spotted that

grave plover
river oracle
timid berry
#

on load is on enable right

river oracle
#

do you even know java?

timid berry
#

na

#

i only know

#

scratch

#

anyways

sly topaz
timid berry
#

hmm?

#

what is onload?

sly topaz
#

a method that runs on plugin load

#

override that in your main class and do it there

timid berry
#

huh???

sly topaz
#

you do realize that you put a method inside a method right

river oracle
#

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

timid berry
#

i do

river oracle
#

please learn java before using the API it'll be helpful

timid berry
#

but i need to put it under

#

onload

sly topaz
#

only the logic that runs on load, not the method declaration/definition itself

timid berry
#

oh i see

#

do i call

#

unfreeez

#

registry

#

on load

sly topaz
#

yes

#

you just can't have a method inside a method in java

timid berry
sly topaz
#

looks good, just follow the rest of the guide now and you should be good

timid berry
#

i dont think this is it

sly topaz
#

getAllTags is one of the methods that was earlier in the guide, you should have copied that too

#

or if you copied it in some other class, just reference it properly

river oracle
#

maybe if you're struggling this hard with the code you should try datapacks

timid berry
#

oh id id it

#

i forgot

#

to copy

#

scroll down

#

should i rename

#

oh i got it

#

he made a typo

sly topaz
#

they didn't, just the method name is now bindTag in the newer version, it was bindTags in 1.21.1 though

timid berry
paper viper
#

Also you should learn about basic stuff at least

timid berry
#

i know basic stuff, i just never did complicated stuff

timid berry
paper viper
#

Type a period, and then see the methods that IntelliJ shows

#

Don’t send a screenshot of it to me, figure which method you think would work the best

timid berry
#

im following a guide

#

but this guy

#

writes it like that

#

so idk

paper viper
#

Guides get outdated

#

Code gets updated

#

Code changes between versions

#

Old guides won’t always work

sly topaz
#

the guide is updated rather, since they're trying to adapt a 1.21.3 guide to 1.21.1

paper viper
#

Oh, the same but vice versa

sly topaz
#

I know right, rarely the case lol

timid berry
#

oh okay

#

do you know what i should

#

put

#

instead of or else null?

#

i have no clue

#

yes ive scrolled

#

through

sly topaz
#

the method is called getHolder in 1.21.1 it seems

paper viper
#

When you type a period you need to look at the method name and IntelliJ suggests the methods that would make the most “sense” on top

#

Look at the ones on top and see the return types and the method name

timid berry
sly topaz
#

I was really confused for a hot second since I was looking at what I thought was the 1.21.1 mappings forgetting that I had switched to the 1.21.3 ones and the method names matched lol

paper viper
#

Yeah

#

But I guess, why not use 1.21.3?

timid berry
#

hmm

#

i dont wanna sound dunmb

#

but

paper viper
#

You need to define a variable for enchantId

timid berry
#

yes

#

but the other thing

#

it applies

#

my enchantment

#

to those items?

paper viper
#

I just jumped into this conversation so I don’t know the full code but do you mind sending the full code?

sly topaz
#

read the guide, it explains it there

#

don't just copy the code, read carefully what it says

timid berry
#

im reading

#

im just wondering

#

for lines like that

#

like

#

i should put it under some event

#

like anvilenchant

sly topaz
#

that is part of the enchantment definition

#

all this code goes after the unfreeze call in onLoad

timid berry
#

oh boy

#

this guide

#

is gonna drive me crazy

eternal night
sly topaz
#

I mean, you wouldn't have all these issues if you were on 1.21.3 lol

timid berry
#

yah

#

but then the issues

#

i fixed

sly topaz
#

I asked claude to make an API from the blogpost and it made one kind of similar to Paper's one lol

eternal night
#

best claude

sly topaz
#

work smart not hard 💁

timid berry
#

ugh

#

i just wanted to create a simple sistem

#

add some sort of meta data to a book

#

call it enchanted

#

let players combine the book and sword via anvil

#

then when they use the sowrd and attack

#

if sword has meta data custom enchant

#

give victim

#

an affect

#

😭

young knoll
#

That’s the craziest part

timid berry
#

yo

#

what if there was a library

#

no way someone didnt simply the process

young knoll
#

¯_(ツ)_/¯

#

Data driven enchantments aren’t that old

timid berry
#

yah

#

but i still dont get it

#

the guide is driving me nuts

sly topaz
young knoll
#

Idk sometimes they just hallucinate new functions

#

At least in my experience

sly topaz
#

I actually had to copy the outerHTML of the post, feed it to mistral and tell it to scrape all the text from it to only then feed it to claude to generate the API, couldn't have done that with just mistral since it does what you just described

#

claude is pretty good at staying concise

young knoll
#

What’s mistral

#

We got another player in this game now

sly topaz
#

mistral is the completely free one, no strings attached

#

so you don't have a limit on how much you can use it

young knoll
#

There’s gotta be a catch somewhere

sly topaz
#

(well, I'm sure there's a limit, I just haven't used it enough yet)

young knoll
#

Computation time doesn’t grow on trees

sly topaz
#

their model isn't as good as the other ones

#

but is is good enough to give menial tasks like the above one so you don't waste all your claude/chatgpt tokens on a single response lol

#

also bigger context window

timid berry
#

oh is it the same guide

#

@sly topaz what 1.21.3

river oracle
quaint mantle
#

Is it possible to make a plugin add mod like features without making the player download it? (I haven’t started learning programming to make plugins yet) with custom items at least and probably blocks

river oracle
# quaint mantle Is it possible to make a plugin add mod like features without making the player ...

Long answer -> Yes
Short answer -> No

Adding custom items, and blocks with plugins is very far from straightforward. It would require a pretty advanced knowledge of the plugin eco system packets, java etc etc. It would be extremely difficult especially for a beginner in programming. While you can hackily execute most things mods can do with plugins, the actual implementation is often times complicated

#

this also requires combination with resource pack too

#

These concepts are pretty far from first plugin type of project

#

as a first step you could maybe start with Custom items they're fairly easy as its just a resource pack with some model data, but blocks would probably hell on earth for a beginner

granite burrow
#

Hello, I am attempting to create a player head, however, when I add it into my GUI it shows up as without a skin (see code below)

            // Convert the UUID to an offline player
            OfflinePlayer player = Bukkit.getOfflinePlayer(adminUsers.get(i));
            // Create the head of the player
            ItemStack playerHead = new ItemStack(Material.PLAYER_HEAD);
            // Get the meta of the skull
            SkullMeta skull = (SkullMeta) playerHead.getItemMeta();
            // Check if the skull is valid
            if (skull != null) {
                // Format the name of the player properly
                skull.setDisplayName(Placeholders.formatPlaceholders("&c" + player.getName()));
                // Set the owner of the skull
                skull.setOwningPlayer(player);
                // Save the skull's player data
                playerHead.setItemMeta(skull);
            }

I have confirmed that the item meta is updating because the name works, however, the skin is just a default head. Any ideas?

river oracle
#

Lots of player skull questions today huh interesting.

#

Get the player profile of the admin and update it

#

Do note this should be done asynchronously so you'll need to set the item in the inventory once the request is completed

granite burrow
#

I tried that. I just found out what the true issue is. The player is offline so the head doesn't show the proper skin (Not the async part but I did the profile thing)

river oracle
#

I gave you solution

#

You have to get the profile but then update it from the web request

granite burrow
#

oh so you want me to get the profile from an API? or via OfflinePlayer#getPlayerProfile()? Because doing the offline player one doesn't work, even after making it async and spawn into the GUI about 20 seconds later

river oracle
#

Should not take 20 seconds 💀

granite burrow
#

Was for testing cuz the 1 second I put yieled no change

river oracle
#

https://hub.spigotmc.org/javadocs/spigot/org/bukkit/profile/PlayerProfile.html#update()

final InventoryView view = ...;
final OfflinePlayer player =....;
final PlayerProfile profile = player.getPlayerProfile();
profile.update().whenComplete((exception, profile) -> {
  if (exception != null) {
    ... properly handle exception
  }

  final ItemStack stack = new ItemStack(Material.SKULL);
  final SkullMeta meta = (SkullMeta) stack.getItemMeta();
  meta.setOwningProfile(profile);
  stack.setItemMeta(meta);
  
  view.setItem(0, stack);
});