#help-development

1 messages · Page 353 of 1

tender shard
#

in my (limited, german law-based) opinion: opening a pull request on github automatically does "waive your rights" on that code. Because if you didnt want to give away your rights o nthis code, you wouldnt have opened a PR on github. easy as that.

kind hatch
#

Alex, I think you'd be very surprised about how the US Courts work. So many arguments can be thrown back and forth just on that alone. The biggest one someone would leverage is that they didn't know. Or that there wasn't any explicit contract signed.

buoyant viper
#

thats what BSD-0 is for yaknow

lavish hemlock
#

If their lawyers are good enough, they win

#

✨ U.S. Law ✨

kind hatch
#

Fr, it seems like the side with the most money usually wins.

tender shard
glossy venture
#

being. alaywayer semes fun

#

yes a laywayer

buoyant viper
#

also i promise i dont license code under CC lolz, i license resources like images, audios, text and stuff under it)

lavish hemlock
#

Orby are you okay

tender shard
lavish hemlock
#

Funnily enough about GitHub

#

I'm pretty sure they do partially own your code

kind hatch
buoyant viper
#

well ofc they do, its on their servers leleDemon

lavish hemlock
#

It's part of one of their legal documents, probably their terms of service?

#

Basically, they have the right to do whatever the fuck they want with the code you upload

#

Which is how Copilot was born

tender shard
#

in the US too

onyx fjord
#

for me CLA is usually disrespecting the person who contributes (very common for oss projects from big tech)

tender shard
#

you cannot give copyright away, only thing you can do is to grant people the rights to use your copyrighted stuff

kind hatch
#

Technically in the US, you can sign it away.

tender shard
#

copyright is an inherent right that exists solely between you and the work you've done

onyx fjord
#

ideally they'd take away all credit from you if possible 😂

tender shard
#

that's wrong

#

you can give people permission to use your copyrighted work

#

but you cannot give the "copyright" away, per se

eternal night
#

Alex 2 mins ago "I don't know anything about murican law"

tender shard
#

yeah well

#

not much

#

but the basics, I do know

onyx fjord
#

law isnt real

orchid gazelle
eternal night
#

neither is currency

#

anarchy now

lavish hemlock
#

Completely unrelated but I found an interesting tidbit of copyright law:

In the case of a work made for hire, the employer or other person for whom the work was prepared is considered the author for purposes of this title, and, unless the parties have expressly agreed otherwise in a written instrument signed by them, owns all of the rights comprised in the copyright.

eternal night
#

on 2b2t, the oldest anarchy minecraft server

tender shard
# onyx fjord law isnt real

law is a science made up by people and it's only correct because it's enforcable by people who got more money than you

onyx fjord
#

nah theres a few curriences actually

orchid gazelle
onyx fjord
#

gold

eternal night
#

what inherit value does gold have

onyx fjord
#

tbh pretty much everything is a currency

kind hatch
eternal night
buoyant viper
#

nothing is worth anything

#

cost is an idea

orchid gazelle
eternal night
onyx fjord
#

omw to make 1 gram of antimatter to buy the entire world

tender shard
#

TL;DR: copyright is an inherent right, you cannot give it away. You can allow people to use your stuff, but that's it.

buoyant viper
#

im a big fan of copycenter

lavish hemlock
#

Ew, copycentrist.

buoyant viper
#

no rights or lefts for anybody

#

no one owns it

tender shard
#

if copyright would be egible to normal "transferation", then youtube would already own everyone's videos

eternal night
#

what about ups and downs

buoyant viper
#

FUCK

eternal night
kind hatch
buoyant viper
#

thats what big pub wants u to think

eternal night
#

fucking big pub man

#

they are everywhere 😭

orchid gazelle
#

Wtf is big pub

tender shard
# kind hatch Isn't that just public domain?

yeah anyway, I didnt mean to start another war here abotu anything. I am just upset that paper adds new stuff but nobody ever opens a spigot PR for this stuff. Then they complain that spigot doesnt get new features

eternal night
#

the shadow organisation behind public domain that wants to steal everything from you

orchid gazelle
#

Oh ok

tender shard
#

people are always like "I dont wanna give my information away", thinking that government cafes about it lol. I doubt that government e.g. cares about @onyx fjord's information in the first place

eternal night
#

if I were the government I would

lavish hemlock
# lavish hemlock Weeeeeell...

Y'see, YouTube has, in the past, taken videos from their platform and reuploaded them onto their official Facebook page.
This is without the explicit consent of the creators, as it's part of what you agree to when you sign up.

orchid gazelle
#

I am the government

tender shard
#

I also wouldn't want to give the government my SSH keys, but I also know that they wouldnt ever care about it, nor would they ever put any effort into getting them

buoyant viper
#

the government has had my information ever since october 20th 2002, its the non-government people that i dont want to have my information

kind hatch
#

Oh yea. I remember that story. Love how companies just get away with shit like that.

tender shard
#

@eternal night is there really no way to get a proper answer to an unban appeal on paper's DC? I mean i could just create a new account

onyx fjord
#

how can i live in a country without gov knowing who i am?

crimson relic
#

why are you banned

tender shard
#

because of reasons

kind hatch
#

Those who know know

orchid gazelle
onyx fjord
#

so shitty argument to make

eternal night
hybrid spoke
crimson relic
onyx fjord
#

gov needs my personal info, <enter corpo name> doesnt

kind hatch
crimson relic
#

i used search

onyx fjord
#

but neither need to know what im doing privately

hybrid spoke
#

nearly every big fish on this discord is banned on paper LUL

orchid gazelle
#

Guys anybody having an idea why sending 20 multiblock change packets lag spikes my client? Lol

onyx fjord
#

how to never be banned on paper: never talk there 🧠

eternal night
# tender shard hmm then alt account it is

While I won't know what your name there is, obviously be aware that ban bypassing is a bannable offense we will ban on sight. Just as a headsup 👍 (so please don't, not like that would change your actions xD)

terse ore
#

how can I fill only the inner slots in a chest?

kind hatch
orchid gazelle
hybrid spoke
eternal night
#

The chest block state provides its inventory

buoyant viper
eternal night
#

igno- ^

#

website ?

terse ore
buoyant viper
#

u said site

eternal night
#

they were talking about a discord

buoyant viper
#

did u mean sight

eternal night
#

oh

#

fml

buoyant viper
terse ore
#

xd

eternal night
#

I indeed did dogekek

hybrid spoke
orchid gazelle
#

Yeah but cmon thats 20 packets

#

Thats not that hard

buoyant viper
#

nah the client is pretty shit

hybrid spoke
#

we dont know what you are doing

eternal night
#

make sure to supress light updates

orchid gazelle
#

I am already

kind hatch
#

How big are your packets? You're probably sending massive changes at once.

onyx fjord
# terse ore

make them an array and when filling inventory if slot is equal to those skip them

eternal night
#

6k blocks only kekw

kind hatch
#

Only 6k blocks. 💀

hybrid spoke
orchid gazelle
#

Bro thats 20 packets lol

eternal night
#

what

hybrid spoke
terse ore
#

thanks

hybrid spoke
orchid gazelle
#

Ehh but is 6k blocks really that much?

eternal night
#

yes

hybrid spoke
#

yes

kind hatch
#

yes

orchid gazelle
#

Its probably like 50kb

hybrid spoke
#

it has to iterate over 6k blocks

orchid gazelle
#

The client?

kind hatch
#

Maybe in file size, but the client still has to go through all of those blocks.

hybrid spoke
#

no the person

#

yes obv. the client

orchid gazelle
#

Arent people doing that in that scale already?

hybrid spoke
#

but not at once

orchid gazelle
#

Define "at once"

hybrid spoke
orchid gazelle
#

I mean the time

#

In what timespan

#

Do they send 6k without issues

hybrid spoke
#

read point 2

orchid gazelle
#

Yeah but whats the timespan needed to send that amount without issues?

kind hatch
#

Over multiple ticks probably.

orchid gazelle
#

thats really bad

#

I gotta do it realtime /: kind of

hybrid spoke
#

why do you think arent chunks loaded all at once

orchid gazelle
#

Bandwith, cpu power, ram

#

Obviously

#

A chunk has more than 6k blocks tho

buoyant viper
#

fuk u intellij maybe i dont want to use the literal char

#

ah, much better.

remote swallow
#

smh

hybrid spoke
kind hatch
# orchid gazelle A chunk has more than 6k blocks tho

Yea, but in most cases chunks are only really holding half of their total space. It's mostly air. So about 40% of it is blocks. That coupled with how minecraft renders the game, sudden changes all at once are taxing. If you look at how normal worldedit works, you'll see that even it struggles to do large operations at once.

remote swallow
#

yes

buoyant viper
remote swallow
#

yeah

buoyant viper
#

couldve sworn it got normal camelCase

hybrid spoke
#

yes

#

its a constant

buoyant viper
#

i thought public/private mattered for that

#

maybe it was a C# thing im remembering

orchid gazelle
hybrid spoke
#

not really

remote swallow
#

?distro

orchid gazelle
#

FAWE

kind hatch
hybrid spoke
#

the only time where its ambiguous is with any modifiable

#

like lists

#

since then it isnt really a constant anymore

orchid gazelle
hybrid spoke
kind hatch
orchid gazelle
kind hatch
#

?workdistro

kind hatch
#

FAWE also has other tricks up their sleeve

hybrid spoke
kind hatch
#

Like messing directly with the region files.

eternal ivy
#
[23:17:26] [Server thread/ERROR]: Error occurred while enabling AnddlPlugin v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "com.mng.anddlplugin.AnddlPlugin.getCommand(String)" is null
    at com.mng.anddlplugin.AnddlPlugin.registerCommand(AnddlPlugin.java:82) ~[?:?]
    at com.mng.anddlplugin.AnddlPlugin.onEnable(AnddlPlugin.java:52) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugin(CraftServer.java:539) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3648-Spigot-19641c7-7c44152]
    at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugins(CraftServer.java:453) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3648-Spigot-19641c7-7c44152]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:587) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3648-Spigot-19641c7-7c44152]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:412) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3648-Spigot-19641c7-7c44152]
    at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:250) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3648-Spigot-19641c7-7c44152]
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:973) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3648-Spigot-19641c7-7c44152]
    at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:301) ~[spigot-1.19.3-R0.1-SNAPSHOT.jar:3648-Spigot-19641c7-7c44152]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
#

My plugin is

remote swallow
#

not in plugin.yml

eternal ivy
#

in error

kind hatch
humble tulip
#

your command is not in your plugin.yml

eternal ivy
#

ah

hybrid spoke
eternal ivy
#

thank you

kind hatch
orchid gazelle
#

Is there a way to vanish client lags for that?

hybrid spoke
#

just dont cause the lag?

orchid gazelle
#

(I maybe also gotta go back to precomputing block-changes on axises then)

orchid gazelle
kind hatch
#

Can you explain why you are sending that many block changes at once?

orchid gazelle
#

Some schematic preview system

kind hatch
#

I can't recall if that was ever stated.

buoyant viper
#

ah yeah, i was thinking of C# @hybrid spoke @remote swallow

#

but they also dont mention constants so idk

hybrid spoke
#

whats [ThreadStatic]

orchid gazelle
buoyant viper
#

some weird .NET shit probably

kind hatch
#

Why would it need to update every tick?

orchid gazelle
#

If the player moves, its gotta move too

kind hatch
#

No wonder it's lagging.

hybrid spoke
#

so just move it when the player finished moving

orchid gazelle
#

I want realtime previews tho lol

hazy parrot
eternal night
#

6k blocks every tick, why my client lag

orchid gazelle
#

So the user can adjust it to their needs in realtime

kind hatch
hybrid spoke
#

then distribute the packets over several ticks

orchid gazelle
#

Then the player has to wait

#

And cannot do it realtime

hybrid spoke
#

and move the construction every 5th tick or whatever

tender shard
buoyant viper
terse ore
tender shard
#

i got 500fps on my laptop

eternal night
#

no processor on this world is gonna survive 6k packets a tick

orchid gazelle
kind hatch
orchid gazelle
hybrid spoke
terse ore
#

(void world)

hybrid spoke
#

maybe some little optimizations like removing air blocks from the updates

tender shard
#

~600 FPS on an m2 max 😛

orchid gazelle
#

And then adjust tick amount based on the size of the schematic?

kind hatch
#

However, it's not ideal for underground builds.

buoyant viper
tender shard
tender shard
hybrid spoke
#

just dont have underground buildings then

kind hatch
#

lmao

hybrid spoke
#

problem solved

orchid gazelle
rose pawn
#

hi, where can i find the GriefDefender Sponge 2.1.7 download for Sponge?

hybrid spoke
#

like 4k blocks of stone

tender shard
#

111 fps on vanilla @buoyant viper

hybrid spoke
#

since you then would only update the outer layer

orchid gazelle
#

Yeah

hybrid spoke
#

your best fix would be to distribute over several ticks

kind hatch
#

Back to the updating everytime the player moves. Are you filtering out player head movement? Because the PlayerMoveEvent fires even when the player is standing still and looking around.

hybrid spoke
#

and send a warning that the bigger it is, the more delayed it will be

buoyant viper
#

yeah, i know the alphabet.

orchid gazelle
tender shard
orchid gazelle
#

I don't feel satisfied with laggy previews :(

hybrid spoke
#

then dont offer a preview

#

or just small ones

kind hatch
crimson relic
kind hatch
#

It's good hardware, but lackluster cooling solution.

crimson relic
#

yes good hardware, looks nice, nothing more

kind hatch
#

The price is also too much.

orchid gazelle
hybrid spoke
#

with apple you also pay for the brand

tender shard
hybrid spoke
#

which sucks if i just want a new phone or laptop

orchid gazelle
hybrid spoke
#

probably your best option

kind hatch
orchid gazelle
crimson relic
#

double or triple all the accessories too

orchid gazelle
#

cough cough pc wheels for 1000$ cough cough

kind hatch
#

$40 for an official charging cable as well.

orchid gazelle
#

lol

orchid gazelle
livid dove
#

Any devs have a base knowledge of a good example of a crop growth plugin that varies growth per biome?

#

Worked with pwns plant and for some reason jts a resource hog

#

Like 70% of 24 gb

kind hatch
livid dove
orchid gazelle
kind hatch
eternal ivy
#
@Override
public void onEnable() {
  registerEvents(new Listener[]{
      new PlayerJoinLeaveListener(),
      new PlayerSpawnListener(this),
      new TeleportBowListener(this),
      new ArmorStandGUIClickListener(this),
      new BanGUIClickListener()
   });

   registerCommand(new DieCommand(), "suicide");
        registerCommand(new GodCommand(), "god");
        registerCommand(new RepeatCommand(), "repeat");
        registerCommand(new SetSpawnCommand(this), "setspawn");
        registerCommand(new SpawnCommand(this), "spawn");
        registerCommand(new FlyCommand(this), "fly");
        registerCommand(new GiveCommand(this), "tpbow");
        registerCommand(new ArmorStandGUICommand(this), "armorstand");
        registerCommand(new HologramCommand(), "hologram");
        registerCommand(new MessageCommand(), "testmessage");
        registerCommand(new ReloadCommand(), "reloadconfig");
        registerCommand(new SignCommand(), "sign");
        registerCommand(new BanGUICommand(), "bangui");
        registerCommand(new RandomTPCommand(), "randomtp");

        getConfig().options().copyDefaults();
        saveDefaultConfig();
        CustomConfig.setup();
        CustomConfig.get().addDefault("message", "This is the default message.");
        CustomConfig.get().options().copyDefaults(true);
        CustomConfig.save();

        Bukkit.broadcastMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "\nAnddl Plugin has been enabled!\n");
    }

onEnableMessage is not sent

orchid gazelle
#

Yeah that sounds fair

#

Maybe I'd just do my system for medium and small and tell builders to use FAWE for large ones since its private anyways

#

Ty for your help

kind hatch
# terse ore I dont want to hard code it

You could just loop over the inventory slots and exclude the edge slots.

for (int i = startingSlot; i <= endingSlot; i++) {
  // Add slot exlusions as necessary
  if (slot == 17 || slot == 18) {
    continue;
  }
  
  // Add items to inventory.
}
livid dove
#

Wait someone 30 second elevator pitch akex issue

#

Might have something already

#

Was debating making a lib

upper meadow
#

Hello ! I have an issue with my server, in my spigot.yml : every time I change the item merge-radius from 4.0 to 1.0 and restart the server, it comes back to 4.0... Could anyone help me please ? 😅

merge-radius:
exp: 6.0
item: 4.0

kind hatch
remote swallow
upper meadow
#

oh ok ill try thanks !

kind hatch
#

Although rare, plugins also have the potential to mess with that file.

livid dove
#

@terse ore what is the context behind ur problem..like what's the end goal?

wet breach
wet breach
#

but I think that would be too easy

#

so we could stay with your skipping slots 😛

wet breach
#

but yeah, we could always remap 10 -> 0, count 7, skip 2, start at the 10th again

kind hatch
#

You could do it that way too. I just threw something together quick and dirty style. I'd rather get it working first then optimize after the fact.

wet breach
#

lol

#

I just see numbers differently is all but yeah I do agree on the getting it working first part 😛

livid dove
kind hatch
#

That's another way to do it. 😛

#

A similar concept is used for particle capes.

livid dove
#

I sorta wanted to do a lib for this as honestly it's a joy to edit guis

#

Never gone back since

ancient plank
#

I hate menus in Minecraft

#

I hate inventories in Minecraft*

livid dove
#

Wanna change position of a button. Move the number to another row.

Intuitive, simple, and works a treat 😎

buoyant viper
wet breach
# livid dove

noticed it is a 2d array, do you indeed make use of the second dimension as I don't appear to see that

livid dove
wet breach
#

your 2D array would do better if it isn't even just fyi

#

for future reference

livid dove
#

Any cons in your opinion? If I've missed something I'd love to hear it

wet breach
#

never make them square in other words, for whatever reason in terms of performance they are just horrible when they are nearly or are perfect squares.

#

this is fine because it is small scale and wouldn't matter

#

but it wouldn't scale well at all if it got larger equally

livid dove
#

I think you've underestimated how most the backend stuff can be done in async per row

#

Via this method

wet breach
#

instead you want 2D arrays to be irregular sized or not even on one side

upper meadow
livid dove
#

That's... not quite right unless I've missed something and "Orked" my way into the code working lol

wet breach
#

The code works, never said it didn't

#

I am just informing that it works for small scale

#

and that it shouldn't be used to go larger

livid dove
#

Where in the problem lies though?

#

I.e. the direct problem

wet breach
#

because even square 2D arrays don't fit nicely contiguously first off in ram, second in terms of searching it just sucks lookup wise and as the squared array got larger evenly, it would increase the effect proportionally

#

As it is now, it is fine because at small scales it doesn't matter

#

its only if you wanted to increase the size

#

So, instead

#

the array would be better of if say one side was 4 and the other like 10

#

its not even

#

and it will would be a whole lot better

#

easier way to do it, would be just keep one side odd

#

if you ever done math in regards to permutations which is the problem here with 2d arrays being even

ancient plank
#

Tl;Dr, squares bad and circles good

wet breach
#

then you would know, as you got larger, the more permutations you have the longer it takes and the slower it becomes

#

but if you limit one side to a smaller size, then the amount of permutations you could have is actually severely limited as well as it wouldn't increase either

buoyant viper
#

Caused by: java.lang.IllegalArgumentException: Could not parse ChatColor ºa bruh whygodwhy

#

ive gotta be getting an encoding issue smewhere

wet breach
#

maybe its them pesky invisible characters again

hasty prawn
#

Is that the character phoning your CPU to do something stupid

buoyant viper
#

Yes

echo basalt
buoyant viper
#

y da fuk u give error whygodwhy

#

ur just 1 character

#

encoding is set to utf-8

ancient plank
#

The menu API the server I work for has, has so many bugs that it makes me grrr

wet breach
buoyant viper
#

wat

#

u sayin just do like

#

SECTION_CHAR = 0xA7

#

?

hasty prawn
#

Hol up

livid dove
# echo basalt

Who are you?

I'm you but better .

Legit dude slick ^_^

hasty prawn
buoyant viper
#

yes

hasty prawn
#

That wants the ChatColor name not the code

#

So for a try doing "GREEN"

buoyant viper
#

it doesnt take like {section}{code} ?

#

?paste sec

undone axleBOT
chrome beacon
#

§

ancient plank
#

grrr

buoyant viper
ancient plank
#

I hate that symbol

buoyant viper
#

line 53

hasty prawn
#

No it doesn't.

public static ChatColor of(String string) {
        Preconditions.checkArgument( string != null, "string cannot be null" );
        if ( string.startsWith( "#" ) && string.length() == 7 )
        {
            //parse hex stuff so not relevant
        }

        //Get by name not by code
        ChatColor defined = BY_NAME.get( string.toUpperCase( Locale.ROOT ) );
        if ( defined != null )
        {
            return defined;
        }

        throw new IllegalArgumentException( "Could not parse ChatColor " + string );
    }
chrome beacon
buoyant viper
#

oh

#

i read that method so wrong then

#

lmao

ancient plank
#

Grrr

hasty prawn
#

I agree with Adelemphii I do not like that symbol

#

It's not on me keyboard so it's annoying to deal with

ancient plank
#

It's not on my keyboard so I have to Google it and I forget it's name every time

buoyant viper
#

still doesnt explain the whole section sign not being the section sign but i can just use getByChar instead i think

#

lol

hasty prawn
buoyant viper
#

maybe

hasty prawn
#

I think I've seen that character when I've printed section symbols in the past and the terminal is just big dumb

buoyant viper
#

what the Fuck

hybrid spoke
#

§

hasty prawn
buoyant viper
#

wait im probably stupid

#

(definitely stupid)

ancient plank
#

I just type "Minecraft color codes"

wet breach
#

since Java knows utf8 escapes and hex

ancient plank
#

Because it's the only instance I know of it being used regularly

wet breach
#

its like built in

buoyant viper
#

i was using the method wrong anyway so it mightve not been encoding issue at all

#

lol

wet breach
#

lol

ancient plank
#

I updated my intellij and now it shows me what Unicode thing I've put in a spot

#

And idk if I like it or not

hasty prawn
#

Sounds like a good feature to me

wet breach
#

it is the other name for the symbol

#

that like no one knows about

echo basalt
#

haha self-hatred go brr

livid dove
#

Any documentation you can throw my way would be great.

Always happy to learn new ideas 💡

ancient plank
echo basalt
wet breach
echo basalt
#

A layer contains elements at positions determined by a selection

wet breach
#

mostly for others but like hardly ever for yourself

echo basalt
#

so you can make a selection of the first 5 slots and apply a "button" to those slots

#

or a switch

#

or make a layer that has a bunch of elements but you can only select one "active" element

wet breach
echo basalt
#

what if you want to apply a rectangle and don't want to draw up a whole bitmask

wet breach
#

but, that is way too highspeed for people here

ancient plank
#

The menu API I use has so many bugs that technically every slot I had something in is a button YMg_Dead

#

I can't get the project to build on my computer so I can't fix the bugs D;

echo basalt
#

I have an element called "DecorationItem" that's literally just a button with no function

wet breach
echo basalt
#

¯_(ツ)_/¯

#

I apply masking, just not bitmasking

#

bit implies that it's either 0 or 1

#

what if I want to make a mask of multiple types and apply multiple selections to different elements

#

with the same mask

#

with bitmasking, you need multiple masks

wet breach
#

no you don't

echo basalt
#

here, you just need a character mask and associate each element with a character

ancient plank
#

And there's a bug with it where players can steal an item from the menus if they double click with the same item in their inventory, so I went around it by adding a random pdc value onto each item and I remove the value when the player retrieves it from the menu

wet breach
#

so bitmasking is just assigning bits as certain things. For example, every 2nd bit if it is a 1, means the option is on. Or you could say, if the third bit is set, then the nibble after has whatever data

#

so, its a bit arbitrary

#

MC uses bitmasking in its protocol

#

so knowing that, you could use the first two bits to tell you what kind of shape

tender shard
#

Ugh my iPhone fell into the bathtub

#

Test 1223

wet breach
#

then the next 4 bits to tell you height and width. And that is only 6bits, with 2bits left over

tender shard
#

K

severe oracle
#

Hi, does anyone know how would I set custom rotation to an arm of a player? as far as i saw i should use something called NMC, but I dont know how to use it.

wet breach
#

its called NMS

wet breach
#

just put rice on it 😉

#

it should be fine 🙂

severe oracle
remote swallow
#

?nms

wet breach
#

yes and no. NMS is essentially non documented code. Refers to net.minecraft.server package

#

so like you are basically on your own unless you find someone else who has documented it but odds are it is outdated for your use so really all that can be useful for you is just understanding concepts as well as knowing how to use reflection sometimes.

#

and then you just go messing with it until it works

severe oracle
#

thanx

buoyant viper
tender shard
#

dnat > snat

tender shard
buoyant viper
#

yeha

tender shard
#

your fault

buoyant viper
#

oh no i know

tender shard
#

for doing things

buoyant viper
#

im ass at text processing

tender shard
#

see

ancient plank
#

Hannah more like

#

banana

tender shard
#

yeah

#

lmao

livid dove
# wet breach over time, you will learn niche stuff that most of the time isn't useful until i...

As an engineer by trade I know for a fact the archemidies screw was made infinitely more useful when folk realised you can spin an outer cylinder and get a shit tonne less dust and debris...

The screw was developed, as the name suggests , in 300BC...

The idea trying a cylinder on the outside?

.... 2019....

The trick isn't to find none niche stuff, it's to take non niche stuff and generalise via alteration.

livid dove
#

Wahey

tender shard
#

whatever

#

taht means

livid dove
#

Spaget messages to avoid spaget code 👌

wet breach
tender shard
#

my yubi's will arrive in 10 minutes :3

eternal night
#

🥳

tender shard
#

At least i hope so

eternal ivy
#
getConfig().options().copyDefaults();
saveDefaultConfig();

I think it doesn't work.
because when I build the plugin, the plugin doesn't save default config file.

remote swallow
#

you dont need the top one

#

and is the a config already there

eternal ivy
remote swallow
#

is there a config.yml already in your plugins data folder

eternal ivy
#

no

remote swallow
#

is there stuff in the config.yml in you resources folder

remote swallow
#

chec console for errors

eternal ivy
#

no errors

remote swallow
#

upload the jar here

#

im guessing the config.yml might not be getting added

eternal ivy
remote swallow
#

its getting added, so saveDefaultConfig() should be saving it

eternal ivy
remote swallow
#

run saveDefaultConfig at the top of onEnable

eternal ivy
eternal ivy
tender shard
#

erm

#

why do you send random .jar files here lol

remote swallow
tender shard
#

oh I see .anyway, the config.yml is there

remote swallow
#

yeah

#

thats whats confusing

#

how would the config get addedd but not saved

tender shard
#

because they already have a config.yml I guess

eternal ivy
#

no

#

There are no config file

buoyant viper
#

2 seconds away from using fromLegacyText and just regex replacing #RRGGBB to bungee hexes

remote swallow
#

why would you deal with that in the firstplace

buoyant viper
#

Yes

remote swallow
#
private static final LegacyComponentSerializer SERIALIZER = LegacyComponentSerializer.builder().character('&')
            .hexCharacter('#').hexColors().useUnusualXRepeatedCharacterHexFormat().build();

    /**
     * Formats a string
     *
     * @param toTranslate message to translate
     * @return Formatted String
     */
    public static String translate(String toTranslate) {
        return (ChatColor.translateAlternateColorCodes('&', SERIALIZER.serialize(MiniMessage.miniMessage().deserialize(toTranslate))));
    }
#

problem

#

solvered

tardy delta
#

Serializer.serialize(Minimessage.minimessage().deserialize(text))

#

Ugh

opal juniper
#

i got mine a few weeks ago for $10

#

cause of the cloudflare promotion

dry yacht
shut mauve
#

Hello everyone,
I'm coding a spigot plugin in 1.8.8 (don't judge me), but my nms villagers spawn only after a reload of my local server, but not at the first start... Does anyone knows why ?

crimson relic
#

?1.8

undone axleBOT
shut mauve
buoyant viper
#

oh wait i dont have it set to do chat duh

remote swallow
#

imagin

shut mauve
tardy delta
#

tf

#

you ever heard of functions?

buoyant viper
remote swallow
#

i can easily convert to bungee stuff if i feel like it

#

i just choose not to

tall fractal
#

How do I set the spawn of schematic?

shut mauve
echo basalt
#

mf trying to make a minigame

shut mauve
tardy delta
#

then we are not here to help :)

buoyant viper
dry yacht
dry yacht
#

Oh, lol

river oracle
#

The code is truly enlightening

dry yacht
#

I had a similar weird bug too on a way more recent version where armor stands just wouldn't show up until I rejoined. I hate spawning entities since then, xD

buoyant viper
#

now that im using bungee components i wish they were more integrated into spigot api sadcat

#

like how paper has them for basically anything that took a string

eternal night
#

choco has PRs open for that iirc

river oracle
#

He did a ton of component things lol

eternal night
#

but also BaseComponent[]

buoyant viper
eternal night
#

dew it

buoyant viper
river oracle
#

We should include adventure in spigot api guys

eternal night
#

would be nice yea

tardy delta
#

no cell in my brain that thinks about that

river oracle
#

Lol

#

I'd totally spend time doing that but the pr def wouldn't be accepted

tardy delta
#

as it should

eternal night
#

I mean issue is naming

#

even with bungee components

#

or you just throw it all into the spigot() blocks

#

which I think is what choco proposed ?

river oracle
#

Spigot

buoyant viper
#

SpigotBaseComponent

tardy delta
#

i have to log in smh

eternal night
#

average spigot contribution lifestyle

orchid gazelle
#

I have no idea why I felt like im signing some important company buying shit when registering to spigot

buoyant viper
#

u are

#

spigotmc is very important

eternal night
#

make sure to include it on any resume as "open source work"

#

to get that extra bonus

tardy delta
#

make sure to contribute to the linux kernel and put that on your resume

eternal night
#

idk man spigot > linux

tardy delta
#

💀

eternal night
#

what is fixing a kernel bug compared to fixing a bug in a minecraft server API

orchid gazelle
#

true

#

RCE in minecraft server would be 10x more important

tardy delta
eternal night
#

Fix typos in spigot docs dogekek

tardy delta
#

put that on your resume

#

wait spigot docs

opal juniper
#

i often don’t bother with PR’s though cause if it is a bug, i want it solved ASAP. If i have to wait around for a contributor to fix it and then their code isn’t that great, it’s just a bad time overall

eternal night
#

hence why one maintains a private fork for their servers

opal juniper
#

it’s often faster to just fix it myself

tardy delta
#

me wondering how to even make a fork

#

github noob

orchid gazelle
#

You guys find bugs?

tardy delta
#

they gotta explain in college

eternal night
#

now find out how to make a fork on stash 5Head

tardy delta
#

uh oh

opal juniper
#

the number of times i sit in maths class fixing bugs OMEGALUL

orchid gazelle
tardy delta
#

math bugging

icy beacon
#

is there a better way to iterate over a radius of blocks? this just looks awkward, three loops and stuff

public void handleAOECropTrample(final Player pl, final int radius) {
    for (int x = -radius; x <= radius; x++) {
      for (int y = -radius; y <= radius; y++) {
        for (int z = -radius; z <= radius; z++) {
          final Block block = pl.getLocation().clone().add(x, y, z).getBlock();
          if (!Constants.CROPS.contains(block.getType())) continue;

          block.breakNaturally();
        }
      }
    }
  }
opal juniper
#

i honestly don’t see the issue with the CLA / stash but then some hate it

tardy delta
#

is there a Tag.CROPS?

orchid gazelle
eternal night
#

if it is a shitload of blocks, you might have to spread the work over multiple ticks

buoyant viper
icy beacon
#

shouldn't be too much blocks

tardy delta
tardy delta
icy beacon
#

oh yeah i forgot about tags

#

tyty

tardy delta
#

how to edit code idk

buoyant viper
orchid gazelle
orchid gazelle
tardy delta
#

wha

icy beacon
#

i think

crimson relic
#

no do the konami code

icy beacon
#

oh my bad

orchid gazelle
#

I don't use a mouse for coding

tardy delta
#

glorified hashset?

icy beacon
#

no it's up up down down left right left right b a

opal juniper
#

?workload

icy beacon
#

very convenient though

orchid gazelle
tardy delta
#

wanted to look through the source but it has roots in nms

orchid gazelle
#

Do I have to have my wired keyboard plugged to do that?

icy beacon
crimson relic
#

you need a bluetooth headset

icy beacon
#

before doing this combination also turn off your pc

#

and spin 720 degrees for better effect

tardy delta
#

after that throw it out of the damn window

orchid gazelle
#

Do I also turn off the local electricity?

icy beacon
#

make sure that you drop it high enough for it to reach its terminal velocity

#

yeah you actually have to cut off the entire district electricity

#

just to make sure

orchid gazelle
#

And isolate it with aluminium foil

#

The district electricity

#

So no energy goes out

icy beacon
#

you actually have to pour sulfuric acid on it

crimson relic
#

solar panels could work but that method is untested

icy beacon
#

just in case yk yk

orchid gazelle
#

Ahhh ok

icy beacon
#

we can just kill the production real quick

#

i don't think they maintain prs too seriously

orchid gazelle
#

On top of it, I think I gotta do 10 kickflips

icy beacon
#

dude 14 is the number

orchid gazelle
#

While spinning and doing 360 noscopes in minecraft

zealous osprey
#

Is there a way to create a FileConfiguration obj without creating a new file?

tardy delta
#

what would you do otherwise?

zealous osprey
#

Well in the api I'm using, they specifically want me to provide a ConfigurationSection and I was wondering if I could provide it without creating a new, somewhat redundant, file.

#

Ah I can use a YamlConfiguration

tardy delta
#

new FileConfiguration().load(Files.newInputStreamReader(plugin.getResource("x.yml"))) or smth maybe?

zealous osprey
#

ok, got it sorted

tardy delta
#

dunno where you would get your section from, or do you need an empty one?

zealous osprey
#

I'll create the section myself

#

well the code will

lavish wing
past vapor
#

Having a strange issue regarding firing and receiving events.
Plugin A and B both use the same API, up to date etc

Plugin A fires an event but plugin B cannot receive it.
Plugin B fires an event and is able to receive it.

Is there any reason this could be happening?

opal sluice
#

Hello, does the LivingEntity#damage(int, Entity) fires a EntityDamageByEntityEvent?

warm mica
past vapor
tardy delta
#

String#concat?

#

"" + "" calls that internally

past vapor
#

yeah <string> + <string> just hides a .concat call

tardy delta
#

so much stuff in java is just represent by a function or class

#

module X opens Y: ModuleOpens.class

hazy parrot
#

operator overload when

tardy delta
#

always fun to look at the jdk internals

#

my mate who knows nothing about java did the java quiz of w3schools and got 25/25

#

might want to spend your time differently then

warm mica
past vapor
#

Otherwise plugin B would not receive the event call at all

tardy delta
warm mica
tardy delta
#

looks like smth im going to write

#

uhh idk never done that quiz

past vapor
tardy delta
#

smh my teacher ai told me we had to learn ai on our own

past vapor
#

It seems that if plugin A fires it, plugin A receives it
if plugin B fires it, plugin B receives it

crimson relic
tardy delta
#

up till now ive not learnt a single useful thing about java in college

past vapor
#

leant nothing useful in college/uni about java

#

well

#

i think its just because i learnt in my own time 🤷‍♂️

tardy delta
#

cry when they require a bachelor certificate

crimson relic
#

lmao ^

tardy delta
#

thats easy

past vapor
#

seems that my event calls are only available to the plugin it's being called on 🤔

tardy delta
#

tell me how much 0x12 is in decimal

crimson relic
#

lol

hazy parrot
#

I also didn't learn anything new about java at uni, but I can say I learnt much other useful things which I would probably never do in free time

tardy delta
#

too much work lol

past vapor
#

Uni covers the shit you mainly dont want to learn but should

crimson relic
#

that took you so long to lookup

#

were you having trouble finding a converter?

tardy delta
#

0xcafebabe hehe

#

2 * 16^0 + 1 * 16^1

#

should probably add hex support to my parser

hazy parrot
#

15

#

0 is first

past vapor
#

0th

#

(im joking)

hazy parrot
#

A-10 b 11 c 12 d 13 e 14 f 15

tardy delta
#

just assign indices to the digits and multiple each digit by base ^ index

  1 0
0x1 2

2 * 16^0 = 2
1 * 16^1 = 16

16 + 2 = 18```
hazy parrot
#

It is?

#

That is why base is 16, 16 symbols or whatever you want to call it

tardy delta
#

0 -> 15

hazy parrot
#

0123456789ABCDEF

#

From 0 to 15 is 16 symbols

tardy delta
#

cuz its zero based and 16 is the base aka the count of available digits

#

there isnt a 10 as one number in base 10 either

#

its 1 0 on two positions

#

0 -> 9

hazy parrot
#

Also binary, base 2 0->1

#

Octal base 8, 0->7

tardy delta
#

cries in quantum computers

#

its 0 -> 15

hazy parrot
#

0 is always included, as it is an valid digit

#

You can't write all numbers without 0

#

?

tardy delta
#

yes

hazy parrot
#

Who use 15

tardy delta
#

15 is f in hex

#

0xf is 15*16^0

#

just 0

#

0x0 is a perfect hex number

hazy parrot
#

Same as 1 is just 1

#

2 is just 2

tardy delta
#

dunno what the digits in base 64 are tho

cold field
#

Hi everyone, does anyone knows why if I invoke #getItem on a ThrownPotion it returns AIR whenever the thrown potion is an uncraftable one?

chrome beacon
ionic hound
#

how could i stack itemstack item with anvil renamed item? (the one that has "extra" is the itemstack one)

#

my code looks like this:

        ItemStack item = new ItemStack(Material.NETHER_STAR,1);

        ItemMeta itemMeta = item.getItemMeta();
        itemMeta.setDisplayName("Heart");

        item.setItemMeta(itemMeta);
trail lintel
#

Yo guys, I am restricting access to some functionality with player.hasPermission(...), but what if the server does not have a permissions plugin installed? In that case, I want to allow my plugin to work without it. Is this something that can be done?

kind hatch
#

It can be done, but it's a massive pain in the ass to manage permissions yourself. It's part of the reason why we have permission plugins.

trail lintel
#

Fair enough, I will just say "no permission" if the server does not have a permission plugin =] thank you

sullen marlin
#
BukkitWiki

When Bukkit loads a plugin, it needs to know some basic information about it. It reads this information from a YAML file, 'plugin.yml'. This file consists of a set of attributes, each defined on a new line and with no indentation.

A command block starts with the command's name, and then has a list of attributes.

A permission block starts wit...

trail lintel
#

but like, I don't want them to have the permissions by default. I only want them to be able to do everything IF there is no permissions plugin installed. If I put default permissions in there and they DO have a permissions plugin installed, will they still be able to do everything?

tardy flame
#

@tender shard hi

sullen marlin
#

Select appropriate defaults

tardy flame
#

I shall steal your github

#

Link

sullen marlin
#

Users with a permissions plugin can customise them

wind blaze
#

may anyone help me? the following code gives me error "Inconvertible types; cannot cast 'java.util.stream.Collector<java.lang.Object,capture<?>,java.util.List<java.lang.Object>>' to 'java.util.stream.Collector<? super org.bukkit.inventory.ItemStack,),java.util.List<org,bukkit.inventory.ItemStack>>'"

#

final List<ItemStack> armour = Arrays.stream(player.getInventory().getArmorContents()).filter(Objects::nonNull).collect((Collector<? super ItemStack, ?, List<ItemStack>>)Collectors.toList());

trail lintel
#

Err guys how do I change the icon of my resource on spigotmc.org? I don't see anywhere on the post resource update, or the edit description page.

kind hatch
trail lintel
#

TYTY lemme see if I can find that menu

#

AHHH there it is

#

tucked away in there =] thanks a bunch

dry yacht
dry yacht
# wind blaze cuz i want a List

It compiles just fine without that cast. Collectors.toList() collects all stream items into a list, and the list is typed the same way as the stream is. So you're already at List<ItemStack>

wind blaze
#

thanks a lot it works now

dry yacht
# wind blaze thanks a lot it works now

Nice! :). The Collectors#toList method heavily relies on type inference, so casting it manually is very likely always going to be a mistake. The list type is inferred by the type of the stream. Just wanting to clear that up, so you understand why that cast didn't work. The issue was likely that ? is not equal to another ?, because it marks a placeholder type. So the already typed capture of ? couldn't be casted to your new wildcard. If that makes any sense. Generics are weird.

wind blaze
livid dove
#

General question for u lovely folk. Would this time in a 24 hour time clock for a config screw over time calcs and potentially lead to it proccing twice in oen day?

#

As this plugin is having this exact issue

#

payday ends up with 1 payment begining of day

#

1 payment at the end

wooden osprey
#

is there a way for me to store items as nbt?

worldly ingot
#

Store them? Persistently? Ideally not because that format changes from version to version. You're better off making use of Bukkit's object output stream

worldly ingot
wooden osprey
terse ore
#

BlockPlaceEvent gets trigered by enderman?

terse ore
#

here in spain i've seen 24:59

crimson relic
#

huh?

terse ore
#

instead of 00:59 ive seen 24:59

#

24:59 + 1 -> 1:00

crimson relic
#

Time-of-day notations beyond 24:00 (such as 24:01 or 25:00 instead of 00:01 or 01:00) are not commonly used and not covered by the relevant standards. However, they have been used occasionally in some special contexts in the United Kingdom, France, Spain, Canada, Japan, South Korea, Hong Kong, and China where business hours extend beyond midnight, such as broadcast television production and scheduling.
i see

terse ore
#

yep

crimson relic
#

never heard of that before

terse ore
terse ore
#

but rarely used

worldly ingot
terse ore
#

time was made before computers

#

I don't think it's a good example

#

I think we just adapted a standard for computers

worldly ingot
#

KEKW That's literally not relevant

#

Computers understand time between 0 and 23

wooden osprey
#

add some info about only accepting 0-23, the player's fault really

glad prawn
#

Lol 24:00:00

terse ore
#

24:24:24

#

is better

glad prawn
#

💀

topaz cape
#

can you change the player's entity client side

terse ore
dry yacht
upbeat hornet
#

Hey so I'm trying to make a simple block stacking system
How can I cancel the event of the user placing the block on another block of the same type, but without cancelling the event as canceling it will end the method (It won't execute the code that comes afterwards).
I tried replacing the block placed with air, but if it's placed on a snow layer, flower etc it will detroy the flower with nothing in return

Any idea on how to do this?

crimson relic
#

you want to cancel it without cancelling it...?

upbeat hornet
#

cancel the block placement (not the whole event as it will exit the current loop/method), and afterwards execute some code

dry yacht
upbeat hornet
#

wait how do you cancel the event?
event.setCancelled(true); right?

dry yacht
#

Right exactly, but that does not hinder you on running more code after this statement

upbeat hornet
#

So this should print the text

dry yacht
#

Yep

upbeat hornet
#

oh it did

#

I am so stupid

#

Thanks

dry yacht
# upbeat hornet I am so stupid

No worries, we all start somewhere. There's no reason on why it should exit your method, as you don't use the return keyword anywhere and that method also doesn't throw.

The event-system is basically an observer design pattern, where everybody who's interested registers centrally and all observers are called sorted by their priority. By cancelling the event, you just set the cancellation flag to true. The event dispatcher can then - after calling all observers - check that flag and act accordingly. This does not mean that you can't do more than just to cancel the event. But in general, you should keep your code in handlers fast and concise, as you otherwise weigh down the whole observer chain.

upbeat hornet
#

ok thanks!

bold vessel
#

anyone know why ?

dry yacht
dry yacht
#

That would be Strength II, right

bold vessel
#

Yes, thanks

dry yacht
#

Are you keeping players from brewing level 2 strength? D:

terse ore
#

is there a way to register all the listeners in a directory?

#

(not adding them 1 by 1)

trail lintel
#

Hey guys, when listing "native minecraft version", I should use the lowest API that is compatible right? I'm just worried people will see that and think, "oh it doesn't support 1.19" even though I have it listed as tested on 1.19, its just targeted at the 1.13 api features.

dry yacht
# terse ore is there a way to register all the listeners in a directory?

Yep, there is, but you are going to have a hard time with injecting dependencies that way, if you don't build a fully featured dependency graph solver along side with it.

If you don't want to instantiate the classes anywhere, their constructor parameters are also out of your control. So you could only have listeners with no references to anything else. Maybe you could do automatic Plugin injection with a few lines, but that's about it if you don't want to do the full thing.

terse ore
#

sounds too complicated

#

for my level

dry yacht
dry yacht
wet breach
#

sometimes, you can just listen for more generic events that get fired

terse ore
#

I am making a project above my level now

#

so I am struggling already

#

but I am learning like I never did

dry yacht
#

Then you probably shouldn't burn yourself out with that, I'd advise

terse ore
#

I am having fun coding it tbh

wet breach
#

I would look to see if there is a more generic event you could listen to that would encompass all the other events you are trying to listen to as well

terse ore
#

how could I get the painting type I placed?

#

but no wonder how

dry yacht
# terse ore sounds too complicated

I also used to automatically detect them, but nowadays I dropped that idea. It's only adding needless complication. By making use of the class's symbols manually, you can also make very easy use of dead code elimination without fancy rules and algorithms. Something which can come in handy if you write your own libraries which you are looking to shade in.

I just don't feel wiring everything up myself, which is why I have written this dead simple auto-wirer. But the detection stuff has been eliminated for me, personally.

livid dove
dry yacht
terse ore
dry yacht
terse ore
#

oh but wait

#

you are still adding the classes manually right?

dry yacht
dry yacht
terse ore
#

welp, ill continue with my plugin

wet breach
#

of course you are going to want to do some checks and all that, but that is essentially what you need

bold vessel
wet breach
#

Painting has getArt()

terse ore
#

oh wow

#

tysm

bold vessel
#

Code is supposed to work ?

dry yacht
bold vessel
terse ore
#

lol there's a kebab painting

hasty prawn
worldly ingot
#

Events are generally called before the action actually takes place (so that it can be cancelled)

bold vessel
#

So i cancel when the strenght 1 is put inside of the brewing stand ?

dry yacht
worldly ingot
#

^

bold vessel
#

Okkk

worldly ingot
#

Your code is totally fine. Just rather than using getContents(), use getResults()

bold vessel
#

I look the docs and i try 👍

dry yacht
#

Lol, is getResults() one of those super-late added features? Cannot seem to find it in 1.17's API

worldly ingot
#

I don't believe so

#

October 2021

bold vessel
#
@EventHandler(priority = EventPriority.HIGH)
public void onBrew(BrewEvent event) {
    ItemStack result = event.getResult();
    if (result != null && result.getItemMeta() instanceof PotionMeta) {
        PotionMeta meta = (PotionMeta) result.getItemMeta();
        PotionData data = meta.getBasePotionData();
        if (data.getType() == PotionType.STRENGTH && data.isUpgraded()) {
            event.setCancelled(true);
            Bukkit.getConsoleSender().sendMessage("§f\uE259 » §cErreur : Vous ne pouvez pas créer de potion de force 2.");
        }
    }
}```
worldly ingot
#

So 1.17.1

bold vessel
#

Likes this ?s

worldly ingot
#

getResults(). It returns a List<ItemStack>

dry yacht
worldly ingot
#

Again, literally the same code you had the first time, only instead of event.getContents().getContents(), you're using event.getResults()

dry yacht
# bold vessel like this ?

This with for (ItemStack item : e.getResults()) instead of for (ItemStack item : e.getContents().getContents())

livid dove
#

if after a spark heap dump the server going between 40 and 70% of 24gb ram to 10% standard is a sign of some sort of leak somewhere or garbage collection issues right?

bold vessel
#

okk, i wasnt understanding the docs

dry yacht
livid dove
#

Yeah it ramps up like a wave

#

40 -70

#

40-7

#

*70

#

etc

#

heap dump?

#

runs at 10% ish

dry yacht
# livid dove heap dump?

Yeah, still not sure what you mean by that. A heap dump is - in my book - a binary file java writes to disk containing the memory space of an application to be analyzed by a tool later. That would not decrease your memory consumption at all. It's just a carbon copy that's being written.

You mean that the garbage collector hit, which has nothing to do with a dump.

bold vessel
# dry yacht This with `for (ItemStack item : e.getResults())` instead of `for (ItemStack ite...
@EventHandler(priority = EventPriority.HIGH)
    public void onBrew(BrewEvent event) {
        for (ItemStack item : event.getResults()) {
            if (item != null && item.getItemMeta() instanceof PotionMeta) {
                PotionMeta meta = (PotionMeta) item.getItemMeta();
                PotionData data = meta.getBasePotionData();
                if (data.getType() == PotionType.STRENGTH && data.isUpgraded()) {
                    event.setCancelled(true);
                    Bukkit.getConsoleSender().sendMessage("§f\uE259 » §cErreur : Vous ne pouvez pas créer de potion de force 2.");
                }
            }
        }
    }```
#

Is this good ?

dry yacht
bold vessel
#

im gonna try 👍

upbeat hornet
#

?blockpdc

undone axleBOT
bold vessel
#

yeah i know but how i can choose the player who put the strenght potion inside the brewing station

#

in the eventhandler ?

dry yacht
#

It's actually not going to be that easy

#

The event has no player, as the issuer of the brewing process is not really being tracked

#

Just printing to the inventory viewers is also not gonna suffice, as the player is never gonna be notified if they're not watching closely all the time.

#

I should have an unfinished quest plugin laying around somewhere here, I could take a look at what route I took there, xD.

#

Yeah, you need to check the inventory click event for placements into brewing stand inventories and keep records yourself... :/.

dry yacht
terse ore
#

is it legal to crash a minecraft client?

crimson relic
#

sure?

dry yacht
terse ore
crimson relic
#

FBI boutta knock your door down

dry yacht
terse ore
#

and they banned some man for posting a resoyurce that crashes a client

crimson relic
#

yes doesnt mean its 'illegal'

dry yacht
#

Oh, you mean if such a plugin is legal to release? I don't think it is, trolling-plugins are denied in general I believe

terse ore
#

okok

dry yacht
#

Rather spam them with mob spawn packets, asynchronously, haha

bold vessel
#

so i cant do this

dry yacht
bold vessel
#

yes pls

bold vessel
dry yacht
bold vessel
#

okk

#

timing lol

#

fck lol i forget to remove the potion from the brewing stand 💀

worldly ingot
#

Alternatively you could change the potion base data to not be extended

#

The List returned by getResults() is mutable

bold vessel
#

What you mean by not be extented ?

worldly ingot
#
    @EventHandler(priority = EventPriority.HIGH)
    public void onBrew(BrewEvent event) {
        for (ItemStack item : event.getResults()) {
            if (item != null && item.getItemMeta() instanceof PotionMeta) {
                PotionMeta meta = (PotionMeta) item.getItemMeta();
                PotionData data = meta.getBasePotionData();
                if (data.getType() == PotionType.STRENGTH && data.isUpgraded()) {
                    // Here v
                    data.setUpgraded(false);
                    meta.setBasePotionData(data);
                    item.setItemMeta(meta);
                    // Here ^
                }
            }
        }
    }```
#

That way players will at least still have Strength I potions

bold vessel
#

i put what into the b asedata?

#

somethings like extentend false ?

worldly ingot
#

I would also just overall clean up your listener to this

@EventHandler
public void onBrew(BrewEvent event) {
    for (ItemStack itemStack : event.getResults()) {
        if (!(itemStack.getItemMeta() instanceof PotionMeta potionMeta)) {
            continue;
        }

        PotionData potionData = potionMeta.getBasePotionData();
        if (potionData.getType() != PotionType.STRENGTH || !data.isUpgraded()) {
            continue;
        }

        potionData = new PotionData(potionData.getType(), potionData.isExtended(), false);
        potionMeta.setBasePotionData(potionData);
        itemStack.setItemMeta(potionMeta);
    }
}```
#

Less nesting, nicer variable names, Java 16 features, etc.

#

Oh there is no setUpgraded() lol. Guess you would make a new one instead

worldly ingot
#

Edited

#

Didn't realize that class was immutable

bold vessel
#

oh okk

#

I will finish this soon when blackbytes send the example for send the message to the player

#

(I need to convert all my plugin to pdc tag)

grand oak
#

Soo, hi I am extremely new to java plugins. And I am tying to use NMS but I am always getting "java.lang.ClassNotFoundException: net.minecraft.server.level.ServerPlayer" error. I don't know what to do. I tried lots of things; Installed BuildTools also added to my maven project there is no problem while programming in IntelliJ. (And excuse my bad English.)

dry yacht
bold vessel
#

Np ahah

grand oak
upbeat hornet
# dry yacht Not quite sure what you mean by it exiting the current loop/method. You just can...

Oh now I remember why it wouldn't work!
I want the item to be stacked with the block. Cancelling the event will cancel block placement (what I want) but will also cancel the item not being placed (The item stays in the inventory, but my stacking system considers it as placed).

So any other idea to cancel block placement without cancelling the itemstack removed?

EDIT: fixed using removeItem()

dry yacht
#

What an unexpected rabbit-hole, lol

bold vessel
dry yacht
bold vessel
#

I find

#

its because of serversign

terse ore
#

Is there a strength PotionEffectType?

dry yacht
bold vessel
dry yacht
dry yacht
bold vessel
#

that can help people, u always here so if som1 else have problem with this u can just send him the link

#

or ask to make a command like ?whoisbrewing (somethings like this lol)

dry yacht
bold vessel
#

PR ?

dry yacht
dry yacht
# bold vessel PR ?

Pullrequest, basically a request to merge your changes into spigot yourself.

bold vessel
#

okk

dry yacht
terse ore