#help-development

1 messages · Page 1187 of 1

young knoll
#

I thought they said something about archiving it on the same domain since the domain was trusted

left jay
#

yeah but it looks scrumptious for making guis

smoky anchor
#

How bad of an idea is it to do dumb stuff like this.
Creating public static final variables inside of an interface.
The reason is "it's faster to type".
-# pls tag, me go to sleep soon

remote swallow
#

spigot does it for some things now

#

@smoky anchor ^^

sly topaz
#

but it isn't particularly wrong to have a public constant, people just tend to avoid doing that in the java world

#

mainly because it makes the code inextensible, but there are use cases where it is valid

thorny vortex
#

hey anyone think they could help me with a issue im having?

remote swallow
#

ask away

wraith delta
pseudo iron
#

The people who can use the command are configable

quaint mantle
#

are you able to make different classes for sum commands?

#

so like if theres /party join /party invite /party disband soo I could make different classes for join, invite and disband

blazing ocean
#

please just use a command framework

quaint mantle
#

which one?

#

maybe cloud

quaint mantle
#

I will be trying cloud framework

#

cloud framework do be hard to understand

echo basalt
#

I prefer command-api rn

quaint mantle
#

yea I might look into that cloud seems very confusing

#

I cant understand anything

#

good part of capi is its VERY well documented

#

alot of examples too

drowsy helm
#

Acf still ftw

quaint mantle
drowsy helm
#

Annotation based framework

quaint mantle
#

annotation? eh

#

this is sort of what I was doing with CAPI

#
public class PartyInviteCommand extends CommandAPICommand {

    public PartyInviteCommand() {
        super("invite");
        withPermission("mungeons.party.invite");
        withArguments(new PlayerArgument("invitee"));

        // Console sender
        executesConsole((sender, args) -> {
            sender.sendMessage("player only command");
        });

        // Player sender
        executesPlayer((sender, args) -> {
            PartyManager manager = Mungeons.getPartyManager();
            Player player = sender;
            String playerArg = (String) args.get("invitee");

            // Invalid arguments
            if (playerArg == null || playerArg.isEmpty()) {
                player.sendMessage("invalid args");
            }

            assert playerArg != null; // We performed the null check above.
            Player invitee = player.getServer().getPlayer(playerArg);

            // Not a valid / offline player
            if (invitee == null) {
                player.sendMessage("not a valid player");
            }

            if (!manager.isInParty(player)) {
                // Player is not in a party...Creating one
                Party party = manager.createParty(player);
                InvitationRequest request = InvitationRequest.from(player, invitee, party);
            } else {
                // Getting the instance of party
                Party party = manager.getPartyByLeader(player);

                if (party == null) {
                    // Player is not the leader
                    player.sendMessage("Not the leader of current party.");
                }

                // Player is the leader
                InvitationRequest request = InvitationRequest.from(player, invitee, party);
            }
        });
    }
}```
#

I will take a look at ACF rq

drowsy helm
#

Can do that in like 10 lines in acf

quaint mantle
#

this is 10 lines I just added alot of spacing

#

and comments

drowsy helm
#

Some people just dont like annotations which is fair enough

quaint mantle
#

which is why I was looking at ACF rn

drowsy helm
#

It majorly reduces boilerplate which is why I like it

#

Like you dont have to do those checks if player exists etc, it will do it for you

#

You can also have custom resolvers for other classes

quaint mantle
#

O: it has a thing for sub command

drowsy helm
#

Yeah you can do super nested sub commands with ease

#

All auto resolves for you with command completions

quaint mantle
#

hehe dont mind me

#

rq changing cmd framework

#

I saw its example and it looks neat

drowsy helm
#

But again, take with a grain of salt. Everyone has their opinions on command frameworks

quaint mantle
#

I really love annotations based frame work

#

but I will change it l8r

#

at the end of the day i want clean code

drowsy helm
#

Also ur not returning on your null checks in that code

#

So it’s still gonna npe

quaint mantle
#

oh I forgot....

#

ty for mentioning

#

b4 i was using normal bukkit one soo I had returns but then I copy pasted it

#

🤷‍♂️

echo basalt
#

damn you extend the class

#

I just init it directly

hushed spindle
#

if i want to get the name of an item is Material#name() sufficient if the item's meta has no display name?

#

i'd like to make a placeholder retrieving the item name exactly how the player sees it, i'd prefer if could be translated too but i reckon the best way to do that is for the server admin to change their servers language

#

is there any api that allows getting a translated item name

smoky anchor
#

There is Material#getTranslationKey()
So the best way to go about this would be to create a text component with that translatable and drop that into the placeholder, but I don't know placeholder enough to know if it supports this.
The other way I think is to just hold all the translation files yourself and look up the name there
You can use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#getLocale() to know which language the player has set.

quaint mantle
#

can u use EntityDamageByEntityEvent to detect damages? by player to a mob

warm mica
quaint mantle
#

alr thanks

hushed spindle
#

and that doesnt work with components on spigot

#

it seems that the only solution is to either store the translation files in the plugin itself, which is not practical, or to use some api

#

but i dont know of an api that is good for translating items like this

#

automatic translators like google translate often make mistakes because the text is very out of context

young knoll
#

NMS is an option

sly topaz
hushed spindle
#

im fine with using nms, what should i look for?

sly topaz
#

usually you don't do automatic translation but rather provide a resource pack with the languages your server support

young knoll
#

You’ll need to use reflection to access the displayName field in CraftItemMeta

hushed spindle
#

im ok with that

#

ill try it out

sly topaz
#

wait, why would you need to do that

#

doesn't itemName get you the default item name if they haven't changed it

young knoll
#

Don’t think so?

hushed spindle
#

getDisplayName() returns null if no specific display name is set

#

actually i think it might even throw an exception considering hasDisplayName() exists

#

and using a resource pack for the plugin im making is very unpractical, its a big measure for whats essentially 1 tiny feature

sly topaz
#

I mean, if the server is providing translations then usually they'd have one anyway but well, server-side translations are an option too

young knoll
#

getItemName is @notnull

hushed spindle
#

thats what im looking for but i also know that changing server translations isnt the easiest thing for most people

young knoll
#

But it says to check hasItemName first

smoky anchor
#

I mean, surely you could split the resulting string from placeholder, put it in a component and throw in the translatable item name, no ?
(or does spigot still not have support for components in item name/lore)

hushed spindle
#

i know paper supports it with their adventure shenanigans

#

last time i heard spigot doesnt support it yet

sly topaz
#

Spigot has a PR open for it but yeah, it isn't merged yet

smoky anchor
#

Who do we yell at again ? :D

hushed spindle
#

obama

sly topaz
#

whenever it is, you'll be able to do someMeta.components().setDisplayName(bungeeComponents)

hushed spindle
#

on craftmeta i assume

#

craftitemmeta

sly topaz
#

no, that isn't available yet as the PR hasn't been merged

#

if you want to do it now, I'd assume you'd have to do it to the handle directly

young knoll
#

Yup

#

And you need reflection shenanigans because CraftItemMeta is private

#

Well, package private

sly topaz
#

wait, is it?

young knoll
#

Yes

sly topaz
#

you can just use CraftItemStack#asNMSCopy and edit the ItemStack handle directly rather

#

I forget that meta is a bukkit concept lol

hushed spindle
#

good thing because im reading the item directly from a packet

#

so i can just do that

young knoll
#

True

#

I just use CraftMetaItem because I already have an instance and I don’t want to waste time making a copy, editing it, and then mirroring it back to a CraftItemStack

sly topaz
#

I mean, applying that meta is already a process so both approaches aren't particularly pretty anyway

#

I don't get what the heck the item name is supposed to be

#

how does it differ from custom name besides the fact that it can't have styles

young knoll
#

No idea

chrome beacon
#

Do so in your plugin.yml

quaint mantle
#

I which version the PDC came? in the 1.14?

chrome beacon
#

yes

quaint mantle
#

okey thanks

smoky anchor
# sly topaz I don't get what the heck the item name is supposed to be

If you're talking about the two vanilla componnets:
item_name exists for items like Banners, the illager banner has different name, or burried treasure maps. They used to be itallic which is incredibly inconsistent. Now they just use that component instead. It is also used by every item, it only references the translation.
custom_name is the name given in anvil, and it is itallic by default.

sly topaz
pseudo hazel
#

all other game items dont have italic names

smoky anchor
#

It was basically presented as a "special" item, even tho the base was normal banner.
It having italic name just looked off.

smoky anchor
pseudo hazel
#

but yeah its for names that arent from anvils or from the translated material names

sly topaz
#

so basically only really useful to data pack people

smoky anchor
#

Wdym, it's literally used in vanilla

#

And if you make custom item, I would always recommend you use that component instead of custom name

sly topaz
#

why would I use that component if it can't have colors

#

in any case one would use a combination of the two I guess

smoky anchor
#

Can you not ?
Then I guess they inherit the color from Rarity.

sly topaz
sly topaz
young knoll
#

Why use it over display name though

#

Display name at least is more backwards compatible :p

sly topaz
#

who cares about backwards compatibility at this point

young knoll
#

Well yeah

#

But shh

sly topaz
#

it is permanent to the item I guess? One would usually use PDC to do that

smoky anchor
#

item_name is also not shown in item frames, so that's pog :)

sly topaz
#

so it essentially acts as if the item doesn't have a custom name

young knoll
#

I wonder

sly topaz
#

I am not sure I can make much use off that tbh, I'd rather just use display name

young knoll
#

If you rename the item, then remove the custom display name (empty name in anvil) does it go back to the custom item_name

smoky anchor
#

yes

sly topaz
#

that's useful

smoky anchor
#

the item_name becomes the item name
Item name is no longer hard coded, that is just how it is defined, with that component

young knoll
#

So it’s kinda like actually adding a new item with its own name

slender elbow
young knoll
#

Neat

#

?

sly topaz
#

we mean custom name component by display name

young knoll
#

Yeah

sly topaz
#

I'll never call it custom name tbh, I'm too bukkit coded

young knoll
#

custom_name is the component

#

Display name is the Bukkitified version

smoky anchor
#

nowadays there are only few hard-coded things for items
custom behaviours like bow, trident, fishing rod. But this will change soon too.
Tools, item name, item model are all components and can be put on any item

young knoll
#

I do like that you can make custom items that support renaming though

#

Now give us block components Mojang <3

smoky anchor
#

Yep, it's awesome
Soon we will not need this tho, custom items are on the horizon (probably)

sly topaz
#

does it inherit the rarity color if you don't use any colors in item name? I wonder

smoky anchor
#

I do believe so

quaint mantle
#

Someone can send me the link to the lib for blocks pdc. I can't find it. I think it was made by mfnalex

sly topaz
#

?blockpdc

undone axleBOT
sly topaz
#

that's nice

quaint mantle
hushed spindle
#

wtf is a codec

#

and how does it translate to a name

smoky anchor
#

You do not need to touch Codecs at all

smoky anchor
# hushed spindle wtf is a codec

But to answer your question:
Codec is how the game serializes objects from/to json/nbt
It can also validate inputs and it throws errors on incomplete input
It is part of the DataFixerUpper library.

hushed spindle
#

oh so its just a serialization thing

#

/deserialization

smoky anchor
hushed spindle
#

sick, thank you

smoky anchor
#

Oh I don't think this was ever updated to components
The NBT access will be incorrect

#

@hushed spindle

hushed spindle
#

darn

smoky anchor
#

I don't recall how to get the data components from NMS stack
But if you go through some vanilla item code, you should be able to figure that out yourself

hushed spindle
#

getting them is fine but setting them is weird

smoky anchor
#

You gotta replace. You can't modify the component object itself.

#

I remember that part.

hushed spindle
#

yeah you do ItemStack#set it seems

#

you give it the type you want or in this case DISPLAY_NAME

#

and you set a value to it

#

but the value is weird

#

i originally thought it wanted a codec but clearly thats wrong

smoky anchor
#

Isn't it just a record with TextComponent ?

#

Man, if only I had private MC decompiled repo

hushed spindle
#

yeah it does

#

it expects a type of Component

#

but how to convert a display name to text components and then pass it onto it i dont know

smoky anchor
#

(I found decompiled, deobfuscated MC code on github, public repo)
You can pass Component.translatable("item.minecraft.lodestone_compass")
You get the translatable string from Material#getItemTranslationKey()

chrome beacon
#

getItemTranslationKey

hushed spindle
#

and how would i prefix and suffix something alongside it

dire marsh
hushed spindle
#

because i dont want the item to be just called the item

smoky anchor
chrome beacon
#

A component can contain other components

#

So you'd have 3 components, one for the prefix and as a container for the other two

#

then add the translatable and suffix to that

hushed spindle
#

and you can just add regular strings to it with Component.literal i think

chrome beacon
#

yes

hushed spindle
#

epic

#

ill try that

chrome beacon
#

That will make a text component

#

If you want to make things easily configurable I recommend you use the Adventure API uwu

#

(with MiniMessage)

hushed spindle
#

i couldnt find how to do it there either lol

smoky anchor
#

If MiniMessage allows you to serialize the text to JSON, you could use the Text component codec to decode it into a Component object.
Probably

#

But that may be overkill

hushed spindle
#

how would i combine these 3 components by the way

smoky anchor
#

seems like MutableComponent has create method ?

hushed spindle
#

sorry if i ask too much im having a hard time wrapping my head around it

#

it does and it expects a ComponentContents argument

smoky anchor
#

ok not that sorry

chrome beacon
#

Here's how you'd do it with Adventure

final TextComponent textComponent = Component.text("Prefix ")
  .append(
    Component.translatable(Material#getItemTranslationKey())
  )
  .append(Component.text(" Suffix")
  .build();
hushed spindle
#

and to set it as an items display name?

smoky anchor
#

Try Component.create(literal).append(translatable).append(literal) ?

hushed spindle
#

oh theres an append

#

my bad

smoky anchor
#

I mean I didn't notice it either :D

hushed spindle
#

where do you guys see all of this btw because i'd hate having to ask these types of things a lot

chrome beacon
#

Docs uwu

#

as for NMS you just look at the source

hushed spindle
#

yeah but where specifically because ive looked through adventure docs and didnt find anything lol

smoky anchor
#

I found decompiled MC source code on github kek

#
  • I already know a bit of MC source
chrome beacon
#

Adventure doesn't have a direct adapter to nms components as far as I can see. So you'll need to gson it and then parse that using nms

hushed spindle
#

alright, ill probably end up using that

#

though this components system is rather new, how to set json to an itemstack lol

chrome beacon
#

NMS has a parse method for it somewhere

#

What version are you on

hushed spindle
#

1.21.3

chrome beacon
#

Let me start my dev env 1 sec

hushed spindle
#

i appreciate this a lot by the way im not saying this enough

smoky anchor
#

I found
ParserUtils.parseJson(this.registries, stringReader, ComponentSerialization.CODEC)

river oracle
#

That's paper internals though iirc

hushed spindle
#

converting components to json is no issue, its putting it on an item that is

smoky anchor
river oracle
#

I'm losing it

#

Maybe I should put my glasses on lol

smoky anchor
smoky anchor
#

(I should be doing my actual job instead of this lmao)

#

The parseJson only wraps the JsonOp with some context, like nbt, entity scores.
It basically does what I sent.
-# I think

blazing ocean
blazing ocean
blazing ocean
smoky anchor
blazing ocean
#

I'm aware of that

#

Just that they're sometimes private because fuck you

#
            Text.Serialization.toJsonString(text, MinecraftClient.getInstance().networkHandler!!.registryManager)
``` is what I do
smoky anchor
#

It makes sense to make private codecs for parts of the codec, but like the resulting codec should be public.

blazing ocean
#

last time I checked the text serialization one was private

#

though it has toJsonString and fromJsonString methods

slender elbow
#

text components use codecs ever since network serialization of text components uses nbt for them, although they are still stored as json, so there is just one codec and they can serialize to both formats

upper hazel
#

in internet exists lib for getting info obaut player by circumventing his online presence?

idle condor
#

i want the cooldown of the diarrhea to be changeable using the /pa gui and i want to make it so if you disable one (for example: diarrhea) and you use /poop it doesn't spam the fucking message 'This command is disabled by the admins!' also its the otherway around for poop aswell also since i gave the code to AI in a desprate way of helping me idk what it did and even if it kept all the functions the same or not im just lost pls someone help me.
The code:
https://paste.md-5.net/xuxifukuce.java
please if someone can help me do so im really lost and can't even think of anything to do i don't even know what the code does anymore

river oracle
#

What the fuck did I just read

blazing ocean
#

jesus fucking christ

smoky anchor
smoky anchor
#

Well your message says "shifting" so L

idle condor
#

thanks for pointing that out instead of helping

#

so still no help?

river oracle
#

I... I don't think you'll be getting help for a while just be patient. Maybe you'll get lucky

idle condor
#

i don't need yall to write the code or anything just need to know what to do

smoky anchor
#

You have the same thing on the second one
Best would be to just.. not do anything I think

river oracle
#

Yeah you should just early return if poopEnabled is false

#

Or you could send the message you can't poop right now!

idle condor
#

yeh honestly don't even care about that part i just need to know how to fix the diarrhea cooldown

smoky anchor
#

Please read this to learn how to do GUI, checking name is bad

smoky anchor
#

Another thing: storing Player in a Map is bad too, store UUID only.
Half of your code does that

#

This is useless, just put

smoky anchor
blazing ocean
#

?cooldowns

undone axleBOT
idle condor
# smoky anchor Can you please walk me through how the thing you don't want happens ?

well first off there is this gui i made which was meant for admins to edit certain functions like disabling diarrhea and pooping and stuff like that but when you shift click on the brown concrete which is for editing the cooldown of diarrhea it just ends up staying in ur inventory before getting cleared after the gui reopens now another thing is that diarrhea cooldown won't change and i will get rid of the message aswell

smoky anchor
#

for the GUI, again, please read the link the bot sent
second, check for the click type, cancel the event and early return if it's anything but left click (pickup_all) or something.

warm mica
river oracle
# warm mica It's only bad if you cause it to leak

It's a bad practice in general and only really works because spigot reuses the Player entity across dimensions, if such behavior was ever reverted, which could be required eventually your fun little entity falls apart

#

UUID is far better and you can still leak memory with a UUID too it's just less memory

ocean tide
#

hello, how to use UseCooldownComponent properly, like how to set cooldown for certain item by method for ItemMeta setUseCooldown(UseCooldownComponent cooldown), I dont really know how to create this useCooldownComponent

blazing ocean
#

similar to how the itemmeta system works

ocean tide
#

oh thanks

warm mica
quaint mantle
#

how can i prevent cheats?

warm mica
smoky anchor
quaint mantle
#

how can i reduce cheating on my server?

warm mica
#

Are you planning to create your own cheat detection plugin?

quaint mantle
#

example custom client
or anticheats
but i need learn other ways

blazing ocean
#

custom client won't get you anywhere

quaint mantle
#

so am i need develope anticheat?

blazing ocean
#

please don't make one yourself, that'll probably end up badly

quaint mantle
#

i thought about it

blazing ocean
#

just use one of the already existing ones

quaint mantle
blazing ocean
#

I don't use one, I don't really know many

quaint mantle
#

aight ty

jade oasis
#

anyone understand gradle things in IntelliJ IDE im tryna change the source code verison for the plguin so i can use it but idk how + when its in IntelliJ IDE i just get like 120 errors anyone know how to not have this happen and change it

pseudo hazel
#

wdym

#

change what version

jade oasis
#

i think its 1.17 rn but change it to 1.21.1

pseudo hazel
#

your own plugin?

idle condor
jade oasis
pseudo hazel
#

well how did you expect to update it across 4 versions without any errors

remote swallow
#

if its just the api there shouldnt™️ be that many

pseudo hazel
#

you update the api version and the gradle repos to the ones you want

#

and then fix the errors in the code

#

probably mostly like renamed constants or whatever

jade oasis
pure dagger
remote swallow
#

those are all iridium skyblock errors

idle condor
pure dagger
#

i dont understand this sentence

#

do you want me to let you be

#

?

pseudo hazel
#

that means leave him alone

pure dagger
#

lool

jade oasis
pseudo hazel
#

dont disturb

pure dagger
#

i mean cool

#

pooping and diarrhea

#

plugin

#

yea

idle condor
pure dagger
#

lol

#

no thanks i wont be needing that

idle condor
#

:(

pure dagger
#

xD

idle condor
#

its funny though

pure dagger
#

where is code>>?

remote swallow
#

i guess you did work your ass off if its about diarrhea

idle condor
pure dagger
#

your code

#

can i see??

idle condor
#

sure 1sec let me get it

pure dagger
#

okay

idle condor
#

?paste

undone axleBOT
idle condor
#

thats the 1.8 version

#

of the plugin

blazing ocean
#

me.poop.poop

#

is this decompiled code

idle condor
#

yes

blazing ocean
#

wha

#

why

idle condor
#

wdym

blazing ocean
#

why are you sending decompiled code

idle condor
#

then how would i send it?

blazing ocean
#

the source code???

idle condor
#

THAT IS THE SOURCE CODE ITS THE UNCOMPILED SOURCE CODE BRO

remote swallow
#

you wrote that?

idle condor
#

with the help of chatgpt yes

remote swallow
#

jfc go learn java

sly topaz
#

@hushed spindle I didn't follow the conversation, did you figure it out

idle condor
blazing ocean
#

Top Poopers
fucking

sly topaz
#

from what I looked it was just setting the data component on the item stack

pure dagger
#

what is Poop.BlockSnapshot

idle condor
blazing ocean
idle condor
hushed spindle
blazing ocean
#
try {
   FileWriter writer = new FileWriter(dataFile);

   try {
      Map<String, Integer> dataToSave = new HashMap();
      Iterator var4 = this.poopCounts.entrySet().iterator();

      while(true) {
         if (!var4.hasNext()) {
            (new Gson()).toJson(dataToSave, writer);
            break;
         }

         Entry<UUID, Integer> entry = (Entry)var4.next();
         dataToSave.put(((UUID)entry.getKey()).toString(), (Integer)entry.getValue());
      }
   } catch (Throwable var7) {
      try {
         writer.close();
      } catch (Throwable var6) {
         var7.addSuppressed(var6);
      }

      throw var7;
   }

   writer.close();
} catch (IOException var8) {
   this.getLogger().severe("Failed to save poop data: " + var8.getMessage());
}

like that cannot be your code

#

if it is

pure dagger
#

but htere is no class Poop or like anything called Poop

blazing ocean
#

?learnjava!

undone axleBOT
hushed spindle
#

gonna mess with that later i fucked up my code as to where players cant even join lol

idle condor
remote swallow
pure dagger
#

oh im dumb

hushed spindle
#

gonna post a lil resource on spigot showing it off because i imagine translating things with components can be very useful for people

pure dagger
#

and blocksnapshot?

hushed spindle
#

oh no that feature works

#

i fucked up something else

idle condor
hushed spindle
#

and because its async with packets im not getting a full exception log

remote swallow
sly topaz
#

ah right you were also doing something with packets

pure dagger
#

oh.. another class

#

sorry i was blind

smoky anchor
#

I believe that is what part of this convo was

idle condor
blazing ocean
#

are you just editing your decompiled source code all the time bruh

#

recaf is my favourite ide

idle condor
#

i just rewrite whatever was the original one

#

?paste

undone axleBOT
idle condor
#

?paste

undone axleBOT
sly topaz
#

what is even the issue here

idle condor
#

hmm weird i can't save it

idle condor
ocean tide
#

how to use UseCooldownComponent properly to set cooldown for certain item, when I getting it form getUseCooldown() it always shows 1 sec cooldown

idle condor
chrome beacon
blazing ocean
idle condor
ocean tide
chrome beacon
#

That trait sets the cooldown that will be set on use

#

It doesn't trigger the cooldown

ocean tide
#

so how to trigger

ocean tide
#

setCooldown for HumanEntity works like setting cooldown for all material even when I use setCooldown(ItemStack)

chrome beacon
#

What version are you on

ocean tide
#

1.21.3

chrome beacon
#

Is the client also on 1.21.3

ocean tide
#

ye

#

oh no

#

1.21.1

chrome beacon
#

That's why

ocean tide
#

oh okey thanks

#

is there any posibility of doing that for clients form older versions?

sly topaz
#

no, since the feature didn't exist until 1.21.3

chrome beacon
#

no

blazing ocean
river oracle
#

I wonder who is the market for this plugin

#

I'm pretty sure 8-10 year old boys aren't supposed to have spigot accounts

marsh sluice
#

hi, would anyone be able to help me? im extremly new to plugin development and im trying to figure out how to export my code into a .jar instead of making a java thingy. the tutorial i watched was only for if you have a server on your computer and then you can use that to test it but my test server is a pebble host server

#

can anyone help with that or does that not make sense

blazing ocean
#

are you using maven?

marsh sluice
blazing ocean
#

then just run the package task

sly topaz
#

Ctrl + Ctrl in IntelliJ then write mvn package on the popup

marsh sluice
marsh sluice
blazing ocean
#

it should be somewhere in the target folder, I don't remember how maven does it lol

sly topaz
#

it is on target indeed

marsh sluice
#

i found it, thank you guys so much for the help

#

and sorry for being an absolute noob lmao

#

wait will the jar file automatically update when i change the code?

#

or is there something else i have to do to save

#

im not used to intellij

blazing ocean
#

No, you need to re-run that

#

should be in the top right hand corner

sly topaz
#

you can make it so it compiles every time you save but you probably don't want that

#

just recompile every time you're done with your thing

tidal kettle
#

hey, can you create a world, delete it and recreate a world with the same name as the one create before, but change the seed?

sly topaz
#

if you want to be able to see your changes live, you'd have to setup hotswapping though I don't know how that works out on shared hosts since they don't let you choose the jvm distribution lol

marsh sluice
sly topaz
sly topaz
#

or if you do that, have a set of seeds already pregened at least

tidal kettle
#

umm okay

sly topaz
#

you can recompile by doing Ctrl + Ctrl and then writing mvn package like before, or you can also do it inside this menu if you're more comfortable with that

marsh sluice
#

okay thanks

hushed spindle
#

question
if you have a list and want to sort it, but most of the elements in the list aren't affected by the sort comparing function, will they remain in the same order?

pure dagger
#

"most" ?

hushed spindle
#

like if i have a class A with properties x and y, both numbers
if all elements of A have different values of x, but most of them have the same values of y, will sorting them based on y mess up the order of A's with different x's

#

i want elements with a different y property to be shifted to the end of the list without disrupting the order of the list for the other elements

worthy yarrow
#

Sounds like you’d just do two sorting functions, one for the Y aspect followed by your general sorting function

hushed spindle
#

the values of x are not in order though so i cant sort based on them

#

oh ill just test it, sec

eternal oxide
#

SortedList with a comparator

hushed spindle
#

regular sorting seems to work just fine

sly topaz
#

what you wanted is called stable sorting btw

hushed spindle
#

oh cool

idle condor
marsh sluice
blazing ocean
#

wdym

#

that gets put in the jar yes

marsh sluice
#

hmm okay

#

im trying to add a command and its not working

#

like its not even popping up in chat for auto finish the command

#

@blazing ocean can you help, this is my code but the command isnt even showing up

name: TestPlugin
version: '1.0-SNAPSHOT'
main: me.makwil.testPlugin.TestPlugin
api-version: '1.21'
commands:
resetdamage:
description: Resets your attack damage to the base value.
usage: /<command>

blazing ocean
#

show your code

marsh sluice
# blazing ocean show your code

package me.makwil.testPlugin;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;

public class DamageCommand implements org.bukkit.command.CommandExecutor {

private final TestPlugin plugin;

public DamageCommand(TestPlugin plugin) {
    this.plugin = plugin;
}

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
    if (command.getName().equalsIgnoreCase("resetdamage")) {
        if (sender instanceof Player) {
            Player player = (Player) sender;
            AttributeInstance attackDamageAttribute = player.getAttribute(Attribute.GENERIC_ATTACK_DAMAGE);

            if (attackDamageAttribute != null) {

                attackDamageAttribute.setBaseValue(1.0);


                plugin.getConfig().set("players." + player.getUniqueId() + ".attack-damage", 1.0);
                plugin.saveConfig();

                player.sendMessage("Your attack damage has been reset to the base value.");
            } else {
                player.sendMessage("Failed to find your attack damage attribute.");
            }
        } else {
            sender.sendMessage("This command can only be run by a player.");
        }
        return true;
    }
    return false;
}

}

#

ive been getting help from a friend so this is mostly his

blazing ocean
#

and are you registering it

#

aka setting the executor

marsh sluice
#

holdup lemme get the other code

chrome beacon
#

?paste

undone axleBOT
marsh sluice
#

i think i am with the main code

#

but i dont really know cause my friend is doing most

blazing ocean
#

are you sure your server is using the latest compiled version of your plugin

marsh sluice
#

yes, the server is using 1.21.1

#

also i get this error:
[18:50:00 INFO]: [TestPlugin] Enabling TestPlugin v1.0
[18:50:00 WARN]: [TestPlugin] Could not find the resetdamage command.
[18:50:00 INFO]: [TestPlugin] TestPlugin has been enabled.

#

in console on my server

remote swallow
#

is your file by chance called paper-plugin.yml

quaint mantle
#

Its possible to set a slot on an inventory that works as a furnance fuel slot?

#

when we get spigot 1.22 ?

blazing ocean
#

once mc 1.22 releases

marsh sluice
marsh sluice
slender elbow
#

share the server's latest.log

#

?paste pls

undone axleBOT
marsh sluice
slender elbow
#

it's a file

#

called latest.log

#

inside the folder called log

marsh sluice
#

thats the full folder if thats what you were refering to

blazing ocean
#

i love §x§f§f§0§0§0§0M§x§f§f§6§6§0§0y§x§f§f§c§c§0§0t§x§c§b§f§f§0§0h§x§6§5§f§f§0§0i§x§0§0§f§f§0§0c§x§0§0§f§f§6§6 §x§0§0§f§f§c§bE§x§0§0§c§b§f§fn§x§0§0§6§5§f§fa§x§0§0§0§0§f§fb§x§6§6§0§0§f§fl§x§c§c§0§0§f§fe§x§f§f§0§0§c§cd§x§f§f§0§0§6§6!

marsh sluice
#

i have no idea what that is im pretty sure its to do with mythic mobs

slender elbow
#

are you absolutely sure there is no file named paper-plugin.yml in your resources? you might want to try a clean build (mvn clean package)

marsh sluice
#

idk how to check

#

and what does that do?

#

does cleaning the package reset my code or anything

#

wait im stupid

#

yes

#

i have paper-plugin.yml

#

and it is setup

blazing ocean
#

rename it to plugin.yml

marsh sluice
#

shouldnt that be done by default

blazing ocean
#

?

marsh sluice
#

like if thats something i need to do shouldnt it have just been done

blazing ocean
#

did you select a paper plugin when you created the project

marsh sluice
#

yes

blazing ocean
#

welp those don't allow commands in their yml

marsh sluice
#

oh

#

then how would you do commands

blazing ocean
marsh sluice
#

i just changed it to plugin.yml and its not working

wet breach
#

that method you are using returns null if that command doesn't exist

#

therefore your registering of the command never happens

#

relevant api section of the method you are using that states it returns null if it can't find a command

blazing ocean
#

does anybody know why I could be getting a permission denied here? I can run that script just fine. ls -l says .rwxrwxrwx@ radstevee

#

it's just a regular GH actions runner

marsh sluice
wet breach
#

don't check if it exists?

#

just register your command

remote swallow
#

github prs down for anyone else? i cant create one, i just get an oops 500

marsh sluice
wet breach
#

probably not set to be executable

blazing ocean
wet breach
#

setenforce 0

sly topaz
#

what did you +x to

#

also, it does say it failed to locate the executable, are you sure it is there

sly topaz
sly topaz
#

can you send the sh file

blazing ocean
#

it does exist

blazing ocean
#

idle 🎉

sly topaz
#

is it a restricted file system?

blazing ocean
#

I hate almalinux ffs

blazing ocean
wet breach
#

its a permission issue with SELinux, I can't be arsed to go over how to fix it. Personally I keep SELinux disabled permanently

#

as I have never found it useful

#

caused me more issues then anything else

sly topaz
#

ideally you'd adjust the SEL context with chcon instead but eh, disabling it isn't going to be the end of the world probably

wet breach
#

you can help them if you want lol 🙂

#

but yeah its not going to be detrimental to anything, not like they have a bunch of users accessing the box

#

or they are just randomly running unknown stuff

blazing ocean
#

#IReallyKnowWhatImDoingISwear

sly topaz
#

you can do sudo ausearch -m avc -ts recent to check if it was indeed a SELinux issue

rough drift
#

look at you all having trouble setting up stuff kekw

#

#nix

blazing ocean
#

I am NOT using nix for a production server 😭🙏

rough drift
sly topaz
rough drift
#

not really

sly topaz
#

it would, because rad wouldn't be the one setting it up lol

rough drift
#

what

sly topaz
#

rad mentioned earlier that he wasn't the one who configured that dedi

rough drift
#

well, you are aware of how nix works right

sly topaz
#

so it means whoever did enforced selinux polices in the filesystem, and they'd have done the same had they done it in nix or not

rough drift
#

that everything is in a configuration file, listing exactly how the system is configured right

blazing ocean
rough drift
#

it means he could have at least figured out what they did

sly topaz
#

they wouldn't, since they wouldn't know it was a selinux issue to begin with

#

nix isn't some magic tool, it is just really a fancy dockerfile

rough drift
blazing ocean
rough drift
#

it is not just a fancy dockerfile

#

I mean it is, but not quite! 😂

sly topaz
#

yeah but you don't go looking onto the system configuration when you find an issue running a script lol

rough drift
#

you can go to journalctl ig and see the issue

#

if it's a file in say /etc/ you know it's a config issue

wet breach
#

it isn't a config issue

blazing ocean
#

ike you are not convincing me to ever use nixos again btw

pure dagger
#

‎🐱

#

🐱

#

🐱

#

kitty

wet breach
#

SELinux (Security Enhanced Linux) is a security program that restricts access to system calls and resources at the kernel level. When you have a system that is setup with SELinux you are supposed to setup permissions in a certain way as well as use alternative commands/arguments to run otherwise it fails

#

the problem with the failing is that it doesn't really tell you its a SELinux issue and why lol

echo basalt
#

hi frosty :3 where's my lego

wet breach
#

idk, I didn't know I was getting lego's

echo basalt
#

you said you were gonna add it to the list

wet breach
#

oh right, well its not christmas yet either

echo basalt
#

couple weeks away

sly topaz
echo basalt
#

already bought a bunch of xmas gifts

wet breach
#

I don't have a tree, waiting till I get a house to do such things

sly topaz
#

mine is just inherited

#

the poor thing is asking for help

echo basalt
#

get a potted plant and put dolla bills under it

sly topaz
#

but I am not buying a new one

wet breach
#

oh thought it was real

#

well I guess if you have one of them older ones they are sometimes nice too better then newer ones

#

I hate them newer fake trees

quaint mantle
#

Its possible to save data from different types under the same namespacedkey? With PDC

quaint mantle
#

(╯°□°)╯︵ ┻━┻

chrome beacon
sly topaz
#

you could use the container PDT and save your data inside there

quaint mantle
#

PDT?

sly topaz
#

PersistentDataType

quaint mantle
#

Ohh

#

TAG_CONTAINER this?

sly topaz
#
var PDC = item.getPersistentDataContainer();
var container = PDC.getAdapterContext().newContainer();
container.set(SOME_INT_KEY, PersistentDataType.INTEGER, 10);
PDC.set(SOME_KEY, PersistentDataType.TAG_CONTAINER, container);
#

that's how you'd do it

pure dagger
#

var

sly topaz
#

it is either that or creating a custom PDT for your class

pure dagger
#

var a = 1

sly topaz
# pure dagger var

I like var, I use it a lot so maybe people find compelled to use it more lol

pure dagger
#

i dont like var 😾

quaint mantle
#

I'm using kotlin

remote swallow
#

Val >>>>>>

pure dagger
#

Var var = new Var(new var)

remote swallow
quaint mantle
#

but what tag container is like an array of values? or how it works

river oracle
sly topaz
#

it is just another PDC

quaint mantle
#

a pdc inside a pdc

sly topaz
#

yeah, basically

#

same way enchantments do Enchants:[{id:"minecraft:dumb",level:69420},...] though this one would be a tag container array

pure dagger
#

what if you put a list inside the list

#

then list[0] == list[0][0] == list[0][0][0] ...
?

sly topaz
#

that sounds cursed as hell

pure dagger
#

yes

sly topaz
#

but it could be done as well

pure dagger
#

i tried that in python in school and i printed it and it was [[...]] or so

torn crystal
#

Hey guys, how to set aliases for a command in code (With PluginCommand object)
.setAliases() doesnt work, only plugin.yml :(

pure dagger
#

what is that

blazing ocean
pure dagger
#

js ahh??

torn crystal
#

List containing a pointer to itself

#

respect

pure dagger
#

what type are arrays?

#

bruh i got lost

torn crystal
#

array

quaint mantle
#

Array is primitive

hybrid spoke
#

array is monkey

torn crystal
river oracle
#

In Java they're kinda objects you can do List<String[]>

pure dagger
#

kinda

torn crystal
#

ugh

torn crystal
#

I resolved it by using reflection

#
CommandMap commandMap = plugin.getServer().getCommandMap();

PluginCommand pluginCommand;
if(commandMap.getCommand(this.name) == null) {
  Constructor<PluginCommand> constructor = PluginCommand.class.getDeclaredConstructor(String.class, Plugin.class);
  constructor.setAccessible(true);

  pluginCommand = constructor.newInstance(this.name,plugin);
}
else {
  pluginCommand = plugin.getCommand(this.name);
}```
slender elbow
#

you can just subclass Command

#

fyi

torn crystal
slender elbow
#

@Override tabComplete

cobalt glacier
#

is there a way to print to a player all the commands sent by the console?

eternal oxide
#

there is a pre process event you can listen to

cobalt glacier
#

the pre process is only for players or it works for console too

eternal oxide
#

good point. I've never tried

#

yep, it is player only

cobalt glacier
#

i want to make a anti-abuse system

eternal oxide
#

console abuse?

cobalt glacier
#

friend's only server

eternal oxide
#

better regulate who has access

#

if they have console access there is nothign you can do to prevent them "cheating"

#

Only server admin should have console access

young knoll
#

ServerCommandEvent btw

eternal oxide
#

oh yeah I didn;t look that well

#

but my statement still stands. No one shoudl have console access other than admin

#

especially if you suspect they may abuse it

cobalt glacier
quaint mantle
#

how do i disable statistics menu?

#

or gaining statics?

cosmic elk
#

does anyone know how i can remove the natural particles from a snowball when it hits something?

umbral pumice
#

Its missing about 3 of its components but they are all there in the section on the left

chrome beacon
#

if I remember correctly Minecraft doesn't handle that type of NBT requirement well

umbral pumice
#

Yeah its weird, it shows up fine in the recipe book, but not when you need to choice it if that makes sense

#

Loses its name, lore, pretty much anything that would let you know what it is

#

12 components in the recipe book, 9 components when called

young knoll
#

Yeah the game doesn’t like ingredients with components when it comes to showing the recipe ghost items

#

Or when trying to auto move items into the crafting grid

umbral pumice
#

Is there a way to fix/work around this?

young knoll
#

Not that I know of

umbral pumice
#

Thats not good

#

Do other recipe plugins do recipe where items call other custom items?

#

if so i wonder...

young knoll
#

I’m sure they do

umbral pumice
#

I guess an alternative to this would be using a variated crafting table

#

that doesnt show recipe forms

#

which means you cant use the normal crafting table

#

and that explains why slimefun does it that way

#

smh

#

Thanks 😭

#

"only materials are support by base recipes"
This is coming directly from how its setup. Man..

#

Could i listen to PrepareItemCraftEvent and redo the lore?

young knoll
#

No

#

Those are ghost items

umbral pumice
#

I need to order my pcie to m.2 thingy so i can get my plugin out of it. I made one where it uses an alternative table and works just fine, but the laptop died 😄

young knoll
#

I mean the normal table works fine too

#

Just not with the recipe book

umbral pumice
#

is there a way to disable the recipe book

#

just the ghost forms

#

not the whole thing

#

nvm dumb question

young knoll
#

There’s a packet for it

umbral pumice
#

Ill just have to get my files

young knoll
#

Not sure what happens if you cancel it

umbral pumice
#

well theres really no point, then people wouldnt know how to craft it lol

#

i think i can totally get my files man, it has an OS on the thing

#

brb 🤯

young knoll
#

You don’t need the ghost items to know how to craft it

#

You can just look in the book

umbral pumice
#

I FOUND ITTTT

#

YESSSS

young knoll
#

Wat

#

ItemMeta newItemMeta = (ItemMeta) newItem;

umbral pumice
#

I spent days if not weeks working on a custom food plug-in that works, and I found all the codes

#

Literally estatic

young knoll
umbral pumice
#

Let me be happy 😆

#

It does work

river oracle
#

Wait nvm bro casted it's okay it'll just crash on run

young knoll
#

I just noticed the resultMaterial line too

#

Wack

young knoll
#

Storing an entire itemstack just to grab the type

river oracle
#

thas sum real shit

umbral pumice
#

I went for working not clean that was when I started getting into more advanced code and as you can see, I knew nothing

#

uwu 🤣

river oracle
#

gonna look for my first plugin and decompile it and send some screenshots in a bit

#

its cursed asf

umbral pumice
#

If I remember right, this custom food plug-in opens a custom crafting table so that way it doesn’t deal with the ghost items

#

It’s fully working besides being able to set up all the foods in the config I think

#

Gonna find out 💀

umbral pumice
#

Successful recovery. Now this laptop can get bent literally

barren peak
#

how would you detect when a player is the first person to open a naturally spawning chest. Is there an event for that?

#

or is it just interact

young knoll
#

If the chest has a loot table it’ll fire a LootGenerateEvent

barren peak
#

alright thanks thats what I was looking for

#

also is there an event on xp bottle splash where I can set xp

#

or do I have to just do a projectile land event

#

how do you spawn an xp orb

young knoll
#

ExpBottleEvent

barren peak
#

ty

#

for a BlockPlaceEvent is e.getBlockPlaced() the same as e.getBlock() or do they return different things?

sly topaz
#

don't even know why that method was added tbh

#

I guess to match the placed against method and the replaced state but still

barren peak
#

is a LootContext instance of a Chest (nvm it isn't, so what is lootcontext?)

#

also is there a way from a LootGenerateEvent to
A. see if it was a chest generated
B. get that inventory

granite iris
#

hello. Im trying to compile a plugin, but Im having problems with dependencies. this is my first time doing this. Ive tried browsing for solutions but couldnt find any answers. Some of the dependencies that are local are showing up in red, and I dont know what to do with them.

opaque scarab
#

In 1.20 I am using this line of code ResourceKey<Biome> resourceKey = ResourceKey.create(Registries.BIOME, new ResourceLocation(newBiomeName.toLowerCase()));, but in 1.21 ResourceLocation has private access. Does anyone know what can achive the same effect?

opaque scarab
#

Trying to update it

sly topaz
opaque scarab
sly topaz
opaque scarab
sly topaz
#

inb4 it was paper and they told you to use registry modification API instead

opaque scarab
#

Which is fair

river oracle
#

That's kinda how nms is tbf he never called you dumb

sly topaz
#

I mean, there's plenty to get lost on these decompiled classes, can't blame them

river oracle
#

Though Javier is a sweet and helpful person <3

sly topaz
#

at some point it all just looks like noise

river oracle
#

Especially Codec

opaque scarab
#

You both have a point

#

NMS is a lot of nitty gritty looks at the internals

#

But man is it a lot LOL

sly topaz
#

I feel that, the other day I was trying to figure out how the heck chunk generation worked exactly, even when stepping through the debugger, it didn't help much lol

#

at some point I just stare at the thing thinking maybe I'll have an eureka moment at some point lol

river oracle
#

I can't blame you there

opaque scarab
river oracle
#

Only thing I'm actually good at is inventories

#

Lol

sly topaz
#

I've learn the hard way that it just takes being patient really, accepting that I won't get it on the first go

river oracle
#

Those are free as hell though quick move can be a tad confusing but otherwise free

sly topaz
#

then slowly figuring out and annotating what I do get

opaque scarab
#

And VERY important

sly topaz
#

the only downside is that minecraft is moving very fast currently so it only gets harder to keep up

#

I do wonder how md even handles all of it

river oracle
#

I can't wait till we get menu builders

#

I'm like doing ass at actually addressing comments atm

opaque scarab
river oracle
#

Finals are a bitch

river oracle
opaque scarab
river oracle
#

Luckily dif for 1.21.4 wasn't that huge from what I've been told

sly topaz
#

they pretty much just finished the winter drop with it so yeah, there wasn't much left I imagine

opaque scarab
#

Yeah that’s good. I was really curious about the creaking and how it would work because maybe it wouldn’t move even if you look at it in third person, which would mean we’d get view data to the server, but alas

sly topaz
#

I had hoped they'd make the creaking more interesting tbh

river oracle
sly topaz
#

like, at least make its AI smarter so it teleports when getting stuck in a 2x2 hole lol

river oracle
#

But you can just tweak that with a datapack

river oracle
sly topaz
#

or since it is tall, they could've made it able to jump high or smth idk

river oracle
#

I'm assuming mojang doesn't think that would be possible in practice though or something because they expect you to be dealing with other mobs too

sly topaz
#

hopefully someone releases a datapack which makes it less of a dumb mob

river oracle
sly topaz
#

I just keep up with the changes because somehow that became a hobby of mine

#

it is kinda hilarious sometimes because since I don't really try to understand the mechanics, just the technicalities behind them so sometimes I'll have some funny misunderstandings

#

like the other day someone was asking something about the breeze mob, I did know the mob existed but I never actually bothered to check what it was but since it was called breeze I just thought it was some kind of new projectile

#

turns out it is an actual full-fleshed mob lol

craggy plover
#

Can someone give a tutorial on custom enchants plz? All the ones on the internet are outdated for latest version

random isle
#

heyyyy, is there a tutorial or documentation about the worldgeneration? i want to know how plugins like Plotsquared or PlotME works with generation of Plots. 🥺

wraith delta
#

How do you support hex codes &#0000 in TextComponent? show example, honestly tried a lot

#

i have it working with legacy hex codes but i need normal hex

wraith delta
proud badge
#

< # 000000>
this but without the spaces

#

is how you do hex

wraith delta
wraith delta
pseudo iron
#

gang can someone tell me how the actualy fuck im supposed to compile this shit into a .class

#

dm if can hlep

#

would be greatly appreciated

pseudo iron
blazing ocean
proud badge
#

Forgor

lilac dagger
#

Hello, which packets are required for creating disguises?

chrome beacon
#

Disguises as other entities? other players? or both?

lilac dagger
#

i want to disguise players as other entities, e.g chicken

chrome beacon
#

The easiest way would probably to use the hidePlayer api and then manipulate an nms entity object

lilac dagger
#

i'm not trying to disguise entites as other entities

#

i want to disguise players themselves

chrome beacon
#

Yes

#

No real difference

lilac dagger
#

so why do i need a nms entity object?

chrome beacon
#

Helps with the packets

#

Otherwise you'll need to call of them manually which will be a pain

lilac dagger
#

ah, i see

#

ahmed does it

chrome beacon
#

And so does Libs

lilac dagger
#

yeah, it makes sense now

#

probably it comes with the entity data and such on change

#

that has to be per disguise, hmm

#

hmm

#

i might consider just using libs disguise for now

chrome beacon
#

probably a good idea

vernal arrow
#

"all usage of MaterialData is deprecated and subject to removal."

#

What do we need to use instead?

smoky anchor
#

all usage of MaterialData is deprecated and subject to removal. Use BlockData.

vernal arrow
#

ah thanks I didn't see that on the spigot page sorry

keen sapphire
#

Hello, can anyone link a good plugin for GUI's? For 1.21!

chrome beacon
#

?gui

chrome beacon
#

or if you're not making a plugin you should move to #help-server

vernal arrow
#

invDeath.setItem(8, getItem(new ItemStack(Material.OAK_DOOR), "&9BACK", "&aClick to go back to main menu", "&ago back to main menu"));

#

I'm stuck with this. I can't understand how BlockData works.

#

I want a material type

chrome beacon
#

What do you want to use BlockData for?

#

The code above doesn't exactly specify

#

nor does it look relevant?

#

or are you just confusing Material and MaterialData

vernal arrow
#

I want to replace Material.OAK_DOOR with something new because it is deprecated

chrome beacon
#

okay you're confusing the two

#

Material is not deprecated

vernal arrow
#

oh I see haha, I just need another function to get the material type

chrome beacon
#

?

vernal arrow
#

I can't find a replacement for this Material.OAK_DOOR

chrome beacon
#

There is no replacement

#

That's fine to use

vernal arrow
#

I can't use it like that I just get errors

chrome beacon
#

What's the error

vernal arrow
#

Like my IDEA can't find Material

chrome beacon
marsh sluice
#

?paste

undone axleBOT
wooden frost
#

Hello everyone, I was trying to figure out how the WE API works and couldnt figure out how to paste cuboid selections into the world, does anyone know how to?
this is my code

public static void returnArena(){
            com.sk89q.worldedit.world.World world = BukkitAdapter.adapt(Spleef.w);
        try (EditSession editSession = WorldEdit.getInstance().newEditSession(world)) {

                CuboidRegion cr = CuboidRegion.makeCuboid(new CuboidRegion(new BlockVector3(66, -30, -50), new BlockVector3(166, 21, 50)));
                BlockArrayClipboard cb = new BlockArrayClipboard(cr);
                ClipboardHolder CH = new ClipboardHolder(cb);
                Operation operation = CH.createPaste(editSession).to(new BlockVector3(-50, -30, -50)).ignoreAirBlocks(false).build();
                Operations.complete(operation);
            } catch (WorldEditException e) {
                throw new RuntimeException(e);
            }
        }
lilac dagger
#

@wooden frost

wooden frost
#

yooo

#

yu

#

ty

lilac dagger
#

no problem 😄

#

you have to copy and then paste

#

your code seems to mix the 2 steps resulting in issues

wooden frost
#

ty so much

#

🙏🙏

lilac dagger
#

no problem 😄

#

glad i could be of help

wooden frost
#

dont want to look stupid so gonna close discord for now, had exams today (name is "Итоговое сочинение" )

#

YEAHHH

#

BABYY

#

IT WORKS

#

THANK YOU SO MUCHHH

#

@lilac dagger U're the GOAT 🙏

lilac dagger
#

i'm glad i could be of help 😄

distant wave
#

gotta love my school wifi

remote swallow
#

phishing kekw

#

@tender shard can vouch its not phishing been as its his website

buoyant viper
river oracle
#

School security is annoying

wooden frost
blazing ocean
#

have you considered asking them

wooden frost
distant wave
wooden frost
#

thats fucked up

distant wave
#

yea

remote swallow
#

sounds like you need a vpn or somethin

distant wave
#

so i cant even log into minecraft

wooden frost
wooden frost
#

i suppose there is a method ima check

#

maybe create pattern or something

lilac dagger
#

yeah, it says to use your ide

#

i'm pretty sure there's a method during paste somewhere

wooden frost
#

😭

lilac dagger
#

sometimes documenting everything is not doable

wooden frost
#

oh yeah, i need that not for paste but for cylinder creation (there is something i want to make player dependant)

lilac dagger
#

during creating should be a way to apply a pattern i think

wooden frost
#

exactly, it needs a pattern

#

and i dont know how to create one

#

it says to use block states but uh

#

yea

lilac dagger
#

TypeApplyingPattern ?

wooden frost
#

what does dis mean (im not dumb i swear its the exams)

#

is extent we api only thing?

lilac dagger
#

Extent?

wooden frost
#

ye

lilac dagger
#

check the contract

#

see what methods it has

wooden frost
#
public interface Extent extends InputExtent, OutputExtent {
    BlockVector3 getMinimumPoint();

    BlockVector3 getMaximumPoint();

    List<? extends Entity> getEntities(Region region);

    List<? extends Entity> getEntities();

    @Nullable
    Entity createEntity(Location location, BaseEntity entity);
}
#

uhhh

lilac dagger
#

Extent doesn't mean much unless i have a bit of knowledge with world edit

#

which i don't

wooden frost
#

ok

#

so its region???!

lilac dagger
#

it looks like it's a selection for entities

wooden frost
#

what the fuckk bro

lilac dagger
#

and it extends InputExtent and output extent

#

no idea what those 2 do

wooden frost
#

oh

#

its just a wrold