#help-development

1 messages ยท Page 357 of 1

mortal hare
#

use ConcurrentHashMap

#

instead

#

to fix this

trail lintel
#

Ahhh very good, I will now try and code this thing and will report back

mortal hare
#

ok

#

imagine how much less pain you'll have if this shit would've gotten fixed already

trail lintel
#

Lolol no kidding, I am learning things about packets though which is going to be useful

green prism
#

help

trail lintel
#

I've been writing a game engine for a small project for the past two years and am dreading making it client/server based. Although its all ECS based so I expect writing code to serialize the components will basically be the bulk of the work

mortal hare
#

its cleaned when inventory is closed

#

leaving the server, inventoryclose() would get executed iirc

trail lintel
#

could prob just store player UUID or something instead too

mortal hare
#

true

#

this whole implementation is a big smelly hack anyways

#

๐Ÿ˜„

trail lintel
#

You know what I find strange though

green prism
#

guys, do you ever used ACF?

mortal hare
#

but at least its cross version compatible

trail lintel
#

why cant I just do something like inventory.getId()

#

why all this weird hackiness =[

mortal hare
trail lintel
#

fair enough haha

mortal hare
#

it exists deep inside minecraft server code

#

its just hidden

#

from api side

trail lintel
#

Ok one final question before I start getting into it

#

Is there a way to only execute a piece of code if a given plugin is installed? I imagine there is some weird reflection stuff I can do but there might be an easier way

mortal hare
#

Bukkit.getPluginManager().getPlugin()

twilit roost
#

does ProxiedPlayer work also when player isn't connected?

mortal hare
#

note that this is dependant on plugin's name provided in its plugin.yml

kind hatch
trail lintel
#

Ohhh yeah thats good stuff. I will go that route

#

hopefully the package name doesn't change, but I imagine a plugin as widely used as protocollib will be good about that

green prism
#

ACF (Aikar Command Framework) and custom args.

trail lintel
#

this feels so hacky ๐Ÿคฃ but sometimes you just have to embrace the jenk

#

its really incredible the amount of stuff you can do server side in this game, spigot is amazing

#

combined with resource packs you can make stuff almost as cool as modded and it feels native

river oracle
#

We still need custom blocks

#

That would make plugins insane

#

I mean you can do that it's just jank and laggy

trail lintel
#

Oh snap is that not something that is achievable atm? I basically am making "custom items" using the persistent data container

#

could you do the same for a block?

river oracle
#

Kinda

kind hatch
#

We've had custom items for a while now. Custom blocks not so much.

river oracle
#

You need to use armor stands iirc

trail lintel
#

oh wow, that is hacky haha. I would like to learn more about that

kind hatch
#

Or re-textured blocks like barriers or noteblocks.

mortal hare
#

coming soon

#

you can scale blocks

#

and entities

#

in 1.20 snapshots

trail lintel
#

that is cursed

river oracle
mortal hare
#

no

remote swallow
#

no

kind hatch
mortal hare
trail lintel
#

woahhhhhh this video is cool ๐Ÿ˜ฎ this is one smart man

kind hatch
# mortal hare you can use barrier tho

It won't match up if the block is scaled X.5 blocks though. Yea, you can set the block_display to a barrier block, but it doesn't copy the block properties. The display entities don't tick and have no hitbox. It's 100% visual.

mortal hare
#

VERTICAL SLABS

lyric mica
mortal hare
#

i still see potential

tardy delta
lyric mica
#

Mojang adds features the commmunity wants in weird ways e.g wirless redstone (skulks)

wooden osprey
#

?pastebin

trail lintel
#

thats the truth lol

#

skulkers and target blocks

#

both awsome, not quite what I had in mind

wooden osprey
river oracle
#

?paste

undone axleBOT
wooden osprey
#

ah lmao

kind hatch
#

I'm still waiting for the day they make tile entities movable

kind hatch
#

๐Ÿ˜ญ

kind hatch
lyric mica
# mortal hare coming soon

i can see some cool stuff being made with the features in 23w06a snapshot and being able to apply direct damage to player without effects is nice.

kind hatch
#

Map makers are rejoicing.

#

No more hacky workarounds.

trail lintel
#

oof I'm SO close

#

but I notice the type for the "string" of the window title is Chat

#

but WrappedChatComponent seems to be abstract

mortal hare
#

you need to convert translateableComponent to json string

#

and provide it there

#

there should be a method to do it inside TranslatableComponent class or its superclasses

trail lintel
#

processing ๐Ÿ˜‰

mortal hare
#

is it possible for intellij to open multiple projects on the same window?

#

nvm found it

terse ore
#

is there an implementation in Spigot API for /fill command?

tardy delta
#

wdym same window?

mortal hare
#

not in a separate window

#

literally

tardy delta
#

i always have multiple windows

river oracle
mortal hare
#

that's a waste of space

#

i mean like this

tardy delta
#

dunno how id do it otherwise

#

ah lol

trail lintel
#

hmm give me another nudge if you would ๐Ÿ˜‰ its expecting a WrappedChatComponent, not a TranslatableComponent. There are methods in the translatable component to convert to plaintext however.

tardy delta
#

didnt know that

mortal hare
#

you convert TranslatableComponent to json string

tawdry echo
#

how can i check what position a player has in relation to another location, i.e. front, back, side

trail lintel
#

But StructuredModifier<WrappedChatComponent> wont accept a string, its expecting a WrappedChatComponent. And I can't seem to instantiate that class as it is abstract.

#

brain hurty haha

mortal hare
#

you create one

fair vapor
#

What would be the best way to run something every certain amount of ticks

tardy delta
#

?scheduling

undone axleBOT
fair vapor
#

thx

trail lintel
#

OHHHH

#

I see now

mortal hare
#

WrappedChatComponent.fromJson(GsonComponentSerializer.gson().serialize(translatableComponent))

trail lintel
#

(I think)

mortal hare
#

this should work

#

not tested though

#

edited

#

deserialize -> serialize

trail lintel
#

I see now, thanks so much. I will prob have questions about translatable component and how to direct it specifically at "ender chest"

#

but one step at a time =]

mortal hare
#

you create that component as in this example code from nms

#

but without private and final shit

#

for ender chest translation

trail lintel
#

Ahhhhh gotcha so you point it to the unique ID for ender chest

#

and translatable component handles the localization for you

mortal hare
#

yes that's a key

#

to the locale

trail lintel
#

So awesome

mortal hare
#

of the client's json file

#

of specific language

trail lintel
#

This has been a wild ride haha

mortal hare
#

translatablecomponent only sends the key to the client

#

and it says hey

#

im not actual text

#

im a translation key

trail lintel
#

May as well use this update to sneak in bstats and an update checker while I'm at it =]

mortal hare
#

you should use it to retrieve the text

#

from json file

fair vapor
mortal hare
#

L means long value

trail lintel
#

those some loooong bois

mortal hare
#

its a data type

#

that's bigger than int

tardy delta
#

20 ticks per second, so 10 seconds

#

L isnt needed

mortal hare
#

its not needed

#

really

#

as he said

fair vapor
#

ohhhh

#

That makes sense thanks for clarification lol

mortal hare
#

20*10 does not reach integer 32 bit limit

tardy delta
#

lmao

mortal hare
#

there are also F and D values

#

it means that treat that value as a float or double

trail lintel
#

wait holup, I imported gson but I don't have a GsonComponentSerializer. I notice it is part of the adventure api, but I don't seem to have that.

mortal hare
trail lintel
#

ahh I see, I have to include it

mortal hare
#

well it exists for me

trail lintel
#

this is purely a developer dependency right? clients wont have to install like an adventure api plugin?

mortal hare
#

no

#

if they're running paper servers

#

it wouldnt work on spigot

#

since they dont have adventure api built in

trail lintel
#

Ah shit, I definitely wanna support spigot native

remote swallow
#

best to shade it

trail lintel
#

even though everybody SHOULD be using paper haha

remote swallow
#

scope compile or implementation if ur using gradle

mortal hare
#

i mean you can always use chatcomponent generator online

#

to format your component

#

and paste the json output

#

inside the wrapped container fromJson()

#

that way you wouldnt need to use adventure api at all

trail lintel
#

this the idea?

blazing monolith
#

addPassenger not working for players

twilit roost
#

I have something like this
How can I get next argument after, lets say user:

mortal hare
#

{"translate":"container.enderchest"} this may be enough

#

to translate

pseudo hazel
mortal hare
#

WrappedChatComponent.fromJson("{\"translate\":\"container.enderchest\"}")

#

try this

pseudo hazel
#

just check the size of the arguments, and then make a switch to return a list of options for each option if that makes sense

pseudo hazel
mortal hare
#

ProtocolLib

mortal hare
trail lintel
#

ohh shit it all is looking good, no errors

#

You are a legend dovidas

fair vapor
#

What would I put in place of plugin?

  @Override
  public void run() {
    Bukkit.broadcastMessage("Mooooo again!");
  }
}.runTask(plugin);```
mortal hare
#

does it work?

trail lintel
#

I'm about to finish up the logic and compile it

#

will let you know

fair vapor
#

oh so 'this' then?

remote swallow
#

if its in the class that extends JavaPlugin yes

fair vapor
#

yea it is

#

thx

mortal hare
#

pls someone make a pull request to paper to add translatable components to inventory type enum class

#

at least a separate method

#

to retrieve them

#

because now only hardcoded ones are wrapped

#

while normal ones are just hidden from the api

wooden osprey
remote swallow
twilit roost
trail lintel
#

moment of truth =] time to test

remote swallow
twilit roost
#

mostly one word

pseudo hazel
#

mostly or always

remote swallow
#

just get the arg

pseudo hazel
#

in this case the exception dictates the rule

trail lintel
#

I got some errors haha, but I think I saw an entry in the protocollib wiki for this

remote swallow
#

if its multiple words

StringJoiner joiner = new StringJoiner(" ");
for (int i = argStartingNumber; i <= args.legnth; i++) joiner.add(args[i]);
trail lintel
#

hmm ok, so following the instructions here did fix the error

#

but that seems weird, so I have to note in my project readme you HAVE to use the latest dev build of protocol lib?

#

I figure most players will just click download on the page and be confused when they get an error

#

AH

#

nevermind

#

it explicitly states it on the protocollib download page, its on the players then if they miss that ๐Ÿ˜‰

hazy wren
#

How can I put a custom name on an ItemStack ?

trail lintel
#

Oh

remote swallow
#
ItemStack stack = ...;
ItemMeta meta = stack.getItemMeta();
meta.setDisplayName("cool custom name");
stack.setItemMeta(meta);
trail lintel
#

haha beat me to it =] I was gonna answer a question instead of ask for once lol

hazy wren
#

but meta.setDisplayName() is depreaced ?

trail lintel
#

it wut ๐Ÿ˜ฎ

hazy wren
#

wait

#

deprecated

trail lintel
#

interesting, I don't get that warning

hazy parrot
#

He is probably using paper

hazy wren
#

yes

hazy parrot
#

?whereami

fair vapor
trail lintel
#

LMFAO theres a command for that ๐Ÿคฃ must be a common occurance

tardy delta
trail lintel
#

ok protocollib understanders, what am I missing here

#

from what I can tell, these indexes are correct

#

hooooold on

#

I think im stupid, its because getIntegers() wont have anything in it yet

rough drift
#

InventoryType.PLAYER vs InventoryType.CRAFTING, what are the differences

trail lintel
#

well, no it should shoulnd't it. since I'm initializing it with the packet type that should have those values... hmmmm

#

I'm guessing inventorytype crafting is whats in a crafting table

#

but thats a guess lol

rough drift
#

CRAFTING is the player's 4 slot crafting

#

so technically still their inv

#

WORKBENCH is the actual name of a crafting table

twilit roost
#

how can I also shade system dependency?

remote swallow
#

mvn install it

twilit roost
#

I'm new into Maven Commands
I tried runing mvn install CMI-API..

remote swallow
#

mvnpath install:install-file -Dfile=CMI9.0.0.0API.jar -DgroupId=com.zrips -DartifactId=Zrips -Dversion=9.0.0.0-Dpackaging=jar

twilit roost
#

tysm

#
mvn install:install-file -Dfile=C:\Users\TomKo\Kastrol\Otto\CMI-API9.3.1.2.jar -DgroupId=com.zrips -DartifactId=Zrips -Dversion=9.3.1.2 -Dversion=9.3.1.2 -Dpackaging=jar
remote swallow
#

just open cmd where the jar file is

#

you also have version twice

twilit roost
#

when I open it where it is, it says it requires pom.xml
but now it just keeps saying that .zrips is "Unknown lifecycle phase"

trail lintel
#

hey guys

remote swallow
twilit roost
#

cmd, IJ

trail lintel
#

so I did a log on the PacketContainer I am trying to work with, and I notice it does not match the packet structure listed on wiki.vg here
https://wiki.vg/Protocol#Open_Screen
So I decompiled spigot and looked inside the net.minecraft.network.protocol.game package, and I notice the following

#

the wiki has it listed as two int arguments and a chat argument

#

but the decomp seems to show an int argument, and a Containers argument? What exactly am I working with here?

#

sorry, decompiled spigot not paper, edited

remote swallow
trail lintel
#

I think im getting close to the answer.....

remote swallow
#

ive got no idea how that happens, that command worked for me when i was using 9.0.0.0 api

#

also just specify the jar file

#

and open cmd where it is

#

-Dfile=CMI.whatever.jar

bold vessel
#

Som1 know how i can make a craft with CustomModelData (like if the item hasnt customodeldata:2 it doesnt work

twilit roost
remote swallow
#

show the command you use now

#

also you shouldnt be mvninstalling the plugin you should mvn install the api

twilit roost
#
mvn install:install-file -Dfile='C:\Users\TomKo\Desktop\MCServers\BungeeCord 1.19.2\Bungee 1.19.2\plugins\CMI-API9.3.1.2.jar' -Dfile=CMI-API9.3.1.2.jar -DgroupId=com.zrips -DartifactId=CMI -Dversion=9.3.1.2 -Dpackaging=jar -DgeneratePom=true
#

oh I have 2x Dfile

twilit roost
remote swallow
#

they give you an api download

twilit roost
twilit roost
#

So now I open CMD where my API is, and run that cmd

remote swallow
#

yeah

twilit roost
#

mvnpath doesn't exist
I reckon I should use mvn instead

remote swallow
#

yeah

#

mvnpath just directs to the path of maven

twilit roost
remote swallow
#

i didnt want to restart my pc when i did that so i just used the direct path

remote swallow
# twilit roost

the hell? you got maven installed? try doing that just in downloads folder

twilit roost
#

im executing it in Documents folder, I have all APIs stored there
if that matters in some way

twilit roost
#

I was working on something that required Maven installed seperately

#

I managed to get this
And then I fixed typo and again got Unknown lifecycle phase ".zrips".

remote swallow
#

i just got that

#

im so confused how this now doesntwork

twilit roost
#

so am I ๐Ÿ˜„

#

I looked a bit and found that spring plugins can compile with system scopes

remote swallow
#

"C:\Program Files\Maven\bin\mvn" install:install-file -Dfile=CMI9.0.0.0API.jar -DgroupId=com.zrips -DartifactId=Zrips -Dversion=9.0.0.0 -Dpackaging=jar

#

that worked for mine

#

i think the missing space caused it

#

just change the path to mvn

twilit roost
#

I added that space and resulted in that Unkown..

#

maybe wrongly specified lifecycle?

remote swallow
#

you got gitbash installed?

#

actually

#

it works in cmd for me still

#

ive got no idea how the hell that wont install

hoary wing
#

?paste

undone axleBOT
hoary wing
orchid sentinel
#

Hello, i see there is isHandRaised(), but is it possible to set it in 'false' state?
i'd like to put custom cooldown on shield after every interaction, but when i use setCooldown() shield still being active on client side
Basically I want to trigger shield blocking animation and without actually dealing damage to the player

hoary wing
#

this just keeps returning the second input vector no matter what i try

twilit roost
kind hatch
remote swallow
#

not use system scope in maven, somehow maven cant mvn install the file

twilit roost
kind hatch
twilit roost
#

Well guys thanks for your help
I gtg away from PC
I can only be at phone

kind hatch
#

Why is it bad? Because it's deprecated?

river oracle
#

Don't use system scope install into the m2

#

You can install .jar files into your m2

kind hatch
#

Neither your response or that link tells you why it's bad.

remote swallow
#

think if you add a jar file to a plugin, add it to github, someone changes that jar file and you dont realise

#

could easily be malware

hoary wing
#

the .add doesnt want to work for some reason

        Vector[] v = new Vector[offset.length*shape.length];
        Vector[] o = new Vector[offset.length];
        int k = 0;
        for(int i = 0;i < offset.length;i++){
            o[i]=offset[i];
            Vector[] s = new Vector[shape.length];
            for(int j = 0; j < shape.length;j++){
                s[j]=shape[j];
                s[j].add(offset[i]);
                v[k] = s[j];
                if(k < v.length-1){k++;}
            }
        }
        return v;
    }```
kind hatch
twilit roost
#

yeye I then rerun it with that space, resulted in unknown lifecycle

kind hatch
twilit roost
#

makes sense yeah
I tried wrapping those paths only

queen niche
#

Is there a way to stop the execution of the command?

...                            Database.getInstance().validateCommand(player, args[1], isOwner -> {
                                if (!isOwner) {
                                    player.sendMessage("Deze token is niet van jou.");
                                    
                                }
                            });
...

I want the command to stop executing after the sendMessage however it still keeps on running the command.

remote swallow
#

return

tall dragon
#

tf

#

that makes no sense

#

u want it to stop. but u want it to not stop

remote swallow
#

they want it to stop but it doesnt i think

queen niche
#

^

tall dragon
#

well then just return yea

queen niche
#

but I thought return didnt work either. But im gonna try again

tall dragon
#

return, stops execution from going any further

#

in simple terms

ruby mesa
#

How would I fix this? "Default system encoding may have misread config.yml from plugin jar"

#

It ruins my symbols in config

eternal oxide
#

config should be saved as utf8

crimson terrace
#

?paste

undone axleBOT
eternal oxide
#

junk

crimson terrace
#

it sounds right

eternal oxide
#

spigot by default attempts to read as utf8. you never use an inputStream

#

his issue is his file is not utf8 in his jar

queen niche
ruby mesa
crimson terrace
#

it assumes the system encoding isnt in UTF-8, builds off of that. otherwise its pretty correct, apart from the last part

ruby mesa
#

actually I can probably just look it up

eternal oxide
#

you don;t specify the encoding anywhere, only when you initially create the file

#

create it as utf8

tall dragon
crimson terrace
#

maybe recreate the file and copy contents?

tall dragon
#

that just returns the consumer

ruby mesa
#

lemme try that

queen niche
tall dragon
#

assign isOwner to a boolean outside the consumer

tall dragon
queen niche
ruby mesa
tall dragon
#

ok, but why do u do it with a consumer<boolean>

ruby mesa
#

seems to fix it

queen niche
# tall dragon ok, but why do u do it with a consumer<boolean>

long story short,

Im still learning and currently using Foundation (Sorta Spigot framework developed by MineAcademy) it should make coding a bit easier. But all of their query function run async and I cant return any values using their async functions so Someone else learned me to use consumers, However till today I never needed to access the boolean outside the consumer.

tall dragon
#

should probably use completable future

#

i could show you how to do that if you have some time to wait. bussy for like 20min

tall dragon
queen niche
terse ore
#

What does this do?

hoary wing
#

i think it kills the entity

remote swallow
#

it marks it for removal

#

most likely the next tick

placid birch
#

probably a stupid question but i just started learning plugin development and im wondering if it would be smart to make an own folder for inventories / GUIs. and if so, how i could select a specific one and open in other classes.

terse ore
#

or it just disappears

remote swallow
#

thats what removal means

terse ore
#

make folders?

remote swallow
#

directories

earnest forum
#

i think they mean in like the animation

terse ore
earnest forum
#

do they just stop existing or do they die naturally

terse ore
#

but just why

#

despawn ig

#

ill try it

remote swallow
#

it removes the entity the next tick

terse ore
#

yep

#

it does what it says

#

who could've guessed

dry yacht
#

Is there a reason for why X got ceiled but Z got floored?

grand flint
#

Do too many mob spawners with entities in them cause lag?

grand flint
dry yacht
# grand flint minecraft doesnt know basic maths :(

This is literally driving me insane right now, :-: I don't find anything useful about how block positions are defined. That has to be aligned with N-E-S-W somehow, as it only screws up in one orientation but matches in another.

placid birch
#

}.runTaskLater(this, 40L); im trying to schedule something in a listener, but im getting an error with this. What should I put there instead of it?

remote swallow
#

actualy

#

one second

fair vapor
#

I think

placid birch
#

oh so i need to pass the plugin instance to the listener?

fair vapor
#

yeah I think

remote swallow
#
Bukkit.getScheduler().runTaskLater(PluginInstance, () -> {
      code;
}, delay);
undone axleBOT
placid birch
#

ok ill try

fair vapor
#

I'm sorry I looked at guides but I got lost ๐Ÿ˜† how can I make an array list for ItemStack?

remote swallow
#

List<ItemStack> stackList = new ArrayList<>();

#

same way you would make any other list

dry yacht
placid birch
#
    public void onBlockBreak(BlockBreakEvent e){
        Player p = e.getPlayer();
        Block b = e.getBlock();

        if(b.getType().equals(Material.OAK_WOOD)) {
            b.setType(Material.BEDROCK);
        }
        new BukkitRunnable() {
            @Override
            public void run() {
                b.setType(Material.OAK_WOOD);
            }
        }.runTaskLater(this.plugin, 40L);
    }```
Anyone knows why it won't place bedrock for 2 seconds, and then change to oak wood again?
eternal oxide
#

!

placid birch
#

yea i tried to add that to see if that was the problem but it wasnt

eternal oxide
#

compare Enums with == or !=

placid birch
#

yea still not

eternal oxide
#

your code without the ! will only change the block if it's is OAK_WOOD to start

placid birch
#

yea it is though

#

like the bukkit runnable is working but not setting the type to bedrock

eternal oxide
#

you also need to cancel the event

#

else you are allowing the block to break

placid birch
#

oh that worked

#

appreciate your help!

humble tulip
#

Why tf is essentials teleport async?

ivory sleet
#

why not

#

in case u tp to an unloaded chunk, it might be proven of beneficence to do it async

plush shore
#

Good afternoon, any suggestions on the best method to change an item's durability in 1.19.2?

#

or a method that works at all would be preferable.

vital sandal
#

Is it good to create a create nullify method like data = null; for saving memory ?

#

Or just let it to java cleaner ?

frank kettle
#

Depends on the place that variable is at

vital sandal
#

Examples?

frank kettle
#

But I don't think nullifying variables will help much with memory unless you do it in a huge amount

vital sandal
#

Yeh ofc

frank kettle
# vital sandal Examples?

There's variables that are global and stay in the plugin till server closes(on main class) and then there's those variables that are created and used just during certain moment(functions, or commands or events)

#

I think it would only make a difference if it was on those "global" variables.

#

But you would need to nullify a lot to make small changes.

#

Why do you want to save memory anyways?

#

From my experience plugins don't consume much memory unless it's a plugin or code that lags the server, and that should be fixed, not cleaned. Most of server ram is from chunks loaded on the server and players itself.

pseudo hazel
#

you shouldn't really set things to null to save memory. its used more often for logic purposes, like you set something to null because you need it to not exist logic wise, if you know what I mean

frank kettle
#

I could be wrong tho, I never set variables to null.

worldly ingot
#

Yeah. Don't bother setting things to null unless you have an express reason to lol

frank kettle
#

I start variables as null and then try to load smth and then check if it's not null for example

pseudo hazel
#

the java garbage collector knows when to set things to null by itself pretty well ๐Ÿ˜›

restive elm
#

Is there any way to create server with snapshot (23w06a) and get API of it?

frank kettle
#

I don't think this is the right place for that sir.

pseudo hazel
#

also, no I dont think spigot makes api versions of snapshots

#

but dont quote me

frank kettle
#

Spigot releases api/server versions on full releases I believe

#

For that u would need to have a "normal" Minecraft server, to run snapshots

#

Maybe Bukkit does it ๐Ÿค”

restive elm
#

hmm

frank kettle
#

But a quick search online and you can figure out how to make servers with snapshots.

restive elm
#

I found this:

A: Can i compile spigot manually to acheive a snapshot release?
B: yes but it won't be easy

pseudo hazel
frank kettle
pseudo hazel
#

well unless you are a spigot dev, I think it would be hard to get an API for a snapshot version

restive elm
#

hmm yea

frank kettle
#

"You can but it won't be easy"

And proceeds to not give any info on how to do it or where to start.

pseudo hazel
#

you just gotta wait like teh rest of us ๐Ÿ˜„

frank kettle
#

So take that as completely bs.

frank kettle
#

Best shot I believe would be Bukkit place.

#

But im not sure they themselves do apis for snapshots

#

Haven't used Bukkit in years

frank kettle
restive elm
#

yes

#

if that's possible

worldly ingot
#

The Bukkit team doesn't exist anymore. SpigotMC is the Bukkit team. We maintain Bukkit and CraftBukkit

frank kettle
#

Oh fr?

worldly ingot
#

And like I said the other day, we don't do snapshot releases

restive elm
pseudo hazel
#

spigot has more stuff

worldly ingot
#

A few performance improvements, configuration, API, etc.

frank kettle
#

I haven't used Bukkit in like 7 years

restive elm
#

ahh but why bukkit still exists?

worldly ingot
#

Easier for us to update

frank kettle
#

Oh

#

You have talked to this guy before

#

๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ

restive elm
#

oh

worldly ingot
#

mhmm

restive elm
#

xD

pseudo hazel
#

so yeah, just wait it out

restive elm
#

yee

frank kettle
#

But wait till it releases

#

Not wait 2 days and come back

restive elm
#

yea xD

magic dome
#

anyone have any knowledge about how i would go about keeping the vanilla generation but using a heightmap to change the heights
I got the heightmap part into a 2d array but i cant seem to figure out how to use ChunkGenerator
it actually doesn't seem like there is a way to do that without specifically setting the type of the block to a certain material

halcyon hemlock
#

just made my first API

upbeat hornet
#

Hi!

I got this error: java.lang.IllegalStateException: Asynchronous entity add! and from what I've read online, it seems that it's because I'm trying to edit the world in an async function (that's right) but spigot is protecting me from doing that because that would most-likely corrupt my world. Is there a way to spawn entities asynchronously?

sullen marlin
#

No

#

You need to do it from a sync task

upbeat hornet
#

mhh ok and would there be any efficient way to do that a bit quicker? I'm aiming to spawn around 100 items at a time, would servers support that?

hazy parrot
halcyon hemlock
magic dome
ebon coral
#

is there a way to get the dragged item from when you click drag an item (and then click a slot with that item)?

tender shard
#

InventoryDragEvent

ebon coral
#

i am very slow

#

well

#

thanks LOL

lethal coral
#

Is it possible to make my plugin load before all other plugins via the loadbefore plugin.yml field?

tender shard
#

only if you add all other plugins to loadbefore

#

why would you want to do this though?

lethal coral
#

e.g. * wouldn't work?

tender shard
#

No

#

But why would you ever need that?

lethal coral
#

external/in-house plugin conflications

lethal coral
#

Where is the "Bukkit" class for reference? everything under the org.bukkit package name is nms-related

tender shard
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

quaint mantle
#

Hello

#

Help me plis

#

I m search in programminst

#

I speak russia

#

And English 10%

tender shard
#

whut

ornate patio
#

how can i reset only the outer end islands

#

ive still got barely a clue on how world generation works

wooden osprey
#
        if (!(block.getState() instanceof TileState)) return;

        TileState tileState = (TileState) block.getState();
        PersistentDataContainer pdc = tileState.getPersistentDataContainer();

        String sr_output = pdc.get(CustomNamespacedKeys.output, PersistentDataType.STRING);
        ItemStack output = SerializeItemStack.deserialize(sr_output);

        if (output == null) {
            pdc.set(CustomNamespacedKeys.output, PersistentDataType.STRING,
                    SerializeItemStack.serialize(recipe.getOutput())
            );
        } else if (output.isSimilar(recipe.getOutput())) {
            output.setAmount(output.getAmount() + 1);

            pdc.set(CustomNamespacedKeys.output, PersistentDataType.STRING,
                    SerializeItemStack.serialize(output)
            );
        }

        pdc.set(CustomNamespacedKeys.recipe, PersistentDataType.STRING, "");
        pdc.set(CustomNamespacedKeys.processTime, PersistentDataType.INTEGER, 0);

        tileState.update();

        Bukkit.getLogger().info("Completed recipe.");

        updateInventory();

the code runs no problem no errors i get to the debug message but pdc doesnt change and my testing also proves that it doesnt get overwritten by another piece of code
could someone help?

#

and values are correct also

quaint mantle
#

Hi, who can help make a plugin construction system as in rust?

rough drift
#

stfu

#

nobody cares

quaint mantle
#

Pliz

rough drift
#

@vagrant stratus handle this person or whatever

quaint mantle
#

He booster?

native gale
#

What

vagrant stratus
#

@quaint mantle Don't go pinging everyone

quaint mantle
#

Okay

#

Sorry

native gale
#

I am not your sugar daddy sorry

tender shard
#

your server is so shitty, it will never get any more boosts

vagrant stratus
#

@native gale They're wanting someone to boost their server lmao

native gale
rough drift
#

@quaint mantle Still got a screenshot lmao

rough drift
#

This is actually funny lmao

quaint mantle
#

๐Ÿ˜ฆ

#

Boosters

#

Help plis

#

One boost

rough drift
#

can you just

#

shut

quaint mantle
#

Not

#

I love to server

#

Mikchan

#

Pliss

#

One boost

#

And all

rough drift
#

Buy it yourself

vagrant stratus
#

No one's going to boost your server, and this isn't even the channel to ask. Drop it

quaint mantle
#

I in form russian

native gale
# quaint mantle Mikchan

ะ‘ั€ะฐั‚ะธัˆะบะฐ, ะฟั€ะตะบั€ะฐั‰ะฐะน ะฟะพะทะพั€ะธั‚ัŒัั. ะ•ัั‚ัŒ ั‚ะฐะบะฐั ะบะฝะธะณะฐ "ะ‘ัƒั€ะฐั‚ะธะฝะพ", ั‚ะฐะผ ะบะฐะบ ั€ะฐะท ะตัั‚ัŒ ะฟะพัƒั‡ะธั‚ะตะปัŒะฝั‹ะน ัะฟะธะทะพะด ะฟั€ะพ ะปัŽะดะตะน, ะบะพั‚ะพั€ั‹ะต ะถะฐะถะดัƒั‚ ะถะธั‚ัŒ ะฝะฐ ั…ะฐะปัะฒัƒ. ะกะฟะพะนะปะตั€: ||ั…ะฐะปัะฒะฐ - ัั‚ะพ ะผะธั„||

rough drift
#

We are aware lmao

quaint mantle
#

This dont buy

tardy flame
#

Oh nice

#

I see a nice development conversation

rough drift
#

Yep

quaint mantle
#

How?

#

I from Russian

tardy flame
#

@vagrant stratus can't you really do something abt it?

quaint mantle
#

This dont buy nitro

rough drift
#

@ Choco

#

lmao

tardy flame
#

For the past 11 minutes this channel is just a mess.

rough drift
#

11 minutes already?

quaint mantle
#

Guys plissss

rough drift
#

damn time flies fast when there's clowns involved

quaint mantle
#

Give boost

rough drift
#

Give me back braincells and you got a deal ๐Ÿ˜‚

vagrant stratus
#

@quaint mantle
ะ•ัะปะธ ะฒั‹ ะฝะต ะพัั‚ะฐะฝะพะฒะธั‚ะตััŒ, ะฒะฐะผ ะฑัƒะดะตั‚ ะทะฐัั‡ะธั‚ะฐะฝ ั‚ะฐะนะผ-ะฐัƒั‚.

ะ’ะฐะผ ัƒะถะต ัะบะฐะทะฐะปะธ "ะฝะตั‚" ะ˜ ะพัั‚ะฐะฝะพะฒะธั‚ัŒัั, ะผะฝะพะณะพ ั€ะฐะท.

rough drift
#

I am archiving this in screenshots lmao

vagrant stratus
#

No need

rough drift
#

Best thing that happened in 2023

tardy flame
#

"serious development help" | ask development related questions here

rough drift
vagrant stratus
#

ugh, all I wanted to do is work on projects qwq

quaint mantle
#

ะฅะพั€ะพัˆะพ

#

ะŸั€ะพัั‚ะพ ั ะฝะต ะฟะพะฝะธะผะฐัŽ ะฟะพะปะพะฒะธะฝัƒ ัะปะพะฒ

#

Ok , iโ€m stoped

native gale
# quaint mantle ะŸั€ะพัั‚ะพ ั ะฝะต ะฟะพะฝะธะผะฐัŽ ะฟะพะปะพะฒะธะฝัƒ ัะปะพะฒ

ะัƒ ะฟะพะธั‰ะธ ั‚ะพะณะดะฐ ะบะฐะบะพะน-ั‚ะพ ั€ัƒััะบะพัะทั‹ั‡ะฝั‹ะน ัะตั€ะฒะตั€, ะธ ะฟั€ะตะบั€ะฐั‰ะฐะน ะพั„ั‚ะพะฟะธั‚ัŒ, ั‚ะตะฑั ัƒะถะต ะฟั€ะตะดัƒะฟั€ะตะดะธะปะธ. ะขัƒั‚ ะฟะพะผะพั‰ัŒ ะดะปั ะฟั€ะพะณั€ะฐะผะผะธัั‚ะพะฒ.

quaint mantle
#

ะ ั‚ั‹ ั€ัƒััะบะธะน?

vagrant stratus
halcyon hemlock
#

What's good guys

#

Anyone need any help?

rough drift
#

I mean if you can teach me to stop procrastinating lol

halcyon hemlock
#

then solve smaller anxiety

vagrant stratus
halcyon hemlock
# rough drift I mean if you can teach me to stop procrastinating lol

Hey friend! I know you've been struggling with procrastination and I wanted to share some tips that have helped me overcome it.

First, figure out why you tend to procrastinate. Are you feeling overwhelmed, unsure of how to get started, or just not interested in the task? Understanding the root cause can help you address it.

Make a list of tasks you need to do, and prioritize them based on importance and deadlines. This way, you can focus your energy on the most important tasks first.

Break down big tasks into smaller, more manageable steps. When a task seems too big and overwhelming, it can be easy to put it off. But if you break it down into smaller parts, it becomes much more doable.

Get rid of distractions. Turn off your phone, log out of social media, and find a quiet place to work where you won't be disturbed.

Give yourself a deadline and stick to it. Having a deadline can help motivate you to get started and keep you on track.

Reward yourself for completing tasks. Treat yourself to something you enjoy, like a favorite snack or a fun activity, to give yourself a sense of accomplishment.

I hope these tips help! Let me know if you have any questions or need more guidance.

halcyon hemlock
vagrant stratus
#

Lemme guess, ChatGPT?

#

sounds like chatgpt

halcyon hemlock
#

I mean he did need help

vagrant stratus
halcyon hemlock
#

I procrastinate a lot as well and these sometimes help

halcyon hemlock
#

56 issues? ayo

#

๐Ÿ’€

vagrant stratus
#

so. many. open. issues.

halcyon hemlock
#

what the hell did u make

#

did you make == true in your if functions or what

halcyon hemlock
#

I have no clue what that is

vagrant stratus
blazing valve
#

send me excellent crate

slate mortar
#

what son of a gun ghostpinged me here

chrome beacon
#

A spammer who pinged every nitro booster

#

because they wanted you to boost their server

slate mortar
#

please stop deleting @ everyone messages, it doesn't remove pings, just leads to confusion about who did it

#

to the mods

chrome beacon
#

It wasn't an everyone

slate mortar
#

same point tho

chrome beacon
#

Not sure if staff were the ones that deleted the messages

slate mortar
#

since when does the bot auto remove ping messages

wet breach
#

if the bot bans you, it removes all messages from that user

#

which includes pings

slate mortar
#

that user wasn't banned tho

chrome beacon
#

^^

slate mortar
#

searching for the ping keyword in a channel to see who pinged me is a stupid way ngl

#

hoping someone said something along the lines of "dont ping ppl"

wet breach
#

lol

wet breach
#

Well as mentioned there was a person spam pinging boosters

slate mortar
#

who didn't get banned, yes

wet breach
chrome beacon
#

nah the messages got deleted

#

See IkeVoodoo screenshot

slate mortar
#

you know that its visible when messages are edited right? lol

wet breach
#

Anyways, it is funny that these spam pingers who come here

#

and when they decide to ping boosters

#

they always skip my name XD

slate mortar
#

its funny that i#

#

oopsie

#

that i'd get banned for sending a screenshot of my discord, while spam pingers who are just there to annoy don't get

#

like lmfao

wet breach
#

you are not allowed to share discord screenshots?

#

is this some new rule?

slate mortar
#

of my discord, yes

wet breach
#

oh just specifically yours

quaint mantle
#

Who write plagins?

chrome beacon
#

oh you're back

#

?services

undone axleBOT
quaint mantle
#

Yes

slate mortar
#

ping me again, and feel the non existent consequences

vagrant stratus
#

@slate mortar hi

quaint mantle
#

What

slate mortar
#

sup nerd

vagrant stratus
#

No u

slate mortar
#

no u

slate mortar
slate mortar
#

yes please,

tardy delta
#

BlockBreakEvent#getPlayer is notnull so ig not

#

yes you can say the executor is the player, but its also possible to execute it on console

onyx fjord
#

is there some s3 api other than the one from amazon?

eternal night
#

like s3 implementation ?

#

MinIO is probably the most popular one

alpine swan
#

how does playerinteractevent work? the only packet I could find that was sent every left click was the animation one

pseudo hazel
#

so I learned this like 2 days ago

#

but the playerinteractevent fires based on the arm animation since there wasnt a better way to do it

#

which means it also fires for dropping a block by using the drop key (default Q)

#

and it fires usually when you use an item by right clikcing on a block or in the air

#

@alpine swan

alpine swan
terse ore
#

how could I make leaf decay faster and make them not to drop items?

wind blaze
#

does anyone know how i would be able to check if a player who is offline ever played before? I am trying to add a /pf command and want it to work on offline players too, but not output anything for people thath ave never touched the server

wind blaze
#

Do you also know how to add offline players into tab completion as 'args' for commands?

onyx fjord
#

not like provider

wind blaze
onyx fjord
#

do you already have a tab completer?

wind blaze
eternal oxide
#

extend TabExecutor instead of CommandExecutor

onyx fjord
#

wait is it for a command or just any tab complete

wind blaze
#

command

onyx fjord
#

implement TabCompleter then

wind blaze
eternal oxide
#

TabExecutor is a shortcut. it implements both command and tab

wind blaze
#

but how di i add offlineplayers to completion w using that

eternal oxide
#

TabCOmplete returns a List

#

you fill that list with whatever you want as choices in Tab

#

depending on args.length

wind blaze
tardy delta
#

heeheehee old code

wind blaze
#

lol, i already got it no worries

tardy delta
#

acf is so much better

wind blaze
#

wait now that i changed tabcompletion it will not update the list when i type smth like "A" it wont remove the player namers whcih do not start with an "A" now

tender shard
#

StringUtils.copyPartialMatches

#

or just filter the list yourself

wind blaze
#

huh i dont really get it ๐Ÿค” like the players will be removed from tabcompletion when the first letter isnt equal to args[0]?

eternal oxide
#

no

#

depending on args.length YOU filter the list to be whatever you want

#

if args.length == 1 you are on teh first argument, so args[0]

#

so filter teh list excluding all that don;t contain args[0] or start with it

wind blaze
#

ohhhh i get it now, thanks

remote swallow
tall dragon
#

thats crazy

charred blaze
#

whats wrong with this code?

remote swallow
#

what do you pass into it

#

and where

charred blaze
#

Main class

tall dragon
#

ur fields are being initialized before its constructed

#

hence chat is null

remote swallow
#

oh yeah

#

lmfao

charred blaze
#

why

tall dragon
#

init them in ur constructor

remote swallow
#

^^

charred blaze
#

okay

tall dragon
#

below this.plugin =plugin

remote swallow
#

also naming convetions

#

?conventions

tall dragon
#

yes

charred blaze
remote swallow
#

naming conventions

#

variables are lower camel case

#

not upper camel case

tall dragon
#

the way you should be naming things in java

charred blaze
#

Did i named my class wrongly?

remote swallow
#

SwearPunishCommand should be swearPunishCommand etc

tall dragon
#

ur class name is fine

remote swallow
#

because naming conventions

tall dragon
#

it will make your code easier to write / read / maintain.

charred blaze
#

ok

#

thx

shadow night
#

how do I make a bucket place a block but not get emptied?

tall dragon
#

cancel the BucketEmptyEvent or PlayerInteractEvent

shadow night
tall dragon
#

well you would have to do that with some code ofcourse

#

after cancelling the event

shadow night
#

so like getting the coordinates the player is looking at and putting a block there?

tall dragon
#

pretty sure both events supply the clicked block

#

BucketEmptyEvent supplies the clicked block & clicked blockface

#

so u know where the liquid wouldve gone

shadow night
#

something like event.getBlockClicked().setType(Material.WATER);?

tall dragon
#

thats using PlayerInteractEvent?

shadow night
#

no, the BucketEmptyEvent

tall dragon
#

or BucketEmpty

#

right

#

so u would do this

#

event.getBlockClicked().getRelative(event.getBlockFace()).setType(Material.WATER); psuedo code

shadow night
#

hmm

past vapor
#

Is there any way I can have the Main world not save chunks/entities

shadow night
frail gale
#

Does the new snapshot allows better custom blocks with custom textures?

terse ore
#

If I have a bounding box (diamonds for showing area) why does it detect me as if was outside it if I to the location of the gold blocks

tall dragon
# terse ore

it detects you while ur outside the area u mean?

eternal oxide
#

bad math

terse ore
#

the diamonds delimitate the boundingbox

tall dragon
#

show some code then

terse ore
#

battle.box.contains(playerLocation.getX(), playerLocation.getY(), playerLocation.getZ())

#

nvm

summer zodiac
#

Hello, how can I change the DeathMessage of a player when he was killed by a zombie?

terse ore
#

ignore what I said

#

I still get the error bug

lyric meteor
#

Why were chat previews deprecated?

terse ore
eternal oxide
#

if you are just testing (true) then your location is bad

terse ore
#

that's the issue

#

it isn't

remote swallow
terse ore
#

because if I change it by one block

terse ore
#

it is inside the glass

lyric meteor
#

what do you mean they got removed? chat preview is used for chat signing right?

#

chat signing is not removed

eternal oxide
#

a bounding box covers teh whole block

remote swallow
#

the signing didnt

summer zodiac
lyric meteor
#

so now you cant reformat chat at all without losing the signature?

tall dragon
terse ore
#
    box:
      pos_1:
        x: 42
        y: -60
        z: -9
      pos_2:
        x: 35
        y: -46
        z: -16
      world: battles```
BoundingBox [minX=35.0, minY=-60.0, minZ=-16.0, maxX=42.0, maxY=-46.0, maxZ=-9.0]
remote swallow
tall dragon
#

@summer zodiac so getEntity().getEntityType().

lyric meteor
#

lmao wow ok

#

so literally 0 spigot servers are using chat signing then?

remote swallow
#

most disable it

#

no one likes it

terse ore
lyric meteor
#

damn. I was following the information in the 1.19.2 post to add chat signing support to private messages in my plugin

#

but I guess it is no longer possible

echo basalt
echo basalt
#

Try with this, if it no worky, call displayParticles(world, Color.RED) or something to see what's wrong

#

my guess is just rouding issues

tall dragon
tall dragon
#

pretty sure that exists

remote swallow
#

player death event can only give player as killer

summer zodiac
terse ore
echo basalt
#

not that

#

more like

terse ore
#

if no worky ill try your Cuboid

remote swallow
terse ore
#

I asked to see if I was doing something wrong

echo basalt
#

do your contains checks with getBlockX, getBlockY, getBlockZ

terse ore
#

I get playerLocation

#
    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        Battle battle = BlockBattles.getInstance().battles.get(player);
        if (battle == null) { return; }
        Location playerLocation = player.getLocation();
        System.out.println(battle.box.contains(playerLocation.getX(), playerLocation.getY(), playerLocation.getZ()));
        if (battle.box.contains((int) playerLocation.getX(), playerLocation.getY(), playerLocation.getZ())) { return; }

        Location location = player == battle.player1 ? battle.player2Location : battle.player1Location;
        player.teleport(location);
    }```
echo basalt
#

your cuboid ends at the smallest corner of the max block

terse ore
#

ill make xyz of player ints

echo basalt
#

yeah

terse ore
#

still doesn't work

#

I can be at 41.999999 but not at 42

echo basalt
#

make your box end at 42.9

terse ore
#

oh lol

terse ore
#

after the game ends

#

I gotta set all blocks inside boundingbox to air

#

if I s et it to 42.9

echo basalt
#

42.9 or 42 is still the same

terse ore
#

it is because the .contains doesn't check for <=

#

it checks for <

echo basalt
#

that's pretty much the same when it comes to doubles

tardy delta
#

ugh exposing collections

summer zodiac
#

omg it was all because of the paper-api right Kappa

#

๐Ÿคฆโ€โ™‚๏ธ

halcyon hemlock
#

hi guys , what's good

#

anyone need help

terse ore
#

now it worked @echo basalt

#

if (
(int) playerLocation.getX() >= box.getMinX() && (int) playerLocation.getX() <= box.getMaxX()
&& (int) playerLocation.getY() >= box.getMinY() && (int) playerLocation.getY() <= box.getMaxY()
&& (int) playerLocation.getZ() >= box.getMinZ() && (int) playerLocation.getZ() <= box.getMaxZ()
)

tardy delta
#

๐Ÿค”

#

๐Ÿค”

#

getBlockX() exists to avoid casting to an int

terse ore
#

it was because of player not being an int + .contains used < instead of <= for maxN

terse ore
summer zodiac
#

I just want to change the PlayerDeathMessage when he is killed by a zombie. That's why I wanted to use PlayerDeathEvent but somehow it doesn't work how can I do it?

halcyon hemlock
#

that should work perfectly fine

remote swallow
#

player death event killer can only return player

#

wont return other entities

#

talking to other person

halcyon hemlock
#

then you can use entity damage by an entity event

#

there is already .getLastDamger() no?

#

or does it not work

#

weird

#

what are you getting the last damager of?

summer zodiac
#

wait i test it

halcyon hemlock
#

p.getLastDamageCause().getEntity() ?

#

might produce nullpointerexception, check for cause before doing that

#

not sure if it would work

summer zodiac
#

like this?

halcyon hemlock
#

if it doesnt work make your own event

halcyon hemlock
halcyon hemlock
#

e.getEntityType()?

#

Want me to make an event for that? Ill send the code and the way to use it

#

easier than this bs

remote swallow
#

making getKiller not only return player is probably better

halcyon hemlock
#

yeah

remote swallow
halcyon hemlock
#

I have my own custom damage events and player objects so it is easier to get last damager and stuff

summer zodiac
halcyon hemlock
#

so the players type

#

do

trail lintel
#

Hey guys, help me out here. I am trying to send a packet using protocol lib, but I cant quite figure out what the data type the second field is. The first is an int, and the third is a ChatComponent, but protocol lib doesn't seem to have anything for "Containers". Any pointers would be greatly appreciated =]

remote swallow
#

looks like its inventories

trail lintel
#

Ohh inventories, lemme see if there is a getInventories in protocollib

halcyon hemlock
#

ChatComponent class?

remote swallow
#

prob nms

trail lintel
#

I haven't tried it with chat component yet, but when I do a getChatComponents there is only one field, so I don't think its that

#

since field 3 is a chat component

#

hmm unfortunately it doesn't seem there is a getInventories

halcyon hemlock
#

look through the Containers class there is naming to all

#

I believe the first 0 is inventory size, second inventory type, third inventory name

trail lintel
#

I do believe you are correct there

#

But inventory type I figured would be an int

halcyon hemlock
#

there is enum

trail lintel
#

although dated the vg wiki lists it as a varint, but it doesn't seem to be

#

ohh enum, interesting

#

hmm help me out here, I'm new to protocol lib

#

would I need to do something like this?

#

although I'm guessing I would need to pass it the minecraft container class, not the bukkit one?

untold jewel
#

How to check if a player has right clicked another player? What event? Could not find anything in the PlayerInteractEvent

tardy delta
#

player interact at entity event or smth?

worldly ingot
#

No At. Just PlayerInteractEntityEvent

#

AtEntity is more for things like armour stands where you need the precise location of the interaction

untold jewel
#

Ok thanks

halcyon hemlock
#

Use normal packets

trail lintel
#

No clue lol, you mentioned it was a enum I figured maybe that would let me send an enum in the packet

#

the above is protocollib

halcyon hemlock
#

I can help you with normal packets NMS

#

not sure about protocollib

#

I can give code for normal packets

trail lintel
#

perhaps if you give me an example in normal packets I could translate it to protocol lib =]

trail lintel
#

I have all the fields except for the Container<?> being sent successfully

halcyon hemlock
#

explain what u want and I'll make it for you

#

you can do Containers.{value}

#

it shows the inventories type in name in the right constructor

#

a-f are normal chests

trail lintel
#

hmm but I don't seem to have access to the Containers class, as that is part of the minecraft code not exposed by spigot right?

halcyon hemlock
#

NMS

#

net.minecraft.server

#

not org.bukkit

trail lintel
#

hmm gotcha, so do I need to decompile minecraft and include that as a dependency to work with that? I don't seem to have access to that package

river oracle
#

?nms

halcyon hemlock
#

oh and the first int is the window's id

#

not the size, sorry

#

it can be any number but it should be unique

trail lintel
#

Yeah the first integer field and the third chatcomponent field are not giving me too much trouble

#

I am able to get the window ID by intercepting window open packets

river oracle
#

If your going to use nms best off using moj maps as well much easier to comprehend

halcyon hemlock
#

i mean like what is better than doing

#

((CraftPlayer) p).getHandle().b.a.k

remote swallow
river oracle
trail lintel
#

Ok, I think this site is sending me in the right direction

#

it lead me to here

remote swallow
#

the compare page is decent

trail lintel
#

now GENERIC_9x1 is indeed what I am seeing in the mojang code

remote swallow
#

gives you mojang, obsfcuated and spigot maps

trail lintel
#

but how do I translate this to a data type to send via a packet >< I am inching closer but still quite confused haha

halcyon hemlock
#

I can provide all code

trail lintel
#

I suppose I could, but I wanted to use protocollib to avoid having to change things too much between versions

halcyon hemlock
#

as an example:

PacketPlayOutOpenWindow packet = new PacketPlayOutOpenWindow(0, Containers.a ,  new ChatMessage("Test"));
        ((CraftPlayer) p).getHandle().b.sendPacket(packet);
trail lintel
#

Hmmm that is nice and clean

wise pumice
#

Anyone now how to use protocollib name tag packet? (SCOREBOARD_TEAM)?

halcyon hemlock
#

hm?

onyx fjord
#

how do i get max player limit in a bungee backend server?

#

using bungee api

trail lintel
#

Eureka! ๐Ÿ˜„ I got it figured out with your guys help. I used the spigot jar that was compiled from build tools to access the NMS classes, and was able to send the container class using protocollib as follows.

#

thanks so much to all that helped me down this confusing road of packets haha

halcyon hemlock
#

Lol

trail lintel
#

and all just to get localization working ๐Ÿ˜‰ since opening the ender chest programmatically does not use the localized name for the chest for whatever reason haha

halcyon hemlock
#

Lol nice

trail lintel
#

you were a big help sweatty thank you, I feel more powerful with this toolkit now >:D

halcyon hemlock
#

Np duke

icy beacon
#

how do i dynamically include libraries into my plugin? i've heard about libraries in plugin.yml but i can't find a tutorial anywhere

#

i want my plugin to weigh less because i want to include some heavy libs

tardy delta
#

google plugin.yml

icy beacon
#

uh

#

thanks i guess

tardy delta
icy beacon
#

yeah i don't get how exactly i'd get to work with the library though? it's not in the project, do i have to download the jar manually or something

tardy delta
#

is it on maven central?

icy beacon
#

yeah

#

mysql jdbc