#dev-general
1 messages · Page 36 of 1

I think you mean Skript
Even I'm not low enough to use skript
💀
not emough time
Hmmm, does sending a GitHub link to #showcase count as advertisement?
I have some open-source projects that I would like to show
Should be fine, I don't see any rules against it at first glance, but I wouldn't take my word for it!
Thanks
@queen saffron How is your server coming along? I remember a few months ago you were working on something, is that open to the public yet?
I cant believe what Ive just seen 
int id = 5;
someMethod(toString().valueOf(id));```
tf
How to tell someone is using eclipse:
what annoys me is when someone does Enum.name().equals("VALUE") when you can just do Enum == Enum.VALUE
it kinda annoys me when they use #contains() aswell
Well contains can be useful sometimes
And starts with and endswith
i get that, it just looks ugly to me
My CS teacher said Eclipse is the best IDE
(he is 60 and didnt know what git was)
Also, what is your guys preferred code formatting? Is it ```java
public class ExampleClass
{
public ExampleClass(String[] args)
{
System.out.println("example");
}
}
Or
```java
public class ExampleClass {
public ExampleClass(String[] args) {
System.out.println("example");
}
}
2nd
the majority of java projects will use the second format
I'm assuming your CS teacher uses the 1st?
I prefer 2nd, but most old projects use the 1st
0 credit if we dont
lol
I hate it with a passion
My CS teacher uses XCode for C++ (I have no clue why) and doesnt like autocomplete or eslinting
isn't xcode popular or smth?
sounds familiar
oh
and it has C++ support as some of Apple's projects run on C++
but it isnt built as a C++ focused IDE
It originated in C which may have something to with it
Yeah, my CS teacher said in C textbooks they wanted to save pages so they shortened it
yeah
no idea if thats true but i guess it would make sense
yeah I got no clue
He mentioned we would be writing out programs on pencil and paper for tests, which I have done before and is the most horrifying experience imaginable
One syntax error and your screwed
idk if you took it but AP CS A has 4 free response questions where you have to write code on paper 🙃
I dont the name but I took a AP CS course through my university where it was what you are talking about
I even had to include imports
idk what is standard, but it is just annoying
same-line opening braces is the standard for Java
next-line opening braces is the standard for like C#
im lucky i took it online 🙂
but actually the guidelines are veryyyy lenient
like they don't care if you use { or [ for arrays which is kinda messed up lol
oh what 🥲
how do you know?
oh wow
that's nice
even the missing semicolon :)) ```java
public void method<List{String} list>
System.out.println<"beautiful">
yep that's valid lmao
i took em both freshman year and got a 5
u will def get a 5 too
its not that hard cuz u already coded for so long
thats level 0
No?
does anyone know how to get Advanced Slime World Manager for 1.20.1?
Maybe this will help you https://github.com/InfernalSuite/AdvancedSlimePaper
some people use level 0 enchantments so the item is glinted but doesnt actually do anything since its level 0
such as protection 0, since the cal is 4xlevel, if its 0 its 4x0 which is nothing
hewwo everyone
today I ordered a tiny homeserver (ryzen 7 4800H, 32GB RAM, 512Gb SSD) basically only to run paperless-ngx (document management) and nextcloud and some docker images (smokeping, pihole, etc...) for me at home. I will however probably also want to spin up some VMs sometimes.
Now I wonder, what's the better approach? I probably want to use proxmox and/or podman, I'd love to use both. Now I wonder whether it's smarter to create a KVM VM in proxmox for podman/docker, or whether to run podman/docker directly on the proxmox host
for my online stuff I also use proxmox on a dedicated server and there I just got a separate VM for docker, but the reason for that was mainly that I don't want docker to alter my host's iptables, which I basically don't have to worry about at home lol
or maybe I could just install plain debian + podman, but then I can't easily create KVMs... hm...
I can't decide lol
promox and docker kvm
you got any reasons for this suggestion?
...
Always trust a good gut feeling
xD
lol well I'll ask in the netcup forums
I wouldn't say that. I got the "Master" rank there and got more likes than I wrote posts, yet I'm an idiot lol
Didn't say you are so smart because you are there
Just said that there are people that have 300IQ when it comes to sysadmin
it's always funny that you can notice through netcup forums whether school holidays have started
You can?
whenever 13 year olds ask how to install "windows 8 and then port forward minecraft to my domain" you know "ah yeah school holidays started"
Ah yes
But the fact that children can afford a domain and a netcup server is amazing
like thats 20 bucks a month lol
hetzner too, I got a dedicated for 46€ per month
like wtf? a DEDICATED server for 46€
I remember when you got 128MB RAM with Linux-V-Server (the thing before KVM and LXC etc) for 20€ per months
i meant.. that they have so much money to spend monthly
oh that's what you meant
yeaa
yeah well idk I also had much money to spare when I was 13, I was getting hundreds of € per months just for distributing real-life spam to people's houses lol
is that even still a thing? it was a very popular job among young people 15 years ago
I had the luck of being assigned a residential area that had extremely high buildings with like 40 apartments per house, so I could just ring there, throw 40 leaflets into the stairwell and that counted as 40 ads being distributed lol
my friends who had other areas assigned just dumped the letters in a nearby lake and pretend they delivered it
good old times
idk if the free ones are good enough to run MC for more than 3 people
Haven't done any benchmarks or anything but it's 4vcore & 24gb memory
Don't know cpu perf tho
that's only for the first months IIRC, after that you only get like 2 GB RAM unless you go for the ARM option
are you sure you get 4 cores and 24gb for free forever?
Yeah
Some ppl in here have had it terminated a while ago tho
But mines been running fine for a long time
¯_(ツ)_/¯
but it's free so
I only once got an abuse notice from hetzner when I did zmap over whole ipv4 looking for open MC servers
💀 they detect that?
yes they detected it as "outgoing port scan" but funnily enough only like 12 hours after the scan completed
I found like 250 thousand open 25565 IPv4's or sth like that
oh wow
idk I can't scan again, I won't risk another abuse lol
IIRC you just do zmap -p25565 0.0.0.0/0 and then wait like an hour and then you got the results lol
oh no... washing machine is done
same ............
(dots added for dramatic effect)
idk mine already got 3 maintenance downtimes just this year
but I don't use it anyway
damn I just realized I need to buy an old-school usb stick to install proxmox because this stupid homeserver only has one USB-C and that's used for power supply lol
why do they advertise it as "1x USB-C" if that's not usable for anything besides power lmao
because.. that's what it has
but only for power supply
yes
MINIS FORUM Mini PC UM480 XT AMD Ryzen 7 4800H 8 C/16 T, 32GB RAM, 512GB SSD PCIe, Mini PC, 2.5" SATA slot, 2X HDMI and USB-C, 2.5 G RJ45, 6X USB ports.
idk imho that implies it got "one USABLE USB-C port"
as it's mentioned alongside the HDMI, LAN and normal USB ports
but according to this pic, there is only one USB-C which is needed for power supply
hewwo
uwu 420 blaze it
bruh this thing is more powerful than my huge-ass potato of a pc
what do you use da ting for
homeserver
nextcloud, pihole, paperless, and stuff
basically just a proxmox/docker host for home usage
currently I'm using a 2018 mac mini for that
but I'd rather use the mac as desktop sometimes so I need a new server thing
anyone knows a KVM switch that supports 4 displayport ports with 4K 🥲
damn it'd also have to support USB
I doubt any exists
its the real deal
but its a bit more complicated than that cause its ampere based
which makes some stuff just not work
😦
but performant af
Anyone know if it's possible to remove this highlighting on ignored files/folders?
Imo highlighting should be used for something important, not the opposite
It’s a theme thing, I believe in the editor settings. Or if you use the material theme that has an option iirc
hmmm can't find it, looked in material theme ui settings & Editor -> Color Scheme -> General
🤔
not sure why it randomly activated (unless I somehow only noticed it today)
You can find them within Settings → Appearance & Behavior → File Colors.
Can disable it here
it worked!! thanks :D
I don't know why I didn't see that before 😅
Ayyyy 😂
ampere?
what the hell is ampere
except a unit for current
cpu architecture bullshit
ARM?
ARM is the future. I got a m2 macbook (also ARM) that beats most desktop CPUs while battery lasts for 20+ hours (ok but it also was 3500€ soooooo lol)
yeah the big advantage though is that now apple introduced ARM to the mainstream market, it's gonna get adopted more widely
you can love or hate on apple, but they often do changes that seem stupid at first but are finally for the good (e.g. switching to USB-C)
I'd imagine people would be still stuck to normal USB in 2025 if apple wouldn't have removed it completely from all their products
yeah anyway my ryzen server is arriving tomorrow :3 can't wait to install proxmox
GG
btw wanted to mention that apple is forced to switch to usb-c, although it did decide to make the change sooner than required
I was talking about the macbooks and how they were basically the first ones who made laptops/computers with "only usb-c and without normal usb"
they haven't since at least 2017
my 2017 mac has 4 thunderbolt ports and one headphone jack
adapters?
my 2023 m2 has 4 thunderbolt ports, one hdmi and one headphone jack and one magsage
yeah that's the idea, ideally all your devices just use USB-C as well
I don't think I own any device that uses normal USB anymore except my audio interface, but I don't need that on any of my macs because they all got CoreAudio builtin (ASIO driver)
but yeah back in 2017 I indeed had to carry a universal adapter all the time - it had 2 normal USB slots, a LAN slot, an SD slot, and a HDMI slot, and it was plugged into one of the USB-C/Thunderbolt ports of the macbook
2017+ macbooks have only (up to) 4 thuderbolt/usb-c ports, hdmi, and 3.5mm audio (and the power supply (magsafe) although it can also use power over any of the USB-C ports)
although I feel like the majority of devices use regular usb over usb-c though, so how do you find ones that use usb c?
which device for example?
mouse
who uses a mouse that does NOT have bluetooth?
if you use a mac, you use an apple magic mouse
for all the gestures macOS offers
yeah I mean on my windows desktop PC, I use a normal USB mouse, that's true
but who uses a wired USB mouse on a laptop?
idk if you ever used macOS but if you did, you will know that you WANT to have a magic mouse or magic trackpad for the wipe and pinch gestures and multi touch and stuff
but who uses a wired USB mouse on a laptop?
👋
(not my laptop)
yeah okay then you don't know what a difference that makes. a magic mouse isn't just 2 buttons + scrollwheel but basically like your phone's touchscreen - just without displaying anything
but to answer the original question: you just google "<device> usb-c" lol
oh-
I currently got 4 monitors connected, 2 through USB-C and 2 through HDMI for example. my keyboard and mouse use "normal usb". my yubikey is usb-c. my audio interface is normal usb because it's like 10 years old. and yeah that's all that's connected to my desktop
it's kinda funny how consumer stuff gets replaced every 10 years (Composite, DVI, HDMI, USB-C, etc), but the professional stuff still uses the same adapters as in the 80's lmao (6.25mm, XLR, MIDI) lol
I think cameras also still use CF cards - anyone remembers those?
no idea what CF cards are 🥴
Looks like a battery buts it's a storage device
I think I have 1 or 2 lying around still
they were introduced in professional DSLRs like 20 years ago but are still around today. in fact the newest canon eos 1dx mark 3 (7000€) still uses CF cards lol
if anyone wants to send me a birthday gift:
(februrary 22)
That 4gb card can barely store 100 photos lol
you can get cf expreess cards that can go up to 2tb and are much faster then sd cards
💀
yes sure, but I only got an EOS 5D II, i doubt that it supports CFe
TL;DR: Google doesn't want to (or cannot) tell me my health insurance's mail addresss
while this may be a good camera, it just looks so god damn ugly
how dare you to insult my EOS 5D Mark II
lol
or were you talking about the 1Dx Mark III I sent a screenshot of? If so, duuuuude, that's an amazing camera
a DLSR isn'T made to look fancy, it's not like an iphone, it's a tool
also it can do 20 pictures per second, that means it's almost a movie lol
photography is one of the few things I actually learnt (besides law, flying, and bartender) and the 1D-series is basically the best you can get. It also doesn't look ugly imho 🥲
Cool flex
the best you can get from Canon lmao
this is my beauty 😌
Now I’ve used a mirrorless (A6400) I don’t think I could ever go back
Having a real live view is amazing
Don’t think I ever use the viewfinder
I guess I do when it’s sunny but that isn’t often it is that sunny
I so want a A6400
Currently I am using a Nikon D7200 and a Nikon D80
(The D80 is for hiking trips where I don't care about losing it since it is worth at most $30)
The D7200 has a live view but the only thing it shows is exposure, it doesn't reflect aperture or iso
yeah Mirrorless is mint man
love my flip out screen, makes filming myself super super easy
hey everyone im working on anti piracy for my software (java) so i was wondering
on runtime i know i can change fields and etc but it wont save after closing the software
how would u suggest change values inside the jar on runtime? that will be static
like that will change self jar stracture and etc?
bytecode manipulation?
thats really wrong
i can just load payloads... its completely different
the reason why i want to do it so once a client uses the plugin it locks it with some data from the server it runs on
so if his plugn gets leaked some how
Then they just leak it before it was run?
thats not something we are looking forward for...
it cannot be run without connecting my ovh server
and having a matching key
You‘re trying to do something you normally only find in malware, as I said
;l
rewriting values inside a jar on runtime?
well yeah make sense when i think about it u can infect others too
I wouldn’t trust something like that
Then you already have a solution?
always have plan B
anyway ill find away because i dont want to store all data via flatfiiles
and etc
also encrypted lol
Plan B is to not publish something that isn’t open source
Or well, it should be plan A
things can get leaked by insiders and etc
but alright imma work on bytecode manipulation
Insiders can also remove any of your security measures
thanks for the support tho ^^
you already had barely any respect from me, now you have 0 lmao
don't understand these people
makes me vomit
isnt plugins using bukkit/spigot api required to be gpl3
yeah, quite funny to see plugins license it with other licenses
Can't do this on spigot. Make sure you're using a market that allows this.
its not something public just sayin...
spigot dont allow even to obsf..
They allow some... but that some is only ones with public deobfucators which defeats the purpose.
Also you can have DRM systems as long as the system will run without internet or if your DRM server can't be connected too.
Meh builtbybit has its issues too. People are finally figuring out how many fees are actually added by "Pro resources"
wdym fees?
wait wut? care to explain?
They have their 9.9% that they were public about, but then tebex has their fees, which the seller pays. Some fees also get added if the buyer has to pay, sales tax etc... Then you have the withdraw fees.
Then alot of people have been complaining about tebex holding their funds for longer then stated times.
It was also stated that legacy won't be kept forever so people not switching to "pro resources" will more then likely leave the platform.
I guess with stuff like Modrinth and Polymart, it’s less incentivising to stay on MCM. I still wish they did a ban sweep, they’d gain so many more active members. Majority of people were banned for silly stuff
Yeah I even got accidentally banned once lol
Had users complaining they couldn't view the resource pages
They’ve lost so many great members from silly shit too
discord allowed them
money buys stuff
I remember like a year ago servers were capped at 1 million
I didnt realize it got increased
they are technically still capped
hmm
they just increase it per demand/request/need
ah
I remember I got kicked from the official Minecraft discord cause it hit 1 million
xD
I tried to rejoin and it said it was full
it's above 1m now I think
yeah
tf?
thats a lot of people
Is anyone know how to disable God from WorldGuard plugin. Because i wanna use Essentials /god
Commands.yml
commands.yml is a configuration file that houses custom defined aliases and command block overrides for your CraftBukkit server.
The command block override system provides a quick and easy way to force the server to use the commands provided by Mojang (as opposed to the ones built into Bukkit) for command blocks specifically, leaving all other c...
Longshot.
I'm on the hunt for a talented dev who’s got experience with custom launchers.
Any potential contacts would be much appreciated. 🫡
for (int i = -1;i > cost.length;i++){
DropItem a = cost[i];
if (InventoryUtils.hasItemAmount(player,a.getItemID(),a.getQuantity()) == false){
return;
}
}
for (int i = -1;i > cost.length;i++){
DropItem a = cost[i];
InventoryUtils.removeItemFromInventory(player,a.getItemID(),a.getQuantity());
}
any opinions on that
start loop for -1 since arrays are from 0
both of those for loops will never run
and why are you not just using an enhanced for loop for (DropItem item : cost) {
dunno didnt think of it ill actually change it
bruh i have to check what i did in the other classes to meanwhile begin not 100% lool
for (int i = -1;i > cost.length;i++){
DropItem a = cost[i];
indexes can't be negative lol
i++ runs after the iteration
also I think you mixed up the > with <, with >, the loop wouldn't loop at all
yeah i felt that somethng is weird here so i had to ask
for (DropItem a : cost) {
if (InventoryUtils.hasItemAmount(player,a.getItemID(),a.getQuantity()) == false){
return;
}
}
for (DropItem a : cost) {
InventoryUtils.removeItemFromInventory(player,a.getItemID(),a.getQuantity());
}
anyway thats the new code instead
besides the variable naming 🥲 yeah that looks good 👍
do you have to do two loops?
hold on
why do you have == false
🥲
no just dont do it 💀
why i dont like shortcuts
its not preference lol
you just aren't used to it, but it's much easier on the eye
reading left from right and seeing the ! makes the coder immediently know
that whatever comes after has to be false for the condition to run
im not really newbie u know but thanks for the advice
its same as some people like to do ? instead of complicated if shit
haha
haha lol if i would care about those who judge
not the ternary bro 💀
yes ew
ill just do if statements and on something that has couple of options a switch
u know pulse
ill change it
ide also dont like it
just for the IDE 🙏
ur so nice i wish me and you friends
good or bad wish
ill go out for a walk for 10min + - ill be back
Is it possible to configure mob AI with a plugin? As in not a new mob but change the zombie AI for example
So apparently running new Thread(() -> {}).start(); causes memory leaks. Anyway to clean them up after use?
I also tested with Thread.currentThread().interrupt(); with no luck.
um
surely that depends on what the thread is doing?
new Thread(() -> {}).start();
this code literally shouldnt leak anything, the thread will start, do nothing, and then get destroyed
threads arent cheap though, they do consume resources + time to be created & exist
perhaps that's what you mean
It runs a while loop reading an inputstream. I have break after I read the portion I want as well as tried interrupt()
how do you know it's the cause of the leak?
According to heaptrack its leaking about 29.2mb
And thats only about 2 mins of running
well theres a lot of different ideas here:
- as i mentioned, threads have some memory overhead just to exist (though not this much)
- it's far more likely that the code that the thread is running is leaking memory, not the thread itself
- are you sure that's a leak? allocating 30mb of memory doesnt seem unreasonable, it's only leaked if it doesnt get cleaned up
are you sure that's a leak?
Definitely. Just tested with only this with the same outcome.```java
new Thread(() -> {}, "[Pool]").start();
Just because memory is allocated, it doesn’t mean it’s a memory leak
^^
Running a longer test with the original code. Give me a bit.
As it looks like we‘re talking about native memory though, which Java version are you using?
17 at the moment.
And how are you measuring that output?
heaptrack
I don’t know if those numbers are reliable at all then. It could be just a memory region for TLAB or stuff like that
Well with the original code running for about 5 minutes its about the same.
The issue is it was taking hours for the out of memory error to occur.
so 1 thread is continuously increasing its memory usage?
or are you just creating a million threads over time lol
You should take a heap dump on OOM then
It runs the new thread every 5 seconds and on condition will create a thread for each core to run calculations.
Why would you create a thread every 5 seconds
Cause for some reason when reading the input from the mining pool, it keeps the while loop running even with no additional lines.
🤨
So rather than fixing that you decided to just make a billion threads lol
What exactly was the OOM message?
yes lol
🙃
Speaking of that I think I know what could be a cause. I have a to make a new connection to the pool every time so the socket might not be closing...
it keeps the while loop running even with no additional lines.
Its not doing this anymore by the looks of it.
I just noticed this, and it is actually infuriating
noooo now i notice it too 😭
?
fking hell....
Voice too
....
Same with extra
What's the standard for server panels these days?
The only ones I knew of last time I was considering a panel were Pterodactyl, Puffer and Multicraft
pterodactyl
I'm officially a SKRIPT user. It's WAY better than coding java plugins.
you're.... joking right?

hack to load jars at runtime using unsafe lol
final File file = new File("json_simple.jar");
final URL url = file.toURI().toURL();
final ClassLoader unwritable = ClassLoader.getSystemClassLoader();
final Class<?> clazz = Class.forName("jdk.internal.loader.BuiltinClassLoader");
final Object writable = UnsafeUtils.getField(clazz, unwritable, "ucp");
final ArrayList<URL> urls = (ArrayList<URL>) UnsafeUtils.getField(writable, "path");
final ArrayDeque<URL> unopenedUrls =
(ArrayDeque<URL>) UnsafeUtils.getField(writable, "unopenedUrls");
urls.add(url);
unopenedUrls.addLast(url);
final Class<?> testClazz = Class.forName("org.json.simple.JSONValue");
System.out.println(testClazz);
it actually works
why load jars at runtime when you can code with SKRIPT
why everythng is final too
Because everything should be final
(no)
yes
and maybe also everything should be immutable
urls.add(url); more like final var newUrls = urls.add(url);
sadly jdk internal api 😦
it's meant to just be a joke
i was messing around with unsafe
add is?
oh im stupid lmao
Mb yeah ic
heres another hack
it changes the enviornment variables of the current process
final String key = "foo";
final String value = "bar";
try {
final Map<String, String> unwritable = System.getenv();
final Map<String, String> writable =
(Map<String, String>) UnsafeUtils.getField(unwritable, "m");
writable.put(key, value);
} catch (final NoSuchFieldException e) {
throw new AssertionError(e);
}
System.out.println(System.getenv());
hackerman watch out 😵💫
luckily Unsafe will get removed at some point
How can I debug a nginx reverse proxy not working? It works fine on another vps, but not on this one :/```
server {
listen 80;
server_name test-subdomain.dkim19375.me;
location / {
proxy_pass http://10.10.10.2:1234;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
```and curl https://10.10.10.2:1234 gives a valid response, but when trying to access test-subdomain.dkim19375.me (with the same method as every other subdomain on a different vps which works), I get a cloudflare 523 error
sudo nginx -s reload gives no error and it's in /etc/nginx/sites-enabled
and port 80 is open
hmmm
https://www.yougetsignal.com/tools/open-ports/ says the port is closed :/
Port checker is a utility used to identify your external IP address and detect open ports on your connection. This tool is useful for finding out if your port forwarding is setup correctly or if your server applications are being blocked by a firewall.
weird
firewall is setup correctly because I can access the 1234 port... and my firewall is just setup to allow all ports right now (will change later once I figure out this issue)
and curl 127.0.0.1:80 returns a valid result
huh???
😖
the 1234 port is from docker, which works externally
but if I do nc -l 1000, that only works on localhost and not externally
I'm so confused
damn
Finally
https://stackoverflow.com/a/63648081/14105665
this worked
Don't know why ufw isn't working
¯_(ツ)_/¯
if anyone knows, pls lmk since I've never had this issue before
edit: I think it's to do with docker...
¯_(ツ)_/¯
I just realized I have had the same status for 3 years
I set it back when the Ukraine war started
and haven't changed it since
Source?
Sometimes there are legitimate uses for unsafe
as of very recently it got a few methods removed and another few marked as deprecated for removal, the vast majority of methods in there have supported public api alternatives that you should be using instead
java removes stuff now? 
always has
Most methods of Unsafe have either a better replacement or heavily break integrity, which is something they want to change for years now. The only reason Unsafe is still around that it also had methods with valid use cases with no proper solution, but that’s solved as soon as the FFM API is out of preview
Oh fuck
Does the FFM API replace Unsafe#allocateInstance?
There is no direct replacement for allocateInstance and there never will be one, because it is something that breaks integrity
Welp that sucks
Most applications using GSON's object mapping function don't add empty constructors into their classes
So that's going to be fun
records exist :)
Well that doesn't make updating any easier
Well anyway
Until it's overridable, it's fine
Sounds like doing something everyone knew will backfire suddenly backfires
Well that's tech debt
It's everywhere
But removing Unsafe#allocateInstance only unnecessarily complicates things
Only for people who were relying on it for some reason
Basically most applications
Nope
Like for example bukkit plugins
Half of them break integrity by reflecting on internal classes
As far as I understand, the JEP will restrict all integrity violations at runtime
And the fact that libraries like gson hide their terrible implementation just to work magically just shows that someone didn’t care
Which means even reflecting on private craftbukkit fields
Well noone wants to write boilerplate constructors in their classes :/
Well, the JDK itself is already strongly encapsulated, and the JEP only describes that this encapsulation should also guard against JNI etc. Reflection on private field that you have access to won’t change
Unless the server ships as a module and doesn’t export those packages
Solved with records, too. But laziness is a bad excuse for doing something you know will break in future
maybe
but still gotta hope this JEP doesn't leave the draft stage soon
but considering it's the only top priority issue on JIRA, it prolly will
That JEP itself doesn’t change much, it’s more a descriptive JEP. But there are other JEPs in that direction
@potent nest so I did a bit of digging, and it appears that the the JEP only talks about sun.misc.Unsafe, not the "new" Unsafe: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/jdk/internal/misc/Unsafe.java
Yeah sun.misc.Unsafe is what‘s exposed and can be used by others, jdk.internal.misc.Unsafe is not exported so I can’t be accessed outside of java.base by default
ewww
That’s far better than what we have now where people think it’s a great idea to use something that tells you it’s not a supported API
There’s a lot of things that you just simply cannot do without unsafe though
It’s not like there is a replacement, but for certain environments it’s just not possible to explore other solutions
In my case, I contacted selenium because their api doesn’t allow you to change their cache path. They replied saying for me to change the environmental variable (and that’s the only way) That’s obviously not viable at runtime for a plug-in environment. (Users that use the plugin on sever hosting websites usually aren’t able to append env variables when running their server) So I have to use unsafe
FFM api isn’t going to solve that. I’m not writing native functions to modify a single map
Of course, this use case is extremely specific but there is literally no other way. If anything, writing native code is much more of a hassle because it gets rid of the cross platform benefit of Java code. I guess it’s all about finding a balance between freedom and safety.
well you are still aware that your solution may randomly break at any point
but if you think that this helps you 
I wouldn't enjoy maintaining code that is legacy already before it is written lol
How would you solve this issue then?
by opening a request in the library's issue tracker?
if a library uses Unsafe (or forces its users to use it and they don't listen to feedback), and hasn't moved away from it or provided alternatives, chances are it's outdated and you should be either looking for a replacement or maintaining your own fork of it
a few days ago someone in the spigot discord was messing with Unsafe to access some field somewhere, somehow they turned all null checks useless lol
you can also teach your users how to set up your software. Same problem as with gson, thinking "I want to hide as most as possible from the user" leads to a "well, you're stuck on some old software now, have fun"
I did but sadly they just closed it and was like just set the env variable
Basically like a “fuck u” lol
But yeah
It’s my only option sadly
And also selenium isn’t outdated but the devs just don’t care
Hey a while ago people were talking about some new Java update where they make class name, params and access type optional for the entry point, so you can just say like void main() { }
Any idea when that’s coming out
I want to teach my friend Java and don’t want to bother them with that stuff right off the bar
for those who use intellij, what highlight plugin do you use so that not all minecraft classes are just greyscaled
in paper, spigot, or vanilla?
You'd have to deobfuscate the minecraft classes
for vanilla, I used some sponge gradle plugin (I don't remember exactly what it is; I'll look it up if you want)
for spigot, there's a maven plugin made by md_5 (idk if theres a gradle version since I use paper api)
for paper, there's paperweight-userdev (<https://github.com/PaperMC/paperweight, example: https://github.com/PaperMC/paperweight-test-plugin)
oh also note that these are gradle or maven plugins, not intellij plugins
wdym
minecraft dev plugin?
it has support for like ChatColor.RED... that's the only thing I can think of what you're trying to say by "text formatting"
but u gotta be more specific
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
nono
like in the intellij ide
like legit cosmetic
you write public static
and their like highlighted
but in base intellij minecraft classes are greyscaled
well
hmmm
grayscaled?
#dev-general message should also fix it but I'm not sure why it'd be grayscaled.. even if it's decompiling, it probably shouldn't be grayscaled
either way, if you're using modern NMS, you shouldn't be using obfuscated code
ohh
wait so ur saying
that even on base intellij there should be some color formatting?
What #dev-general message does is create a dependency with sources
IntelliJ should always give colors to those, if not, feel free to post pom.xml/build.gradle(.kts) and screenshot and I'll try seeing what's going on
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
If you try adding non-minecraft related code, what does it look like?
I thought you were talking about something else
i mean everything else is fine
its just only orange
like u see public
and the if
can you give an image of like ```java
String string = "a".toUpperCase();
it might just be your theme
and not anything minecraft-related
i think it might be
https://plugins.jetbrains.com/plugin/12124-material-theme-ui-lite
This is a plugin containing a bunch of themes that I use and recommend (specifically the theme Atom One Dark)
You can also get the full version for free if you're a student, but the lite version works as well
the image isn't loading for me... so can you answer these 2 questions:
- is String colored?
- is toUpperCase colored?
oh, can you put it in a method and see if it's colored?
if it's not colored, I guess there's no color in the theme for it
If so, then that's... odd
ok
A little snippet of what it looks like
oh nice
If you want to change it, you can click Tools (at the top) -> Material Theme -> Theme Chooser
I did Dark Themes -> Atom One Dark
if you want to use
or you can choose whichever theme you'd like
alr
but it looks a lot more colorful now 😍
sorry it took me a while to understand what you were talking about 🥲
but now ig its fixed?
🙃
what do you people think about my awesome code https://github.com/mfnalex/shitlib/blob/master/src/main/java/us/and/everyone/els3/who/wants/to/contribute/shitlib/logic/BetterBoolean.java
peak development
thank you
pull requests are welcome ofc btw
but please read the CODE_OF_CONDUCT file first
this is why I love github copilot
Github copilot oh god
long time
both are equal to me
fuck off, you're old too
yeah stop remining me please haha
I got more gray hairs than I got... erm... testicles?
or kidneys*
😭
when are you going to talk about the youth being so bad
also bed time stories ?!?
I'm german
I can only tell you "bad" time stories
insert grandma voice: "yooo when I was your age, back in 1939....."
ok wanna hear a really sad story?
my boyfriend has to get up at 5am tomorrow
😭
why lol
because of work
he works in a psychiatric linic
and he got "frühschicht"
@heady grove look pm
nothing there?
@heady grove send you friendship
you're wizzard harry
harry p-p-p-potter?
sorry, it's me, quirrel
don't worry, he called in sick today haha
Nice one
so, it is not at all possible to (even with packets) make that when player executes (for example) /discord command, it would right away act like he clicked the chat link and ask him to open it or copy to clipboard?
I don't think so, no
Didn't someone create a guide like some time ago for like setting up a lifetime azure server here?
Just use oracle free tier vps
i made a little oracle vps guide but I need to update it since things changed
Oh okay, I'll try oracle than instead
Has a lot changed or would it mainly work with your guide?
Sorry for the late response, I was updating it to add some extra info: #dev-general message (and doing some other stuff)
tbh within that hour you probably could've googled it and set it up yourself but sending it anyways 🙃
No worries, I got it to work. Thanks a lot
Looking for devs dm me
stop posting in multiple channels pissboy
good game engine 2D > ? <
Just wondering if anyone knows any resources on how to create/train my own chatbot? whatever language, I assume python is usually most used, but other langs would be cool too
Why would you do that
for fun
Fun 💀
All these kiddos have it easy these days with grabbing an existing library and "making their chatbot"
I had an entire AI course in uni
That shit was pain
I will probably have one of those too
Math 💀
True, but we couldn't use any
Nah how dare you have an easier life smh
Everything from scratch
Anyways, you can probably do that with chatgpt
You better not 💀
would prefer without chatgpt, gotta pay that one, and idk if you can train it with your own data
For that you need a huge ass dataset and hours upon hours of training the model
And after 3 days of training you run it and you realize you made a mistake
Uhoh spaghettioh, time to run it back
lmao
edit: nvm
I only know of how to use existing models
but not training or anything
surprisingly you can setup pretty good chatbots on oracle vps btw
with it responding in like only a few seconds
you can find a few basic text generation tutorials on tensorflow's site, which can probably be modified to be usable as a chat bot
i've actually been playing around with them myself for the past week or so, though in my case i'm trying to train a model to create realistic commentary for memes
In my case, I am interested in creating a chatbot that can answer any type of questions about a game using all information provided in the wiki.
no idea how I will do it, but figured it's a good enough objective for starters
^ yeah, I did this with my own documentation bot thing
wdym with custom prompt?
its fairly cheap for small scale uses
and FAR easier than making your own with much better results
you know what a prompt is right?
its like 0.001 or something
yes but I mean't, how would I make it learn from data I provide and only answer x questions with a prompt? as said, I don't understand much about it
you would literally just tell it "You are a chatbot for blah. you only know blah. please only answer questions related to blah"
people might be able to escape that with some effort, but even if they do, so what?
the alternative is you train GPT-2 or something on your own data
but that will take a lot of effort & computing power
thing is, its tons of data, not possible to just put it in one prompt I think
don't even know how I would provide that much data like that
even if I can send multiple prompts
And it will probably kinda suck
how much data is tons? I don’t think there’s a limit for prompt length
I mean there is a limit of how many tokens a LLM can use for context
like, over 800 pages of wikis
💀
So I normally use new File(".") to get the location of the used jar but sometimes linux will output "path/to/file/." instead of just "path/to/file"
Any suggestions on what to use instead that work for both windows and linux?
couldn't you just replace the end or smt?
or check the last 2 chars, if they are "/.", remove them
what is "the used jar" and what do you actually want to achieve?
I figured it out... That wasn't even the issue lol
I think you should first just feed in like the wiki categories, then go deeper, etc
eh it's still a lot of data though
Yeah ik but it's better than 800 pages 💀
not accurate at all though
@pastel imp if you have some money OpenAI can train a version of ChatGPT off your data for a few bucks (depends on dataset size)
They can make personlized models (at least that is what I remember seeing)
Any good plugins for bungeecord for accouncements?
yeah its an option, although I found a way to do it in python ehich apparently is easy to do
how to support multiple version, is there a link have infomation about this ?
multiple versions of what?
just, how to support multiple version
I think he means multiple mc versions

Depends on use case. You could make modules for different versions, use reflection etc...
https://github.com/TheCrappiest/ReflectionLibrary
It depends on what your plugin does
For example, if you want to let users use custom model data on the items, all you have to do is to add a check in your code if version is >= 1.14.4 before attempting to use ItemMeta#setCustomModelData and that's it
Not this again 😭
Just found out about Eden AI, quite a cool service, they allow you to provide custom data
Anyone know how to do hyphens with no break?
hyphens with no break?
if you mean the gap between them, use spaces and then &m
so like &7&m &r
th &r might not be needded
I have this translateColors function to set all colors in text. However, when I translate the string #00ff11Hello! using for an action bar it comes out blue. It works fine with inventory items and chat text. But not for action bars?
public static final Pattern HEX_PATTERN = Pattern.compile("(#[a-fA-F0-9]{6})");
@Nonnull
public static String translateColors(@Nonnull String s) {
Conditions.assertNotNull(s);
if (!Version.NETHER_UPDATE.isServerMinimum())
return ChatColor.translateAlternateColorCodes('&', s);
Matcher matcher;
// HEX colors
if ((matcher = HEX_PATTERN.matcher(s)).find()) {
Color color = parseHEX(matcher.group(1));
s = matcher.replaceAll(ChatColor.of(color.toJava()).toString());
}
// Bukkit colors
return ChatColor.translateAlternateColorCodes('&', s);
}
@CheckForNull
public static Color parseHEX(@Nonnull String s) {
if (!Version.NETHER_UPDATE.isServerMinimum())
return null;
Matcher matcher = HEX_PATTERN.matcher(s);
if (!matcher.matches())
return null;
return Color.ofJava(ChatColor.of(s).getColor());
}
Is the action bar wonky or am I doing something wrong?
If I sout the message before print using the action bar I get §x§0§0§f§f§1§1Hello! which seems correct?
This is the EXACT same string sent using both action bar and chat.
I assume this is the issue somehow? player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(message))
Nvm, it is TextComponent.fromLegacyText(String) and not new TextComponent(String). Thanks though
how can i make that crystals make normal damadge like in cpvp?
wondering guys how bukkit would react if u load other plugins via ur plugin?
for example Plugin A , loads B,C
so server return on plugins A,B,C
what?
You mean stuff like PlugMan is doing for years already?
Most plugins should work fine but I wouldn't recommend it
Especially on a production server
If you want to see how it's done... Look at PlugmanX
yeah didnt think off it
yeah i want my plugin to load couple of plugins from my dedi
its not meant to be malware if u wonder
I would just download them to plugins folder and restart server
Also kinda related but I think paper has like an update feature
Where u can put plugins in a folder and paper will automatically replace
im staying on old bukkit version with that resource
Oh ok
Bukkit has that too afaik, but it requires matching file names or something like that
in first i wanted to actually just to shadow the resources
but it wont work
due paths and shit
if it was an option i would do it instead
Loading itself shouldn't really be an issue if ur doing it in like onLoad, but if another plugin wants to use that same plugin as well... That gets kinda confusing
And hacky
Is this for like a host-your-own-server thing?
wdym?
Like is this a service where you're allowing players to host their own server
Like hypixel smp
no
Oh ok
nah its just a game mode plugin that has tab and scoreboard and nametags and etc and own region system and in general many changes and every other plugin would just fuck the existing system
but for such a thing u also need a simillar system i guess that allows to load plugins during run time via cloud server
I know this is going off track but I don't think limiting the user to 3 plugins is a good idea
Although I see what you mean - plugins like TAB would conflict
I think
¯_(ツ)_/¯
Hi there, I would like to know if someone knows how to detect when a Worldguard region is created ? I did read the documentation but saw nothing at this subject. I know I can try to detect the changes manually (list all regions every X millisec) but I do not think it is really clean.
Thanks in advance !
why'd you need to do that?
I want that my territory plugin detects when a region is created or deleted because territories are based on regions.
It is not necessary but I think it coule be really good that à region could be user immediatly instead of using a kind of refresh command
this is where i'd ask "and why'd you need to do that" but i feel like i'm gonna get in a deep rabbit hole i don't wanna get into
good luck 
I don't think there's an official way using the API, but you could create a command listener that would parse out the command, check the respective permissions, get the region name argument, pass it to WG API, check if it exists, check who created it (idk if it stores that), match with the command executor - tadah
haven't looked in the code, but if it's just a regular list or smth then calling every tick should not be an issue
but I do not think it is really clean.
oh nvm
they could do a pull request to add an event for when a region is created and see if it gets approved
unlikely, generally speaking that's a jank way to do things tho
and there are either better ways or otherwise already provided means to do X and Y things
obviously it depends on what the actual goal is
shut up man
no u
if u value ur life dont get involved in this
But... paranoia is fun 😉
this is really starting to annoy me
why is intellij being shit and not letting my gradle files have syntax highlighting and shit
all i had to do was go into gradle settings from the gradle button on the right top and click reset, then apply and close and it seemed to have made it work
im trying to add a block display entity but with a custom texture, ive done everything correctly from what i see but when ever the block displays its still its normal texture... anyone can assist me?
/summon block_display 13.502 134 19 {Tags:["4180004"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,2f,2f]},block_state:{Name:"minecraft:carved_pumpkin"}}
this is the command that im running, if i give my self the carved pumpkin with the custom texture it does so fine but as soon as i make it a block display entity its just a regular carved pumpkin
post the code to #development
its not code
thats default minecraft commands 🥲
i can ask for help on this in a different chat if this is the wrong onme
probs #minecraft
Cool
U want it to silently fail or?
^
what did you think i meant lol
im currently in the early stages of doing a full rewrite of my prison core plugin that ive been working off and on with since march 2022, it was just too painful to look at and its a spagetti mess
Hi, everyone.
I am new to here. and this is me.
https://portfoilo-ochre.vercel.app/
thanks.
Hello
where do I go to contact devs for commission?
Thought u were talking abt the second image
😭
Not you
😭
I was gonna say “not you” but now I’m having second thoughts…
😳
i Think maybee better write ur own region system
not depending on worldguard
what the best way to play music disks to players?
playSound?
Is there an actual way to play music server side
Or would you have to use note blocks
like actual music? resource packs is your only option
otherwise yeah, whatever combination of playSound you can come up with (or throw that shit in some midi converter so it creates it for you :^) )
via resourcepack ofc
i mean
if u playsound
it plays per location
is there a way beside making loud sound from x location
Omg its you
what the no way
[04:42:08 INFO]: I doesnt exist
[04:42:08 INFO]: what exist {I=zx.tonyfalk.data.DropTable@59e0640d}
wtf?
} else {
System.out.println(table + "doesnt exist");
System.out.println("what exist" + " " + LootManager.dropTables.toString());
}
what is the difference between "I" and "I"
LootManager.dropTables.containsKey(table)
the check
Show the rest of the code
what part exactly there is alot
The part where you're checking contains
if (LootManager.dropTables.containsKey(table)) {
CRD crd = new CRD(block,LootManager.dropTables.get(table));
if(!contains(crd)) {
CRDR.put(crd,300);
Uas.create(block.getLocation(), "&4LOOTED", false, false, ID);
}
} else {
System.out.println(table + "doesnt exist");
System.out.println("what exist" + " " + LootManager.dropTables.toString());
}
maybe i need to change it to numeric or get last char
maybe mc generete some invisable text idk
Yapperyapps any theories?
i can go trial and error
ikr
Thats probs your best option. Unless you're doing Capital i vs lowercase l I don't see the issue.
It's the real me
both are capital
Very sad
👍
if (MathUtils.isNumber(table)) {
int tablenum = Integer.valueOf(table);
if (LootManager.dropTables.containsKey(table)) {
CRD crd = new CRD(block, LootManager.dropTables.get(table));
if (!contains(crd)) {
CRDR.put(crd, 300);
Uas.create(block.getLocation(), "&4LOOTED", false, false, ID);
}
} else {
System.out.println(table + "doesnt exist");
System.out.println("what exist" + " " + LootManager.dropTables.toString());
}
}
replaced
table with tablenum
int works
eh ;/
maybe ill do a string and always &(int)
any good minecraft dev that is not busy and want some money?
yes im good and not busy and want money, now give me money
nah
i also want money
same
trades are always more interesting, idk
Depends on what u can offer
It can be work in exchange for work
Do u know to model ?
Like make 3D texture
S
does anybody know why this isnt working
Block block = event.getBlock();
BlockFace bing = ((Directional) block.getBlockData()).getFacing();
event.getBlock().setType(Material.CARVED_PUMPKIN);
((Directional) event.getBlock().getBlockData()).setFacing(bing);
theres no errors, everything else works, BUT, it wont set the block facing
Iv confirmed already that bing is being set to the block face of the original block, the ONLY thing i believe is not working is the last line of code
what event?
onBlockPlace
try set pumpkin then get facing
alright i will
working?
No
lemmie paste everything
public void onBlockPlace(final BlockPlaceEvent event) {
AtomicInteger counter = new AtomicInteger(7);
if (spookytoggle.get(event.getPlayer().getName())) {
if (event.getBlock().getType() == Material.JACK_O_LANTERN) {
Block block = event.getBlock();
event.getBlock().setType(Material.CARVED_PUMPKIN);
BlockFace bing = ((Directional) block.getBlockData()).getFacing();
((Directional) event.getBlock().getBlockData()).setFacing(bing);
}
}
}```
Block block = world.getBlockAt((int) x,(int) y,(int) z);
BlockState state = block.getState();
Ladder ladder = new Ladder();
ladder.setFacingDirection(BlockFace.EAST);
state.setData(ladder);
state.update();
i found this for ladder
i think it works with pumpkin
I think thats too outdated it didnt quite work for me, im on 1.20.1
To maybe better explain what im trying to do, when you set the block, it resets where its facing to north, and im trying to set it back to what it originally was when you placed it
afaik getBlockData returns a copy of the blocks current BlockData, if thats the case you are modifying the copy and the copy is doing nothing once you have
Im a bit new to java, but would the keyword final before a variable make it so that it cannot be modified after the fact?
yes
just checked the server internals, down the line of getBlockData it clones the original
so yes its a copy
this should work
Block block = event.getBlock();
BlockFace bing = ((Directional) block.getBlockData).getFacing();
block.setType(Material.CARVED_PUMPKIN);
Directional directional = (Directional) block.getBlockData();
directional.setFacing(bing);
block.setBlockData(directional);
I was still experimenting with my earlier idea and i didnt consider doing it like this, but this worked flawlessly, thank you for helping
blockstates are legit just an copy of a block that stays the same untill you change it manually, its nice for stuff that requires the block metadata to stay the same like if you wanted to setup block regeneration for example
Where instanceof !!!!
idk what the before code is
so could be already checked
tho yeah instanceof should always be checked
how can i add more menus in Deluxemenus? can anybody help me?
wrong channel
Im having an issue rn, i cant quite find a solution
public void onBlockExplode(final BlockExplodeEvent event) {
Material ExplodedBlock = event.getBlock().getType();
Bukkit.broadcastMessage(ExplodedBlock.toString());
}```
this block of code always returns air as the event block, and i cant find any way to make it not do that (final does not work either)
ill post there, but right no im just trying to get something unique to check, to maybe cancel the event for only specific blocks
you should use blockList() like modii said
exactly
spigot
