#dev-general
1 messages · Page 27 of 1

thing 1 is fast
thing 2 is not fast
more than 1 thing, but thing 1 is clearly the best!
shocking
Thanks, I was really looking for a math lib
lol np
tldr:
Q: What's the best library to use for fast math?
lib 1: 10ms
lib 2: 50ms
A: lib 1 is the best option
Bro does not understand comparisons between things based on quantitative and qualitative measurements
tldr:
Q: What's the best library to use for fast math?
lib 1: 10ms
lib 2: 50ms
A: lib 1 is the best option
It's like arguing that there isn't an objective better when comparing in terms of speed between an F1 car and a fucking Fiat Multipla
I don't have micro (mu) on my keyboard, so ms is all you get
literally lmao
yeah 50ms is actually pretty terrible lmao
so's 10 really
Does... anyone?
i bet at least 1 person does
Smh Star
I guess the Greeks maybe
I dunno if they still like use that as their primary alphabet lol
I bet Fiat 1000tipla is pretty fast 
For a more concrete example, this is why HikariCP is by far the most popular connection pooling library
It’s fast and easy in a way that alternatives aren’t
Or why most people use a config library that's not snakeyaml if they possibly can
I left for a few minutes and a whole war happened here
classic really
The daily 10PM war
um actually it's only 9pm 🤓
um actually it's only 2pm 🤓
The daily <t:1683835012> war
Look I have the whole day ahead of me
3:56pm
thats straight up just embarrassing
😌
Yeah that's still wrong lol
Ah darn it
The daily 18 hours ago war
I give up
🙃
cap, it's 9:57pm 🤓
L
The daily <t:1683835020:t> war
Google lied to me
OI my fav ow2 streamer, when stream???
epic fail
EEST 😩
anything but murrica
never heard of anything remotely close in my country unlike in murrica where you get killed because you added to much mayo on customer's sandwitch
uhohspaggetioh #off-topic
story development
indeed
thats a weasel actually
@bardy
oh yeah lmao
wait what
yes, you can do whatever you want
I guess we can't stop you
🛑
Updated guide for Hot Swapping -> https://forums.papermc.io/threads/speed-up-your-plugin-development-with-⚡-hot-swapping-⚡.748/
Any feedback is appreciated :)
Seems like a lot of the images are missing
Or is this a paper's forum problem? 
doesn't seem like it since it doesn't "copy" the images to its own server
oh wait nvm
ignore me
😃
i clicked open the image in new tab and saw "jsdelivr.net" and my brain thought that was like a username or smth
i make website cause im too lazy too manually calculate version values that my api uses :) https://media.srnyx.xyz/chrome_JbCJepcJXR.mp4
major*100+minor*10+patch
what does ur api use this value for
just so it knows if it should even try to reflect
no
oh
but i remember seeing somewhere that reflection is expensive or something
tru
and i might end up using it for more stuff in the future
cause im also using it to give ppl using 1.13-1.13.1 a warning that i dont care about them
something with titles
o wait no maybe they added the thing above hotbar
wait wdym
i seriously doubt 150 servers are running 1.5 and using your plugins lmao
🥲
oh that's how you discern versions i see
what if mojang decides to release Minecraft 2 
it'll still work
2.3 = 1.13
not like that's ever gonna happen anyway lmao
nvm, 2.3 would be smaller than 1.13 lmao
no?
why not do this 😌
no reason to have a small number
i mean squaring the individual thingies, not the entire version
oh i didn't read what you replied to 
oh lol
i almost just freaked out thinking i couldve made the version into a double but luckily patch exists
but what if they release 2.0.0.0
that goes against Semantic Versioning rules
>:)
i dont think they are rly following semantic versioning lmao
If you're doing a way to get an unique number for a version you can do what I do for versioning my lib
1.8 -> 180
1.13 -> 1130
1.16.3 -> 1163
..
(in the middle of typing this I realized that it can be easily broken if Mojang decides to to do .xx, like .10)
((this also includes 1.7.10 for example, but who uses that version anyways
))
1.20
o u mean x.x.xx?
Yeah
I guess you can use a float 
1.7.10 -> 17.10
1.16.4 -> 116.04
1.20.20 -> 120.20
why not major*10000+minor*100+patch?
in case theres a minecraft 1.1000.0!
but what if~
so 1.1000000000.0 would still work?
why not just compare the three individual numbers in series?
takes longer fr
Star, don't give reasonable solutions okay
star stop being helpful
lmao
Exactly
u rn: ⭐
what u need to be doing: 🌠
i need to be shooting?
oh no
well you generally call it a "shooting star"
but when it lands, is it then called a "shot star"?
u need to be shot
well generally it doesn't land for millions of years
but i guess if it does, it's just like a crashed meteor?
me fr fr
why'd they become aliens at the end?
they like grew extra arms
but that wont happen
yes
no thanks!
how did youtube know i was talking about space stuff here????? https://maxx-has.no-friends.xyz/chrome_qmst2j6ogB.png
what happened to kotlin
wdym
i thought kotlin was best
i deleted kotlin
good
yeah :(
No
I rather like it
Makes up for a lot of the shortcomings of java whilst being interoperable with it
Or "features" as java calls them
And it does make up for some but not well
And modern java is fine imo
Once java 21 is released and we get patterb matching for switxh and record oatterns 😍
I haven't touched it much since 8, I've been told it's come along better.
Kotlin works just fine for me and is far less boilerplate, which I hate
Oh yup I was on Firefox everything’s ok but on chrome it displays these missing image icons idk why
Did you forgot the existence of maths? You can find a bijection from N² to N, it’s called a pairing function, have a look at the Hopcroft and Ullman’s one, it’s perfect for your use
just | the 2 numbers so the minor takes up the first 32 bits of a the result and the patch takes up the last 32
ok and
In case that the laws of physics do not apply in the future, God help you.
I want to write something in there but it doesn't work, then it says that the file is too big even though there is no file there!
chatgpt officially sucks at math @half harness https://cdn.venox.network/chrome_G4T7tLB16c.png
thanks but no 💀
Lol
My formula best 😌
Or make it an object
As star said
pov: you realize language models just spit out words they think you want to hear
I wonder how language models work
Like how does it actually predict text it hadn't seen before (ex keyboard spam??)
how do you know it hasn't?
it's basically just a big math expression, it just weights a billion things together and spits out whatever
for it to be of any use, you need a MASSIVE data set
yeah to be fair, it probably has seen that before lol
chatgpt already spews random nonsense as it is, it only gets worse with small sets
hey they're working on that in GPT 4.0!
trying to give it some semblance of objective truth
4 is out already, no?
Or is it 3.5
4 is out for paying customers
Oh
your chatgpt is 3.5
our chatgpt
everything it said is wrong lmaoooo
yes it does that a lot
Try bard
yeah it actually doesn't know anything and just says things
"both versions have the same integer value"
Bard seemed to be worse in my experience but
it isn't a truth generator lmao
¯_(ツ)_/¯
bruh bard is garbage 
Speaking of this
I remember I put in a keyboard spam of base64 and it decoded correctly (and for long ones it mostly decoded)... Kinda interesting
comrade emi
you really gotta turn off the embed metadata for your custom image host man
5 head
no its hot
more like no its not
real
Well u gotta tell it to decode with base64
more like ur brain's forgot
well then thats just easy
Oops
true base64 doesn't think
i wanna be base64
base64 predicts
seems based
actually, false.
Bing is already using GPT 4 and is free lol
Bing is a paying customer of OpenAI
Or use copilot chat with gpt4 🤓
ok
You pay with your dignity.
is it possible to covert a tebex template to craftingstore?
With enough time potentially, but they’re both completely separate platforms. Out of curiosity, what’s making you want to switch away from Tebex?
it was the price but, next month going back just couldn't afford a month which meant i had to look for an alternative rather than not have a store up
Does the free plan not help for now? To be transparent, I do work at Tebex - just wanted to try help where I can to better understand
Yep thats it
Ah thanks for clarifying, I wasn’t sure what it was in particular that held you back
Could you not hold off and use the free plan until your server makes enough, then move to Plus? The seller protection + the perks you get with Tebex is unmatched
you sound like a salesman desperate to not lose a costumer xd
💀
He did state he works at Tebex :P
ye at least he said that
Knowing him he means well with it.
I mean, not really - I get no gain or incentive if someone stays on tebex or leaves. My job itself isn’t even core Tebex either.
I only ask to better understand, and to try help people. Similarly as @surreal garnet mentioned, I didn’t hide the fact I work there
yeah, I am aware charlie, it just looked like it for someone from the outside without any intel on it
could look like it*
I’m not too fussed haha, like I say I get no gain or incentive - only trying to help people here. I’ve been a tebex customer personally since 2014, so bias aside there’s no platform better - and I can comfortably say that
totally agree with you
Bias aside (works with them, was a customer since 2014, no mention of ever trying other platform)
Yeah I'd think it was the best too
Yes, am about to buy a 100 pound theme in a month or so for tebex so will stick with them for the longrun just to let you know.
Does anybody know how to host a Minecraft server on a spare pc? Vps are too expensive in the long term so I’m thinking of getting a good pc on the side for my server. I know how to set up a Minecraft server, port forward, domain etc but how do I set it up so my IP is 100% hidden and can’t have any ddos attacks or anything harmful linked to me?
TCPShield allows for 3 IPs/subdomains (it's a minecraft server antiddos service)
used to be unlimited but it got too popular 🥴
I will only need to use it for just 1 up correct? Even if I setup bungee cord with multiple servers (linked to same ip but different port)
yeah only the bungee
There should be directions on the page
Note that you'll need a domain (which will give you a DNS manager such as Cloudflare)
Ok thank you so much
@nocturne apex looking at your latest #showcase post I'm slightly concerned about the packet reading logic
having a huge switch statement and reading like that will become problematic
A possible solution I'm thinking is some sort of registry so you can do like
registry.add(HANDSHAKE, 0x00, HandshakePacket::read)
and also hardcoding your json stuff is a bit icky
i dont think there's tooooo much wrong with using a switch statement there
since the logic is separated out
the string literal for json is pretty sus though
but that's probably just a temporary thing
the minecraft packet registry has well over 50 entries
if the project ever scales, it'll be a pain to actually wire them up individually
I've seen projects have like a json thing
that link the packet ids to each class
and different client versions have different json files
don't get me wrong i agree that a switch case isn't the cleanest solution
but you need code somewhere that lists out all of the possible branches of flow, whether it's declaring them in the switch case or adding them to a registry
True
Just that this is the first approach that comes to mind
and speaking from experience
The first approach is usually the worst
hey! Thanks for ur suggestion. As it's been told in the post, it's for the first time am working with netty, so I was happy that I could get it to work. Before it was all done just in 2 classes and looked like a piece of Garbage. I'll surely try to make the code cleaner 🙂
This is just a project that I do for fun. There's no plans to release it. Wanna get some new experience around netty and overall networking area
well this may be true, but how would you do something quality when you do not know how it works 👀
mozna by se mohlo nekdy hodit https://github.com/valence-rs/valence, je to hezky rozdeleny

🦀 ❤️
NO
🚫🦀🚫
real
🤣
Do you believe editing yml async is redundant?
IO operations should be done async, yes
Default spigot configuration doesnt provide that right
If by edit you mean "FileConfiguration#setString", that doesn't do any IO operation
probably not
I'm talking about reading/writing in files
yeah same thing
So I need to make my own async functions?
That works fine with zipping unzipping and copying directories as well right?
Lets say I want to create a world when a player joins the server and then zip it and place it somewhere when the player leaves
So I dont bother with any async java functions i just mess with the scheduler of spigot correct?
what "async java functions" do you mean
you can use like futures and executors if you want
scheduler is just easier
AsynchronousFileChannel e.g.
that seems like overkill
that's more for multiple threads operating on a file at the same time
afaik
could use it if you really want though
I believe that this could go wrong as if the plugin disables that will keep running if im right?
what is "this" referring to
Running the operations through AFC
That async operation wont terminate if the plugin happens to disable
right?
frankly im not sure
but probably not, yeah
since the thread pool is unrelated
im not actually 100% sure if bukkit async tasks get awaited if the plugin disables
I think they do
that's why you usually keep references to uncompleted tasks/executors/futures etc and shutdown/await for them inside onDisable
I think bukkit awaits for your async tasks to finish when disabling the plugin since they go through the scheduler; if you don't do things via the scheduler then you need to make sure of waiting for tasks yourself
but in any case, AsyncFileChannel isn't really what you're looking for -- Files.copy(Path src, Path dst) is more than enough to copy a file from A to B
I was just looking to copy and paste whole worlds when players join and leave so if it's not done async I suppose the server will be lagging
most likely
smth like that involves more than copy and paste
isnt there some project for worlds that is using sql for saving the data, or was it slimeworld?
I mean, I'll just have the world I want to copy paste and do that. Then I just teleport the player and done
slime worlds are for something else
yeah ik it is, but I don't remember if there's another thing that uses sql
I got one
Doesn't save their entirety, it's more for minigames
can anyone help me 1 key problem? That I don't have a answer....pls
How can I setup that when ever a Player reaches a certain y level of a certain region they instantly die,...
Java - Are there other ways of reading the content of a pdf created programmatically (not from scanned images, but with a js library), other than OCR? I know that browsers render pdf with html tags, so I wonder if there's a way to use css/xpath selecters to do so.
It doesn't matter anymore.
ah yes
What I said regarding html tags might apply only to some PDFs, or my memory is failing me. Anyways
If they are on that region and their y is >= than what you need.. they die. What you typed is exactly your solution
Question, so im using the CraftItemEvent to get when a player crafts an item, but i need to get how many they craft. I tried getting the recipe etc. However when they shift click im not too sure to count how many they just crafted. any ideas?
You could try subtracting the amount of the recipe from the result, so something like this int previousAmount = event.getCursor().getAmount(); int currentAmount = event.getCurrentItem().getAmount(); int craftedAmount = currentAmount - previousAmount;
UUID playerId = player.getUniqueId();
if (flightTimeMap.containsKey(playerId)) {
long flightTime = flightTimeMap.get(playerId);
if (flightTime > 0) {
plugin.getServer().getScheduler().runTaskLater(plugin, () -> {
long newFlightTime = flightTimeMap.getOrDefault(playerId, 0L) - 1;
flightTimeMap.put(playerId, newFlightTime);
if (player.isFlying() && newFlightTime > 0) {
if (newFlightTime <= 10) {
player.sendMessage(ChatColor.YELLOW + "Your flight time will expire in " + newFlightTime + " seconds.");
}
startFlightTimeCountdown(player);
} else if (!player.isFlying() && newFlightTime <= 0) {
player.setAllowFlight(false);
player.setFlying(false);
player.sendMessage(ChatColor.RED + "Flight mode disabled.");
}
}, 20L); // Decrease flight time every second (20 ticks)
} else if (player.isFlying()) {
player.setFlying(false);
player.sendMessage(ChatColor.RED + "Your flight time has expired.");
}
}
}```
It doesn't disable the flight after the time runs out
I fixed it with removing the person from the hashmap
this might help
https://github.com/ezeiger92/QuestWorld2/blob/master/src/main/java/com/questworld/extension/builtin/CraftMission.java
i found it on a thread about that exact question
ok thank you i’ll take a look at that
I doubt but is there anyway to do 3D armor?
What
So you can make 3D "hats"/helmets with a resource pack because you put a 3D item on your head. Is there a way to do this for the rest of the armor?
*not modded
Well if you can somehow force the item in other armor slots and if it actually properly renders it then maybe, my best guess
Yes, very unlikely
ive seen people have 3d armor by just having an armorstand stuck inside of you i think
but other then that nah
is it worth doing my own SQL(ite) library? (java)
like making ur own one?
haven't found a good one that also isn't too intrusive like JOOQ is for example
more like, framework/wrapper
overall making the process with SQL easier yeah
ORMLite / Hibernate is a thing if you’re into ORMs
will check them out, thanks. otherwise I will just make my own lol
if jooq's too intrusive...
yeah jpa with hibernate is nice ish
dk what its like doing plain hibernate tho
like without spring data or whatever
Hibernate is fucking huge in plugins anyway
adds like 50MB
almost definitely want ormlite instead
🥴
making an ORM is not a particularly trivial task
Yeah right
yeah right, sherlock
tbh probably not going to do orm lol
I liked ormlite a lot, but now I wanna see if what I had in mind would work
it wouldn't be orm but it would def. make sql a lot easier
wanna do something like this, for instance, creating a table:
new SQLTable("table", "id")
.addField("id", DataType.INTEGER, true, true, true)
.addField("data", DataType.TEXT)
.create();
kinda the idea behind it
the 3 trues being isNotNull, isUnique and isPrimaryKey respectively
an enum for properties maybe
confusion
so have a list of properties?
... new SQLField("id", DataType.INTEGER).notNull().isUnique()... or smt?
this would look fine tbh
yeah that or enum varargs, both are okay
basically: give it a name, boolean parameters are not obvious what they mean when you are reading the code that calls the function
so either what I sent above or smt like public SQLField(String name, DataType type, FieldPropriety ... proprieties)
I mean, all the cool libraries use like class definitions and annotations to define table schemas and DTOs
Please if you understand in essential DM me ASAP!!!!
yes but that = advanced for my knowledge lol and tbh, doesn't sound that bad the way I am doing it.... I think?!
in Java that's not actually that hard to do lol
basic reflection and just using an annotation processing library
I mean why create a new one xD
why not? xD
xD
TBH even if there are better alternatives out there, creating your own gives you the insight on how it works. Besides, it gives you flexibility to work on your own way and code/structure however you prefer. It's also a training and an alternative for whoever dislikes orm for example.
or, not and lol
annotation processing = codegen
at runtime, yes
welp
my settings got messed up due to settings sync and now it's back to the small icons 🥲
anyone know the setting
do you have PlaceholderAPI installed?
yes
is this your plugin
yep
hard depend
can u show me ur plugin.yml?
but with softdepend appears the same error
name: KumaStaff
version: '${project.version}'
main: com.xodesito.kumastaff.KumaStaff
api-version: 1.19
author: Xodesito
hard-depend: [ PlaceholderAPI ]
show me plugin.yml?
maven or gradle?
private void initPlaceholders() {
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
getLogger().info("PlaceholderAPI found! Using placeholders...");
new KumaExpansion(this).register();
} else {
getLogger().warning("PlaceholderAPI not found! Please install it to use placeholders!");
}
}```
this is how i register the placeholders
maven
ah hmm
name: KumaStaff
version: '${project.version}'
main: com.xodesito.kumastaff.KumaStaff
api-version: 1.19
author: Xodesito
depend: [ PlaceholderAPI ]
looks right
package com.xodesito.kumastaff.placeholders;
import com.xodesito.kumastaff.KumaStaff;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
public class KumaExpansion extends PlaceholderExpansion {
private final KumaStaff plugin;
public KumaExpansion(KumaStaff plugin) {
this.plugin = plugin;
}
@Override
public @NotNull String getIdentifier() {
return "kumastaff";
}
@Override
public @NotNull String getAuthor() {
return "xodesito";
}
@Override
public @NotNull String getVersion() {
return plugin.getPluginMeta().getVersion();
}
@Override
public String onRequest(OfflinePlayer player, @NotNull String params) {
switch (params) {
case "isInStaffmode":
return plugin.getStaffUtils().isStaffMode((Player) player)
? plugin.getStaffConfig().getString("placeholders.isInStaffmode.true") : plugin.getStaffConfig().getString("placeholders.isInStaffmode.false");
case "isFrozen":
return plugin.getStaffUtils().isFrozen((Player) player)
? plugin.getStaffConfig().getString("placeholders.isFrozen.true") : plugin.getStaffConfig().getString("placeholders.isFrozen.false");
case "isVanished":
return plugin.getStaffUtils().isVanished((Player) player)
? plugin.getStaffConfig().getString("placeholders.isVanished.true") : plugin.getStaffConfig().getString("placeholders.isVanished.false");
case "isInStaffChat":
return plugin.getStaffUtils().isInStaffChat((Player) player)
? plugin.getStaffConfig().getString("placeholders.isInStaffChat.true") : plugin.getStaffConfig().getString("placeholders.isInStaffChat.false");
}
return null;
}
}
KumaExpansion class
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
:/
Could use some guidance on embedded IoT. I am trying to develop IoT devices (small devices with a touchscreen), and I need some help deciding how to develop the firmware. Should I write my own linux distribution that is "locked in" to my IoT platform, or should I use some kind of lightweight existing distribution, write regular software for it, and automatically start that software upon the OSes start? Or is there another way that's more efficient?
i am not in embedded at all but i dont see a pressing reason to make a custom distro
Security is the main reason
If I develop it myself, there are less attack points for a potential malicious actor to be able to exploit
idk about that ngl
I'd also consider speed as a reason. The more barebones I can get without using an existing distro that has overhead, the faster I can do computations
whenever someone says 'if i develop it myself there are less attack points' red flags go off
speed might be a valid reason, if the hardware cant support existing distros
It's not about "developing myself makes it more secure," it's that if I use an existing distro, there is lots of bloated features that can expose attack vectors. When I develop it myself, it's only what I need and nothing else, so I'm not exposing myself as much.
i'm sure there are already distros out there for very similar purposes that will have covered a lot of the same bloat you are going to
Any suggestions?
no clue 🤷♂️
i just have faith that in the hundreds of thousands of IoT vendors there's at least one reasonable distro open sourced
Would you suggest that I don't use linux at all?
i mean that probably depends on what your device does
It needs general access to network, bluetooth, display drivers, and external sensor inputs.
The external sensors don't have linux drivers, I'd have to write the drivers myself for whatever platform I choose. So I'm not locked into linux.
again if security is that much of a concern i would rely on other peoples' work as much as possible to avoid any oversights that come from me being a single person
but like, how secure do you need it to be really? are you dealing with passwords or other important data
how sensitive
Sensitive enough where I need it to be only accessible by me
It doesn't stay on the device though, it only acts as a transmitter
do you need the device to be resistant to people hijacking it and trying to scrape the data from inside it
Yes
i'd probably go with the linux distro if possible
but im imagining that you're gonna have like an RSA key or something stored on the device to transmit your utility data, and at that point it would be more important to get some sort of hardware secure key thing
rather than leave it to software to protect
Thanks for the help
that feels like a borderline logical-fallacy
popular things will almost always be more secure because they’ve actually been battle tested
especially with Linux where actual security experts are regularly submitting fixes
and with all due respect, I’d trust actual security experts far more than just a guy
?
please don't crosspost - #development
ok sry
Created a multi-class option for ease of use.
Example usage;
Object playOutSpawnNamed = Class.fromName(<PacketPlayOutNamedEntitySpawn>).newInstance();
ReflectObject reflectSpawnNamed = new ReflectObject(playOutSpawnNamed);
reflectSpawnNamed.setField("a", entityId);
reflectSpawnNamed.setField("b", uuid);
reflectSpawnNamed.setField("c", location.getX())
reflectSpawnNamed.setField("d", location.getY())
reflectSpawnNamed.setField("e", location.getZ())
just use alpine
¯_(ツ)_/¯
The issue isn’t necessarily security but performance
Its running on very bare bones hardware
same thing applies
plenty of linux distros are specifically made to run on basic hardware
with years of effort going into them
Is a pi stable enough?
Plus cost. It’s expensive for a bulk order - it goes up in price per unit the bigger the order rather than down.
I need hundreds to start
Suggestion?
i mean, it depends what you want to do
well just how basic are we talking
I'm not an expert, but for a startup, I would personally focus more on the product itself than making my own OS for the product 
As bare bones as possible, low power less than 5MB of RAM in a sleeping state
The product is finished
ah nice
It’s already deployed using Pi Zero W
It’s a project I’m picking up from a company I purchased so I’m using their infrastructure and everything
I just need some embedded IoT suggestions and advice
out of curiosity, what do you need an OS for?
like, what does the device do that requires an OS?
anyone knows an discord api for java?
I was going to use JDA but that makes my plugin weigh 20 mb xd
hello there i was wondering is there is a placeholder for chose a custom font like {"text":"TEST","font":"namespace:path/to/file"}
and are you size limited?
There's Discord4j, but all will add a significant size to the jar, you can use another library that downloads your libraries at runtime - spigot has one built into for 1.17+
a placeholder where?
Can't post on spigot if its over 2mb
4 or 4.5
w placeholderapi
well that's on spigot. but they didn't mention anything about it. which is why I asked
no jangyga
thanks
wdym?
you were saying that jda is 20mb and I was wondering why that would be a problem
then you did something wrong.
tbh, if size is a concern, you can always minimize it. I haven't had any issues with it
yeah well, unless they already have some big dependencies already, jda is < 10MB
JDA-5.0.0-beta.9-withDependencies-no-opus.jar
9.92 MB
he probably implemented something extra lol
although, minimizing usually doesn't help much, but my jar is never above 10mb lol
minimizing can lead to issues, depending on what your plugin or your dependencies do, but it isn't uncommon
What's hangar's size limit?
You see, you'd think that I of all people would know
Actually I wasn't expecting anyone to know straight away but would go check ;p
I would but I'm on my phone and I don't wanna
I wonder if this means what I think it does https://github.com/HangarMC/Hangar/blob/staging/backend/src/main/java/io/papermc/hangar/controller/internal/PaypalController.java
Probably not
Not bad tbh
like the jars for all platforms on a single download?
No, LuckPerms downloads its dependencies on startup
oh, true
LuckPerms is 13MB total right?
Maybe it got bigger 
chonky
Technically
it depends on your settings
e.g. if you use MariaDB for storage with redis messaging it'll be larger than, like, just sqlite storage
Oh yeah it only adds h2 if you select right
all of LuckPerms would be massive
Imagine if plugin size mattered
just how I like my plugins
Debian is great, barebones but functional. It's what I use for any production sites
I would assume you didn't read the discussion lol
Can Linux even run on 5mb
125 imo
Ohhh nvm they said 5mb in sleeping state
Or actually
While in sleep, memory doesn't clear or anything
So Linux wouldn't work for this, I think?
¯_(ツ)_/¯
in this day and age worrying about whether is something 10 or 20mb is goofy ahh
Not if a company is worrying about size/cost/performance of each unit to minimize spending.
I think a lot of you are still in the mindset of unlimited resource technology like AWS EC2 servers and forget there are lots of restrictions and constraints in the professional world with embedded hardware.
You should ask these very specific questions in a specific place though
ACHTUALLY ☝️ 🤓
I run my own servers on my own physical hardware, 10 extra megabytes is not gonna kill the system
we're not in floppy disk era
I don't think his message was about the same convo you think is occurring lol.
how come
He's talking about someone wanting their own OS. I think you were referring to running JDA with 10mb
Maybe I'm wrong though.
I wasn't talking about running a vm with 10mb, I was talking about size in terms of storage
👍
yes
I am talking about very small, efficient, devices. Not large scale servers doing a heavy workload.
isn't that when you use like an FPGA or something?
or if you want real small, one of the BSDs is a really good choice
super secure, small, and optimized
tbf he just asked for an OS, without any other details 
theres also jda
read like 3-4 messages above
I wish JDA was modules so you can say like private messages only etc...
ohmb
Question about CF workers, could it be used for an app that pings various services to get data from them? Would each ping count as a request, or only incoming requests count?
Only incoming requests count towards limits and billing, not outgoing requests made by the worker script.
As the pings are initiated from within your worker script and not as a direct result of an incoming request, they won't count against your request limits or affect your billing.
I see
incoming requests count towards limits and billing,
Ouch lol
?
I have a problem with deluxemenus, and it is that it does not recognize these requirements. even if you have permission "deluxemenus.protection" Keep running right click commands
op? * permission?
does sending an unneeded header with a request increase the delay?
aka the header isn't used, does it affect the time it takes to get a response? Is it noticeable?
it is sending more data than if not adding any headers at all, but there shouldn't really be any real noticeable difference between 5 and 30 headers
I mean if you're hosting the http server in a 8086 sure it might be noticeable
What's wrong with my 8086k
ik this probably isnt the best way to do it but it makes everything very organized https://srnyx-needs.to-sleep.xyz/idea64_G9aakwitO3.png
example of what one of them looks like (the integer [10120] is the minimum mc version that the thing exists on):
public class NamespacedKey {
/**
* 1.12+ org.bukkit.NamespacedKey
*/
@Nullable public static final Class<?> NAMESPACED_KEY_CLASS = ReflectionUtility.getClass(10120, "org.bukkit.NamespacedKey");
/**
* 1.12+ org.bukkit.NamespacedKey#constructor(org.bukkit.plugin.Plugin, String)
*/
@Nullable public static final Constructor<?> NAMESPACED_KEY_CONSTRUCTOR = ReflectionUtility.getConstructor(10120, NAMESPACED_KEY_CLASS, Plugin.class, String.class);
}
only annoying thing is stuff like this:
public class ItemMeta {
/**
* 1.11+ org.bukkit.inventory.meta.ItemMeta#setUnbreakable(boolean)
*/
@Nullable public static final Method ITEM_META_SET_UNBREAKABLE = ReflectionUtility.getMethod(10110, org.bukkit.inventory.meta.ItemMeta.class, "setUnbreakable", boolean.class);
}
```where i have to put `org.bukkit.inventory.meta.ItemMeta.class` instead of just `ItemMeta.class`, but oh well 🤷♂️
just put it on github if anyone wants to look thru it: https://api.srnyx.com/git/api/src/main/java/xyz/srnyx/annoyingapi/reflection
gonna add Ref before each one just so i dont confuse myself (or others)
Does anyone know an alternative for this library? https://github.com/DevNatan/inventory-framework
Ideally one that is built in a similar way, at least with the context part where you can pass variables from a GUI to another. I've looked at Interfaces but I don't like it very much.
Matt’s GUI library?
quite a bit different imo
No
Out of interest, what's lacking in it? Looking to utilise GUIs myself for the Tebex v2 plugin. Been unsure which one is most robust, lightweight and isn't open to dupes
good question
regarding the second part of your message, I have been using triumphguis (aka mf-gui) and never had any issues
same here
mf-gui is used in my epic SellGUI addon for ShopGUIPlus- over 400+ active instances.
I mean, it doesn't lack anything, I need a replacement for that lib because I have to update a plugin that has 20 something GUIs made using it.
why
Love php, what you struggling with?
Php
i am mostly just bored out of my mind
i have no choice but to use php on its own

work placement, trying to do data comparison is the task i have but i am incredibly limited on the resources i have because i'm not at my pc
so trying to do a language i don't like with a keyboard that misses like every other letter using a barebones sublime text on their dev environment
other option is adobe dreamweaver CS6
not to motivate you more
which i'm sure is ancient
LOL anything is better than dreamweaver
What type of job are you doing placement for
i have like unpaid internships right now and this company focuses primarily on accounting software that uses php primarily
Ah wow, nice placement tbh getting to deal with money and such
I'm sure a lot of nice tech going on, I find it interesting with how companies deal with money
what data comparison do you have to do
currently i'm just set to try out shit for the sake of trying to figure out what type of job i actually want to do
but methinks the end goal is comparing two csv files
Using Symfony for my bachelors degree project
Pretty nice too
PHP on it's own is kinda meh
And for the love of god use a decent IDE such as, before mentioned, phpstorm 😩
Yeah I think PHP by itself is terrible, but with a framework it's easier to use. ANd yes, phpstorm is dope
i have no choice but to use sublime
F
can't just install phpstorm on a company pc i use once a week
What about VSC?
not on here either
Very dumb
i generally just don't wanna go installing shit without asking
and i don't wanna ask
Why though?
i like safely assuming the answer is no
even if i just become a whiny little bitch over it
Well you can't know if you don't try. You can simply say you are more used to VSC and that it is a better editor than Sublime
but i won't try so 
Ok
rekt
pussy
company gave me ubuntu machine with root access, no need to ask to install a simple program 😎
No password set for BIOS on computers at school, wondering if we should boot Linux there and set password for BIOS
You could also get into the local admin account a stir stuff up
or, hear me out, disclose this to your school instead of creating unnecessary costs for them.
my school didnt care ;D!
told them about most of the "administration" only accounts had passwords in plaintext on microsoft active directory
like the exam accounts
our gym hall computer
the full names of the people they outsource microsft AD management to
lmao we did this 
Any ideas? 
Ideally one that is built in a similar way, at least with the context part where you can pass variables from a GUI to another.
That's just dependency injection, I don't see how you can't do this with all gui libs already
I know that Matt, that's the last option if I can't find anything like it
And well, a library where GUIs extend a class and override methods would also be good
Smh
I guess I will give IF a try
lol
You mean this one? https://github.com/stefvanschie/IF
An inventory framework for managing GUIs. Contribute to stefvanschie/IF development by creating an account on GitHub.
Yeah
Great
Yeah thanks for the idea M0dii
"It was me all this time"
Hey @ocean quartz with your GUI lib, what versions are supported? And what’s the file size when shaded?
1.8+, 70-ish kb if you're on Paper (1.16.5+) and excluding adventure, 400 or 700 kb or something like that if you want full support on spigot etc, because it uses adventure
If you already use adventure in your plugin, not much changes
MB? 
Was about to ask xD
Fukcing hell kb
Was gonna say what the fuck I’m defo making my own if it’s that big 😂😂
kchat moment
That’s dope then, thank you - looking for a nice GUI library to add into the Tebex v2.0 plugin
Looking forward to trying your GUI Lib
Uh, if you're looking for a nice one I'd suggest something else 
My lib is pretty .. meh, it's old at this point and only really suitable for very simple things
Oh really 😂 I only need it for listing packages and such, otherwise what others would you recommend? Needs to be 1.8+ and ideally lightweight
1.8+ it's probably the best one, most of the more modern good ones like Incendo/interfaces are for newer versions,
Ah dope then, thank you - will give it a try, it’s just for /buy really - and making the GUI customisable
Shame to need to support 1.8 but we move
Ya know you can get into bios without a password by just removing a jumper on most motherboards
If you have local access to the computer, I think they just trust you to not do stupid stuff
Hacker alert
Ho how ho save an inventory ?
I tried to save the items in the player inventory in an arraylist but it dosent work
ArrayList<ItemStack> items = new ArrayList<ItemStack>();
if (args.length == 0) {
if(sender instanceof Player) {
Player p = (Player) sender;
if (p.hasPermission("moderator")) {
if (isMod(p)) {
mod.remove(p);
p.getInventory().clear();
p.updateInventory();
p.sendMessage(ModOffMessage);
p.getInventory().setItemInHand(items.get(1));
items.clear();
p.updateInventory();
}else {
mod.put(p, p);
Bukkit.broadcastMessage(p.getItemInHand().getItemMeta().getDisplayName());
items.add(p.getItemInHand());
Bukkit.broadcastMessage(""+items.get(1));
p.getInventory().setItem(0, FreezeItem);
p.updateInventory();
p.sendMessage(ModOnMessage);
return false;
}
}
Here i just tried to save 1 item (the item on hand) but it doesn’t work
I tried but same problem
Is this supposed to work like this to save an inventory or am I doing it the wrong way?
ahh yes, the good old
ngl never used adventure should prolly try it sometime though
We got the computer itself locked in a cabinet 😄
It's pretty neat
Its like the only time I use static imports tho
Or else the code just gets too long
Hi, i have multiple HashMap in my plugin and everything work perfectly
but i created a new one and i can add value in, but can't remove why ?
I have a first Hashmap Where i add frozen player that work correctly
public HashMap<String, Location> freeze = new HashMap<String, Location>();
freeze.put(clicked.getName(), clicked.getLocation());
freeze.remove(clicked.getName());
This work with not problems
but same with an other name doesn't work :
public HashMap<Player, Player> security = new HashMap<Player, Player>();
security.put(p, p); ======> WORK PERFECTLY
security.remove(p); ======> DOESN'T WROK
eveything is in the same class
What about it doesn't work?
Player is generally not a good object to use as a map key, because it can change, I'd recommend using their UUID instead
Try with UUID and see what happens, but that should definitely work
If it doesn't you'll need to provide a bit more code of your actual use case
also why is this a map of a player to the same player object
ok thx
bcs i only want the player name
what lol
If the name is all you want in there, then a Map<UUID, String> would make more sense
yeah it's true thx
My server is in crack so i can't use UUID
I juste need the player name saved in a hashmap when he's disconnected
I tried to remove the player from the hashmpa on blockplace but it doesn't work
@EventHandler
public void onPlace(BlockPlaceEvent event){
Player p = event.getPlayer();
if (isInSecurity(p)){
p.sendMessage(securityMessageMod);
security.remove(p);
Bukkit.broadcastMessage(security+"");
}
}
what are you mapping it to? would a Set not suffice?
mmh i don't think, i need a variable where i can save player's name when disconnected and delete from the hashmap when connected back
yeah a Set would allow you to do that
How can i do that ?
you put them in the set when they disconnect, and remove them when they reconnect
a Set is basically a Map with just keys
hooo ok
nice
If it’s a cracked server there’s basically no safe way of identifying players lol unless you use something like the AuthMe api
wdym you can't?
the UUID still works, although since it's in offline mode, if a player changes their username, it will not keep the data
im 99% sure
^^^
Yes but also no
By default the UUID always changes when you login
There are things you can use to make it work but at the end of the day you can just use a random player's name and get their data
Unless you have like bm said, AuthMe
By default the UUID always changes when you login
wdym?
my dev server uses offline mode and it works with all the plugins I've tested so far
and I just put skinsrestorer to keep skins
Yes your true im stupid lol
Pretty sure skinsrestorer is what is making you keep your UUID, but I could be wrong
Does anyone know how to cancel dropped loot recovery ?
By default the UUID always changes when you login
no? it is just different from the premium one,UUID.fromName("OfflinePlayer:" + username);
Right
AuthMe will stop people from joining with the same name but different capitalisation
so like Matt and MATT
lol Star
for some reason offline mode uuids can change afaik
even tho it makes no sense to do so it can
if what?
they only change if you join with a different username / the same username but different letters case
Still different name 😉
Does anyone know of a library to read chunk data using ProtocolLib?
Hi i have errors when im not clicking on a player
how do i remove that ?
here is my code:
public void onPlayerInteractEntity(final PlayerInteractAtEntityEvent e) {
Player p = e.getPlayer();
if (e.getRightClicked() instanceof Player) {
}
}
whats the error your getting?
Use https://paste.helpch.at/ for errors, logs and configs. So we don't spam the discord.
show the onInteract method
the error is coming from that method
this code doesnt line up with the error, its comming from the onInteract method at line 23
okk
public void onInteract(PlayerInteractEvent event){
Player p = event.getPlayer();
Action action = event.getAction();
if (action== Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK) {
if (!estCps(p)) {
joueurscpslist.put(p, 1);
}
else if(estCps(p)){
joueurscpslist.put(p, joueurscpslist.get(p)+1);
}
}
whats at line 23?
i forgot something
public void onInteract(PlayerInteractEvent event){
Player p = event.getPlayer();
Action action = event.getAction();
if (action== Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK) {
if (p.getInventory().getItemInHand().getItemMeta().getDisplayName().equals("§a§lRandom Tp")){
if (p.hasPermission("oasia.mod")) {
Player cible = Bukkit.getOnlinePlayers().stream().skip((int) (Bukkit.getOnlinePlayers().size() * Math.random())).findFirst().orElse(null);
for (int i = 0; i < 50; i++) {
if (cible.getName().equals(p.getName())) {
cible = Bukkit.getOnlinePlayers().stream().skip((int) (Bukkit.getOnlinePlayers().size() * Math.random())).findFirst().orElse(null);
break;
}
}
p.sendMessage("§e§lOasiaMod ↝ §7Vous avez été téléporté au joueur " + cible.getName());
Location loc = cible.getLocation();
p.teleport(loc);
}else {
p.sendMessage("Permission");
}
}
}
if (action== Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK) {
if (!estCps(p)) {
joueurscpslist.put(p, 1);
}
else if(estCps(p)){
joueurscpslist.put(p, joueurscpslist.get(p)+1);
}
}
}
its
if (p.getInventory().getItemInHand().getItemMeta().getDisplayName().equals("§a§lRandom Tp")){
at line 23
air doesn't have an item meta
your supposed to check if the itemmeta has a displayname or not
so it will error if you're right clicking with air
either itemmeta is null or displayname is null
displayname will never be null
apparently
i dont get it
theres hasDisplayName but its annotated with @NotNull
so
check if the item in hand is not air
i need to do: if (p.getInventory().getItemInHand().getItemMeta() != null && p.getInventory().getItemInHand().getItemMeta().getDisplayName().equals("§a§lRandom Tp")){
I have problem when im clicking on a block
no probleme with air
might want to check if getDisplayName is also null
nvm
it shouldn't ever be null
i think
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java#751
calls
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java#289
which calls
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java#293
even if its a block ?
it should error when attempting to click air or block
well blocks have itemmetas
since u can hold it
with this code it cannot just error if you click a single type
or are there non holdable ones
I have this line that i think remove the AIR error :if (action== Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK)
no this is right
try this
i think
It works
good
thx @half harness @brittle leaf
random question but can someone tell why this plugin has patches?
https://github.com/jonagamerpro1234/CustomJoinAndQuitMessages/tree/main/patches
what the hell lol
Hi, how to cancel damage when a player is the attacker on an other player ?
#development in the future but you can use EntityDamageByEntityEvent
and then you can use EntityDamageByEntityEvent#getDamager to get the attacker and EntityDamageByEntityEvent#getEntity to get the player being attacked
and then setCancelled(true) if you want to cancel the damage (this will also cancel the knockback, etc though)
so if you want to stop damage but not knockback then just set damage to 0 afaik
yes sry
Okkk thanks guys
@hazy cape Make sure to check if attacker is player like so: if (event.getEntity() instanceof Player) && (event.getDamager() instanceof Player) {
event.setCancelled(true);
}
Made a custom death screen on 1.8 https://imgur.com/4PWJoms
?codeblocks
Use codeblocks for formatting code or configuration files:
```<language name>
<your code here>
```
For example:
```yaml
test:
- “hi”
- “there”
```
Produces:
test:
- “hi”
- “there”```
Can somebody help me with plotsquared v6.
not the right channel, and they have a discord server linked here: https://www.spigotmc.org/resources/plotsquared-v6.77506/
Hello, I would like to request help about EzRanksPro. I would like to make prestiges, could you help me???
wouldn't it be a good idea to migrate #1103027380685115473 to an automated system using forms? Could be a lot clearer to the user on what's needed, etc.
With JDA is possible to add an empty, dummy field to an embed? I need to arrange the fields like this ( 🟦 represent a field with data)
🟦 ⬜ ⬜
🟦 ⬜ ⬜
🟦 🟦 ⬜
🟦 🟦 ⬜
I can arrange the first 4 fields just fine, but if the 5th is inlined, it will go on the 3rd row =/
Nice bar chart
what
The question is; is that possible with discord?
I do remember it was possible, but I can't remember if discord.js was just doing some hackery (e.g. use empty characters in the title and value of the field)
Yeah try thar
yeah
its exactly that
I can send you how I do it in a min if you wish
Here it is:
it's there, just hard to notice
\
uhm...
so I just created a git repo (already deleted but yeah) that had a token of one of my test bots from discord...
and got this from discord literally seconds after lol
First time I ever saw this
Yeah they have scanners
that's quite pog ngl, didn't expect that
saved me once as well
xd
ever since, I make secrets required as start command parameters instead of reading from files.
what's wrong with reading from files?
if you have it empty and only fill it out on your machine, should be fine
?
nothing wrong. problem is with me forgetting to git ignore them
why would you git ignore them? I meant like a config.yml with a "token" field that is empty
that will be published to the github repo
then on the hosting machine, you just change that field
but it shouldn't have anything to do with git at that point
I'm attempted to log into my old account.
and discord fucked up
I need to do this stuff
But their request gets a 400 back
@nocturne apex stop putting us to shame with your awesome designs!
Wab testing?
You put it in, commit a fix and boom, uploaded
confusion
https://www.youtube.com/watch?v=tzcToDPAa2g&t=6s
Would any spigot devs be willing to tell me what ya'll think of this?
If this video helped you, please like and subscribe, it helps a lot. If you need help with anything, feel free to join my Discord server where I can help you! https://discord.gg/UFs6SWWD48
Links:
PaperMC: https://papermc.io/
Java: https://www.oracle.com/java/technologies/downloads/#jdk17-windows
IntelliJ: https://www.jetbrains.com/idea/download...
oracle java link 👎
I can change it in the description if you want lol
Sound effects too loud
the video quality is horible
well, I mean
1080p is just fine :/


