#help-development
1 messages · Page 353 of 1
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.
thats what BSD-0 is for 
Fr, it seems like the side with the most money usually wins.
that might be true. I dont know anything about how it works in the US. I can only express my opinions about how it'd work in germany. and here you'll have a bad time saying "Yes, I pull requested this to paper but I dont want paper to use it"
also i promise i dont license code under CC lolz, i license resources like images, audios, text and stuff under it)
Orby are you okay
the judge would just say "If you don't want paper to use it, then do not pull request it to paper"
Good.
Funnily enough about GitHub
I'm pretty sure they do partially own your code
Honestly, probably a huge W for Germany right there. Wish we had basic decency over here or general competency, but that's wishful thinking.
well ofc they do, its on their servers 
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
copyright cannot ever be given away
in the US too
for me CLA is usually disrespecting the person who contributes (very common for oss projects from big tech)
you cannot give copyright away, only thing you can do is to grant people the rights to use your copyrighted stuff
Technically in the US, you can sign it away.
copyright is an inherent right that exists solely between you and the work you've done
ideally they'd take away all credit from you if possible 😂
no
that's wrong
you can give people permission to use your copyrighted work
but you cannot give the "copyright" away, per se
Alex 2 mins ago "I don't know anything about murican law"
law isnt real
Based
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.
on 2b2t, the oldest anarchy minecraft server
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
nah theres a few curriences actually
Aight can you give me 1mil?
gold
what inherit value does gold have
tbh pretty much everything is a currency
It's shiny.

Ill give you 10 dumbness for 10kg code ok?
all capitalist propaganda
omw to make 1 gram of antimatter to buy the entire world
TL;DR: copyright is an inherent right, you cannot give it away. You can allow people to use your stuff, but that's it.
im a big fan of copycenter
Ew, copycentrist.
if copyright would be egible to normal "transferation", then youtube would already own everyone's videos
what about ups and downs
FUCK

Weeeeeell...
Isn't that just public domain?
thats what big pub wants u to think
Wtf is big pub
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
the shadow organisation behind public domain that wants to steal everything from you
Oh ok
yeha that's another funny thing lol
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
if I were the government I would
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.
I am the government
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
the government has had my information ever since october 20th 2002, its the non-government people that i dont want to have my information
whut
Oh yea. I remember that story. Love how companies just get away with shit like that.
what
@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
how can i live in a country without gov knowing who i am?
why are you banned
because of reasons
Those who know know
You can't lol
so shitty argument to make
Eh, generally I don't think we offer anything else ? Tbh I am not too close with our moderation policies
why arent you?
i now know
hmm then alt account it is
gov needs my personal info, <enter corpo name> doesnt
Ah, so you've heard. lol
i used search
but neither need to know what im doing privately
nearly every big fish on this discord is banned on paper 
Guys anybody having an idea why sending 20 multiblock change packets lag spikes my client? Lol
how to never be banned on paper: never talk there 🧠
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)
how can I fill only the inner slots in a chest?
do you send them at once?
Inner slots?
Yes. With Player#sendBlockChanges
by ignoring the outer slots
The chest block state provides its inventory
how would u ban on the web site
u said site
they were talking about a discord
did u mean sight

xd
I indeed did 
maybe because the client has to process it?
nah the client is pretty shit
we dont know what you are doing
make sure to supress light updates
I am already
How big are your packets? You're probably sending massive changes at once.
6k blocks only
make them an array and when filling inventory if slot is equal to those skip them
6k blocks only 
Only 6k blocks. 💀
yeah well
I dont want to hard code it
Bro thats 20 packets lol
what
so make a formula
thanks
its about the size of the packets
Ehh but is 6k blocks really that much?
yes
yes
yes
Its probably like 50kb
it has to iterate over 6k blocks
The client?
Maybe in file size, but the client still has to go through all of those blocks.
Arent people doing that in that scale already?
but not at once
Define "at once"
read point 2
Yeah but whats the timespan needed to send that amount without issues?
Over multiple ticks probably.
why do you think arent chunks loaded all at once
smh
NAMING_CONVENTION
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.
yes
private static final gets full upper snake?
yeah
couldve sworn it got normal camelCase
How is WE doing it without issues then?
not really
?distro
FAWE
It's not. That's why AsyncWorldEdit and FastAsyncWorldEdit have different methods to set blocks.
the only time where its ambiguous is with any modifiable
like lists
since then it isnt really a constant anymore
And how do they send a shit load of changes so fast then with FAWE?
by sending the changes distributed
FAWE uses workload distribution. AWE sends the block updates in succession.
Explain, please
?workdistro
FAWE also has other tricks up their sleeve
explain please*
Like messing directly with the region files.
[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
not in plugin.yml
in error
The command that you are trying to register is not defined in your plugin.yml
your command is not in your plugin.yml
ah
didnt they remove it
thank you
Tbh, I don't know. I haven't been keeping tabs on their changelogs ever since they move to intellectual sites.
I cannot do things like that since its just block packets
Is there a way to vanish client lags for that?
just dont cause the lag?
(I maybe also gotta go back to precomputing block-changes on axises then)
Lol
Can you explain why you are sending that many block changes at once?
Some schematic preview system
I can't recall if that was ever stated.
ah yeah, i was thinking of C# @hybrid spoke @remote swallow
but they also dont mention constants so idk
whats [ThreadStatic]
Updating on cursor movement every tick
some weird .NET shit probably
Why would it need to update every tick?
If the player moves, its gotta move too
No wonder it's lagging.
so just move it when the player finished moving
I want realtime previews tho lol
c# use pascal case for constants also
6k blocks every tick, why my client lag
So the user can adjust it to their needs in realtime
You know that mods like litematica even struggle with large schematics right? Plus they don't even have realtime schematic placements. They are done manually.
then distribute the packets over several ticks
and move the construction every 5th tick or whatever
just get an m2 🥲
https://stackoverflow.com/questions/5227676/how-does-the-threadstatic-attribute-work apparently ThreadStatic creates a copy of a field for every thread its used in it looks like @hybrid spoke
ikr, I get kicked from my server everytime I use fill xd
i got 500fps on my laptop
no processor on this world is gonna survive 6k packets a tick
Ejh bro u just tested the 25 blocks method lol
I'm not even talking about fill. Although it does have it's issues. I mean in general. When you move large schematics, it struggles a little bit.
Isn't that gonna feel delayed
there is no other option
maybe some little optimizations like removing air blocks from the updates
~600 FPS on an m2 max 😛
And then adjust tick amount based on the size of the schematic?
This will actually help a lot.
However, it's not ideal for underground builds.
cheating with Fabric, eh?
but yeah I get it, people claim "macs are shit" because they are more expensie than your mother charges per hour
true
sodium is installed, yes
just dont have underground buildings then
lmao
problem solved
Already doing that. Maybe precompiling which blocks 1x changeits type and only send them?
hi, where can i find the GriefDefender Sponge 2.1.7 download for Sponge?
you could also do that, but that would only help with big solid blocks of blocks
like 4k blocks of stone
?whereami
111 fps on vanilla @buoyant viper
since you then would only update the outer layer
Yeah
your best fix would be to distribute over several ticks
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.
and send a warning that the bigger it is, the more delayed it will be
yeah, i know the alphabet.
Im just firing whenever the player is aiming at a new block
Hmmm
idk why, but people always claim "macbooks suck". Usually it's enviouness because they cannot afford more than 2k <currency>
I don't feel satisfied with laggy previews :(
Macs tend to have an overheating issue. That goes across multiple generations.
no its because you are locked into apple garbage
It's good hardware, but lackluster cooling solution.
yes good hardware, looks nice, nothing more
The price is also too much.
What about instead-sending small ones, delaying medium ones and only send large ones whenever the player ends moving
with apple you also pay for the brand
hm idk never had this issue. I got an 16" mbp m2 max, two intel macbooks, and a mac mini from 2018. none of those ever had any overheating issue .Hoeever, the 2017 macbook has the butterfly issue and I am very annoyed by that
which sucks if i just want a new phone or laptop
Looks nice is based on personal preference
you could do that
probably your best option
I can't speak for the new M-Series macbooks, but the older intel ones had some cooling issues.
Double the price when an apple logo is on any device
double or triple all the accessories too
cough cough pc wheels for 1000$ cough cough
$40 for an official charging cable as well.
lol
What do you think where the lines for small | medium | big are?
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
That's probably something you'll have to test yourself. Things like houses or statues probably fit in the small category. Bases are probably medium. Anything else larger than that goes in large.
With 20 players
Houses may also have like 10k lol
Well again, probably something you are going to have to test for. Or just have block caps. If total block volume is greater than or equal to 10K, then it's categorized as large.
@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
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
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.
}
Wait someone 30 second elevator pitch akex issue
Might have something already
Was debating making a lib
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
Seems more like a #help-server question.
stop the server, change it, start the server
oh ok ill try thanks !
Although rare, plugins also have the potential to mess with that file.
@terse ore what is the context behind ur problem..like what's the end goal?
optionally, starting with the 10th, start the count every 10th
He wants to fill the inner slots of a gui.
#help-development message
Oh a gui?
Hehe
One min
but yeah, we could always remap 10 -> 0, count 7, skip 2, start at the 10th again
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.
lol
I just see numbers differently is all but yeah I do agree on the getting it working first part 😛
I sorta wanted to do a lib for this as honestly it's a joy to edit guis
Never gone back since
Wanna change position of a button. Move the number to another row.
Intuitive, simple, and works a treat 😎
i hate Minecraft**
noticed it is a 2d array, do you indeed make use of the second dimension as I don't appear to see that
Each row is a separate array, neatly lined up. Allows for future proofing stuff like changing a whole row in one go
Any cons in your opinion? If I've missed something I'd love to hear it
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
I think you've underestimated how most the backend stuff can be done in async per row
Via this method
instead you want 2D arrays to be irregular sized or not even on one side
doesn't matter it is an array
it didnt solved the problem, do you have any idea ? 😅
That's... not quite right unless I've missed something and "Orked" my way into the code working lol
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
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
Tl;Dr, squares bad and circles good
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
Caused by: java.lang.IllegalArgumentException: Could not parse ChatColor ºa bruh 
ive gotta be getting an encoding issue smewhere
Is that the character phoning your CPU to do something stupid
Yes
The menu API the server I work for has, has so many bugs that it makes me grrr
when using utf8 escapes I don't think you need them in quotes
Hol up
Who are you?
I'm you but better .
Legit dude slick ^_^
Are you doing ChatColor.of()?
yes
§
grrr
https://paste.md-5.net/midowegete.java dont mind how cursed this may be, its just a rough first-try at using components
I hate that symbol
line 53
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 );
}
Why?
Grrr
I agree with Adelemphii I do not like that symbol
It's not on me keyboard so it's annoying to deal with
It's not on my keyboard so I have to Google it and I forget it's name every time
still doesnt explain the whole section sign not being the section sign but i can just use getByChar instead i think
lol
It's probably just an issue with printing in the console
maybe
I think I've seen that character when I've printed section symbols in the past and the terminal is just big dumb
what the Fuck
§
I ALWAYS google "Paragraph symbol" and then realize that is not at all what I wanted
I just type "Minecraft color codes"
pretty sure you could
since Java knows utf8 escapes and hex
Because it's the only instance I know of it being used regularly
its like built in
i was using the method wrong anyway so it mightve not been encoding issue at all
lol
lol
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
Sounds like a good feature to me
if you want to be fancy or confuse people, just call it the silcrow
it is the other name for the symbol
that like no one knows about
wait until you learn this can natively hook into configs and make an entire menu in like 2 lines
haha self-hatred go brr
Any documentation you can throw my way would be great.
Always happy to learn new ideas 💡
What every project from me looks like:
The idea of the menus here breaks down into 3 principles:
- layers
- selections
- elements
over time, you will learn niche stuff that most of the time isn't useful until it is
A layer contains elements at positions determined by a selection
mostly for others but like hardly ever for yourself
I want to fill the inner slots
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
the alternative to your design is bitmasking
what if you want to apply a rectangle and don't want to draw up a whole bitmask
but, that is way too highspeed for people here
The menu API I use has so many bugs that technically every slot I had something in is a button 
I can't get the project to build on my computer so I can't fix the bugs D;
I have an element called "DecorationItem" that's literally just a button with no function
bitmasking is arbitrary in that it is only dependent on what you decide. So if you design your bitmasking to not really be changeable that isn't a limitation of bitmasking rather a limitation you built into your design
¯_(ツ)_/¯
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
no you don't
here, you just need a character mask and associate each element with a character
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
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
then the next 4 bits to tell you height and width. And that is only 6bits, with 2bits left over
K
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.
its called NMS
seems to work fine
just put rice on it 😉
it should be fine 🙂
do you know how to do it?
?nms
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
thanx
cool, now its even MORE fucked
dnat > snat
hannah
yeha
your fault
oh no i know
for doing things
im ass at text processing
see
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.
Wahey
Spaget messages to avoid spaget code 👌
sure, but like most of the time it isn't useful for yourself lmao
my yubi's will arrive in 10 minutes :3
🥳
At least i hope so
getConfig().options().copyDefaults();
saveDefaultConfig();
I think it doesn't work.
because when I build the plugin, the plugin doesn't save default config file.
same
is there a config.yml already in your plugins data folder
no
is there stuff in the config.yml in you resources folder
chec console for errors
no errors
You should decompile it
its getting added, so saveDefaultConfig() should be saving it
This is my project file @remote swallow
run saveDefaultConfig at the top of onEnable
ok I will try it
it doesn't work
oh I see .anyway, the config.yml is there
because they already have a config.yml I guess
2 seconds away from using fromLegacyText and just regex replacing #RRGGBB to bungee hexes
why would you deal with that in the firstplace
Yes
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
why did you buy through amazon lol
i got mine a few weeks ago for $10
cause of the cloudflare promotion
Which is why they can actually afford to design a somewhat decent operating system, proper hardware as well as a user experience that sucks less than others.
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 ?
?1.8
Too old! (Click the link to get the exact time)
"don't judge me", I'm not here to know how old is 1.8.8.
Show your code?
woo
Fuc
oh wait i dont have it set to do chat duh
imagin
https://paste.md-5.net/rafizacalo.java a small price to pay for components
How do I set the spawn of schematic?
That's not the question
chill out, i'm not here to listen to your complains
then we are not here to help :)
all this just for me to convert my code to just use bungees component builder
That sounds odd, when do you call spawnVillagers?
Oh, lol
The code is truly enlightening
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
now that im using bungee components i wish they were more integrated into spigot api 
like how paper has them for basically anything that took a string
Beg Choco
choco has PRs open for that iirc
He did a ton of component things lol
u think id succumb to adventure? hel no
dew it
no cell in my brain that thinks about that
as it should
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 ?
Spigot
i have to log in smh
average spigot contribution lifestyle
I have no idea why I felt like im signing some important company buying shit when registering to spigot
make sure to include it on any resume as "open source work"
to get that extra bonus
make sure to contribute to the linux kernel and put that on your resume
idk man spigot > linux
💀
what is fixing a kernel bug compared to fixing a bug in a minecraft server API
im talking about fixing typos in the docs :)
Fix typos in spigot docs 
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
hence why one maintains a private fork for their servers
it’s often faster to just fix it myself
You guys find bugs?
they gotta explain in college
now find out how to make a fork on stash 
uh oh
the number of times i sit in maths class fixing bugs 
math bugging
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();
}
}
}
}
i honestly don’t see the issue with the CLA / stash but then some hate it
is there a Tag.CROPS?
nope
Makes it harder and sometimes impossible to commit
if it is a shitload of blocks, you might have to spread the work over multiple ticks
u click da button that says fork
shouldn't be too much blocks
Tag.CROPS.isTagged(block.getType())
What?
thats all i know lol
how to edit code idk
True, i believe the bungee docs have a typo
Ah nvm thats the thing u told me too lol
How do I click button?
wha
no do the konami code
oh my bad
Isn't it right click?
I don't use a mouse for coding
glorified hashset?
no it's up up down down left right left right b a
?workload
Ohhhh ok
wanted to look through the source but it has roots in nms
why?????????
Do I have to have my wired keyboard plugged to do that?
unplugged keyboard will suffice
you need a bluetooth headset
before doing this combination also turn off your pc
and spin 720 degrees for better effect
after that throw it out of the damn window
Do I also turn off the local electricity?
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
And isolate it with aluminium foil
The district electricity
So no energy goes out
you actually have to pour sulfuric acid on it
solar panels could work but that method is untested
just in case yk yk
Ahhh ok
what's the github for sun
we can just kill the production real quick
i don't think they maintain prs too seriously
On top of it, I think I gotta do 10 kickflips
dude 14 is the number
While spinning and doing 360 noscopes in minecraft
Is there a way to create a FileConfiguration obj without creating a new file?
what would you do otherwise?
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
new FileConfiguration().load(Files.newInputStreamReader(plugin.getResource("x.yml"))) or smth maybe?
ok, got it sorted
dunno where you would get your section from, or do you need an empty one?
You can try saveConfig;
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?
Hello, does the LivingEntity#damage(int, Entity) fires a EntityDamageByEntityEvent?
Plugin B didn't register the listener
Plugin B did register the listener, since it receives the events but only when fired by itself
yeah <string> + <string> just hides a .concat call
so much stuff in java is just represent by a function or class
module X opens Y: ModuleOpens.class
operator overload when
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
Then you forgot to add the EventHandler annotation
I did not
Otherwise plugin B would not receive the event call at all
Then plugin A isn't actually firing the event
It's a possibility but if that were the case then plugin B wouldn't be able to fire the event either, but it can
smh my teacher ai told me we had to learn ai on our own
Tested this, it is firing the event
It seems that if plugin A fires it, plugin A receives it
if plugin B fires it, plugin B receives it
also just did it 25/25, shockingly easy
up till now ive not learnt a single useful thing about java in college
leant nothing useful in college/uni about java
well
i think its just because i learnt in my own time 🤷♂️
cry when they require a bachelor certificate
lmao ^
thats easy
seems that my event calls are only available to the plugin it's being called on 🤔
tell me how much 0x12 is in decimal
lol
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
too much work lol
Uni covers the shit you mainly dont want to learn but should
A-10 b 11 c 12 d 13 e 14 f 15
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```
0 -> 15
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
0 is always included, as it is an valid digit
You can't write all numbers without 0
?
yes
Who use 15
Hi everyone, does anyone knows why if I invoke #getItem on a ThrownPotion it returns AIR whenever the thrown potion is an uncraftable one?
Make sure api version is set in the plugin.yml
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);
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?
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.
Fair enough, I will just say "no permission" if the server does not have a permission plugin =] thank you
Yes you set default permissions in plugin.yml
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...
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?
@tender shard hi
Select appropriate defaults
Users with a permissions plugin can customise them
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());
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.
TYTY lemme see if I can find that menu
AHHH there it is
tucked away in there =] thanks a bunch
Is there a reason for why you added a manual cast before Collectors.toList()?
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>
thanks a lot it works now
british man spotted
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.
seems to make sense now, thanks alot
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
is there a way for me to store items as nbt?
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
24:00:00 doesn't exist. It would be 00:00:00, no?
would that be ideal? I am trying to make a furnace-like object
BlockPlaceEvent gets trigered by enderman?
I think it depends on the place
here in spain i've seen 24:59
huh?
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
yep
never heard of that before
does someone know?
I mean maybe if their time starts at 01:00 for some inexplicable reason, but as far as computers are concerned your hours range from 0 - 23
time was made before computers
I don't think it's a good example
I think we just adapted a standard for computers
well, do you depend on the client or the server? i doubt it would cause problems
add some info about only accepting 0-23, the player's fault really
Lol 24:00:00
💀
can you change the player's entity client side
make them invisible and move a mob to it's same exact location?
What do you want to change about it? Its entity-type, its skin, ...?
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?
you want to cancel it without cancelling it...?
cancel the block placement (not the whole event as it will exit the current loop/method), and afterwards execute some code
Not quite sure what you mean by it exiting the current loop/method. You just cancel the event but don't return it's handler function until you're done?
wait how do you cancel the event?
event.setCancelled(true); right?
Right exactly, but that does not hinder you on running more code after this statement
So this should print the text
Yep
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.
ok thanks!
https://paste.md-5.net/gemosijuqe.java
I have an error at the getLevel()
anyone know why ?
The base potion effect cannot have a level (called amplifier) like a custom effect can. It's PotionData#isUpgraded, which tells you whether this potion has been upgraded to level 2, in essence.
like this ?
That would be Strength II, right
Yes, thanks
Are you keeping players from brewing level 2 strength? D:
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.
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.
That's what I thought, 😂
You can always get back to it once you feel more comfortable
sometimes, you can just listen for more generic events that get fired
I am making a project above my level now
so I am struggling already
but I am learning like I never did
Then you probably shouldn't burn yourself out with that, I'd advise
I am having fun coding it tbh
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
how could I get the painting type I placed?
declaration: package: org.bukkit.event.hanging, class: HangingPlaceEvent
but no wonder how
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.
my fave bit is that all these folk being like No way bro no way.
Then why has my server on pay day charged at exactly midnight and gonna again in 25 mins even though thats just no a thing in this plugin lol
That's the most important thing when it comes to personal projects, in my opinion! :)
oh wow, that looks overlycomplicated
It reads like plain english, almost, xD
It's just 200 lines of code behind the scenes, this is dead simple.
Yes, as I've said, I nowadays dislike automatic detection. It looks cool and fancy, but it only causes headaches.
welp, ill continue with my plugin
Painting mcPainting = (Painting) getEntity();
of course you are going to want to do some checks and all that, but that is essentially what you need
yes ahah i made another item for get strenght 2
Painting has getArt()
Code is supposed to work ?
Oh right, that makes sense. People who cancelled strength 2 on their servers just always made me sad, as I loved to kill others with it (preferably with killaura, LOL)
I made somethings for spam strenght 2 during 30 seconds for rush lmao
Killaura... you're one of those guys... 
Use BrewEvent#getResults(). getContents() is the contents before the brewing completed
Events are generally called before the action actually takes place (so that it can be cancelled)
So i cancel when the strenght 1 is put inside of the brewing stand ?
While you could also do that and check for which brewing action is about to be performed, you should just iterate getResults() instead of getContents()
^
Okkk
Your code is totally fine. Just rather than using getContents(), use getResults()
I look the docs and i try 👍
Lol, is getResults() one of those super-late added features? Cannot seem to find it in 1.17's API
@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.");
}
}
}```
So 1.17.1
Likes this ?s
getResults(). It returns a List<ItemStack>
Yeah, super late, as I've said, haha
Again, literally the same code you had the first time, only instead of event.getContents().getContents(), you're using event.getResults()
This with for (ItemStack item : e.getResults()) instead of for (ItemStack item : e.getContents().getContents())
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?
okk, i wasnt understanding the docs
Not quite sure what you mean by a spark heap dump, but yeah, that sounds like bad memory management. Not sure if it would actually collect a leak tho, the server should just eventually run out of memory and crash (from my experience, at least).
Yeah it ramps up like a wave
40 -70
40-7
*70
etc
heap dump?
runs at 10% ish
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.
@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 ?
Looks good to me, but does it work?
im gonna try 👍
?blockpdc
Learn about CustomBlockData here:
https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/
its working but the sendmessage is send to the console and not to the player do you know how i can fix that ?
yeah i know but how i can choose the player who put the strenght potion inside the brewing station
in the eventhandler ?
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... :/.
Another missed feature by the bukkit API, lol
is it legal to crash a minecraft client?
sure?
No, you're gonna go to jail, lmao
not in that sense
FBI boutta knock your door down
What else do you mean?
I've seen some resource posts in spigotmc.org
and they banned some man for posting a resoyurce that crashes a client
yes doesnt mean its 'illegal'
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
okok
Rather spam them with mob spawn packets, asynchronously, haha
so i cant do this
You can, it's pretty easy even. I could quickly whip up a small and concise example, if you'd like.
yes pls
tag me when u have make the example pls
Alright, gonna get back to you in a minute
Alternatively you could change the potion base data to not be extended
The List returned by getResults() is mutable
What you mean by not be extented ?
@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
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
wdym ?
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)
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.)
Almost done, there are just a few not so obvious decisions I have to make as I really don't want to send you a memory-leaking pice of trash, xD. A good implementation is going to take a few more minutes.
Np ahah
I am trying to fix this thing for about 30hrs now :D
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()
Lol, the same just happened to me
What an unexpected rabbit-hole, lol
Do you know what this mean ?
The metrics stuff? No idea
Is there a strength PotionEffectType?
Analyzing the inventory click has also turned out to be a bit more complex, as I also need to detect shifting. xD I took all of these things for granted, as in my old project they were handled by my old libraries.
Funny how much work you gotta invest to find out who brew a potion, :-:
Make a "librairy" and post it on github if u have time 
Yeah, you can basically only handle this manually, yourself. The item will never be taken off of the stack in hand, as the event has been cancelled. Sounds like you managed to implement it tho! :)
That's actually quite the nice idea, I was thinking about that
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)
Yeah, that's what I think would be ideal anyways. If the bukkit API doesn't have a feature that's needed, build a lib for it. I personally think that this is way smarter than to create a PR. I'm never gonna do something like that, lol
PR ?
I'm probably just gonna create a custom event. Something like PlayerBrewEvent, which just extends the BrewEvent by a player property.
Pullrequest, basically a request to merge your changes into spigot yourself.
okk
But that'll take a bit, as there are quite the edge cases to manage.
Is there a strength PotionEffectType? https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
declaration: package: org.bukkit.potion, class: PotionEffectType




That's literally not relevant