#help-development

1 messages · Page 1183 of 1

timid berry
#

why are the items not dissapearing?

#

i mean the drop

#

like everything but the part where i want it to not drop raw iron works

spiral cliff
#

Looking for developers for an OG prison server from scratch

undone axleBOT
spiral cliff
#

Thanks!

young knoll
#

I believe there is BlockBreakEvent#setDropItems

timid berry
#

does player.getInventory().addItem() error out if the inventory is full

#

or does it drop it

eternal night
#

@return A HashMap containing items that didn't fit.

slender elbow
#

lynx out here sending empty messages

worldly ingot
#

That's not true

#

He sent
-# (edited)

mortal vortex
#

Can anyone comment on why this code is somehow wrong? I even wrapped it in "valueOf" in hopes it would stop shitting itself

#

This enum works, and is written, literally the same.

timid berry
mortal vortex
#

try without it

timid berry
#

so what should i pass?

#

when i first started messing with wg

#

location was

#

red

#

because i didnt import it

#

but i saw two options

#

import from bukkit

#

or world gaurd

#

and i choose bukkit

#

so i think that might be doing something

#

not sure

mortal vortex
#

ohhh

#

Arre you actually passing com.sk89q.worldedit.util.Location as your location?

mortal vortex
#

BukkitAdapter.adapt(loc)

timid berry
mortal vortex
#

Yeah I just told you that.

timid berry
#

i guess it works

mortal vortex
barren peak
#

is there an event that fires when a minecraft server autosaves (or just saves is fine too)

sullen marlin
#

WorldSaveEvent

quaint mantle
#

Does NBT-API persist?

#

Or would it be better to save data in a yaml file?

orchid gazelle
quaint mantle
#

Awesome

orchid gazelle
#

?pdc

quaint mantle
#

PS, I'm currently using a very ancient version

orchid gazelle
#

Ah yeah then NBT it is

#

you will require nms though

quaint mantle
#

I thought NBT-API eliminated that?

orchid gazelle
#

Idk what nbt api is

#

Whenever I used legacy versions, I've been using nms to do nbt stuff

quaint mantle
orchid gazelle
#

Yeah that thing just uses nms in the background so you don't have to

quaint mantle
#

Would you recommend using NBT-API over yaml?

orchid gazelle
#

Depends on what you are doing, both can be a great choice

#

For example, adding data to items -> nbt

quaint mantle
#

I'm storing data, to be specific, a number

orchid gazelle
#

For what is it?

quaint mantle
#

?paste

undone axleBOT
quaint mantle
#

Ignore the really bad code 🙏

orchid gazelle
#

Yeah you can definitely use NBT right there

quaint mantle
#

I should probably get my code reviewed

orchid gazelle
#

If you don't need it to get parsed out again, you can just set it in your item desc/lore or title, but if you do, consider storing it in nbt

quaint mantle
#

Alrighty

orchid gazelle
#

Also don't really have the time to analyse the exact code rn, I am literally omw walking to school rn

quaint mantle
#

Thank you!

fossil fiber
#

EntityTargetLivingEntityEvent

is it possible to prevent eye contact with mobs with this event? just like spectator mode

#

or u can only cancel eye contact with protocollib

wraith delta
fossil fiber
#

what it does is just ignore the player but still look at players if not in spectator mode

#

im looking for a solution to make myself completely invisible like spectator mode (prevent eye contact)

wraith delta
#

add that one in addition

#

and for both make it check for player, like if (event.getTarget() instanceof Player) { //cancel }

fossil fiber
#

ye tried it acts like creative mode, but still can't prevent eye contact

forest shuttle
#

It's not about the entity despawning it's about keeping ticking the entity even if nobody's around and keeping the chunk loaded.
The workaround works fine at the moment

#

Btw does anyone here knows is there's an event when a villager panics?
Or is reflection is the only way for now?

lilac dagger
#

most likely part of the brain which isn't in the api

pliant topaz
quaint mantle
#

One of the servers I work on currently uses GadgetsMenu, and players are able to phase through the map while flying upwards while riding the Blaze pet. Is there a way to prevent this, such as by implementing a phase check?

pliant topaz
#

check if their head is in a block and they're riding the blaze pet, then teleport them a block down again

quaint mantle
#

Let me try this

#

?paste

undone axleBOT
nova notch
#

Store the last position, get a vector from that last pos to the new pos, then check if that ray hit a block. That should be how you can detect if they hit a block above them

#

Actually you could just use an up vector of (0, 1, 0) from the last position

quaint mantle
#

Holdon

#

Could I dm you?

nova notch
#

uh no I'm about to go to bed

#

but real quick what is it

quaint mantle
#

Ah

#

Any thoughts?

nova notch
#

oh cool getFrom exists

#

I mean

#

fuck I'm too tired to type

quaint mantle
#

Is the code wrong?

nova notch
# quaint mantle Any thoughts?

You're still just doing the same thing but with unnecessary steps, you'd need to raycast with a vector of getFrom pointing towards getTo. Make sure not to normalize it since the length is important here. That should get the block hit, if there is one. Then, if a block was hit, get the hit location. You'd want to teleport back down the distance from getTo - the hit loc, then like another .1 or so to make sure you don't get clipped into the block

#

This way accounts for any movement speed, so if you're moving really fast it will still detect the collision and teleport accordingly

#

Wait I didn't realize that was cancelable so yeah no teleport just cancel i guess

quaint mantle
#

I'll give this a shot

nova notch
#

alright gl man I'm boutta go do some chess puzzles and pass out

fossil fiber
quaint mantle
rapid whale
#

Hey team, when trying to add Bukkit 1.20.5-R0.1-SNAPSHOT to my maven project, it says it cannot find the artifact. Downloading the maven-metadata.xml it says that the latest is 1.15.2.R0.1-SNAPSHOT when 1.20.5-R0.1-SNAPSHOT actually exists. Who can we reach out to get the maven-metadata.xml file updated?

blazing ocean
#

1.20.5 should not be used, 1.20.6 is only a lil hotfix

rapid whale
blazing ocean
#

why are you trying to depend on Bukkit

#

use spigot

chrome beacon
#

^^ use Spigot

rapid whale
#

I'm a pre 1.13.2 dev, just coming back from the abyss haha

#

Back in those days we were told to use bukkit-api during development

chrome beacon
#

How long ago are we talking about?

#

Spigot did exist (pre 1.13.2)

rapid whale
#

oh geez

#

uhhh like 8-9 years ago ?

blazing ocean
#

Spigot did exist there

rapid whale
#

Yeah no doubt, spigot definitely exist. It came into the picture maybe 1.7 ish

blazing ocean
#

1.8 iirc

rapid whale
#

Coolio but the latest and greatest is to ditch using BukkitAPI and instead use Spigot ?

young knoll
#

Nah there was a 1.7.10 build of spigot

chrome beacon
#

I believe there are a couple 1.7.10 jars of Spigot

young knoll
#

Idk about before that

chrome beacon
#

1.7.2 might exist as well

blazing ocean
#

shouldn't be using those

rapid whale
#

awesome thanks

#

My plugin.yml still has a api-version: 1.13 is that property still relavent to spigot?

chrome beacon
#

Yes

rapid whale
#

pretty much just keep it the same version as whatever I declare in my pom.xml right?

blazing ocean
#

it defines on what minimum version your plugin runs

#

/ what api it should be using

chrome beacon
#

^^ so Spigot can run it's compatibility mode

rapid whale
#

Hmm, so if I am not using any of the newer api method, this value could technically be lower than what I set for spigot in my pom.xml?

chrome beacon
#

yes

rapid whale
#

Sweet thanks

chrome beacon
#

Do note the lowest value you can put is 1.13

#

versions older than that will just ignore it

#

and not all versions support minimum version being specified

rapid whale
#

Thanks, yeah I recall this property was introduced around that time

eternal night
#

(strong recommendation to put this at the minimum version you are going to support, the software may apply things to your plugin if you set it to low, that cause it to break)

blazing ocean
eternal night
#

Yea

#

Was just referencing could technically be lower than what I set for spigot

rapid whale
#

Yeah, I think for ease of maintainability I'll just keep it the same as whatever version I vend with pom.xml

eternal night
#

yea NODDERS

#

I think spigot is fine with anything beyond 1.13, I know paper does some optional stuff for higher versions

young knoll
#

I would always advise you do that, ye

eternal night
#

actually spigot also does that now with the enum -> interface

rapid whale
young knoll
#

It was introduced whenever Mojang added it

#

Which I believe was 1.20.5 ye

rapid whale
#

So 1.13 -> 1.20.5, I'm probs gonna have quite a few things break in my plugin (I recall hearing about a bunch of Material/ItemStack changes throughout the years)

eternal night
sly topaz
#

before that you'd use an empty enchantment tag or things like that, it was kind of hacky

rapid whale
#

Yeah, I used to slap the LORE enchant

#

LURE* and then just hide it

sly topaz
#

the harder version to upgrade is in fact 1.20.5 anyway so you'll have to suffer through that

rapid whale
#

rip the 1 user that is still on 1.14.4 and the 2 users on 1.17.1

sly topaz
#

do plugins refuse to load if the api version is higher than the server's?

pliant topaz
#

nope

rapid whale
#

Around 50% of my userbase floats around 1.20~ so I might continue supporting that for a while

pliant topaz
#

one tip

#

don't get yourself into localizednames

#

they got removed in 1.21. just use the pdc at the beginning :)

rapid whale
#

never heard of that so I guess I'm lucky?

chrome beacon
#

yeah they were pretty much always missused

pliant topaz
#

really?

rapid whale
#

I did see a bunch of threads talk about PDC which was supposed to replace NBT I believe?

blazing ocean
#

yes

blazing ocean
#

It uses NBT I believe

chrome beacon
#

It's an API wrapper for it

#

It's saved to NBT in the end

rapid whale
#

o

young knoll
#

Unless it’s a server version that doesn’t even support api-version

rapid whale
#

interesting

young knoll
#

Aka < 1.13

#

Which is why a plugin with an api version of 1.13 will still load on 1.8

pliant topaz
# blazing ocean yes

oh, i remember testing my 1.21 plugin on a 1.20.6 server (didn't notice until i ran into method not found)

rapid whale
#

I guess it make sense, If my plugin declares 1.21.3 and you try to run it on a 1.20 server the risk is I could be using methods that don't exist in 1.20

#

So what is the server gonna do it that case if it tries to run the actual code, poops :p

sly topaz
#

kinda hate it tbh

#

what if my plugin supports both versions properly by doing reflective checks

#

then it'll enable legacy conversion for no reason

rapid whale
#

Honestly I feel like the api-version can be easily forgotten to be bumped

pliant topaz
#

happens all the time

#

atleast to me, so my plugins are always outdated

rapid whale
#

whats the latest take on NMS, is it still taboo, or has the landscape gotten better now?

chrome beacon
#

It's much easier to work with now

young knoll
#

Well we have Mojang mappings now

#

Pretty hype

chrome beacon
#

^^

rapid whale
#

omgawrd

#

thats soooooooo much better

blazing ocean
#

yarn >>>>

chrome beacon
#

Do use the API when possible though

#

?nms

chrome beacon
#

^^ if you want to take a look

young knoll
#

Hmm I wonder

rapid whale
#

Thanks, I think it will be a good read anyways to bring me up to speed

chrome beacon
#

?mappings

undone axleBOT
young knoll
#

Can I call papers native adventure methods using objects that are from the adventure version I have shaded

rapid whale
#

Interestingly enough, I had some old NMS code that survived version bumps

eternal night
#

Especially because tou should be relocating adventure

rapid whale
#

defs died in 1.20.5 +

eternal night
#

If you wanna support spigot crud, you are limited to the Bukkit platform sadly

young knoll
#

Yeah I didn’t think so

#

That’s fine, I have my NMS adapters

eternal night
#

Or just drop spigot support 😉

young knoll
#

With fallback to the legacy serializer

sly topaz
rapid whale
#

Man the landscape sure has changed

sly topaz
young knoll
rapid whale
#

I feel like I have to drink out of the waterhose again with all this new info

eternal night
blazing ocean
#

Chocoooo

eternal night
#

Well that's still not even adventure 😦

sly topaz
#

it doesn't have to be adventure

young knoll
blazing ocean
#

Adventure is just really

#

weird sometimes

eternal night
#

Yes I also like chocos pr

young knoll
#

Smh does the command not work in this channel

blazing ocean
#

nah

young knoll
#

?mappings

undone axleBOT
rapid whale
#

Coming out of retirement was all because I had users from the paper side report everything died.
Then I saw this:

As of 1.20.5, the versioned relocation of the CraftBukkit package was removed and CraftBukkit packages are now located in org.bukkit.craftbukkit and not in org.bukkit.craftbukkit.<version>.

and everything made sense, time for a big overhaul and remove that hacky code

sly topaz
#

it'd be nice if it were adventure since it's pretty much the component platform nowadays, but as long as it is complete and the API is reasonable enough then I don't mind it not being adventure

young knoll
#

Yeah paper loves to break shit

#

Smh

rapid whale
#

Didn't understand their whole announcement but apparently it was for the "better"

young knoll
#

-# Fight me lynx

#

I mean I do like it

rapid whale
#

But if spigot can include Mojang mappings without breaking everyone, surely they coulda too

young knoll
#

But it still breaks shit

#

:p

eternal night
#

It breaks internal usage

eternal night
#

Spigot doesn't include Mojang mappings

blazing ocean
young knoll
#

Well maybe if the api was magical and could do everything!

dry hazel
#

fix it lynx

rapid whale
#

O, then what the link that was sent earlier that had the plugins?

#

that did the mapping or something

eternal night
#

That's compile time Mojang mappings

#

Paper does runtime Mojang mappings too

young knoll
#

It allows you to develop with Mojang mappings but it reobfuscates the code when you build

sly topaz
#

what you do is run build tools to generate a remapped vesion with mojmap, and then specialsource makes use of that in your plugin as dependency instead

eternal night
#

Spigot doesn't

rapid whale
#

ohh yeah, isn't that what paper also does now though? or do they actually compile server with mappings too?

sly topaz
#

they do both

young knoll
#

Paper runs the server mojmaped

#

And then re-remaps plugins

rapid whale
#

So I guess as a plugin dev it doesn't make too much of a difference?

sly topaz
#

not really, just tooling difference

#

in the end this is all for use of internals anyway so if you stick to API then it really doesn't matter

#

it used to be impossible in older versions, but the API is much more complete nowadays than it was before

pliant topaz
#

paper also provides paperweight-userdev which has all nms stuff available

sly topaz
#

as long as you don't depend on the newer features being there that is, item components and the like are still things spigot is playing catchup with mojang

#

I've seen that paper merged their item component API recently, wonder what people think of it

young knoll
#

We have methods for most of the component stuff

eternal night
#

Needs some more work on dx

young knoll
#

I think the new food stuff is missing tho

rapid whale
#

oh boy, what is item component? sounds like another new topic I need to consume

sly topaz
#

last time I saw the thread about it in the api discussion channel there wasn't much talk and I hated how it used builders for everything

eternal night
young knoll
#

New system for custom data on items

eternal night
#

Any data on items

#

Not just custom

young knoll
#

Well, yeah

#

It’s basically just parsed NBT

rapid whale
#

https://mappings.dev/ dam, I can't believe the domain name was snagged just for minecraft xD

blazing ocean
sly topaz
#

lynx just actually'd you smh

young knoll
#

But Mojang also took it as an excuse to add a bunch of new functionality to items

young knoll
#

Tooltip hiding, custom tooltip backgrounds, etc

rapid whale
#

So kinda like a PDC but for Items?

sly topaz
#

PDC is arbitrary data

young knoll
#

Items already have PDC

sly topaz
#

item components are for modifying the item's behavior

blazing ocean
#

wait till you hear about display entities and custom fonts and shaders

rapid whale
#

🤯

sly topaz
#

i.e., make a tool edible or make any item a tool

young knoll
#

Wait until you hear about data driven bloc- oh wait not yet

rapid whale
#

Dam, this sounds like CSS in Java :p

eternal night
#

Wait till you hear about signed chat and chat reporting

young knoll
#

Oh yeah that thing people freaked out about and then immediately forgot

sly topaz
#

that one I'm not excited about, I love that there's more security towards chat but it broke all my fancy conversation stuff that I used to have with villagers smh

young knoll
#

Probably because it just doesn’t work on most servers

#

Since they customize chat in some way

blazing ocean
#

wait till you realise that you can do this now

young knoll
#

Smh he’s advertising brawls+

#

Banned

remote swallow
#

md say its slay

#

so id count that as advertisment for brawls

fading drift
#

how do I open a book on a player in 1.8.8

blazing ocean
fading drift
#

nvm go tit

young knoll
#

I will not go tit

fading drift
#

my fault

young knoll
#

When do we get minecraft Adblock

#

Client mod that blocks all those messages telling you to go to a servers store page :p

blazing ocean
fading drift
#

surely you could chcuk google ads in a minecraft plugin

#

like imagine player had to watch an ad to join a server

#

easy W

young knoll
#

That’s just minehut

blazing ocean
#

yea

young knoll
#

Although the commercial usage guidelines do have things to say about that

rapid whale
#

How would I be able to find if an Item has a certain enchantment meta.getEnchants().forEach(enchantment -> enchantment.<something>?);

fading drift
#

stream findfirst

#

I mean stream anymatch

inner mulch
#

Enchants are a collection, arent they?

#

So just #contains

young knoll
#

Isn’t there like

#

A getEnchantmentLevel or something

rapid whale
#

ah wait

#

meta.hasEnchant

umbral ridge
#

split it to a string list and run contains

young knoll
#

Oh there’s just hasEnchant

#

That works too

rapid whale
#

But If I need to remove the enchant I'll rprobs have to loop through 😅

fading drift
#

map

rapid whale
#

wait I'm silly

frigid falcon
#

Hey, does someone have a snippet for getting the tps of a server by hazard? Would be very much appreciated.

jolly forum
#

Hi, could someone tell me in 1.8 Bukkit how I could cancel the consumption of a strength potion, for example?

smoky anchor
jolly forum
smoky anchor
#

Show some code then

#

?paste or ?codeblock if it's short

undone axleBOT
torn shuttle
#

fun question

#

now that biomes are keys

#

or rather registry values

#

are the values still uppercase

eternal night
#

hm?

#

the constants still follow java naming conventions yes

torn shuttle
#

thought so

#

I hope other plugins are also following those rules

eternal night
#

confused

torn shuttle
#

trying to add compatibility for custom biomes

#

now taht that is technically possible via the api

eternal night
#

The name of the field has nothing to do with the key

#

The key can be whatever

torn shuttle
#

yeah I know

worldly ingot
#

Plugins should have been pulling Biome constants from the biome registry to begin with

#

If they were doing Enum.valueOf() then they were doing it wrong :p

rough drift
#

most were

sly topaz
#

I mean, Registry is still a fairly recent API

torn shuttle
#

just trying to grab the most popular world gen plugins and basically make a method where if I am, say, looking at a desert biome form vanilla, it would also then go pick all the terralith, terraformgenerator and terra biomes that would fit that

#

so that stuff like biome-specific structures will spawn in appropriate biomes even if people are not using vanilla biomes

young knoll
#

The game has categories and tags for biomes

#

Idk if we expose those

rough drift
#

10/10

torn shuttle
#

I haven't really messed with registry at all honestly

#

don't think we can see biome tags afaik but if we could that would be pretty cool

worldly ingot
#

It's not recent lol

remote swallow
#

that was only 6 years ago?!

torn shuttle
#

tbf my codebase is older

rough drift
#

fuck you mean 6 years ago

#

bruh what

#

I remember 1.13 like yesterday

#

huh

worldly ingot
#

COVID distorted the perception of time for a lot of people

#

That was a 3 year period lol

rough drift
torn shuttle
#

depending on your country

rough drift
#

5m? 5h? no diff

remote swallow
#

it feels like 1.13 was atleast 8

#

?howold 1.13

undone axleBOT
remote swallow
#

it really is 6 dam

sly topaz
# worldly ingot It's not recent lol

it's recent from a plugin development perspective, and there wasn't much of a heads up for people to know "hey, these are not hardcoded enums anymore but registries, use this instead of that" so the expectation was still to just use enums until rather recently when using registries did become useful to support datapack stuff and what not

#

registries themselves have been long part of the internals of the game so if anything, it's surprising the API users are just catching up right now

rough drift
#

yeah

#

what's up with that lol

sly topaz
#

there was just no benefit to using a registry since the API didn't change until recently with the movement from enums to interfaces, and people didn't care enough about datapacks or mods

torn shuttle
#

yeah I mean up until now the most complex thing I did with biomes getting enum from string

young knoll
#

It’s best to have a configurable list of biomes for your structures

#

Then one can easily add custom biomes to it

worldly ingot
#

I've been using registry keys in VeinMiner since 1.13, it's been so nice

young knoll
#

You can also provide a default config with some of the popular custom biomes

torn shuttle
#

I'm just adding default compat

young knoll
#

Like idk terralith

torn shuttle
#

I mean

#

that's basically what this is

#

except as a generator instead of a single file

sly topaz
#

that is... a list

#

so you just map the wordgen biome to the closest vanilla match?

torn shuttle
#

that's the idea

#

should be simple but effective, hopefully

sly topaz
#

it'd be interesting to see the API have fallback biomes

torn shuttle
#

I mean even just exposing types would be a good enough replacement here

#

if plugins could self-report deserts or something like that it would already be 99% good

#

not perfect in my case for some of this stuff but it would be pretty good

sly topaz
#

biome categories exist in the game so it is just matter of someone exposing that tbh

young knoll
#

Well now that biomes aren’t an enum

#

Should be pretty easy

blazing ocean
torn shuttle
#

this is the lazy way of doing it

sly topaz
#

hey, if it works

torn shuttle
#

I literally just asked people to submit them in a format then just had ai clean it up and slap regex on it

#

no effort and it just gets dumped into a map

sly topaz
#

but my beautiful source code!!! 😦

#

discord why do you replace my sad face with an emote smh

blazing ocean
sly topaz
#

thank you

#

I forgot that exists

#

:)

#

it works yay

ocean hollow
#

how can I get BukkitValues from Entity?

sly topaz
#

so, item.getPersistentDataContainer().get(NamespacedKey.fromString("itemsadder:placeable_entity_item"), PersistentDataType.STRING)

torn shuttle
#

still wrong

#

itemsadder is the key

remote swallow
#

NamespacedKey.fromString("itemsadder:xyz")

sly topaz
#

yeah, I mixed them up lol

#

I fixed it there

#

though I assume ItemsAdder has API to access this information

ocean hollow
#

api sucks

#

It's not working properly. For some reason it's seeing furniture in a bigger radius.

#

There's not even a proper event for the furniture placing.

ocean hollow
#

or there's an event where you can cancel it, but you don't know where the furniture is. Or you can only recognise the location of the furniture

#

there is no getLocation() method

young knoll
#

Ew why does it return the namespaced id as a string

ocean hollow
#

there is FurniturePlaceSuccessEvent, but you can't cancel it

sly topaz
#

oh so there's two events

#

found it weird that it only provides a namespace in the place event

young knoll
#

Yeah that seems silly

remote swallow
#

are you going to make ur own itemsadder

young knoll
#

Means you can’t cancel furniture placement inside a certain region

remote swallow
#

with blackjack and hookers

young knoll
#

Easily at least

blazing ocean
sly topaz
#

there's a FurnitureEvent super class that FurniturePlaceEvent doesn't extend, that's hilarious

ocean hollow
young knoll
#

The heck is packed

remote swallow
blazing ocean
young knoll
#

Also you could potentially delete the furniture in the success event and then give the item back

#

Mayhaps

ocean hollow
#

i have tried it, it dosn't work

#

looks like it places after event

sly topaz
#

if it places after the event why does it not let you cancel that smh

young knoll
#

Jank

sly topaz
#

so yeah, player interact event it is kek

#

their skript API just tells you to use that reflection addon for Skript lol, how is that an API

ocean hollow
#

I thought that itemsadder is the best plugin for this kind of stuff, but there are so many crutches in it. not even normal support

sly topaz
#

the best plugin for this stuff is Oraxen probably

#

wait why is the spigot resource unavailable for purchase

summer scroll
sly topaz
#

spill the tea

summer scroll
#

The original developer returns and decide to take control of the plugin, kicking the developer who's been maintaining it 3 years minimum.

#

Also demand 5-6 figures from the maintainer.

remote swallow
#

oraxen or ia

summer scroll
#

Oraxen

remote swallow
#

oh dam

sly topaz
#

who is oraxen's original dev and who is the maintainer

summer scroll
#

Original developer is th0rgal and maintainer is Boy

remote swallow
#

i didnt even know thorgal left it

summer scroll
sly topaz
#

who is Bro, Boy0000?

summer scroll
young knoll
#

Isn’t ItemsAdder also unavailable to purchase atm

summer scroll
#

You can look at the reviews for Oraxen, it has so many 0 stars review lmao

eternal night
#

Block game drama truely is the best

young knoll
#

Maybe we do need a new plugin with blackjack and hookers

sly topaz
#

I mean that was just dumb from the maintainer's part

#

it'd be more understandable if it had been a few months after they left, but they went on for years without actually trying to "legalize" their ownership of Oraxen

#

of course it's just shitty from the creator's part, but it's what it is

summer scroll
#

That's true lmao

sly topaz
#

one learns from mistakes so I'm sure they'll never let this kind of thing happen again to them, if anything

#

I am curious how this th0rgal guy even has the gall to do this, knowing the severe backslash they'd receive for attempting an aggressive takeover

#

I guess even with that on the plate, they'd still gain a few bucks before it implodes on their face so they might just be aiming for that

eternal night
#

Read their side of the things too

young knoll
#

That’s effort

#

Can I get a tldr

sly topaz
ivory sleet
sly topaz
#

the fact that a minecraft plugin community drama gets 6.5k views is crazy

worldly ingot
#

of course there's a video about it

remote swallow
#

course theres a video about oraxen

young knoll
#

What is that background

#

Looks like vomit

#

Idk if that’s a resource pack or custom blocks added by Oraxen

#

But it’s terrible

worldly ingot
#

you look like vomit

eternal night
#

Uuuf

sly topaz
#

did spigot seriously just give the dude back the resource because they asked for it lol

remote swallow
#

you cant say that to coll1234567

sly topaz
#

that's hilarious

worldly ingot
#

I hate that stupid YouTuber zoom thing

worldly ingot
young knoll
remote swallow
#

@simonhypixel

eternal night
#

And spigot HR

sly topaz
worldly ingot
#

By having access to his account

remote swallow
#

why did they have access to his account

young knoll
#

Is this why 2fa is required now

worldly ingot
#

They were pushing updates. So it was a shared account without Spigot's knowledge :p

remote swallow
#

ah

young knoll
#

Ban them both then

#

Problem solved

sly topaz
#

I'd just let them have it for being dumb

eternal night
#

Permissions ✨

worldly ingot
#

This is exactly why we want people to let us know about shared accounts, by the way

young knoll
#

2 people fighting over a resource? Sike neither of you get it now

eternal night
#

My offer to share your account with me still stands choco

sly topaz
#

should probably have organizations like github to avoid this kind of problem

worldly ingot
#

Fuck the account. Let's share a house, lynx

eternal night
worldly ingot
remote swallow
#

damn he on a lease and a mortgage

eternal night
#

I'm flying over rn

#

Tell your gf to move over asap

sly topaz
remote swallow
#

for xf 1 maybe not

young knoll
#

Just make an entirely custom system

eternal night
#

Should have made it an automatic gh act-

young knoll
#

The side effect being youll end up insane like minidigger

remote swallow
young knoll
#

Imean what

remote swallow
#

are you trying to say something about mini digger

sly topaz
#

that video really puts spigot in a bad light for siding with th0rgal lol

eternal night
#

Mini isn't too far gone yet

young knoll
#

yet

eternal night
#

We can save him COPIUM

young knoll
#

Web dev smh

remote swallow
sly topaz
#

it doesn't outright say anything bad about spigot, but it does seem to imply the decision was kind of dumb

young knoll
#

Shut up

#

I and * are in the same spot but different keyboards

sly topaz
#

I'd agree if I knew the context here but there seems to be no info on th0rgal's side

#

@eternal night why did you send me through this rabbit hole smh

eternal night
#

There is this

#

Sourced from somewhere idk why I have it

young knoll
#

Source: deez nuts lmao

sly topaz
#

so this is just a shitty situation

#

but Boy does seem to be acting in bad faith if all of that is true

young knoll
#

Tbf either one could be lying

#

I vote we eject both of them for being sus

sly topaz
#

it's easy to prove, just show transactions

#

if Boy did send them the 20% that they had decided upon still, then th0rgal is the one lying

#

if they didn't, then we'd have to see chat of that being agreed upon to begin with

#

seems like everything is rather recent still so I'll stay tuned for more tea

eternal night
#

"chat"

#

If this is truly in a 5-6 figure range I'd expect some paperwork

wet breach
#

lol

#

what plugin we talking about?

young knoll
#

Oraxen

sly topaz
#

Oraxen, the custom items plugin

eternal night
young knoll
#

I would be a great boss

#

Idk what ur talking about

eternal night
#

Facts XD

wet breach
#

which isn't all that much

sly topaz
#

it isn't just spigot, but polymart and wherever else they're in + sponsorships

wet breach
#

I am going based off spigotmc

#

don't care about polymart and probably has less downloads from there

#

sponsorships don't necessarily make you money

#

rather it allows you to do something

sly topaz
#

but if they're asking for 6 figures then sponsorships must have some kind of monetary compensation otherwise it wouldn't make sense to charge the whole sum of the plugin's earnings

#

or so I'd like to assume, but who is to say

young knoll
#

A know a lot of server hosts just give you a free server as a sponsorship

#

Absolute stonks

pure dagger
#

do i have to handle time zones or will just server do it

sly topaz
pure dagger
wet breach
#

$111,484.23 from spigotmc alone over 6 years and not factoring in taxes. $18,580/yr ($1,548/month) which in US terms is way below poverty level lmao.

summer scroll
young knoll
#

What if my server is located on a globe travelling cruise ship

pure dagger
#

ok so better to get the time zone from config

#

right

wet breach
young knoll
#

You could just default to UTC

#

Or whatever

pure dagger
#

what does it mena

wet breach
#

as I said originally, sponsorships are not for making money per say as that would be illegal

young knoll
#

And do a bit of math to compensate for the servers timezone

pure dagger
#

but there is like zoneddatetime

#

ZonedDateTime

#
        int hour = 20;
        int minute = 3;
        ZonedDateTime now = ZonedDateTime.now(ZoneId.of("Poland"));
        ZonedDateTime nextRun = now.withHour(hour).withMinute(minute).withSecond(0).withNano(0);
        if (nextRun.isBefore(now)) {
            nextRun = nextRun.plusDays(1); 
        }

        long initialDelay = Duration.between(now, nextRun).toMillis();
        ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
        scheduler.scheduleAtFixedRate(
                () -> code,
                initialDelay,
                TimeUnit.DAYS.toMillis(1),
                TimeUnit.MILLISECONDS
        );

        System.out.println("Task scheduled to run at: " + nextRun);
#

i did this

sly topaz
#

6190 downloads for 19.99 each, over the span of 60 months and 10 days

drowsy helm
#

When the plugin takes 80% of your time, 2k isnt worth it

sly topaz
#

of course, without taking taxes into account

young knoll
#

Wouldn’t it be 60.33 ish

drowsy helm
#

Just goes to show the big money is in owning servers ig

young knoll
#

10 days is not 0.1 of a month

sly topaz
#

it is 60 months since first release

pseudo hazel
pure dagger
#

what

#

i dont understand

wet breach
#

but it still isn't a lot of money though

sly topaz
#

it isn't but I'd be curious to know how many hours a week they spent on the plugin so we'd ultimately know whether it was worth it or not monetary-wise

wet breach
#

and whether or not they are providing support

pure dagger
#

or not

pseudo hazel
#

idk what that is

#

Im used to another framework that just has datetime

pure dagger
#

;c

pseudo hazel
#

and you construct it with some utc value and then you can the time it would be for other timezones

sly topaz
#

save the thread pool in a constant and use that

pure dagger
#

but im gonna use it only in onEnable

young knoll
#

Yeah but what if you want to schedule multiple tasks

pure dagger
#

but i dont want, what do you mean

sly topaz
#

it's fine then I guess

pure dagger
sly topaz
# pure dagger so the rest is ok
pure dagger
#

lol

#

why every 2 years

sly topaz
#

I had assumed leap year shenanigans but it seems to be related to how the scheduled executor service internally stores time (a long), making it overflow if your service runs for 2 years

#

then again, I doubt your plugin will run for 2 years straight

blazing ocean
#

time concern

young knoll
#

Smh they should have used a BigInt

ivory sleet
# pure dagger but i dont want, what do you mean

They mean that you may wanna schedule other tasks or services to execute based on a schedule, then its ofc convenient to reuse the same executor service, in fact its a very common practice to keep around a single thread pool for scheduling tasks with like 1-3 threads for the entire application, then ofc executing the task itself may occur in another thread pool etc

frigid falcon
#

Hey, does someone have an idea if theres a way so asynchronously update a bossbar? My goal is to create a TPSBar which wont be affected by lags on the main thread.

inner mulch
#

make a new thread

pseudo hazel
#

why would something ran once a day overflow in 700 days

hazy parrot
#

Tbh I asked myself the same question

frigid falcon
frigid falcon
pseudo hazel
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

frigid falcon
# inner mulch ^

Sorry I'm a bit tired xd
I've created some lag by spawning a bunch of tnts with explosion power 100 and the server started to lag, but the TPSBar didn't update asynchronously or at least my client didn't receive that update

sly topaz
pseudo hazel
#

why in gods name would it count in ms

#

if you know beforehand it needs to trigger once a day

#

just reset it when it gets triggered

#

but I guess thats all standard java shenanigans

inner mulch
chrome beacon
#

Server might need a tick to compute the tps

frigid falcon
chrome beacon
#

since it needs the time the tick took

#

You won't see the tps change until the tick is finished

#

If you want a more acurate thing track the time in ms yourself

river oracle
frigid falcon
blazing ocean
#

Bukkit.getTPS be like

young knoll
#

That’s not a spigot method

blazing ocean
#

damn

plush sluice
#

is there a way I can get this data in bukkit plugin? (enchantments)

young knoll
#

ItemMeta#getEnchantments

#

Wait it’s on a block

#

Wut

plush sluice
#

i was bout to say that

blazing ocean
#

the fuck did bro do

plush sluice
young knoll
#

Yeah but that shouldn’t be saved when placed

#

At least it wasn’t in the past

plush sluice
#

if there is a way to get this data

sly topaz
#

there is no reason for it to be saved to begin with, blocks can't use enchantments in any way

sly topaz
plush sluice
pseudo hazel
#

here I thought the items were stored container/client side

sly topaz
#

I guess since it is a tile entity it allows it to save the data but hella weird

pseudo hazel
#

hold up

#

how does that even work

young knoll
#

I don’t think tile entities save arbitrary data

pseudo hazel
#

doesnt every player have their own anvil screen?

young knoll
#

Entities don’t at least

young knoll
#

Why does the anvil screen matter?

pseudo hazel
#

or am I going crazy

plush sluice
#

what are you talking about

pseudo hazel
#

oh wait

young knoll
#

They put an enchantment on a chest and then placed it

pseudo hazel
#

im dumb nvm

#

I thought it said anvil and not chest 💀

sly topaz
#

oh I guess it saves the component to keep the enchantment when broken, that makes sense

young knoll
#

It didn’t do that before

#

Guh

sly topaz
#

let me check my 1.21.3 source real fast

pseudo hazel
#

it probably works the same way for the name

#

if you rename a chest or shulker in an anvil the name will be kept when placing and opening it

young knoll
#

The name had its own tag before

#

But only the name

plush sluice
sly topaz
pseudo hazel
#

are you sure that vanilla is adding this data?

young knoll
#

Oh does it only last until the block is unloaded

young knoll
#

The heck

plush sluice
pseudo hazel
#

how did that data even get there

plush sluice
#

sooo no way to get this data?

smoky anchor
#

The "components" tag is there to easily support the item name & other stuff
it just saves everything from the item stack iirc

young knoll
#

How did I never hear about that change

sly topaz
plush sluice
smoky anchor
#

Just tile entities

#

Blocks can not store any data like this

plush sluice
young knoll
#

Seems weird to store all the data

#

Rather than just the name

young knoll
plush sluice
#

That leaves me with one option.. PersistentDataContainers

sly topaz
#

yeah just tiles

remote swallow
sly topaz
ivory sleet
remote swallow
#

did younot know?1

ivory sleet
#

nope :(

remote swallow
sly topaz
plush sluice
sly topaz
#

if you could get the block state in item form you could have used BlockStateMeta but I don't think you can

sly topaz
worthy yarrow
#

Just read the whole thing now I’m gonna cry

remote swallow
#

i thought you knew

worthy yarrow
#

No

sly topaz
#
var chest = new ItemStack(Material.CHEST);
var meta = chest.getItemMeta();
((BlockDataMeta) meta).setBlockData(yourChestBlock.getBlockData());
var enchantments = meta.getEnchantments();
worthy yarrow
sly topaz
#

since when is BlockDataMeta a thing, I haven't seen it before

worthy yarrow
#

I wanna know where in the internals are PerlinOctaveGenerator objects being used

remote swallow
#

open cb and ctrl + click

#

in an ide ofc

sly topaz
#

I doubt it is being used anywhere

#

PerlinOctaveGenerator is a bukkit utility

worthy yarrow
#

Erm

#

I need examples

sly topaz
#

examples on how to use it?

worthy yarrow
#

Yeah

worthy yarrow
#

Fuckkkk man I shoulda just used chunk generators anyway

#

Looking like I’m gonna have to rewrite to account for this considering I don’t wanna spruce up the current wfc impl to handle this

#

Erm upsetting

sly topaz
#

wait, what were you using if not chunk generators

buoyant viper
#

bro is manually placing the blocks, obv

buoyant viper
sly topaz
#

why would you do that lol

worthy yarrow
#

Cuz uh

#

Uh

#

insert good excuse here

#

I suppose it’s solid practice for actual game impl

cursive summit
#

can i make the Player object have a string, that i can change anytime i want and it doesnt change for the same player?

#

like for example every player has an integer that counts the times they took damage

smoky anchor
#

?pdc

cursive summit
#

thank you

acoustic pendant
#

Hey, does someone know how to shade GraalVM into a gradle project? I've been searching but couldn't find anything (perhaps I have negative searching skills) Could someone help me please?

acoustic pendant
#

Thanks

acoustic pendant
acoustic pendant
sly topaz
#

use the polyglot features of graal?

#

because you can't just shade a whole jdk, you'd have to run graal in your server for it to work

acoustic pendant
acoustic pendant
acoustic pendant
#

Cam't shadowJar only shade what's important?

blazing ocean
blazing ocean
sly topaz
#

it is part of the runtime

#

@acoustic pendant it looks like what I said was old news

#

apparently they've decoupled the polyglot api from the jdk so now you can in fact use it outside of non-graal JDKs

blazing ocean
#

jeez

sly topaz
#

you just don't get any JIT compilation, which is fine since graal community edition doesn't anyway

frigid falcon
#

Hey, does someone know how I can disable blocks being destroyed from a tnt I've just summoned?
This is my snippet I'm using atm

            TNTPrimed tnt = (TNTPrimed) player.getWorld().spawnEntity(player.getLocation(), EntityType.TNT);
            tnt.setFuseTicks(0);
            tnt.setYield(10);
sly topaz
sly topaz
#

someone should deprecate all the other methods smh

frigid falcon
sly topaz
#

the TNTPrimed entity doesn't have a way to set the explosion power

sly topaz
#

sadge, you'll have to use rad's method probably

#

even though it is part of the entity data

frigid falcon
sly topaz
#

it was added rather recently so I guess it makes sense it wasn't added yet

frigid falcon
blazing ocean
#

yea should be

acoustic pendant
#

Why did they remove it in java 15 through?

sly topaz
sly topaz
acoustic pendant
sly topaz
#

the standard JDK never supported the polyglot API by itself, that has always been Graal's domain

frigid falcon
#

Hey, does someone have an Idea if theres some event which I could use to:
a. detect placement of item frame
b. detect the itemstack of the itemframe
c. modify the item frame entity and make it invisible

inner mulch
#

then you just check for instanceof ItemFrame

frigid falcon
inner mulch
#

have you registered the event

frigid falcon
#

Yes, just read through the docs and the event isn't supposed to fire

#

But I couldnt find any alternative for item frames

inner mulch
frigid falcon
#

Thank you very much, will try that out :)

inner mulch
#

no problem

frigid falcon
#

Is there some way to find out the metadata from the item frame which has been placed? Because casting the entity to an itemFrame and getting the itemstack doesnt seem to work

inner mulch
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

frigid falcon
#

itemFrame.getItem() returns null

undone axleBOT
frigid falcon
young knoll
#

That’s for the item in the frame

#

Which will of course be null if it’s just been placed

frigid falcon
#

Ahhh maybe I should've read the docs

#

Is there any way to get the item which resulted in the entity being spawned?

autumn cave
#

I'm getting this error from using Kord in my plugin: ClassNotFoundException: kotlinx.io.unsafe.UnsafeBufferOperations. I have all the libraries loading, including kotlinx-io-core-jvm which the error is from. Any clues what could be the problem?

inner mulch
frigid falcon
#

Do you have an idea how I can set the entity_data component for an itemstack?

inner mulch
#

which entity_data component?

frigid falcon
inner mulch
#

okay and what do you want to set there?

frigid falcon
#

Normally the entity_data will be empty or at least not have the Invisible tag. I want to create a custom recipe which gives you an invisible item frame you'd normally receive with this command /give @s item_frame[entity_data={id:"minecraft:item_frame",Invisible:1b}]

inner mulch
#

im not sure, i would have probably just listened to the event and made it invisible once the player tried to place it

frigid falcon
inner mulch
#

im not sure i havent used the new api for itemstacks yet, with the components

#

the docs probably have that written down somewhere

chrome beacon
#

It's a bit limited atm

frigid falcon
#

It should be possible with NMS atleast

remote swallow
#

Iirc it's on World

sly topaz
#

isn't that the block_entity_data component

slender elbow
#

item frames aren't blocks

sly topaz
#

ah right

#

if SpawnEggMeta was generalized that could've been used, what a shame

acoustic pendant
sly topaz
hybrid spoke
#

hi, a question: i have an armorstand with an itemstack as a helmet (for a custom entity) and when i try to update the helmet, it does serverside, but not clientside. how can i force the client to update the armorstand?

e.g. i have a paper with a custom model data, once set to the armorstand i can do anything about it, but it wont change again. changing the custom model data or removing/changing the helmet entirely, nothing works - it stays the same model as initial

#

to update the model we currently have to destroy the old armorstand and spawn a new one with the new model as helmet, which is not ideal

autumn cave
hybrid spoke
sly topaz
#

it should send the equipment change packet

#

@hybrid spoke what happens if you do Player#sendEquipmentChange instead

#

of course, you'd have to do it for all players, but it is just for testing purposes

#

to me this sounds like a client rendering issue rather than an issue with the server given the helmet is being changed

#

are you using the vanilla client?

hybrid spoke
#

yeah and no, labymod. i figured, since teleporting the entity automatically updates it clientside. weirdest shit is, that its the same for itemdisplays, which do not have any equipment

sly topaz
#

I haven't heard about labymod in ages

hybrid spoke
#

pretty big thing in germany

sly topaz
#

why labymod over something like simply optimized or fabolously optimized modpacks

hybrid spoke
#
  • i look cool
sly topaz
#

well, do try Player#sendEquipmentChange

#

if that doesn't do it either, try it in the vanilla client and if it happens to be a labymod issue just report it to them I guess

hybrid spoke
#

i cannot try sendEquipmentChange on an itemdisplay

#

and i already threw away the armorstand

sly topaz
#

I mean, try it on the armor stand

hybrid spoke
#

couldve been a fix, but now its too late ig

sly topaz
#

that sends the destroy and reappear packet so there's no way it doesn't re-render

hybrid spoke
#

i tried that earlier, same issue

sly topaz
#

with the item display too?

hybrid spoke
#

si

sly topaz
#

well fuck labymod

hybrid spoke
#

lmao

sly topaz
#

I use lunar, is it any better performance wise

hybrid spoke
#

idrk, i dont care about performance, i just want to look cool and already spent enough money at my cosmetics

sly topaz
#

lmao

hybrid spoke
#

so im kinda forced to use it lol

#

but still weird, i will try it with vanilla

#

nvm, i have to download it from the store which is quite annoying

#

fuck vanilla

young knoll
#

The old launcher still exists

#

Or you can use something like prism

sly topaz
#

^ prism is good

#

but you don't necessarily have to download it from the store tho

paper viper
#

Prism and then fabulously optimized

#

Used to use Lunar but I stopped

hybrid spoke
#

btw sendEquipmentChange didnt work either

#

just tried

sly topaz
#

I like simply optimized better for 1.21.3

#

yeah your client is fucked

#

check your labymod settings if there's anything with the word cache or rendering on it to see if you could maybe adapt it

paper viper
#

Are you using Laby? I wouldn’t use Laby to test plugins…

#

Laby fucks up too many things

sly topaz
#

but yeah, generally, you shouldn't use it for plugin dev

young knoll
#

It’s also possible you have something server side fuckin with packets

sly topaz
#

honestly not out of consideration, hence why I wanted to test vanilla first

paper viper
#

In fact fabulously optimized fucked up once for command shit

sly topaz
#

I'd like to believe laby isn't so fucked up that it wouldn't detect an entity being destroyed and re-spawned

young knoll
#

Me when I just cancel every outgoing packet with PacketEvents

sly topaz
#

"why am I not moving? Oh"

#

@hybrid spoke what plugins do you have

#

is any of them or yours doing anything funny with packets

hybrid spoke
#

none except for mine

sly topaz
#

if you aren't doing anything with packets then that only really leaves you using a cursed spigot fork that isn't sending the appropriate packets or labymod fucking things up

hybrid spoke
#

probably both

#

i just tried on both paper and spigot

#

for spigot the teleport workaround works, for paper even that doesnt work

#

and we were using paper before

#

but the issue remains the same on spigot

#

and that leads me that the rest is either a really weird spigot problem or labymod

sly topaz
#

if it happens to be labymod it'll really fun to tell your players to just not use it lol

hybrid spoke
#

oh its a private SMP

#

so i dont have to worry about that

sly topaz
#

well, assuming labymod support doesn't care about it

hybrid spoke
#

im just too lazy to test it with vanilla rn, i will just live with it lol

#

enough effort have been put into it for private shit

timber eagle
#

yo guys

#

wtf is happening

#
System.out.println("button material - " + inventoryButton.getItemStack().getType()); // not null
        System.out.println("button name - " + inventoryButton.getItemStack().getItemMeta().getDisplayName()); // not null
        this.inventory.setItem(slot, inventoryButton.getItemStack()); // valid slot
        System.out.println("inv slot - " + this.inventory.getItem(slot)); // prints null
#

this code is just suppose to add an item to an inventory

#

and its not doing that??

#

it seems to work outside of the class that i am working in

#

but it doesn't work when im inside the class that manages the inventory stuff

#

it opens the inventory just fine btw

#

so i figured it out, kinda? i have to wait like 1 tick before i can set an item in the inventory or else it will set that slot to null. anyone know why?

timid berry
#

/data get entity @s SelectedItem

this is the output of that command

#

how can i access the custom enchants via code?

shadow silo
#

if you're making a "faction" kind of plugin, is it a good idea to create a permission node for every single faction that all faction members have? Or is it better to just make an API that links to a database that stores members of a faction?

I want to create some permission-based stuff with factions, but don't know which is better.

sly topaz
#

if you are using nbt directly, don't. Use PDC

#

?pdc

timid berry
#

no

#

i need to use nbt

#

basically

#

a pugin uses nbt

sly topaz
#

well, you can't get it without NMS

timid berry
#

and i cant use pdc

#

because

#

then the existing items wont work

#

that players already have ^

sly topaz
young knoll
#

That’s probably what the other plugin uses too

#

Why people still use it when PDC exists is beyond me

timid berry
#

i dont even know bruh

#

i already made enchants with pdc

ivory sleet
#

ChAngE NBtTTT diRectly!!!

timid berry
#

but then my friend says

#

no it needs to be nbt