#help-development

1 messages Β· Page 1213 of 1

worthy yarrow
#

And it's a lobby?

robust helm
#

like docker auto restart multiple lpbby stuff

robust helm
worthy yarrow
#

I mean there shouldn't be any changes to the world if it's a lobby

robust helm
#

but using multiple lobbies with the same world and saving wont work

gilded forge
#

is there any way to set an Item Entity no gravity?

#

i only found a setNoGravity method in nms

robust helm
#

setGravity?

gilded forge
#

oh thanks

robust helm
#

lol

worthy yarrow
gilded forge
#

i searched for setNoGravity but found nothing XD

worthy yarrow
#

Don't think you need to save velocity values though

pseudo hazel
#

yeah thats overkill

robust helm
pseudo hazel
#

moving a player to a different server is already a jarring change

#

losing velocity wont matter

robust helm
#

but rlly annoying with all that copy paste stuff

worthy yarrow
#

I mean you still don't need their velocity unless I guess they were flying? but I thought like teleporting a player already set the velocity to 0 as it were

pseudo hazel
#

yeah

robust helm
robust helm
worthy yarrow
#

That sounds like extra work

robust helm
robust helm
#

thx tho

worthy yarrow
#

Sure!

worthy yarrow
robust helm
#

yea think so too. i need to load items on join anyways

rough drift
#

you'd need yield switch if you want the parenthesis

#

it's basically a return statement for the new switch blocks

smoky oak
#

forgot abt that

glacial narwhal
#

my item menu goes off screen, is there a way to change the orientation of the menu ?

pseudo hazel
#

no

#

its client sided

glacial narwhal
#

alr thanks

pseudo hazel
#

well maybe with shaders

#

but like , good luck xD

#

i dont know how shaders work

glacial narwhal
#

i'm in 1.8 so i dont think so lmao

pseudo hazel
#

the tooltip depends on the position the item is in the inventory

glacial narwhal
#

thanks

glossy laurel
#

Bukkit.getOfflinePlayerIfCached when is a player considered "Cached"? Is it if they have ever joined the server?

remote swallow
#

i think you need to check who adds that method

glossy laurel
#

wdym?

remote swallow
#

that isnt a thing on spigot

glossy laurel
#

fu

#

is Bukkit.getPlayer() save to use off the main thread?

pseudo hazel
#

if it says so in the description

#

otherwise nah

#

Bukkit is usually unsafe outside of the main thread

glossy laurel
#

yeah ik thats why im asking

pseudo hazel
#

yeah then if there is nothing in the docs about it, its unsafe

nova swift
#

doeos anyone know why my fwhitelist isnt working to whitelist bedrock users to my server ?

tepid flicker
#

yes

limber mantle
#

that's not how it's done anymore. when using the offsets i get spammed with this error

#

i don't want redstone tho

chrome beacon
#

Pass a Color to it

limber mantle
#

that's what i'm currently using

river oracle
#

What Color

limber mantle
#

it's ignoring my rgb params seemingly

#

.

river oracle
#

Is that the Bukkit one?

#

Cuz awt has color as well

limber mantle
#

yes bukkit

chrome beacon
#

If it was the wrong one it should throw a different error

#

iirc

#

Are you using ViaVersion/ViaBackwards or any other protocol hack?

limber mantle
#

wait... 😭

#

that's probably it..

#

i forgot to actually test on 1.21 omg i've been using 1.20 still w via πŸ’€

#

mb

#

thanks

split gull
#

Is there a way to create a headless PDC?

warm mica
blazing ocean
#

yeah i think you just want a db

tepid flicker
#

is there a way to make a recipe with an item that stays in the grid after craft? is so then how? can't find any tutorials no it anywhere

smoky oak
#

look at cake

potent atlas
#

Is there any way to register an enchantment made with PDC without NMS and reflection, etc? :/

tepid flicker
chrome beacon
#

I believe they're refering to the bucket

#

That's not part of the recipe however. Items being kept in the crafting grid is controlled by the item itself and not the recipe

#

You'd probably have to listen for when a player crafts and then set the slot item yourself

chrome beacon
#

^ but if you're on 1.21 you can use a datapack to register real enchantments

blazing stream
#

is it possible to send different texture packs for people on different versions? for viaversion

chrome beacon
#

Yes

#

Check their version before sending the resource pack

worthy yarrow
#

@blazing ocean it’s your queue

blazing ocean
#

:D

#

packed my beloved

smoky oak
#

is there a way to query the constructor arguments of a class using reflection?

blazing ocean
glossy laurel
#

Does Player#teleport close their inventory?

blazing ocean
#

opened inventory or player inventory

glossy laurel
#

Let me guess, if its their own inventory it doesnt close cuz its client side?

blazing ocean
#

?tas i'm guessing

undone axleBOT
smoky oak
#

what do you mean getClass isnt static

#

hell

pseudo hazel
#

should it be? xD

smoky oak
eternal oxide
#

Integer.class

smoky oak
#

why... why is my autocomplete not seeing that

#

it works but why

eternal oxide
#

Integer is already the class

smoky oak
#

oh for fucks sake

eternal oxide
#

getClass is an instance method

urban cloak
#

is than an else?

smoky oak
#

no thats case

#

i cannot declare constants because switch needs to be known at compile time apparantly

#

because fuck me

#

bleh i soooo want to do if-else chains now

urban cloak
#

dynamic switch cases would be so weird xd

smoky oak
#

HashMap consumer maybe?

urban cloak
#

what do you need to do?

#

you could just hardcode the class names

#

they wont change

smoky oak
#

true too but i dont have them at hand

#

something about this just feels so wrong

        Class<? extends Tag> clazz = tag.getClass();
        Field field = clazz.getField("data");
        field.setAccessible(true);

        stream.writeUTF(clazz.getCanonicalName());
        switch(field.getClass().getCanonicalName()){
            case "byte": stream.writeByte(field.getByte(tag));
            case "double": stream.writeDouble(field.getDouble(tag));
            case "float": stream.writeFloat(field.getFloat(tag));
        }
echo basalt
#

needs more interfaces

desert aspen
#

Anyone can help me to think about how to make to when it's raining, and a player is in fire, the fire doesn't extinguish?

smoky oak
#

wait whats the difference between getField and getDeclaredField

eternal night
#

getField is limited to public fields iirc

smoky oak
#

ah so thats why its failing

#

wonder why the error message is just 'data' tho lol

#

huh?
this class declares the field 'data' but getDeclaredField(data) isnt finding it

#

its marked as private final but i should still be able to read it, no?

#

ah.

#

obfuscation

#

fml

#

actually related question to this, why does getClass give me the Spigot mapping but the field name is the obfuscated one?

#

shouldnt it be both of either, not one of both?

eternal night
#

"getClass" gives you the spigot mapping?

echo basalt
#

how much you wanna bet it's some compiler fuckery

eternal night
#

like, at runtime the classnames are generally spigot mapped

smoky oak
#

but why arent the fields then

#

bleh

eternal night
#

what class?

smoky oak
#
        Class<? extends Tag> clazz = tag.getClass();
        Field field = clazz.getDeclaredField("data");
        field.setAccessible(true);
eternal night
#

what gives you an unexpected value then?

#

net.minecraft.nbt.NBTTagByte?

#

but yea, spigot does not reobfuscate class names, just fields

smoky oak
#

thats irritating. would paper remap class names to spigot or obfuscated

pliant topaz
#

paper uses mojmaps now afaik

smoky oak
#

god damn it

#

can i tell it to give me the mojmap name

#

probably not tbh

#

though how do i do this check?

rough drift
#

or

eternal night
#

ByteTag.class.isAssignable

rough drift
#

WRONG ORDER

rough drift
#

oh yeah my bad chief

#

got the wrong one, lynx is right

smoky oak
#

the really annoying thing is that i cant make this a switch lol

eternal night
#

(not that there is a child type of ByteTag so == would work)

smoky oak
#

i need to if else chain it

smoky oak
eternal night
#

why not just instance of the tag object?

#

you can do that in a switch

smoky oak
#

wym

rough drift
#

not the class

eternal night
#
Tag tag = ....;
switch (tag) {
    case ByteTag byteTag -> System.out.println(byteTag.getAsByte());
    case StringTag stringTag -> System.out.println(stringTag.getAsString());
}
rough drift
eternal night
#

skill issue + don't care

rough drift
eternal night
#

not worth supporting java 8 users obviously NODDERS

#

but given they were talking about paper remapping, I doubt they are using java 8

eternal night
#

das too old

rough drift
eternal night
#

facts prayge

rough drift
#

I can't wait for new java releases to fix old boring stuff

eternal night
#

can't wait for valhalla

rough drift
#

FR

smoky oak
#

given that spigot spits out spigot mappings, what happens if i go Class.forName("net.minecraft.nbt.ByteTag") (mojmap)?
does it not find the class?

ivory sleet
#

Null restricted types πŸ™

eternal night
#

yes, that won't find a class

#

(on spigot)

smoky oak
#

brilliant

#

at least this aint for dynamic types lol

#

long ass switch it is

rough drift
#

@eternal night what do you tihnk about amber

#

specifically code before the super call

eternal night
#

well, depends xD

#

oh

#

YES

rough drift
eternal night
#

already third preview prayge

#

that is going to be SO nice

#

but yea, same for StableValues

rough drift
#

also records are getting the whole withXYZ stuff built in like hashCode and equals

eternal night
#

468 I am not a fan of

#

yea

#

not a fan of that

rough drift
#

I mean I kinda like it? At the same time not really

#

feels out of place with records

eternal night
#

Syntax supported on specific subtypes of object just

#

feels odd

rough drift
#

488 is interesting

#

but I am wary of the pattern matching

#

feels like a possible recipe for bugs

eternal night
#

Well, just prep for valhalla for sure COPIUM

eternal night
#

so eh

rough drift
#

valhalla is surely not going to have huge repercussions

smoky oak
#

uh. how do parametereised functions work again

eternal night
#

the "space" operator just feels weird af

eternal night
#

the performance gains minecraft will see

#

are crazy

#

given the server is known for just, shitting out small semi useless objects

rough drift
#

Anyways turns out that a lot gets a performance boost from that

eternal night
#

Well valhalla EA builds are out

rough drift
#

like a lot

rough drift
eternal night
#

ah

#

Well, minecraft isn't gonna be too happy given a lot of its small BS types are mutable

#

but that can be solved typing

rough drift
#

it works for like 98% of cases then breaks down because I haven't fucking figured out how to get it to reliably handle lambdas

#

holy shit you have no idea

#

lambdas are a PAIN in the ass

#

anyways still gonna work on it

#

actually I did figure it out

#

it's just annoying to implement

rough drift
#

afaik it doesn't really matter

#

those mutable types still use some form of object to handle themselves

#

like the BlockPos class

eternal night
#

hm?

#

iirc tho, they already moved Vec3I to be mostly immutable

#

the withers are not used anywhere where the originally thing is re-used

#

at least in vanilla, on paper sure to avoid re-alloc

#

but yea, the fact that the value types allow for like, that fancy level of escape analysis where all of their inner values are just lying around on the stack without any allocation is pretty neat

#

like, there was a talk where they literally were able to flatten a full wither method on a value class to be a single registry edit

ivory sleet
#

actually?

#

cz thats huge W

eternal night
#

that was their example

#

does not allocate a single record

#

the int is stored in a reg and just allocated

#

which is also huge because iterators become basically free

#

From Devoxx last year

#

or like this shit

ivory sleet
#

oh woaw

eternal night
#

doesnt even allocate a point

#

just yield you two doubles

ivory sleet
#

incredible

rough drift
#

yeah I love that

#

I am basing my whole language around that concept lol

eternal night
#

I mean, its just c structs

rough drift
#

not really

eternal night
#

but glad to have them in java

#

Well, c structs are just fun ways to describe memory offsets

rough drift
#

c structs can do more things iirc

eternal night
#

I guess

rough drift
#

you can do very neat optimizations with them

eternal night
#

but yea, can't wait to clown on languages with java performance omegaroll

rough drift
#

I don't get their reason to add a new keyword though

#

wouldn't that also conflict with older namings

eternal night
#

value ?

rough drift
eternal night
#

I mean, what else are you donna do

#

you gotta identify shit somehow

#

can't just turn existing stuff into value types

rough drift
#

why not though

eternal night
#

because == exists?

rough drift
#

if it is just primitives & other records you should be able to

rough drift
#

I forget about it

#

I wonder how they'll deal with it

eternal night
#

Well value types compare like primitives

#

non value types have identity

rough drift
#

no I mean, how they'll deal with existing codebases with the variables named like value

eternal night
#

?

#

have you considered naming a variable record

rough drift
#
var value = "hello";
eternal night
#

var record = 1; works

rough drift
#

oh wait it does?

eternal night
#

yea?

rough drift
#

oh damn

ivory sleet
#

I mean you also have contextual keywords vs reserved keywords

split gull
smoky oak
#

why does this produce a NoSuchMethodException
clazz.getConstructor(byte.class)
when clazz is instance of ByteTag whose constructor is
ByteTag(byte b0) ?

buoyant viper
smoky oak
#

im a bloody idiot

#

thatd probs do it

buoyant viper
#

happens to the best of us

#

reflection sux

smoky oak
#

urgh ikr

#

all this couldve been avoided if PDC could just spit out the PDT for given keys

eternal night
#

it can't omegaroll

#

Well, it could give you a default, but like that might not be the data type used to store it

smoky oak
#

wait what
object.getClass() -> class java.lang.Byte
clazz instanceof ByteTag.class

clazz.getDeclaredConstructor(byte.class) spits out non-null constructor
clazz.getDeclaredConstructor(object.getClass()) causes noSuchMethodException

#

like ?????

#

i mean i can sidestep this with a switch but like

eternal night
#

java.lang.Byte != byte

smoky oak
#

ah

#

is there like a way around that

eternal night
#

Well, why is object.getClass() yielding java.lang.Byte

smoky oak
#

bc im passing a byte to a semi generic method

#
private static Tag constructTag(Class<? extends Tag> clazz, Object object) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Constructor constructor = clazz.getDeclaredConstructor(object.getClass());
        constructor.setAccessible(true);
        return (Tag) constructor.newInstance(object);
    }
#

cant have nice things apparantly

eternal night
#

you cannot no

#

wtf are you even doing xD

#

What is the xy

smoky oak
#

'serialize and deserialize PDC'

eternal night
#

just use the compound tag?

#

or use paper πŸ˜‰ but yea, compound tag and off you go

smoky oak
#

hm

eternal night
#

The pdc impl has a toTagCompound method

smoky oak
#

i see how compound can be turned into a stream but where's the reverse?

eternal night
#

if you wanna string it, even easier

#

PDC impl has serialize

smoky oak
#

no it aint

#

thats why im here

eternal night
#

I am looking at it

smoky oak
#

?????

#

classpath

eternal night
#

that is not a paper method

#

its on the impl, but yea

smoky oak
#

idk what to tell ya i dont see it

eternal night
ivory sleet
#

on the impl

eternal night
smoky oak
#

ah. and the implementation is spigot innit

#

greeeeeat

eternal night
#

You are using nms already?

#

Whats the issue with just using impl

smoky oak
#

honestly i didnt see this one, though wouldnt this not exist on paper? or do they remap it to their own version of it?

eternal night
#

the type also exists on paper

#

it isn't mojang owned, so it isn't obfuscated either

smoky oak
#

do you know where the TagCompount -> PDC conversion is?

#

i cant seem to find it

#

oh its putall innit

eternal night
#

yea

smoky oak
#

12 hours wasted on ultimately 6 lines of code 🀦

eternal night
#

Β―_(ツ)_/Β―

#

such is the xy

smoky oak
#

well to be fair ive been talking about this tangentally for a few days now

eternal night
#

Never caught the original goal πŸ˜… sorry

smoky oak
#

nah s' fine lol

#

im not mad or anything, just disappointed in myself

eternal oxide
#

Asking half questions does that

smoky oak
#

i read through PDC but not the implementation coz im an idiot

#

im pretty sure i said i wanted PDC serialization

eternal oxide
#

not that I saw

eternal night
#

(obviously if you are ever dropping spigot, paper has methods to de/serialize on the API, but enough shilling)

eternal oxide
#

pft who uses paper these days

eternal night
river oracle
eternal night
#

hater

quaint mantle
#

how to set max stack size?

eternal oxide
#

setMaxStackSize on Inventory or ItemMeta, depending on which you want to limit

sleek island
#

https://paste.md-5.net/vawopatoku.java
i am trying to intercept entity packets and set them to a serverplayer so that the client treats all packets from the intercepted entity as the serverplayers

#

but i dont think im doing it properly

warm musk
#

hi guys i have a problem and i cant solve for an hours

problem;

  • Code
private static Economy economy = null;
public void onEnable() {
        if(!setupEconomy()) {
            this.getLogger().severe("Economy can't setup.");
            this.getLogger().severe("Plugin Disabling!");
            this.getServer().getPluginManager().disablePlugin(this);
            return;
        }
}
private boolean setupEconomy() {
        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        economy = rsp.getProvider();
        return economy != null;
    }

it never hooks

eternal oxide
#

Do you have an economy plugin?

warm musk
eternal oxide
#

which one, and is it supported by Vault?

warm musk
eternal oxide
#

no reason that code would not work then

warm musk
#

i think too

eternal oxide
#

unless you are shading vault

#

?paste pom

undone axleBOT
eternal oxide
#

you are shading vault

#

set scope to provided

warm musk
weak badger
#

import net.minecraft.server.v1_12_R1.MojangsonParseException;
excuse me, why this dependency cant search in Maven repository?

eternal oxide
#

net.minecraft is not on a repo as it's proprietary Mojang/Microsoft code.

weak badger
eternal oxide
#

its nms. You need to run Buildtools for the version you need, then depend on spigot instead of spigot-api in your pom

#

?bt

undone axleBOT
weak badger
#

tks,now iβ€˜ll copy another plugin ,it used: net.minecraft.server.v1_12_R1.MojangsonParseException;

#

just for catch a exception , i start gloable search in IDEA ,just this exception used net.minecraft.server.v1_12_R1.MojangsonParseException; ,i dont see any use this import

#

try {
return ItemUtil.jsonToItem(string.replace("/|/", "'"));
} catch (MojangsonParseException e) {
return new ItemStack(Material.AIR);
}
}

eternal oxide
#

if thats all it does change it to Exception e

weak badger
torn shuttle
#

that moment when you've completely forgotten how one of the core, cursed systems you wrote 5 years ago works

#

like, I have no idea of how this ever worked and I am now not surprised that it doesn't

weak badger
#

and i ready create auth action in Paper plugin,if i want connect remote database to auth plugin ,what should i do

eternal oxide
#

comment, comment, comment!

torn shuttle
#

ironically it's not really a lack of clarity so to say

#

it's that there's three parallel systems that ended up getting built over time

#

and I have no clue of how I ended up routing this behavior

#

managers on top of managers

#

man this definitely is overcooked

#

I should rewrite it for the (unironically) 10th time

weak badger
#

just like ,user load my plugin , send a Http request,request my remote interface,i'll verify it's phone ,ip address ,or some filed

#

and in my remote db,save some record to verify this request ,if( xxxUtils(String phone ,String ipAddress).equals(DBrecord))

#

it should to say :remote verify auth use local config, what should i use in Paper plugin project , please

unborn hollow
#

how do you "kill" a Text Display Entity?

torn shuttle
#

same way you kill any entity

#

you can remove() it

unborn hollow
#

tyvm (i didn't know how to kill any entity in the first place)

weak badger
#

in Paper plugin ,i β€˜ll send Http request to remote server ,what is my steps to do this,can you help me , please

solar mica
#

Hiring a dev for my server.

remote swallow
undone axleBOT
weak badger
#

tks tips me

nova notch
#

whats with the arbitrary spacing between commas?

remote swallow
#

Translator I'm guessing

torn shuttle
#

ah man

#

so

#

non-persistent entities aren't surviving to chunk unload events

#

by which I mean, at the time of the chunk unload they are already gone from the chunk's entity list

#

which kinda makes sense I guess but truly complicates things for me

#

going to have to open my third eye for this one

#

I don't think there's any dancing around this one

#

I just have to bite the bullet and make a watchdog task

#

I want to rely on my own unloading but mc has been incredibly flaky with that

#

either double loading or double unloading chunks

eternal oxide
#

not sure that will run for non persistent Entitites

torn shuttle
#

was about to test if they get detected

torn shuttle
#

these are just ghosts in the api

#

we love that

#

well, well, well

#

what do

#

wait what now, why are they duplicating now

#

what did I do

worthy yarrow
torn shuttle
#

hm

#

I just might

#

there's no shot right

#

I swear this used to work

#

something must've changed while I wasnt' looking

worthy yarrow
#

I don’t believe the great magma could be stumped

torn shuttle
#

truly the only person powerful enough to stump me is my past self

worthy yarrow
#

Or rather your future self going back in time o.O

torn shuttle
#

I do enjoy playing 4d chess with myself

worthy yarrow
#

You’re like Sheldon but sociable and smarter (but that was a given)

torn shuttle
#

Einstein, Mozart, DaVinci, all dead! Only I remain

#

ok I don't get it

#

according to my testing I see the chunks unloading, and none of the chunks unloading have entities

#

and it never removes the unloading entities

#

even if they're seet to not be persistent

#

like, it never tries to remove them in the first place which is why I can't detect them

#

but at the same time I can't spot the entities in the unload event of the chunk

#

what am I even supposed to do

worthy yarrow
#

I guess you’d have to remove the entities before the chunk unloads?

#

But now what’s the point in the entities being β€œnon persistent” if this is occurring anyway smh

torn shuttle
#

I can't guess a chunk isa bout to get removed

#

I can only scan if an entity is no longer valid

worthy yarrow
#

Oh I see

#

Hmm

torn shuttle
#

but that's a very poorly scaling solution when I have literally tens of thousands of mobs I am managing

#

I can probably get away with only scanning the loaded ones but falling back to that is something I was hoping to avoid

worthy yarrow
torn shuttle
#

I guess I have no way around it

#

it's just too flaky

worthy yarrow
#

I don’t think there’s really a more β€œefficient” way since the api is just bugging apparently

torn shuttle
#

I swear elitemobs 10 will be built around implementing my own top to bottom game logic

worthy yarrow
#

It might… kek

torn shuttle
#

justa game engine built into mc

worthy yarrow
#

EliteEngine

torn shuttle
#

has a nice ring to it

worthy yarrow
#

Well that’s one thing to look forward to… probably the only thing

vital leaf
#

im gonna assume that spigot/bukkit doesn't directly support datapack creation within the plugin? Otherwise I just wasted a lot of time with my plugin making it copy a /data folder in the jar to the world folder as a datapack,,,

eternal oxide
#

Not sure you can add a datapack to the server while its running though

vital leaf
#

oh i add it before running lol

eternal oxide
#

Try and then call Bukkit.reloadData()

vital leaf
#

it's moreso so i can create datapack oriented details, like custom armor trims and recipes, through the plugin files rather than making a manual datapack in every server instance

red sedge
#

are noteblocks still the best wya to do custom textured blocks

vital leaf
#

i'd say so, as you can still keep noteblock functionality while having them be custom blocks

chrome beacon
young knoll
#

:(

#

And most of the fancy datapack stuff doesn’t work with reloading

pseudo hazel
#

like generation

young knoll
#

Mhm

grim hound
#

Does anyone know how I can log packets and their content clientside?

grim hound
mortal vortex
#

what does client side mean in your use case? Storing the data on the client?

grim hound
#

for my own use

mortal vortex
#

what does that have to do with spigot.

grim hound
#

curseforge didn't know

#

so I came here

amber fjord
#

packets from a server? Im confused why you would need them

pseudo hazel
#

so basically

#

its like a server, but reverse

#

just listen for whatever the server sends

mortal vortex
#

use MCP and add some logging code to CleintPacketListeber

grim hound
mortal vortex
#

Why not use a mod?

grim hound
grim hound
mortal vortex
#

Oh you’re trying to capture what the handshake packet looks like for user authentication?

grim hound
#

?

young knoll
#

Well, minecraft.wiki.vgℒ️

grim hound
#

wait, does this stuff allow you to modify the client src as you please?

mortal vortex
#

Yeah

#

pretty much

#

It’s how hacked clients are made.

young knoll
#

Ew

grim hound
#

yooooo

young knoll
#

No way they still use MCP

grim hound
#

finally

young knoll
#

And not something like loom

mortal vortex
#

You just need to rewrite the class I told you about, with Netty.

#

I think there’s a class called NetHandlerPlayClient.

#

I don’t remember.

amber fjord
#

just a quick question thst im pretty sure i know the answer to but i cant find out rn, can i have a hashmap with a list as the value?

chrome beacon
#

yes

mortal vortex
#

You mean like:

HashMap<String, List<String>> map = new HashMap<>();
slender elbow
#

Multimap :pogging:

amber fjord
#

yeah but UUID and List<UUID>

#

im tryna have a trust api plugin

mortal vortex
#

Cool! Good luck on your project!

quaint mantle
#

Does 1.8 support NBTTagCompound?

chrome beacon
#

1.8 has NBT tags yes

quaint mantle
#

Thanks

orchid trout
#

newer clients are usually just fabric mods

young knoll
#

?howold 1.8

undone axleBOT
chrome beacon
blazing ocean
#

cc @shadow night

#

you can just do stuff

smoky oak
#

if i have to store true/null for every block in a chunk, what's the most efficient (read: fastest to load/store) method to do so? Byte arrays per layer?

young knoll
#

BitSet

smoky oak
#

hm. no serializer but i doubt heavily i cant just shove it into a byte stream

#

ty thatd do it

quaint mantle
#

How exactly do I import two different versions of NMS into my pom file?

#

Do I have to use uhh modules?

young knoll
#

yes

quaint mantle
#

IntelliJ freaks out whenever I do this

#

Something like this isn't in the project root

mental drum
quaint mantle
#

Any other way to do it which doesn't involve modules?

smoky oak
#

i stg every link tha aint spigot is jeff

ancient plank
#

is a good blog

echo basalt
#

I should make a blog one day

#

where I just toss all my posts

blazing ocean
#

astro my beloved

smoky oak
#

is there a way to gauge the expected time for java code to run, or is the only option to profile it?

shadow night
blazing ocean
#

Yep

eternal night
#

I mean, there is just "this code could be improved" things

#

but like, "time" is obviously super dependant on the system too

echo basalt
#

I have work machines that are so slow to the point where multi-threading it takes longer than single-threading

left jay
#

so what plugins would you guys recommend for storing player stats in 1.21.1, like health defense speed etc?

desert aspen
#

how can i check in a world if its day or night?

chrome beacon
#

You check the time

#

using getTime

burnt bobcat
#

hello, im trying to set entitytype on TrialSpawner but i think there is not a method to do it (1.21.4)

#

i tried to copy blockstate and blockdata and it didnt work

burnt bobcat
#

i used it to creature spawner but cant do it for trialspawners

eternal oxide
#

I've not heard of a TrialSpawner, must be a nerw Block

burnt bobcat
#

is the spawner of trial chambers (new dungeons)

eternal oxide
#

Its in teh TrialSpawnerConfiguration

#

getNormalConfiguration() or getOminousConfiguration()

vague dawn
#

hey, is there someone really good with Databases? MySQL? i need help

undone axleBOT
#

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

vague dawn
#

I have a problem with the addVoteToPlayer method... when the starting value is 0, it added 1, but when the starting value is something else then 0, its not working, it just stayed 1, bcs before adding the one, it goes back to 0, idk why...

vague dawn
wet breach
#

0+1 is still 1 just fyi

vague dawn
#

but when i do it again, it should do 1+1 right?

wet breach
#

depends

#

cached values are a thing

vague dawn
#

like I want the value to increas 1 by 1..

is different table its working normal

#

in this table its working normall

wet breach
vague dawn
#

nope

#

but it should work like this right?

wet breach
#

anyways I don't know your exact setup but you obviously don't safeguard or bother vetting the data you are putting in is even accurate

#

and I have no idea if there is anything else that touches that data

#

I will give an example, whatt happens if votes happens to be a negative value? you don't bother checking for that lol

vague dawn
#

its just very simple method, i guess there is no need to it (i do not understand it :D), but basically it should add 1, like it does add it, but the value is still 1.. not 2 or 3 when i run this method again πŸ˜„

i am adding balance to this table and its working fine πŸ˜„ idk where is the problem

sorry for my english, its not my native language

wet breach
#

well if you don't understand it, then that means you probably should learn it better. Both Java and MySQL have a thing where it will cache stuff and occasionally this can be a problem. IE you are trying to do things optimally and not creating a bunch of variables so you are going to reuse variables etc

vague dawn
#

yeah, i am just like on begginer 2 πŸ˜„ i am still learning

#

nvm, thanks for trying to help

#

still dunno what to do πŸ˜› need to study more

wet breach
#

instead of using executeupdate

vague dawn
#

if you have some materials about it, you cen send it to me pl

wet breach
#

try using execute query

#

or execute statement which ever it is called

vague dawn
#

i will try it

#

nope

wet breach
#

are you making use of a connection pool?

#

if not, then you need to be closing out your statements and connections

vague dawn
#

i will implement it

vale hawk
#

Hello, can someone help me with a plugin?I have a problem because if I install this plugin I can't get you to do it commando

#

Essentials

chrome beacon
worthy yarrow
wet breach
worthy yarrow
#

breh

#

Imagine actually looking at the information

#

I gotta stop assuming so much

wet breach
#

lol

robust helm
#

        String sql = "INSERT INTO sync_data (id, loc_x, loc_y, loc_z, loc_yaw, loc_pitch, vel_x, vel_y, vel_z)" +
                "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" +
                "ON CONFLICT (id) DO UPDATE SET" +
                "    loc_x = EXCLUDED.loc_x," +
                "    loc_y = EXCLUDED.loc_y," +
                "    loc_z = EXCLUDED.loc_z," +
                "    loc_yaw = EXCLUDED.loc_yaw," +
                "    loc_pitch = EXCLUDED.loc_pitch," +
                "    vel_x = EXCLUDED.vel_x," +
                "    vel_y = EXCLUDED.vel_y," +
                "    vel_z = EXCLUDED.vel_z";

guys am i doing sql correctly?

#

no way i cant js do something like INSERT OR UPDATE

echo basalt
#

depends on the sql dialect

#

basically sqlite, postgres and mysql have different "dialects" and some let you do this

#

some let you ON DUPLICATE KEY UPDATE

robust helm
#

oh mysql's REPLACE seems to be what i need

#

ty! ill switch to maria then ig

smoky oak
eternal oxide
#

google

#

or Look in the SQL folder of GroupManager

#

I did all the syntax for INSERT for H2, MariaDB, MYSQL, PostgreSQL and SQLite

cedar turtle
smoky oak
eternal oxide
#

An Explosion Location is not going to match the Players Location

#

ah I see

#

do some sysout

#

Also, are doing enough testing? as you only cancel 50% of the creepers

cedar turtle
#

yes so all 100% of the creepers do damage

#

it's about the damage to players/entity and not to blocks

eternal oxide
#

sysout the distanceSquared for each location

wet breach
grim hound
#

does this not bring any output

#

nothing in the forEach is done

#

already love kotlin

#

breaks for no reason

#

this works no problem

blazing ocean
blazing ocean
#

{ ... }

#

you are creating a lambda there

grim hound
blazing ocean
#

...

#

forEach { material -> ... } already is a lambda

#

but you are putting { /* logic */ } in there

#

it's like doing ```java
forEach((material) -> {
() -> {
// logic
};
});

grim hound
#

okay

#

thanks

blazing ocean
#

and for the love of god stop putting the word sex in your code

grim hound
#

so I made sure to use a word that no other dev would use

#

very efficient

smoky oak
#

a bukkit provided serialization method spits out a string; is it better to store that as a string or byte[] blob when using MySQL? I'm debating if i should use ByteArrayStreams so that all the data is Blobs

eternal night
#

which one

smoky oak
#

asking generally coz theres a bunch of data im going to store as byte[]; but in this specific case its CraftPersistentDataContainer

desert aspen
#

how can i detect when a item gets cooldown? like enderpearls or shield colldown

cedar turtle
#

i have adjusted it again. it seems to work sometimes, but completely randomly. sometimes one 50% does no damage, sometimes the other 50% and sometimes both https://pastebin.com/cz6C0ZsM

smoky oak
#

uuuuuuh i just found a new keyword lol

#

wtf is 'strictfp'

#

ah interesting... its math related

drowsy helm
#

Just precise floating point

worldly ingot
#

It's also practically useless in modern Java

amber fjord
#

is API the correct terminology for a plugin that serves mainly as a dependency for methods and object storage file creation?

#

Wow thats vague lemme try again

mortal vortex
#

The answer is yes

amber fjord
#

it has creates files and stores data and implements methods

#

ok cool

mortal vortex
#

or library / framework

amber fjord
#

ima go with api bc i dont wanna refactor everything lmao

mortal vortex
# amber fjord ima go with api bc i dont wanna refactor everything lmao
  • If your plugin provides methods and object storage functionality that other plugins use as a dependency, "API" is generally the most accurate term.
  • If it acts more like a helper library that other plugins call without adhering to strict interfaces, "lib" might suit better.
  • If it enforces a structured approach to plugin development or extends core functionality heavily, then "framework" is appropriate.
smoky oak
#

im calling mine a library

worldly ingot
#

And API basically just means it has publicly callable functions :p

#

Anything is an API if you want it to be

smoky oak
#

though you can get around that if you're up to dealing with reflection

smoky oak
#
'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 87, column 21
It is highly recommended to fix these problems because they threaten the stability of your build.
For this reason, future Maven versions might no longer support building such malformed projects.
#

wot

#

i didnt touch anything πŸ˜…

#

hm its in the thing for using mojmaps

tame plume
#

sure ? is it not your maven compiler plugin version which is missing ?

eternal night
snow spindle
#

is there any way of sending an actionbar to a player?

drowsy helm
#

Are you wanting to use components

snow spindle
#

?

mortal vortex
worldly ingot
safe talon
#

sorry guys, i have a problem with spigot right now, i pay this plugin and i dont give AdvancedEnchantments... i need support :c i have all details for the payment.

@lost matrix @ancient plank @ivory sleet @young knoll
Please!

mortal vortex
#

Why are you pinging randoms

safe talon
mortal vortex
mortal vortex
safe talon
#

πŸ™„ i dont have support with this payment

#

its for a bug of the spigot page

#

I tried to contact the plugin owner but was just ignored

mortal vortex
safe talon
#

I didn't mean to offend with that... in my country I guess it means something else, I try to do things in the best way

mortal vortex
#

But I literally asked you, what does what you're talking about have to do with #help-development?

safe talon
#

I'm trying to contact some kind of support, does that exist here on this discord?

#

sorry with that

mortal vortex
#

You haven't explained what it is that's the issue. Is it a billing issue??

smoky oak
#

how do you do this again?

#

or do i just have to rewrite the entire constructor

drowsy helm
#

super(params)

#

Or do you mean call another version of ths constructor

#

this(params) if so

smoky oak
#

ah ty
btw, is there a maven <something> such that the source code / javadoc gets incorporated into the resulting file?

drowsy helm
#

You can generate javadocs

#

Is that what you want?

smoky oak
#

y

warm musk
#

how can i solve?

warm musk
smoky oak
#

uh, wasnt it new File(Directory, filename) ? why would that possibly just create another folder with filename as it's name? im calling mkdirs(); createNewFile();

chrome beacon
#

call mkdirs on the directory

smoky oak
#

?

chrome beacon
#

If you're calling mkdirs directly on that file object you're telling it to make that as a directory

smoky oak
#

theres no getDirectory

#

do i need two separate file objects?

chrome beacon
#

one for the directory and one for the file

summer scroll
#

Does boss bar from EnderDragon or Wither will be listed to Bukkit#getBossBars?

smoky oak
#

cursed, but works. ty olivio

#

now for the sql errors :v

summer scroll
#

Ah, so boss bar from command, thanks.

#

I really need to read the jdocs before asking here, my bad

chrome beacon
smoky oak
#

well all i need is that file, and given that i get this
CREATE TABLE FAILED WITH: [SQLITE_ERROR] SQL error or missing database (incomplete input)
i have a feeling the issue is no longer the absence of a file lol

chrome beacon
#

Send your SQL

smoky oak
#

ye i checked that

#

forgor the closing ) im pretty sure

#

if it still doesnt work imma post

#

well its not throwing an error anymore

#

wheres my inspector tool...

#

god damn it it doesnt work

chrome beacon
#

what about it doesn't work?

smoky oak
#

it throws an error that its incapable of opening the database file

#

bleh i had a working tool for this once but hell if i remember the name

chrome beacon
#

I usually use HeidiSQL

#

but if you have Intellij ultimate it's built-in

smoky oak
#

im on hammer & sickle edition

#

ah, found one that works

#

db browser sqllite

#

ah yes chunk3d oops

amber fjord
#

yo im bouta lose it how to I add a plugin dependency to my plugin that is a plugin that I made?

#

i added the dependency with the right groupid artifactid and version

#

but idk what to do from here

smoky oak
#

show the part of the pom where you do

#
  • what exactly is the issue? theres more than one way this can break
amber fjord
#

im pretty sure i figured it out im just gonna test it rq

quaint mantle
#

?paste

undone axleBOT
amber fjord
#

yeah no I got it

sleek island
#

https://paste.md-5.net/vawopatoku.java
i am trying to intercept entity packets and set them to a serverplayer so that the client treats all packets from the intercepted entity as the serverplayers
but i dont think im doing it properly

smoky oak
#

can you catch runtime exceptions?

mortal vortex
#

Exception catches runtimes

smoky oak
#

what does this mean?

sullen marlin
#

means you should do try (PreparedStatement ps = ...) { etc etc }

smoky oak
#

see i did do that

#

wait in parenthesis?

#

what does that change?

quaint mantle
# smoky oak

try(PreparedStatment p = prepareUUIDStore(key)) {}

smoky oak
#

i am doing that now

#

what i want to know is what that changes

quaint mantle
#

It closes when scope dropped

drowsy helm
tepid flicker
#

is there a way to make a recipe with an item that stays in the grid after craft? is so then how? can't find any tutorials to it anywhere

smoky oak
#

cake; transmute the item into itself

mortal vortex
#

You could have your recipe include a custom item, which is modeled after the bucket.

#

Or the other item is of course to just insert the item back into the grid using an Event

upper hazel
#

guys in yours comunity exists standard architecture? What layers of classes do you mostly have? And what are they usually called

#

I started learning this when I started developing websites and there's a huge standard in backend

#

like (controller-> service -> repository -> dto -> controller)

hushed spindle
#

bit of a question with what the standard is in animations in minecraft
lets say i want to display a pixel animation of a circle getting bigger, is there a consensus on how that should be done? should you capture each frame of that animation in like an item model and display it with item display entities, changing the item of the model each tick?

#

or is there a better way to do it

tepid flicker
#

in the head

drowsy helm
hushed spindle
#

im not asking that

drowsy helm
#

And generally yes, have a value for each tick or a mapping function

hushed spindle
#

the circle was an example

#

could be any animation like a stick figure or whatever

drowsy helm
#

Yep, it’s the only way you can do it

hushed spindle
#

alrighty, thank you

grim hound
#

does anyone know what might be causing the mcp build to fail?

#

only changed these two

blazing ocean
#

ask mcp

drowsy helm
grim hound
grim hound
blazing ocean
#

why are you using mcp in the first place

drowsy helm
#

What an informative error

grim hound
grim hound
drowsy helm
#

TRy run verbose

blazing ocean
#

i mean there's not really a reason to use mcp with modern versions

grim hound
#

that task doesn't even exist

#

fair... enough?

blazing ocean
#

again, you should ask mcp

#

this is spigot

grim hound
blazing ocean
#

issues or something

#

it isn't even maintained anymore and really not worth using

grim hound
#

2 years, no response

eternal oxide
#

WHY are you trying to use mcp for 1.18?

blazing ocean
#

sounds like you should use one of the better alternatives then

grim hound
blazing ocean
grim hound
#

clientside

blazing ocean
#

mache supports the client too

chrome beacon
#

Fabric is also an option

grim hound
#

ah yeah okay

#

it does, alright

blazing ocean
wooden frost
#

Using adventure api HELP FOR THE LOVE OF GOD, how do you edit the stay/fade time on a title part. My brain is mELTING trying to find anything of use.

robust helm
blazing ocean
#

lol

#

Title.title(mainTitle, subtitle, Title.Times.times(fadeInTime, stayTime, fadeOutTime))

cinder abyss
#

Hello, how can I keep EventHandler annotation in proguard ?

blazing ocean
#

does proguard remove it or something

cinder abyss
#

yeah

blazing ocean
cinder abyss
#

I tried pro -keepclassmembers class * extends org.bukkit.event.Listener { @org.bukkit.event.EventHandler public *; }
But it changes nothing

robust helm
#

Im syncing player data between my lobby servers, using an sql database. should i worry about the player changing servers faster than my plugin can write to the database and commit changes?

robust helm
wooden frost
#

Thank you all

#

genuinly thankfull for your existance

#

god blessπŸ™

robust helm
blazing ocean
#

ofSeconds

robust helm
#

ooh

cinder abyss
wooden frost
blazing ocean
#

Audience#showTitle

cinder abyss
blazing ocean
#

cobblemon isn't spigot

warped cradle
#

its just datapack related

blazing ocean
#

and this is for spigot development

warped cradle
#

umm no πŸ˜…

blazing ocean
warped cradle
#

just thought might get some datapack help

#

my bad

#

😦

buoyant viper
junior lynx
#

Hello, I'm developing a plugin and I'm wondering how I can build a schematic world edit in one place with spigot 1.8.8

blazing ocean
mortal vortex
junior lynx
mortal vortex
#

To be honest. I didn’t even know world edit had an API. Ik wg does but not we.

junior lynx
blazing ocean
#

bukkit is dead

chrome beacon
#

Wait that was the WorldGuard version πŸ’€

blazing ocean
junior lynx
buoyant viper
mortal vortex
#

Curse you, Curse!!

buoyant viper
#

poor BukkitDev and MinecraftForum

mortal vortex
#

F

cinder abyss
glacial narwhal
#

Hey, how can i update a scoreboard, i saw that you need to reopen it, but just doing player.setScoreboard(scoreboard) doesn't seem to work, i tried to remove the scoreboard with player.setScoreboard(null) gave an error.

buoyant viper
#

looking at code for one of my plugins, should be able to just setScoreboard once and then thatll be it

#

updating individual values for teams/objectives is all i do after

echo basalt
#

for a flicker-free scoreboard you want to just use a scoreboard and update teams

glacial narwhal
#

I didn't use teams, and my tutorial didn't use teams, could you explain what do you mean by teams?

robust helm
#

is there any way to register permissions at runtime? like without plugin.yml

chrome beacon
#

Yes

#

Make a permission object

robust helm
#

and then?

chrome beacon
#

That's it

robust helm
#

i did that but it didnt show up in luckperms

#

nvm it did im stupid

#

ty

chrome beacon
#

Do make sure to reuse that permission object

#

otherwise you'll hurt performance quite a bit

robust helm
#

alr ty

floral pond
#

Hello, what is the best way to keep track entities between 2 restarts ?
Currently i am spawning entities as non-persistent so they are deleted when the chunk is unloaded and are spawned back when their chunk is loaded with ChunkLoadEvent but it does not work on spawn chunk that are always loaded.
I can always add some code to handle those chunks but i was wondering if there was a better way.

smoky oak
#

depends entirely on the purpose they have

#

but you most likely will end up needing chunkload one way or the other

chrome beacon
floral pond
chrome beacon
#

You mean the spawn chunks are loaded before your listener?

floral pond
#

however the listener is set up before the actual spawn of the chunk if my test prints are correct

chrome beacon
#

You can set load to startup in the plugin.yml

#

Should cause the plugin to load before the worlds

floral pond
#

oh i did not know that

chrome beacon
#

That ofcourse means you can't reference the worlds during load which usually isn't an issue but keep that in mind

smoky oak
#

actually, isn'T there an event for when the server finishes loading? couldn't you just scan over spawn chunks then?

floral pond
floral pond
chrome beacon
#

Give it a try and see what happens

floral pond
#

Alright thank you all

glacial narwhal
#

Hey, how can i update a scoreboard, i saw that you need to reopen it, but just doing player.setScoreboard(scoreboard) doesn't seem to work, i tried to remove the scoreboard with player.setScoreboard(null) gave an error. (I do not use teams)

chrome beacon
#

You should be

proven kite
#

import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;

public class guiListener implements Listener {


    @EventHandler
    public void onClick(PlayerInteractEvent e) {

        if (ChatColor.translateAlternateColorCodes('&', e.getView().getTitle()).equals(ChatColor.AQUA + "Select Kit")) {

        }
        

    }

}

could someone tell me whats wrong with the if statement?

#

like .getView doesnt work

chrome beacon
#

Don't detect inventories by their name

#

?gui

proven kite
#

I will only have like 2 huis

#

guis

#

maybe 3

chrome beacon
#

inb4 a user renames a chest

proven kite
#

they cant cus first of all this is a colored text and second its a pvp server

#

they wont be able to get stuff to do it

#

Im trying to make a kit selector for duels

surreal wadi
#

can anyone help me i want the plugin/mod which works like squid game

chrome beacon
#

What do you need with

chrome beacon
blazing ocean
#

didn't vulcan do this

chrome beacon
#

It did

proven kite
blazing ocean
#

and then you could just rename a chest and get op

surreal wadi
#

red light green light , mingle and if glass brigde is there or not it not mater's

proven kite
surreal wadi
#

no

chrome beacon
chrome beacon
#

yes

proven kite
#

Or pay some random dev idk

surreal wadi
#

is there not any plugin ?

proven kite
#

Prob no

chrome beacon
#

πŸ€·β€β™‚οΈ who knows there might be

#

Either way this is the wrong channel

proven kite
#

Idk why would anyone make a squid game plugin

chrome beacon
#

Break down the problem

surreal wadi
#

so how did that yt creators are making video on squid game ?

proven kite
#

please tell me you are joking

surreal wadi
#

no im not

smoky oak
proven kite
#

they paid devs to code a custom plugin for them XD

#

for a video

#

they dont make vids about public plugins because no content

surreal wadi
#

oo

proven kite
#

they pay money to gain more money

smoky oak
#

i bet i can make a worse version of whatever they used in the video

proven kite
#

from views

surreal wadi
#

ooo

smoky oak
#

oh hell naw

#

you can hunt me with gui shit

#

other than that im decent

proven kite
#

I dont know how to make a gui...

echo basalt
#

big business

#

I've lived that life for a while

proven kite
#

but Im reading

#

this