#help-development

1 messages · Page 434 of 1

undone axleBOT
remote swallow
#

i would hope so

sterile token
#

If you mean storage, yes. Because you wont store locally

#

Most of time you work over Github or remote machines

#

In my case for coding i work remotly into a local dedicated server i have

urban trout
#

what im trying to do is put campfires out when they're placed and then allow players to put campfires out if they hit them

sterile token
#

Its a shity pi 4 of 8gb ram, its not the best

#

Yeah

#

As dev says, if it works dont move it

#

💀

#

Agree with you

#

Okay, GPT is weird today

#

Nothing to do to what ive asked

#

Lmao i wont touch fkg kyori componets, they are a fk mess

tardy delta
#

i believe minestom uses them by default

sterile token
#

yeah

#

That why shity minestone

#

😡

tardy delta
#

bruh

#

bet you havent even used it

sterile token
#

And i wont touch they shity api again

tardy delta
#

hows minestom shitty?

sterile token
#

Looks code by a none api experienced dev

#

Atleast the api

#

the methods doesnt have the get keyword for methods atleast

tardy delta
#

oh if thats the only thing

sterile token
#

they are like builders naming

#

instead of getPlayer(), its source() 💀

tardy delta
#

where

sterile token
#

alexitos msg be likes

#

How do you converts shity kyori componets into plain string?

young knoll
#

You need a serializer

sterile token
#

Okay, cant i get an example?

#

Im currently using the LegacyDeserializer

young knoll
#

LegacyComponentSeralizer

urban trout
eternal oxide
#

does clicking on a camp fire normally put it out?

young knoll
#

Only with a shovel iirc

urban trout
#

ye only if you use a shovel

eternal oxide
#

and you are not using a shovel?

urban trout
#

no

#

i want it so a player can just punch it out

eternal oxide
#

cancel the interact event anyway, to eliminate that possibility

urban trout
#

and it worked fine until i added the blockplaceevent

#

to make campfires start as unlit

worldly ingot
#

Probably a consequence of handedness

#

Right click with right hand, then right click with left hand in the same tick

#

Tag.CAMPFIRES.isTagged() btw

urban trout
#

what is that

worldly ingot
#

More convenient check

#

if (Tag.CAMPFIRES.isTagged(event.getBlock().getType()))

#

wut

urban trout
#

thank you choco

sterile token
#

choco?

#

What happened with some stuff they used to be more staff. Did smth happen to them?

worldly ingot
#

I don't think so

urban trout
#

ok its definitely this bit thats messing it up

    //campfire block place and make it unlit
    @EventHandler
    public void onPlace(BlockPlaceEvent event) {
        if (Tag.CAMPFIRES.isTagged(event.getBlockPlaced().getType())) {

            Campfire camp = (Campfire) event.getBlockPlaced().getBlockData();

            camp.setLit(false);
            event.getBlockPlaced().setBlockData(camp); //set the data
        }
    }```
i removed it and i can light fires and put them out fine
eternal oxide
#

that only fires if a player places the fire

young knoll
#

I eated the other staff

regal scaffold
#

How can I specify a optional parameter in @Syntax using ACF

urban trout
#

actually

#

maybe itd work if i added something to check if the palyer placed the fire

#

how does setlit work

eternal oxide
#

no, it only fires if the player does the placing

urban trout
#

does it just replace the campfire with a lit one or something

eternal oxide
#

are you doing this in creative?

urban trout
#

i was doing it in both

#

it was broken in both

strong parcel
#

I have confirmed that there are plus signs that should have the red chat color. Is the chat color removed somewhere in the process?

fluid river
#

can you explain a bit better

#

Input:
Desired output:
Actual output:

#

is that a map

strong parcel
#

It is a list of UUIDs. The blocks around the player were looped through searching for a PDC tag that marks ownership. If there is no owner, it adds "null". If there is an owner, it adds the UUID.fromString(). I am trying to send a map to the player by iterating through the list of UUIDs and appending different colored "+" signs depending on ownership. Right now, I just want white "+" for no owner and red "+" for some kind of owner.

#

I confirmed that there are UUID tags in owners when I do the test, so I am not sure why there aren't any red "+" signs showing up in the message sent to the player.

fluid river
#

that's still hard to understand for me, sry

#

try adding some more println's

#

you can try printing "OWNER" after your if check is passed

#

to see if there is like at least one owner(also at least one red plus)

strong parcel
fluid river
#

There is some kind of zone around the player

#

with blocks

#

and you loop through the blocks

#

right?

#

and on each block(somehow) there is a PDC tag

strong parcel
#

Here is a paste with all the context

#

I am using the CustomBlockData library (thanks Jeff) to assign PDC tags to blocks using the chunk.

#

The owners list looks like : [null, null, 1230e-asdfe2-asf2, null]

#

So I want the output to look like "++❌ +"

fluid river
#

you are doing like

#

owners.get(0);

#

while uuid should be bgfdgf-fdgfdg-312q312-dgf

#

can this like return something not null

strong parcel
#

I am getting the element from index 0

fluid river
#

oh shit

#

true

#

mb

strong parcel
#

No worries

fluid river
#

forgor about index

#

if you insert println between this two

#

does it like print anything

#

and all of your assembledlines are white too?

strong parcel
#

lemme see

fluid river
#

tho why don't u use bukkit.broadcastmessage

#

instead of prints

strong parcel
#

Because I just found out there is a bukkit.broadcastmessage

#

😛

fluid river
#

spigot like always sends a warning

#

when you use sysout

worldly ingot
#

It doesn't. Paper does

fluid river
#

oh

#

i thought it's spigot

worldly ingot
#

sysouts are fine for debug purposes. No harm

fluid river
#

but still

#

it's kinda sus

strong parcel
#

Oh, I figured it out, lol

fluid river
#

?

#

owners is empty or smth

#

why does it exist

strong parcel
#

Since it is a map, I divided the list into rows , but in the for loop, I grabbed owners.get(0, 1, 2, 3, 4, etc.) for every row. So the map is actually the same row repeated over and over.

fluid river
#

big pasta monster religion

#

cool

strong parcel
#

Thanks for the help!

#

We need a rubber ducky emoji

fluid river
#

i can only offer amogus gif

quaint mantle
#

How can I add a level 255 enchantment? I think there was a specific method but I forgot and I can't find it please help

young knoll
#

ItemStack.addUnsafeEnchantment

#

Or you can use ItemMeta

quaint mantle
#

Thank youuuu

frozen thorn
#

Can you please help me finding the cause?

eternal oxide
#

your events are abstract. They don;t have all the required elements

#

you also seems to be using events in a very bad way

#

tryign to fire an event for a specific item is terrible

#

mark your items as custom in the PDC and detect them in a single Listener

frozen thorn
#

it's because I want to add special properties for each items

eternal oxide
#

?pdc

frozen thorn
#

I'm already using this yes

#

to know what item is custom and to get his custom class

eternal oxide
#

then store their data in teh PDC and detect when that item is used in a Listner

#

ONE listener for all items

frozen thorn
#

but when I create properties, I need a special event as parameter

eternal oxide
#

why?

frozen thorn
#

because for exemple I want a property to add potion effect when holding the item, an other to break other blocks from a blockbreakevent, and multiple others in the future

eternal oxide
#

Nothign stopping you firing off whatever effects you want, but no need for listeners for it

frozen thorn
#

a SuperItem has a list of ItemProperty

frozen thorn
eternal oxide
#

its still a terrible design pattern

frozen thorn
#

but to start

#

I need multiple properties

#

each needs one event

eternal oxide
#

if you want to add potion effects when items are worn, just check yoru armor slots on InventoryCloseEvent

#

properties do not need to implement/register events

frozen thorn
#

yes but they need an event like BlockBreakEvent in parameter to do all mechanics

eternal oxide
#

no they don't

#

you are not understanding the MC/Spigot design

#

it is an event driven system...

#

but not an event PER item

frozen thorn
#

I know

#

so I need to find an alternative

eternal oxide
#

I just told you

#

you do NOT register any events other than your basic listners

frozen thorn
#

how can I register automatically all events I need but only one time?

eternal oxide
#

your listener checks to see if it was a custom item used, then pass the event through a Consumer/Function to handle it

#

There are very few events you need

#

eg a method java public boolean onBreak(BlockBreakEvent event) {}Does not need to be registered as an event

#

all it needs to do is process the event you pass to it

frozen thorn
#

so in ItemProperty I remove the implementation of listener

#

can I keep the handle method with a custom event?

eternal oxide
#

yes, you never need to register it as a Listener

#

you can pass it whatever events you want, just creat a method to process them

frozen thorn
#

okay

#

so for each events I need to do everytime @EventHandler in a class implementing Listener and to handle them manually for each property?

#

💀

eternal oxide
#

yes

#

a global Listener and pass to your property to handle them

eternal oxide
#

yes

frozen thorn
#

😭

eternal oxide
#

much cleaner

frozen thorn
#

yeah but it will be the same code for each events

eternal oxide
#

then use better generics so you are not hardcoding the type

#

wait no need

#

your ItemProperty is a generic interface?

#

the code you are running shoudl be specific to that property

frozen thorn
#

yes

#

so what should I do?

eternal oxide
#

not sure what you are stuck on

frozen thorn
#

ok, can I listen all events? because every time I check if each property of the superitem in player's hand is applicable to this event

eternal oxide
#

a property should be for a specific event

frozen thorn
#

yes

eternal oxide
#

so why do you want to listen to all events?

frozen thorn
#

ok let me explain you an exemple

sick edge
#

Does someone know how to best track if the inventory changes for example crafting something new, collecting an item, taking item from chest (What listeners are all needed seems like quiet a few or am I missing smth?)

eternal oxide
#

There are many events you need to listen to

#

PlayerPickUpItemEvent

#

inventoryClickEvent (this one will be complex)

#

InventoryDragEvent (also complex)

#

PlayerItemConsumeEvent

#

and a few I'm missing

#

monitoring an Inventory change is quite complex

#

especially as other plugins can also make changes

sick edge
#

Yeah I only need Vanilla stuff possible in survival so PlayerPickupItemEvent and InventoryMoveItemEvent might be enough thx for the help 🙂

young knoll
#

Wonder if we can hook the Inventory Change handler vanilla uses

sick edge
sick edge
young knoll
#

I mean it's called when the inventory changes

#

Is that not what you wanted

spare marsh
#

Using the spigotAPI, is there a way to get all structures in a server including those of a data pack? I got the vanilla structures but how would I get the ones from data packs?

young knoll
#

I don't think there is an api for data pack ones

spare marsh
#

Dang it.

young knoll
#

You can have a look at org.bukkit.generator.structure.Structure and org.bukkit.generator.structure.StructureType but I don't think it will help much

eternal oxide
#

I was going to say they have to be registered before they can be used

sick edge
eternal oxide
young knoll
#

Ah that should actually work

#

In theory

spare marsh
eternal oxide
#

if they have been registered/used yes

spare marsh
#

I’ll take a look at that. I appreciate it

grim sequoia
#

When i restarted my server, some player's money and home set got clear.how can i solve it?

rough ibex
#

huh

quaint mantle
#

How do I download spigot?

#

I can’t find the download button on the site

kind hatch
#

?bt

undone axleBOT
remote swallow
#

Run buildtools for 1.8.8

quaint mantle
#

Where can I download it, it doesn’t have a download button @kind hatch

kind hatch
#

You can't download it. You have to build it. Hence BuildTools.

quaint mantle
#

WHAT!

#

how

kind hatch
quaint mantle
#

Why can’t I click it

#

@kind hatch

subtle kite
#

Everything you need to understand is on the page itself.
Just do a bit of reading

quaint mantle
#

Ok

subtle kite
#

It's like this because of laws and stuff.

quaint mantle
#

Ok

vocal cloud
young knoll
#

Beta 1.5*

vocal cloud
#

Java 7

compact haven
#

Just go download craftbukkit 1.0 it’s in #help-server somewhere

#

and uh add the jar directly to the ide with the build path

next fossil
#

I'm trying to retrieve the net.minecraft.network.Connection in 1.19.4, but when I do so, it gives me the error:
Connection connection = craftPlayer.connection.connection;
The field ServerGamePacketListenerImpl.connection is not visible

tender shard
#

Just use the ServerGamePacketListenerImpl directly

next fossil
# tender shard Why do you need the Connection?

For a packetreader which requires the channel in order to interact with NPCs.
ServerGamePacketListenerImpl doesn't have a way to retrieve the Channel nor does its predecessors have any access to io.netty.channel.Channel

#

I'm trying to pipeline a packetinjector through said channel

tender shard
#

ah okay. in that case, you need to set the "connection" field accessible with reflection, then get it

#
    private static final Field CONNECTION_FIELD;

    static {
        try {
            CONNECTION_FIELD = ServerGamePacketListenerImpl.class.getDeclaredField("h"); // 1.19.4 = "h", https://nms.screamingsandals.org/1.19.4/net/minecraft/server/network/ServerGamePacketListenerImpl.html
            CONNECTION_FIELD.setAccessible(true);
        } catch (ReflectiveOperationException e) {
            throw new RuntimeException(e);
        }
    }

    public static Connection getConnection(Player player) {
        CraftPlayer craftPlayer = (CraftPlayer) player;
        ServerPlayer serverPlayer = craftPlayer.getHandle();
        try {
            return (Connection) CONNECTION_FIELD.get(serverPlayer.connection);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
tender shard
#

anyone know why java refuses to decode my base64 string?

Stacktrace:

java.lang.IllegalArgumentException: Illegal base64 character a
        at java.util.Base64$Decoder.decode0(Base64.java:847) ~[?:?]
        at java.util.Base64$Decoder.decode(Base64.java:566) ~[?:?]
        at de.jeff_media.angelchest.Stepsister.saveBase64VerificationTemplateToActualHtmlFile(Stepsister.java:310) ~[AngelChest-9.10.0.jar:?]
        at de.jeff_media.angelchest.Stepsister.createFile(Stepsister.java:282) ~[AngelChest-9.10.0.jar:?]
        at de.jeff_media.angelchest.Stepsister.access$000(Stepsister.java:27) ~[AngelChest-9.10.0.jar:?]
        at de.jeff_media.angelchest.Stepsister$1.run(Stepsister.java:138) ~[AngelChest-9.10.0.jar:?]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.4.jar:git-Paper-466]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.19.4.jar:git-Paper-466]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1482) ~[paper-1.19.4.jar:git-Paper-466]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.19.4.jar:git-Paper-466]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1396) ~[paper-1.19.4.jar:git-Paper-466]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1173) ~[paper-1.19.4.jar:git-Paper-466]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.19.4.jar:git-Paper-466]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Base 64 (decodes fine on CLI and on online decoders): https://paste.md-5.net/iqokuzilej.makefile

Code (line 310):

byte[] decodedBytes = Base64.getDecoder().decode(base64.getBytes(StandardCharsets.UTF_8));
ivory sleet
#

Stepsister? lol

tender shard
#

yes, it's the successor of Daddy

#

anyway, found the problem - java cries when the base64 string contains newlines

#

so I just had to base64.replace("\n", "") and it worked

torn shuttle
#

it tooks a few months but I now officially regret the way I set my scripting system

#

the systems fundamentally works but the way I injected inheritance into it is a major nightmare

tall dragon
#

sounds like time for a re write PepeLaugh

tender shard
#

you mean a ConfigurationSerializable?

#

you mean stuff like this?

mylocation:
  ==: org.bukkit.Location
  x: 20.0
  y: 64.0
  z: 20.0
  ...
#

that's what bukkit uses to identify which class that is. you could write your own serializer / deserializer, e.g. like this: (gimme a second)

#
    public static Map<String,Object> serializeLocation(Location loc) {
        Map<String,Object> map = loc.serialize();
        map.remove("==");
        return map;
    }
    
    public static Location deserializeLocation(ConfigurationSection section) {
        return Location.deserialize(section.getValues(false));
    }

// ...

    {
        Location myLoc = ...;
        myConfig.set("location", serializeLocation(myLoc));
        // and to get it again
        Location myLoc2 = deserializeLocation(myConfig.getConfigurationSection("location"));
    }

sth like that should work

tall dragon
#

you really just using the normal serializer/deserializer and removing the type xD

tender shard
#

yes

tall dragon
#

might as well just use the default then

tender shard
#

but they want to remove the == part

tall dragon
#

fair enough 😮

tender shard
#

I mean, that was literally the question 😄

tall dragon
#

id prefer my locations to just be "world,x,y,z,yaw,pitch" in configs but that is me

#

i prefer to not config locations at all by hand even more

tender shard
tall dragon
#

oh yea that is neat indeed

urban trout
urban trout
#

does anyone know how to make it not trigger for campfires being relit

tender shard
#

wdym? ofc it can

#

just use RecipeChoice.EXACT_CHOICE

#

oh wait it's not an enum

#

anyway, with ExactChoice it should work fine

tender shard
#

for shapeless recipes, that's true, but it should work fine for shaped recipes

tender shard
#

I'm pretty sure that it works fine for shaped recipes

tawdry echo
#

player head can be enchanted?

warm mica
#

There are some materials which don't glow and I believe that skulls unfortunately are one of them

terse ore
#
        getServer().getPluginManager().registerEvents(new IgniteEvent(), this);
        getServer().getPluginManager().registerEvents(new PortalUse(), this);
        getServer().getPluginManager().registerEvents(new PortalRemove(), this);
        getServer().getPluginManager().registerEvents(new PortalCreate(), this);
#

better ways to do this?

icy beacon
#

well this is fine tbh but maybe you could be like

List<Listener> listeners = new ArrayList<>();

onEnable {
    listeners.add(new IgniteEvent());
    ...
    listeners.forEach(it ->      getServer().getPluginManager().registerEvents(it, this));
}
terse ore
#

it = ?

#

wait im confused

#

why is that better=

icy beacon
#

it's just a lambda

#

there's nothing wrong with what you're already doing

#

I prefer having an initListeners() method in my init()

terse ore
#

would it be possible to loop through all the classes in a package and construct them?

eternal oxide
#

yes

#

but its annoying

#

reflection

terse ore
#

should I continue how I am doing it?

eternal oxide
#

yes

terse ore
#

okok

eternal oxide
#

you can combine listeners if they all do the same thing

#

or are closely related

#

when my IDE opens I'll show you a class I wrote for a land claim/protection plugin.

#

?paste

undone axleBOT
eternal oxide
#

You'll see a LOT of events in there

#

but its just one listener as it's all related

terse ore
#

yeah I dont think I need so many classes for listeners

eternal oxide
#

if you are dealing with portals, one class

eternal oxide
#

yep, they could all be combined into a portal listener

swift sequoia
#

Hi, i'am trying to get the lit state of a candle but it somehow always says it's not lit while it is,

    public void candleEvent(BlockIgniteEvent event){
        if (event.getBlock().getBlockData() instanceof Candle) {
            System.out.println(((Candle) event.getBlock().getBlockData()).isLit());
        }
    }

the candle return false, even if i start a thread later to check it, anyone knows why ? or if i'am doing something wrong

eternal oxide
#

use
getIgnitingBlock()

#

or not

terse ore
#

Elgar how much time since you started with Java?

swift sequoia
#

No it return the block that ignited the block, i use flint and steel so it will return null

eternal oxide
#

ok

#

in that case you are probably getting the blocks state before it's actually lit

#

it won;t be lit until the event has ended, and not been cancelled

swift sequoia
eternal oxide
terse ore
#

can I ask how old are you?

eternal oxide
swift sequoia
#

so i shall do getBlock()#getState()#getBlockData() and cast that to Lightable to have access to the #isLit ?

eternal oxide
#

no

#

forget I mentioned the state as it's confusing you

swift sequoia
#

yeah i'am confused rn xd

eternal oxide
#

if you are IN the BlockIgniteEvent, the block has not yet been ignited. It's about to happen, IF your event is not cancelled

terse ore
#

how can I get the name of a structure type?

eternal oxide
#

getKey().getKey() probably

swift sequoia
eternal oxide
#

if you run 1 tick later it should be lit

terse ore
eternal oxide
#

getKey() returns the NamespacedKey

#

getKey() on that returns just the name

swift sequoia
#

It still returns false

eternal oxide
#

?paste some code as it should not

undone axleBOT
swift sequoia
#

ok i got it to work

#

i was storying the #getBlock#getBlockData directly in my runnable, storing the block and then getting the data inside the runnable worked

eternal oxide
#

yep, you stored a data instance

swift sequoia
#

that's why i was asking about "reference" but i think i got a bit confused, but yeah that was the problem

#

thanks a lot, it works

eternal oxide
#

nice

terse ore
#

why does that happen although I have it defined

#

nvm

icy beacon
#

is it possible to change the frequency of natural regeneration?

#

e.g. slow it down x2 or speed it up x2

eternal oxide
#

regeneration of what?

#

health?

icy beacon
#

of players

#

health yeah

#

the one defined by /gamerule naturalRegeneration <bool>

eternal oxide
#

well you could turn it off and apply your own

icy beacon
#

maybe i could listen to regain health event and cancel it every second time but it's scuffed

icy beacon
eternal oxide
#

you only need check the players food level to make sure they are fully saturated then heal

icy beacon
#

frequency

eternal oxide
#

no clue what the default rate is

icy beacon
eternal oxide
#

googleing says depending in teh regen buff

#

regen 2 gives 0.8 hearts per second

ionic thicket
#

is there a way to create an item that i can access to with /give minecraft command?

lost matrix
quaint mantle
#

Help me. I cant understand spigotmc bukkit code

eternal oxide
#

its just Java

#

?basics

undone axleBOT
terse ore
#

What would be any possible reasons why my config.yml get's blank when disabling the plugin?

#

I just have saveConfig() ondisable

#
    @Override
    public void onDisable() {
        saveConfig();
        logger.log(Level.INFO, "Plugin disabled");
    }```
lost matrix
# eternal oxide its just Java

To be fair, most of the concepts are quite unusual. For example the entry point of your
JavaPlugin. Or why methods with annotations get called.

eternal oxide
#

at some point you are wiping it, or you have a bad config to start

quaint mantle
eternal oxide
#

lol

terse ore
lost matrix
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

terse ore
#

?whereami

quaint mantle
lost matrix
quaint mantle
#
index e090175d2fbe8eba664500feafc29c0567bb0c87..d77f15c58f41f1e00c75e0a022919bb7dacc9926 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,10 +9,9 @@ plugins {
 dependencies {
     implementation(project(":paper-api"))
     implementation("jline:jline:2.12.1")
-    implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") {
-        exclude(group = "org.apache.logging.log4j", module = "log4j-api")
-    }
+    implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
     implementation("org.ow2.asm:asm:9.4")
+    implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
     implementation("commons-lang:commons-lang:2.6")
lost matrix
#

This is a patch

quaint mantle
#

I cant understand

  • and -
terse ore
eternal oxide
#
  • is add and - is deleted
lost matrix
quaint mantle
#

Ok

lost matrix
#

Contribution steps will explain how to create a fork

terse ore
#

:p

eternal oxide
#

whats your default config?>

terse ore
#
# This is the name of the main world
main_world: deep_dark

structures:
  shouldgeneratestructures: true
  # Type can be whitelist or blacklist
  # whitelist will only generate the structures in the list
  # blacklist will generate all structures except the ones in the list
  # List of all structure types: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/generator/structure/StructureType.html
  type: whitelist
  structures:
    - ADD HERE THE STRUCTURE NAMES
portals:
  # Example
  # 0 (portal id):
  #   world: world name
  #   blocks: [list of block coords]
  last: -1
#

I've passed it into a yamlvalidator and it say it's fine

lost matrix
eternal oxide
#

are you calling saveDefaultConfig() in your onEnable?

terse ore
terse ore
#
    @Override
    public void onEnable() {
        logger = getLogger();
        instance = this;
        config = getConfig();

        getConfig().options().copyDefaults();
        saveDefaultConfig();

        this.getCommand("generateworld").setExecutor(new Generate());

        getServer().getPluginManager().registerEvents(new IgniteEvent(), this);
        getServer().getPluginManager().registerEvents(new PortalListener(), this);
        // getServer().getPluginManager().registerEvents(new StructureGeneration(), this);

        logger.log(Level.INFO, "Plugin enabled");

        // Will create the world when tasks are enabled (aka when you're able to create worlds)
        Bukkit.getScheduler().runTaskLater(this, () -> {
            Generator.createWorld(Config.getMainWorld());
        }, 1L);
    }```
eternal oxide
#

delete getConfig().options().copyDefaults(); it's pointless

terse ore
eternal oxide
#

this is the line thats wiping it config = getConfig();

terse ore
eternal oxide
#

move saveDefault before it

terse ore
#

still does it

eternal oxide
#

you didn't delete teh copydefaults

terse ore
#

oh

#

ok it worked

eternal oxide
#

and delete teh config.yml you have on your server (the blank one)

terse ore
#

tysm

eternal oxide
#

np

terse ore
#

why are some structures missing?

#

like ancient city

icy beacon
#

are default entity drops stored anywhere

#

like LivingEntity#getDrops() // this isn't a thing or something

trim creek
#

I guess it's inside the game's codebase. For custom drops you'd have to make custom mobs I guess

icy beacon
#

not looking for custom drops, just wanna have a way to easily fetch mob's drops

lost matrix
#

drops are evaluated through the loot table

icy beacon
#

ty i'll look into that

lone jacinth
young knoll
#

Isn’t woodland mansion also a jigsaw structure

chrome beacon
#

I believe so

lone jacinth
#

A lot is in the jigsaw

young knoll
#

Yeah but the mansion has its own StructureType

raw crow
#

on entity damage event, if health of player is 0 (then dead), if I do player.getKiller(), will it return the killer of player or is this only not null if set mannually?

lost matrix
raw crow
#

ok, but on death, player.getKiller will return a non-null value?

lost matrix
#

Nope its a nullable value. A player can ofc die without being killed by another player.

raw crow
#

yes, i know, but my answer is if i am sure that the player was killed by another player, will it return a non-null value or player.getKiller only returns a non-null value if i set it mannually by doing player.setKiller?

lost matrix
#

getKiller() will return a Player if the game determined a killer.

raw crow
#

oh ok, thanks

serene sigil
#

how do u get the PersistentDataContainer from a world?

lost matrix
#

world.getPersistentDataContainer()
(!?)

serene sigil
#

i wanted to try that lol

#

but it didnt owkr

#

work*

chrome beacon
#

Old version?

lost matrix
#

What version?

serene sigil
#

1.16

chrome beacon
#

Don't think the world has PDC in 1.16

#

Time for fun with NMS

lost matrix
#

Nah just use the PDC of the spawn chunk

serene sigil
#

how could i store some like string in a world?

chrome beacon
lost matrix
serene sigil
#

also, what does World#setmetadata do?

chrome beacon
#

That's the old metadata api

#

It will keep things in memory I believe

lost matrix
serene sigil
#

lemme see

lost matrix
#

metadata is not persistent

eternal oxide
serene sigil
#

it works!

#

like this?

PersistentDataContainer persistentDataContainer = Bukkit.getWorld(Worlds.REDWORLD).getChunkAt(Bukkit.getWorld(Worlds.REDWORLD).getSpawnLocation()).getPersistentDataContainer()
young knoll
#

Should work

#

When do we get pdc on the server itself

eternal oxide
#

just do it on Bukkit.getWorlds()[0]

#

or get(0). I forget what it returns

young knoll
#

Ye it’s a list

icy beacon
#

does anybody know of a good sign gui library? (one that allows fetching input from a sign)

pulsar veldt
#

I'm trying to understand structure palettes. How can I create a palette for a structure? The NBT of the structure file just shows a simple list called "palette". Is there another file I need to define more palettes?

pseudo hazel
#

whats in the palette list

#

if all the blocks are there then I would assume it to be enough

#

I never had to load in a structure with multiple files like that

pulsar veldt
# pseudo hazel whats in the palette list

the palette list is just a list of block states in the order that they appear in the blocks tag: ```
palette: [
{
Properties: {
axis: y
}
Name: "minecraft:birch_wood"
},
{
Name: "minecraft:birch_planks"
},
{
Properties: {
axis: x
}
Name: "minecraft:birch_wood"
},
{
Properties: {
lit: "true"
}
Name: "minecraft:redstone_lamp"
},
...
]

#

blocks stores position of the blocks, palette stores the states

pseudo hazel
#

are there not multiple files , one for each structure variation?

#

or are those generated by the game maybe

#

but I doubt it

pulsar veldt
#

there probably are, not entirely sure

sick edge
chrome beacon
#

That would require NMS

pulsar veldt
eternal oxide
#

just because it supports multiple doesn;t mean any currently have them

pulsar veldt
#

then how do I create multiple palettes lol. I wanted to try just looking at the decompiled MC code to see where it tries fetching the palettes from but idk how to do that in spigot

eternal oxide
#

No clue, I don;t know of any structure using more than one palette

#

it may not be used but for future proofing

sick edge
# chrome beacon That would require NMS

I've worked a bit with NMS (mostly Packets) but don't really know how to start with this one. Where/how does Minecraft implement their hooks and where are the Bukkit Events called from?

ancient plank
#

I too enjoy future proofing

#

Work smarter not harder

#

Technical debt go brr

pseudo hazel
#

what about past proofing though

pulsar veldt
#

more like present proofing

#

why implement a feature that you can't use

eternal oxide
#

can't use, yet

rough drift
#

Is there a way to disable the loading of spawn chunks in WorldCreator#createWorld? (It's slowing down the process, and it's fine for me to manually load the chunks that I need)

fresh timber
#

how can I play a music disc in a jukebox block?

eternal night
#

does spigot have the concept of not loading spawn chunks think

young knoll
#

I don’t think any api method for making multiple palettes exists

#

Nor do I think you can do it with a structure block

near crypt
#

I want to create custom heads but I cant import things like GameProfile or Property... why?

fresh timber
#

I've been trying to use this code to play the pigstep music disc if someone right clicks it but I keep getting an error saying class org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock cannot be cast to class org.bukkit.block.Jukebox (org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock and org.bukkit.block.Jukebox are in unnamed module of loader java.net.URLClassLoader @759ebb3d)

          if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
            if (event.getClickedBlock().getType().equals(Material.JUKEBOX)) {
                if (!(player.hasPermission("wildminer.jukebox"))) {
                    event.setCancelled(true);
                    player.sendMessage("§cYou do not have permission to use this!");
                } else {

                    ((Jukebox) event.getClickedBlock()).setPlaying(Material.MUSIC_DISC_PIGSTEP);

                }
            }
        }

Does anyone know how I can fix this?

near crypt
echo basalt
near crypt
#

com.mojang.authlib:authlib ?

young knoll
#

What version are you on

near crypt
young knoll
#

Mhm

eternal oxide
near crypt
young knoll
#

Use the api then

near crypt
#

authlib api?

young knoll
#

The spigot api

near crypt
#

ah with build tools?

young knoll
#

SkullMeta.setOwningProfile combined with PlayerProfile

fresh timber
fresh timber
eternal oxide
#

then get teh BlockState instead

fresh timber
# eternal oxide then get teh BlockState instead

the error is gone now but.. ehm.. it just doesnt play anything at all

         if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
            if (event.getClickedBlock().getType().equals(Material.JUKEBOX)) {
                if (!(player.hasPermission("wildminer.jukebox"))) {
                    event.setCancelled(true);
                    player.sendMessage("§cYou do not have permission to use this!");
                } else {

                    ((Jukebox) event.getClickedBlock().getState()).setPlaying(Material.MUSIC_DISC_PIGSTEP);

                }
            }
        }
eternal oxide
#

call .update() on the state

#

store teh satate, make changes, then call update

small current
#

there is no ChatMessage in 1.19.4, what should i do

young knoll
#

What is ChatMessage

small current
#

a class

#

it was in older versions

eternal oxide
#

more info

small current
#

for now i chose to Panic

#

net.minecraft.network.chat.ChatMessage

eternal oxide
#

so protocol

fresh timber
small current
#

yeah, sorry if i didnt provide enough info at first

fresh timber
#

mk

near crypt
#

@young knoll why is setOwner() deprecated? How can I fix it or should i just do @Deprecated?

eternal oxide
#

How about OutgoingChatMessage.java

#

or PlayerChatMessage.java

undone axleBOT
icy beacon
#

if you are talking about skulls

small current
eternal oxide
#

neither, those are chat

near crypt
small current
#

in 1.17.1

#

Which implementation of IChatBaseComponent should i use

eternal oxide
#

why are you using packets to set names?

remote swallow
small current
#

just tell me which class should i use

fresh timber
#

I'm trying to play a music disc in a jukebox if the jukebox is not playing anything and then if it is already playing something, stop that song and the next time you right click it will play again or even just restart. I have this code and it just starts another song every time you right click again so you have like 20 songs playing at the same time and it won't stop.

        if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
            if (event.getClickedBlock().getType().equals(Material.JUKEBOX)) {
                if (!(player.hasPermission("wildminer.jukebox"))) {
                    event.setCancelled(true);
                    player.sendMessage("§cYou do not have permission to use this!");
                } else {

                    event.setCancelled(true);
                    Jukebox jb = (Jukebox) event.getClickedBlock().getState();
                    if (jb.isPlaying()) {
                        jb.setPlaying(Material.AIR);
                    } else {
                        jb.setPlaying(Material.MUSIC_DISC_PIGSTEP);
                    }
                    jb.update();

                }
            }
        }

does anyone know how I can fix this?

echo basalt
small current
echo basalt
#

yeah nms' component

small current
#

i dont have mappings

young knoll
#

💀

small current
#

there is no class by that name

#

its only spigot or bungee

#

:(

young knoll
#

Get mappings

small current
carmine mica
#

its just Component

#

there aren't separate implementations of that now, there are separate implementations of ComponentContents

small current
#

which implementation of it

#

in the setCustomname method

#

or b

carmine mica
#

there aren't separate implementations of it, if the method takes Component, then you have to create one of those. should be static methods on that interface

small current
#

Then, i cant set custom names anymore?

lost matrix
terse ore
lost matrix
# small current how

For example like this:

nmsZombie.setCustomName(Component.literal("Some cool text"));
small current
#

where is PacketPlayOutSpawnEntityLiving

#

hell naw

#

why everything changed

young knoll
#

This is why you use mapped NMS

small current
#

nah

#

too much work

#

boring

near crypt
#

How can i create a table in sql which contains the uuid of a player? What is the datatype of a uuid in my sql?

young knoll
#

Doesn't MySQL have a uuid datatype

near crypt
remote swallow
#

no it doesnt

lost matrix
#

Using moj mapped will help you in the long run. If you are using obfuscated or spigot mapped then you will be left behind.

solar mauve
remote swallow
#

you can use char(36) for uuid as a string

lost matrix
#

SQLite doesnt. But MySQL should have a uuid type

#

Or was it Postgres

hazy parrot
#

If it doesn't have, store it as byte array

young knoll
#

ew char(36)

lost matrix
#

Postgres has it for sure

small current
#

where is PacketPlayOutSpawnEntityLiving now

young knoll
#

At least drop the dashes and use char(32)

lost matrix
#

Which is btw the better sql db anyways

remote swallow
#

could also use a blob and byte array

lost matrix
young knoll
#

Do the dashes matter in some way?

near crypt
small current
remote swallow
small current
#

that should be PacketPlayOutSpawnEntity

#

and its not living

lost matrix
near crypt
lost matrix
#

?notworking

undone axleBOT
#

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

young knoll
#

I normally just convert it to binary

near crypt
young knoll
#

But I've read that isn't ideal for primary key

near crypt
lost matrix
#

Send the actual code. We cant predict your syntax error from thin air.

lost matrix
#
binary(16) PRIMARY KEY
near crypt
#

ok thx

hazy parrot
young knoll
#

I mean we know there won't be collision with player uuids

lost matrix
#

I always cite this one
"Only after generating 1 billion UUIDs every second for the next 100 years, the probability of creating just one duplicate would be about 50%."

near crypt
hazy parrot
#

Drop table lol

hazy parrot
near crypt
hazy parrot
near crypt
#

oh yes like: DROP TABLE coc_money;

lost matrix
#
DROP TABLE yourTableName;
#

Yeah

#

Unless you have relations. Then you need to cascade

tardy delta
#

learnt about sql precedures today

warm mica
tardy delta
#

we saw some java code in the databases class today and i was terrified

young knoll
#

Lol?

tardy delta
#

dude was not even closing anything

#

no hikari :(

young knoll
#

Hey it'll close itself when the JVM terminates

#

It's fine

tardy delta
#

you guess

#

someone had to explain what it did and the whole class was impressed

#

i was like cmon man that was the easiest database shit ive ever seen

subtle light
#

anyone know what plugin i can use to make an rtp gui to rtp in nether overworld and end?

young knoll
#

Well

#

DeluxeMenus can make GUIs

#

Combine that with any RTP plugin that supports multiple worlds

buoyant viper
tardy delta
#

programming is so boring, we learnt about how to extend a class prev week

buoyant viper
#

like

#

the Whole week?

icy beacon
#

cut em some slack

#

it's hard to memorize a keyword extend

#

and the fact that it extends

remote swallow
#

it does?

#

thats crazy

winged anvil
#

its not really about the difficulty of the content

#

but making sure everyone is at the same level

young knoll
#

And that is why my college course started with how to CTRL C + V

winged anvil
#

yes exactly

#

teachers have to build a foundation

tardy delta
#

i believe we had 6 prev semester 💀

buoyant viper
young knoll
#

I mean we didn't really progress much farther

rare rover
#

how would i change the output dir in gradle?

#

ik how to do it in maven

#

but

#

using maven-jar-plugin

remote swallow
#

using shadow jar

#

then shadow jar should look like ```groovy
shadowJar {
destinationDirectory = file("./target/")
}

rare rover
#

oh i see now

#

yeah

#

tysm

alpine swan
#
        Vector velocity = event.getEntity().getVelocity();
        Bukkit.broadcastMessage("" + event.getEntity().getVelocity().length());
        velocity.setX(velocity.getX() * multiplier);
        velocity.setZ(velocity.getZ() * multiplier);
        velocity.setY(velocity.getY() - multiplier);
        Bukkit.broadcastMessage("" + event.getEntity().getVelocity().length());```

why does this not change the speed of the object?
young knoll
#

entity.setVelocity

rare token
#

I'm trying to set the players yaw and pitch to their original one before the arrow lands but it just sets to something random:

Location loc = e.getEntity().getLocation();
                    float yaw = player.getLocation().getYaw();
                    float pitch = player.getLocation().getPitch();

                    player.teleport(loc);
                    player.getLocation().setYaw(yaw);
                    player.getLocation().setPitch(pitch);
                    e.getEntity().remove();
lost matrix
#
    float yaw = player.getEyeLocation().getYaw();
    float pitch = player.getEyeLocation().getPitch();
    tpLoc.setPitch(pitch);
    tpLoc.setYaw(yaw);
ashen quest
#

hey guys, how can i make maven build my plugin to a custom path? kinda lazy to move it everytime.

winged anvil
#

maven-jar-plugin

young knoll
#

Oh wait maven

#

Am slow

#

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>../libs</outputDirectory>
</configuration>
</plugin>

winged anvil
#
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>3.3.0</version>
    <configuration>
      <outputDirectory>YourDirectoryHere</outputDirectory>
    </configuration>
</plugin>``` @ashen quest
#

wow

ashen quest
#

Ty

winged anvil
#

am slow

ashen quest
remote swallow
#

im slower than both

alpine swan
young knoll
#

I mean yours probably has a modern version of the jar plugin XD

#

It's probably a copy

#

Hence the set method

young knoll
#

Does setting keep spawn in memory to false work?

rough drift
#

No, because I don't have a world instance yet

#

createWorld returns a world instance of the newly loaded/created world

#

(Loaded since I already have all the files)

young knoll
#

huh I thought that was a method on the creator

#

Guess not

lost matrix
#

Only on paper

rough drift
ashen quest
lost matrix
tardy delta
#

i thought those two were the same

rough drift
#

I don't really know which one to use

young knoll
#

Probably init?

#

The docs don't help much XD

rough drift
#

Yep

#

Lemme check stash

young knoll
#

Maybe I should add clarification for that

rough drift
#

It's called right before chunks are generated and after the world border is initialized

young knoll
#

How does that compare to the load event

#

Okay its before load

tardy delta
#

i could really use some rust enums in java 🥹

remote swallow
#

make them

regal scaffold
#

?export

#

What’s Alex’s command for maven export

remote swallow
#

huh

regal scaffold
#

?jar

undone axleBOT
#
"Cant you just send the Spigot jar?"
  No, we can't. It's illegal to distribute Mojang code, meaning that you have to use BuildTools to build the Spigot jar.
remote swallow
#

the change location of maven jar output?

regal scaffold
#

Test server plugin expert

remote swallow
#

mock bukkit?

regal scaffold
#

Yeah it’s for someone else that needs it

#

Alex’s forums

tardy delta
#

just realized i dont need an usb dongle when i use my mouse with a cable

regal scaffold
#

Thanks ebic

desert tinsel
#

I have troubles with the default config.yml, Why after I make some modification via spigot code, all my comments, or other variables are removed?

#

I use config#set(); plugin#saveConfig();

#

Do I need to replace saveConfig with saveDefaultConfig?

remote swallow
#

saveDefaultConfig should be ran onEnable to save the config from resources

#

saveConfig should be used when you call #set()

cedar dagger
#

if im looking for a plugin do you know where i could find it

remote swallow
hazy parrot
#

BTW if you are using older version of spigot, saveConfig will remove comments, as they are not parsed

desert tinsel
# hazy parrot How exactly code after modification is removed

my config before:

#Do not change here, just use /setup command.
changes:
  x1: 0
  x2: 0
  y1: 0
  y2: 0
  z1: 0
  z2: 0



#Messages
#{variable}
no-space: '&7There is not enough space: " + {lun} + "x" + {lat} + "x" + {ina}'
create-ground: '&7You need to create the base on ground.'

error: '&cOOPS! Something went wrong, please contact an administrator'

cannot-interact: '&7You cannot interact on this base because it s not your base.'
position:
  first: '&aFirst position was set up'
  second: '&aSecond position was set up'
  saved: '&aYou saved the region'
  error: '&cYou did not defined the region, use the netherite axe to do it.'

no-console: 'This command can be used only by a player.'```
after I set the 'changes' values (that s all)
```yml
changes:
  x1: -3
  x2: 3
  y1: 0
  y2: 3
  z1: 2
  z2: -2
desert tinsel
#
FileConfiguration c = plugin.getConfig();
                        c.set("changes.x1", x1);
                        c.set("changes.x2", x2);
                        c.set("changes.y1", y1);
                        c.set("changes.y2", y2);
                        c.set("changes.z1", z1);
                        c.set("changes.z2", z2);
                        plugin.saveConfig();```
hazy parrot
#

So basically only thing that persist is your setted stuff

desert tinsel
#

yes, I m using the 1.19 API

languid marsh
#

Hello, i want to make my %server_time_EEE, MMM d% but in my language
anyone have an idea how i can do that?
im using this for Featherboard

tawdry echo
#

i want to cancel trades with villager so what event i have to use?

young knoll
#

Pretty sure it's just the InventoryClickEvent

tawdry echo
#

i think i cancel opening merchant totally

young knoll
#

you can do that with the PlayerInteractEntityEvent

lost matrix
near crypt
#

When is this error called? Could not pass event PlayerJoinEvent to ClashOfClans v1.0-SNAPSHOT
org.bukkit.event.EventException: null

undone axleBOT
#

The NullPointerException, (commonly referred to as NPE), is thrown in the following cases, but not sealed to: 1. null is passed into a method or constructor which does not allow it; 2. When trying to access a field on an object pointing to null; 3. Casting null to a primitive. See https://stackoverflow.com/a/3988794/17047120 for information on how to debug NPEs.

tall citrus
#

Okay i need help

#

I want to create a function that waits untill a player places a block, but i can't find the way

#

Can i show my code in pastebin or something?

hazy parrot
#

You can just make kind of set (if should wait for place block), then in place block event, just check if player is inside of that set

tall citrus
#

Is not that easy, its an async stuff

hazy parrot
#

What

tall citrus
#

can i show you my code?

hazy parrot
#

Sure

tardy delta
#

this doesnt feel right bruh

#

always fun discovering bugs when you thought something worked

halcyon hemlock
#

minikloon from walmart

tardy delta
#

all tests pass so thats something

regal scaffold
#

Is

#

NBTTagCompound same as TagCompound 1.17

#

Cause I also see there's no tag#setString() method either

fluid river
fluid river
#

or stream the screen

#

we need your onEnable() + all of the methods which have config.set() or saveConfig() inside

ivory sleet
#

In short, dump us everything you got

#

Probably due to the
==: org.bukkit.Location

#

Which may confuse server endusers

#

Myea

#

Well you at some point ought to separate configuration data from arbitrary formatted data anyway, since config data is usually read once anyway

halcyon mica
#

So question, when using the world creator, spigot is failing pretty hard on 1.19.4

halcyon mica
#

Not done writing, smart guy

lost matrix
halcyon mica
#

It apparently tries to generate using the new cherry biomes, but the feature toggle is not on, and as such it errors when trying to find the biome definition in the registry

#

Is that a known issue?

lost matrix
#

Lets see

halcyon mica
lost matrix
#

?stash

halcyon mica
#

See here

undone axleBOT
young knoll
#

Did someone make an oopsie

halcyon mica
#

And for reference, enabling the experimental datapack does fix it

#

Since it is now added to the registry

young knoll
#

You can get experimental items without the pack enabled too using spigot

#

It seems the support for the new experimental stuff is a bit... experimental atm

halcyon mica
#

Here's the thing, I have no interest in supporting the experimental stuff

#

It's doing this with the datapack disabled

young knoll
#

Is this just making a normal world

#

No custom generator or biome provider

halcyon mica
#

Indeed

covert dune
#

Any idea how can I force mythicmobs mob to go in one direction?

lost matrix
#

Hm there is an issue but it was resolved 2 weeks ago

covert dune
#

Unfortunately I haven't found any goalai or something in their wiki so I have to force it with my plugin

young knoll
#

I only see an issue with it being missing in enums

lost matrix
#

Oh yeah no mentioning about the registry

lost matrix
young knoll
#

Also I just noticed you are using paper

#

Does it also happen on spigot

halcyon mica
#

I tested with pure spigot as well, yeah

#

I am just using paper for some profiling, it's my default setup

covert dune
#

Like a plane in pubg

lost matrix
#

Then try letting it move relative to ~X ~ ~Z

covert dune
#

How about flying entity

#

I want it to fly

#

Straight

lost matrix
#

Honestly ask on the MM discord or forum

halcyon mica
#

Oh hang on

#

I think I see

#

The experimental biomes are added to the enum

#

So now I can't iterate over the enum anymore to get all available biomes

#

That sucks

sullen marlin
#

Hard to solve

young knoll
#

IsExperimental boolean?

halcyon mica
#

Could just have Biomes and BiomesExperimental

lost matrix
#

Make it not an enum but a class with constants :D

halcyon mica
#

Also that

young knoll
#

But that pr isn't updated yet :p

remote swallow
#

md can we have that merged in 1.20

#

if its updated

#

can we also get loads more prs that modify lots merged

#

merge all the prs for 1.20

young knoll
#

All of them

#

Even if they are unfinished or just straight up not working

lost matrix
#

And no testing pls

young knoll
#

Ship it

remote swallow
#

yes

#

merge all open prs and release

halcyon mica
#

Don't joke about that

#

I have worked with too many people that operate like that

lost matrix
#

Release 1.20 right now PES_GunR

young knoll
#

Spigotpunk2077

halcyon mica
#

Well, that did it

#

God dammit

lost matrix
#

Let only Verano decide which prs get pulled

young knoll
#

👀

remote swallow
#

that would go great

young knoll
#

sdfdfgdfg

#

One day I will remember interact event is fired twice

remote swallow
#

no you wont

sullen marlin
#

That was such a mistake

young knoll
opaque scarab
#

Anyone know the packet used to make a player appear to be crouching on the client side? I’m using the mojang remappings.

#

Sorry, I’m fairly new to NMS (I don’t use it much)

ionic oxide
#

recently started minecraft development, how do i save player data to a variable?

winged anvil
#

learnjava?

#

what the fuck

#

?ls

rough ibex
#

?learnjava

undone axleBOT
winged anvil
#

yes that one

opaque scarab
#

That will determine the type of variable you should use. If you are trying to store data long term, put the information in a database or file

#

Also, yeah, no offense but if you don’t know how to make a variable, learn the basics first. There’s a lot of resources out there (:

ionic oxide
#

i do, im just not sure how to store it with a player

soft flame
#

each one being used in one case or another

#

just please dont use txt

hazy parrot
#

Me when I store data in txt

soft flame
soft flame
echo basalt
#

Sneaking is considered a pose, on the Entity Metadata packet

#

You can create an entity metadata packet, and change the pose (usually at index 6) to SNEAKING and it should work

#

This is a bit stupid but should work (make sure to define your nms player)

livid dove
# hazy parrot Me when I store data in txt

You joke but i realise yesterday a region file, which holds of 32x32x16x16x256 blocks init with unique paletes of 20+ blocks ... is 100mb...

Considering sqls like coreprotect with 400k rows are like 9GB plus...

Maybe we have had a great way to store easy to grab data all along 😅

young knoll
#

Okay but most blocks can be stored as a single integer

#

A log for breaking a block, not as much

echo basalt
#

or a byte

#

if the palette is smaller

compact haven
#

^ region data is tiny

echo basalt
#

it'd be a bit heavier to do recalc if the palette size expands much

#

but if it's for something that only gets parsed once or twice and not edited, you can actually do some optimizations with a bit buffer

compact haven
#

Log data requires a time stamp, likely 8 bytes right there. Then a user, another 16, a block, any miscellaneous data, etc

#

now absolutely coreprotect doesn’t just restore everything anew

#

if you check the database it’s broken up into separate palettes as well, so a user can be represented in a much smaller number of bytes with some relational key

#

though you also need to consider the fact that you’re storing interactions to the point it can be reversed to any state in the past, not just current state

young knoll
#

Minecraft’s structure files on the other hand are kinda bulky

#

Compared to sponge schematics

sage dragon
#

Is it possible to spawn an Entity with already modified PersistentDataContainer?

young knoll
#

You can use the spawn method that has a consumer

sage dragon
young knoll
#

It should

sage dragon
#

Okay, thanks

opaque scarab
lost matrix
opaque scarab
#

How would I do that? Sorry I’m new to this

lost matrix
#
List<SynchedEntityData.DataValue<?>> valueList = serverPlayer.getEntityData().packDirty();

New to nms or Spigot development?

opaque scarab
#

Is this correct?

lost matrix
#

of the player changes

#

So in most cases it will be reverted within a second

opaque scarab
safe flower
#

How do you do this in spigot 1.9.4-R0.1-SNAPSHOT?

net.md_5.bungee.api.ChatColor.of("#FFFF")```
jagged monolith
#

Hex colours were implemented in 1.16+ not before.

safe flower
#

oh shoot

#

I thought I had 1.19.4

#

😅

jagged monolith
#

Anything after 1.16 will have the hex colours

safe flower
#

ty 😛

opaque scarab
#

Completely different question, but what packet would I use to make it appear a player is swinging hand on the client? I’m using the mojang remappings

young knoll
#

Use the api

#

swingMainHand/swingOffHand

sage dragon
#

Hey,

I am trying to check if a player hit a mob's head with a melee attack.

Not really good at math, so a little hint would be nice 😅

quaint mantle
#

just needa confirm this here to make sure im not dumb
you cant change the texture of blocks without the user using a mod / resourcePack correct.
for example i want to make grass semi transparent or smth

young knoll
#

Correct

quaint mantle
#

kk just wanted to be sure lol

sage dragon
quaint mantle
#

ye

sage dragon
opaque scarab
young knoll
#

I see

regal scaffold
#

Where is my settings.xml file located at for maven?

arctic delta
#

Anyone have experience editing the spigot source code?

#

I'm trying to create a fork of spigot but I want to build it with kotlin

#

However, spigot's compiling process doesn't seem to like kotlin

bold vessel
#

Som1 know why this isnt working ?
The config file / folder isnt created

young knoll
#

Yeah calling loadConfiguration doesn’t make the file

#

You can just use saveDefaultConfig

winged anvil
#

it makes it a lot easier

quaint mantle
#

how dies via version translate the new entity stuff?

young knoll
#

Armor stands

indigo frost
#

hi, how do i change a mob's data when they are already spawned in to have no AI

delicate lynx
#

there's a setAI() function you can use

unique sable
#

I have set the Api version in my plugin.yml as 18.0 , but it's saying "unsupported api version : 18.0" On my 1.18.2 spigot server

young knoll
#

1.18

unique sable
#

I assumed it works with 1.18+?

young knoll
#

Yes

bold vessel
#

Hi ! Som1 know why its not teleporting the player to the f home or anythings ?
It supposed to claim the chunk at the coordinate in config, fsethome at the coordinate and teleport the owner

The code :
https://paste.md-5.net/ohotedegag.java

#

Config

#

And i dont get error

remote swallow
#

Because thats a map list not a string list

bold vessel
#

So what should i edit ?

hasty pebble
#

Hello all I was wondering if there is a way to add world edit without a server

bold vessel
bold vessel
#

Or u can local host a server

young knoll
#

Worldedit can run as a fabric or forge mod

hasty pebble
#

How do you local host

bold vessel
#

Look on youtube

hasty pebble
#

Listen I just got Java for my tiny human I know legit none of this so I am sorry for not being in the know

bold vessel
young knoll
#

I mean I would just go for the mod

#

But sure

bold vessel
#

Yeah fr mods is easiest

hasty pebble
#

Where do I find mods for Java and how do I add them

young knoll
#

You can use something like the curseforge launcher to install it

#

Or multi mc? Idk if that has one click mod installation

wet breach
# regal scaffold Where is my settings.xml file located at for maven?

Depends which one. You can add a settings.xml in the root project directory which allows per project maven settings. and then there is a global settings file. If you have maven standalone its located with the binary. If instead use maven provided by the ide you have to find where the ide stores maven

bold vessel
#

multimc is complex ahah

young knoll
#

Mm then curseforge

#

Or just find a tutorial on how to install forge and forge mods, it’s pretty simple thanks to the installer

undone axleBOT
hasty pebble
#

Oh never mind I get it

wet breach
#

Then find some plugins toss them into plugins directory

#

Configure them etc

#

Then you run the server on the pc and have the other computers connect to it

#

If you go with 1.17 or newer mc version. Then make sure to have java 17 installed

hasty pebble
#

What's packs

wet breach
#

In what context?

hasty pebble
#

In create world

#

I only have 1.19.4 and some snapshots avaliable I honestly got Java for free through my Xbox

#

Xbox ultimate for pc that is

wet breach
#

Java is always free

young knoll
#

Java edition