#dev-general
1 messages · Page 234 of 1
that's not what file#separator is for
Oh?
java will automatically replace your file separators in hardcoded paths
I see
file.separator is just for getting the file separator of the system, to for example, show to the user
you don't need to use it in paths
PiggyPiglet
is there a difference in
File#pathSeperator
File#separator
Ah
or both do the same job?
yes there is a diff sagi
not sure what the difference is sorry
pathSeparator separates multiple paths in a collection
You dont need to
I mean you can but it's useless and ugly
just use /
Piggy // on the code did the issue in the first place
show me the actual path you're using
pl.getInvCfg().getConfig("categorys" + "\\" + "settings.yml").getYml()
works on windows
doesnt work on linux
is categorys the name of your plugin?
no categorys is sub folder
and what does getConfig do
getConfig is a function that has HashMap of files short path and value of the actual file
=paste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
1 sec
ok
Howdy fellas, how's AOC going
Also consider using / instead of , it looks much nicer imo
debatable
I got so much shit to do
my school holidays just started so ig i'll catch up soon
I was gonna use a tree
Can we ban this dude, I hate people not having names.
A tree of each different combination and then just walk down each branch to find the longest branch
It's annoying as fuck for other people who don't know who you are
not banning him, just giving him a nick
nooooo 😦
I completely agree though, it's just unnecessary
extremely annoying for anyone who is trying to have a conversation with you
^
same with people who put non standard characters in their names
Same with those edgy text names, they're just annoying to type / read / ping
Anyway, I'm using Julia for day 10. It's pretty nice
lol

i wonder why if u keep using new languages each time 
But that's part of the fun
Just doing them all in Kotlin or java is boring
This is a good opportunity to struggle for hours and then pretend I know Haskell / C / Julia etc
kek
For example did you know C arrays don't know their size so unless you know it at compile time you are in trouble
I mean the array is just a pointer to somewhere in the stack
what would be more optional?
cast server to craftserver and get the commandmap or get it via the simplepluginmanager
probably 2 but just want to verify
"more optional"?

just get it from the SPM
it's part of bukkit so no strange dependencies are required
Isn't it the heap for dynamic arrays?
Static arrays are on the stack
Static arrays are int[], "dynamic" is with malloc and you get a pointer back
yeah
But yes what you just said is correct
Pointers 😫
But at the end of the day, both are pointers to the first element
You are a pointer
ur mum
too far
Woah there
Pointers in C are the doom of humanity
free(arr);
That's why C strings (and the same goes for C++ std::string) end with a null terminator, because there is no concept of array length
You know it ends when it reaches \0
If the implementation is any good 
I wasn't, body aches all over, tired all the time
Getting old
Actually It'd be public Fefo implements HelpChat to make Fefo the implementation
Matt extends Fefo implements SupportElf
:]
efefury extends BadAndWeak implements Bannable
no worries
I have the same implementations
=ban efefury
Aaa yes
I can be used as HelpChat
All of it myself

pointers 
Fefo if you code Among us in Cow language I will give you PulseBeat

@steel heart no u
Nice dogo Conclure


not cool
stfu

no search snippa
in swedish
jävel ?
idiot or crackhead perhaps
dumb piece of shit
devil
Conclure is lesbisk
omfg
anyone know if EzBlocks is being updated too 1.16 ??
why lol
lol
EzBlocks probably
sure
It will
Kaliber is working on a rewrite
of the plugin
okay
well at least that's what he keeps saying or the past 2 months xD
idk when that will happen
lol itll be done by 2025 😛
kekw
hell still be 2 lines in 😛
dont worry about it 🙂
haha
kaliber saying "Dont worry about it 🙂 "
someone ask about a bug fix that will be his response
return Unit.INSTANCE; 🙂
nah not the same
Thats the closest Java would have
^
sadly only the closest
Void isn't instantiable though
just pass Object 
Unit isn't even actually returned most of the time
actually it's not returned at all
It's just syntax sugar
boolean ? true : false
^ ternary
so you just return conclure.isCool() ? Unit -> () : conclure.setCool();
or smtng
that isn't how unit works though
you're confusing Unit with Nothing
probably
Unit is just void with toString, etc
I mean its returnably void essentially?
Nothing represents a function that never completes, and can be any type
or have I been missteached the entire time
yes that's correct
but it still follows normal typing rules
a function returning Boolean can't return Unit
hmm who told me about returnable void then
Sxtanna probs
anyway ye
so then we can conclude Unit is void but with default object method such as toString() ?
pretty much
it's just an empty class
you could do the same in java, make an empty singleton and just return that
hmm yeah ig
yep :))
he been playing that silly game for quite a while now
also
best game ever
worth it tho
@steel heart the docs pretty much, although i don't think there's anything specific for every top level function
hmm okay tyty
so I dont get why spigot isnt in kotlin
and minecraft as well
just convert to kotlin code literally
because there's no reason to
To the user that downvoted my post titled "Currying in kotlin
", please send at least 500 words as to why, and how it could be improved within 24 hours or I will contact a moderator.
ok, short quiz:
What would you expect to happen when you remove a print statement from your code?
a) whatever was printed is not printed anymore
b) your program doesn't terminate anymore
wrong

My C program literally breaks when I remove a single print statement and I have no idea why
it's not even the last print statement
so it has nothing to do with the buffer not being flushed or sth

C is a magical and mysterious language, it do be like that sometimes
it just works
or just doesn't work
except when it doesn't
except when it does
what happens if you change the output of the print statement? does it still break?
Hello
interesting question, let's see
Allow me to introduce Rust
yet ANOTHER downvote. why!!! clearly the silent majority is out in full force tonight
You mean the bots! We should only count LEGAL upvotes. None of these ILLEGAL downvotes. In fact - maybe the MODS should disable DOWNVOTING of these showcase posts since it is clearly being VIOLATED.
I agree
supposedly the HelpChat Postal Service has been throwing away upvotes !!
legal upvotes gone!
cowards
no dignity
sheeple now a days choose to ignore what is right in front of their eyes
"Academic" is a codeword the elite use to mean "made up"!! they have left many breadcrumbs about this GLOBAL CONSPIRACY... just open your eyes and look
((int) N.get("myCoolNum"))
69
😕
Maybe I should make a sequal to N.java - N2.java
nope
So, what are you trying to do exactly?
just make it so that my spring server works lol
ive got nginx running and reverse proxying it or some shit now but its just saying the spring server cant be reached
I have no-idea what a spring server is lol
Not a clue unfortunately.
ripp
My C program literally breaks when I remove a single print statement and I have no idea why
so as it turns out, weird things happen when you forget to terminate your strings
Lol - yes. haha
You know as I'm starting to get more into systems programming (I have to because of uni anyway) I'll probably give Rust another chance
I will never understand how this is funny to anyone
that is comedyheaven material
Hello all
Typing curl localhost:8080 gives the right output
so i wonder whats causing this then

I should write an entire plugin with only infix functions
can you chain infix functions?
so like
infixFunctionOne infixFunctionTwo infixFunctionThreee```
Not like that, because infix functions need an argument
two arguments in fact
This is as far as it goes with chaining
can you not make an infix function return a string for example then use it as the argument
Nah, it doesn't work like that
rip
how does one get good at css?
display: none;
i need a good project idea as well
also anyone here used electron?
There we go
Which Meta associates to Enchanting Bottles?
hey, so I've been looking in to making a plugin for a specific program that's API is written in C++, and I was wondering what my options are for programming languages I can use
I've heard Rust is quite nice, but can you use C++ libraries in Rust?
Yes you can, via the FFI
note that this will be tough
Rust in of itself isn't something you learn in a day and starting with some foreign interface stuff isn't going to make it easier
what about C++?
I know Java and Kotlin, but I think C++ is an entirely different species isn't it
I'd argue it kinda makes sense to use C++ if the API is written in it, though that won't be straight forward either if you've never touched Cpp
If you want to learn a new language, you can pick pretty much anything and for this particular use case C++ will probably be the easiest since it's the territory of the API
but otherwise you could check if someone else has made bindings to it already
bindings?
I mean, the API is one .h file with a word document for documentation so I highly doubt it
I would just use C++ here
Rust is very difficult to be initially productive with
And if you don't have any bindings it's gonna be even harder
that is true
I just need something that'll work and that I'm not going to tear my hair out over lol
what API are you talking about anyway?
it's an API for a program called EuroScope
it's a kinda old radar client for VATSIM
though you probably won't even know what VATSIM is
Well if you're not looking to do anything too complicated then C++ should be fine
It has some similarities to java
Albeit not many
at least the docs seem to be somewhat helpful
which ones?
the word document I mentioned?
to get the developer docs, you have to download and install it
I mean, they're not bad, if you ignore the fact that they haven't been updated in 10 years
i mean the doc file yeah
Hi, how do I make sure that when I open a deluxemenus menu there is an icon that can open a menu other than deluxemenus, let me explain?
Ah okey
What's the opposite of the word deprecated?
using undeprecated but surely there's something better
not deprecated
why would you ever undeprecate something?
you wouldn't
it's for a role request
- Don't suppress deprecation warnings, use the undeprecated alternative.
non-deprecated?
yeah that's better
yeah either is probably fine
nah I'd say non is the way to go
👍
because as you just demonstrated, undeprecated is ambiguous
don't think there's another meaning to non-deprecated
touche
NEW
could also always just rewrite the sentence
o
and kaliber the non-deprecated alternative is never guaranteed to be new
someone is getting denied
1 of them is me xD
correct
u gonna do them with me lemmo?
unfortunate
I've reviewed people I know
and they usually get denied because I have more experience with their shit code
so I'm not the next one and the one after the next
:))))
How does this make sense?
public TileEntity a(World world, int i) {
return new TileEntityMobSpawner();
}
Sheesh
((TileEntityMobSpawner) blockMobSpawner.a(((CraftWorld) block.getWorld()).getHandle(), 0)).getSpawner()
Suggestions?
final net.minecraft.server.v1_8_R3.Block nmsBlock = ((net.minecraft.server.v1_8_R3.Block) block);
final BlockContainer craftBlockContainer = (BlockContainer) nmsBlock;
final BlockMobSpawner blockMobSpawner = (BlockMobSpawner) craftBlockContainer;
modifyRequiredPlayerRange(((TileEntityMobSpawner) blockMobSpawner.a(((CraftWorld) block.getWorld()).getHandle(), 0)).getSpawner());
block.getHandle()
not a thing
@hot hull CraftBlock#getNMSBlock
oh it's private lol get fucked
CraftBlock#getNMS#getBlock
Using 1.8
get a life
bruh
🤣
I hate it more than you do
call getNMSBlock via reflection
I mean I think I can just use this
CraftMagicNumbers.getBlock(block);
Which is what the method uses
calling it via reflection is future compatible
I didn't check if CraftMagicNumbers exists above 1.8
I don't need it to be future compatible lol
final BlockContainer craftBlockContainer = (BlockContainer) CraftMagicNumbers.getBlock(block);
final BlockMobSpawner blockMobSpawner = (BlockMobSpawner) craftBlockContainer;
modifyRequiredPlayerRange(((TileEntityMobSpawner) blockMobSpawner.a(((CraftWorld) block.getWorld()).getHandle(), 0)).getSpawner());
private void modifyRequiredPlayerRange(final MobSpawnerAbstract spawner) {
try {
final Field requiredPlayerField = MobSpawnerAbstract.class.getDeclaredField("requiredPlayerRange");
requiredPlayerField.setAccessible(true);
requiredPlayerField.setInt(spawner, 48);
System.out.println("Changed Required Player Range For Spawner.");
} catch (final NoSuchFieldException | IllegalAccessException ex) {
ex.printStackTrace();
}
}
Either I'm stoopid, or it doesn't work
Is it a stretch to say prefixing interfaces with I in java is an anti pattern?
probably not
<wave colors=#f953c6,#b91d73,#b91d73,#f953c6> @heady birch Why no pause here? :(((
probably
the convention for "util files" is usually [ClassName]s.kt, so Strings.kt instead of the Java StringUtils
inconsistent braces too
@static zealot can I get your honest opinion, do you think your code is good enough for dev role?
because I suck at reading kotlin
free dev role
i would think that as well lol
pretty much
im a bad developer 
better than most mc devs
Well I was hoping that you can tell me xD
from what I've seen pulse, your algorithm knowledge seems good
hackerrank shit
but you need to work on quality
yeah
not really comparable
ah
pulsebeat had a nice big project for me to look at
just learn kotlin pig 4head
you've only got small projects 😦
That's true
The feeling when Gaby still doesn't have dev role
to be honest with you I would reject my own rquest probably.
because free dev role
I'm not sure how I feel about your voluntary usage of null in your code
a big selling point of kotlin is that you don't have to use null
yet you're using it in places where it's not necessary
Extension functions, only thing I'd want in java from kotlin
em?
elara mitten
oh
aka brister mitten
look at sponge mixin frosty
I do like kotlin.
lol
tho
why?
should've started with java .-.
lua or python
so I just went with it
python prob
xD
I prefer Lua over python, I was never able to get to work with it
Lol
...
no
leave
kekw
skript is not bad
You know the mod with ComputerCraft
where they make an os
using lua
inside Minecraft
val permWorld = if (worldName == null && sender is Player) sender.world.name else worldName
``` imo this isn't very idiomatic, consider changing it to something like ```kotlin
val permWorld = worldName ?: (sender as? Player)?.world?.name
although all the logic here is a bit of a mess
so many ?
and way too much nullability for my liking
this is why kotlin is ugly
nah, this is why you shouldn't have too much nullability
@forest pecan I was thinking of opencomputers
it's supposedly better than computercraft for gameplay
Yeah
Piggy I'm actually confused. naming conventions? I thought I was following them.
the convention for "util files" is usually [ClassName]s.kt, so Strings.kt instead of the Java StringUtils
ah
everything else is fine
I believe he's following that one already
I see
that's not what I was talking about
Ye
Yeah lowercase files are bad
Oh yeah and that
What it is, is a mess
Although configme sucks with Kotlin so that's not Blitz's fault
Piggy how is the deal for private work?
wym?
Like
add me and lemmo to the repo
oops wrong chat - message deleted

why tf does hotswapping take about 2 years when im changing 1 line
potato pc
potato hotswapping then
smh
hotswapping ez 🙂
el debugger
takes your bugs and des them
huh?
but like
haha funny one james!
hows it work
haha thanks!
._.
Fellas, anyone care to fix this for me, I think I'm gonna lose my mind if I try to
I'll send you a steam key if you do ❤️
If I have any left after the giveaways I will ❤️
lol
Will show what I need fixed in a sec
Should display a border around the 3x3 chunks the location is surrounded by, but since my brain turning into poop, I can't figure it out properly
ie.
X X X
X O X
X X X
O being the chunk which the location is at
can't you just get the chunkX and chunkZ, the four corners are x +- 1, z +- 1 and then join up the dots
That'll give me the centers of the chunk tho, so you have to offset them
wdym by that
This should be correct I think
https://paste.helpch.at/murojewuca.java
O being the chunk which the location is at
Do you have that as block x and z or chunk x and z?
I didn't even read the pastes 
that moment you guess the group id correct

lol
That moment when your pc froze for the 6th time today

wtf
why do decompilers like cast every single
object to their type

Like
(MinecraftKey) new MinecraftKey(...)
???
That decompiled code?
Yeah
Yeah no wonder
Because at runtime everything is just an Object lmao and is casted back and forth
Lol
Decompilers will also produce the same behavior of the actual code
but generate crappy code
That's my guess
Yeah it sucks
Yeah
anyway to fix that
in intellij
without manually one by one
Oh yeah
I can
Yeah you can bulk fix shit
Oh ok
8th freeze in the past 2 hours
You really are frosting
1.8 commission to edit some outdated as heck plugin
git clone, mvn install
about 30 missing dependcies
all versions of plugins from about 6 years ago
kill me
the change took about 30 seconds but now i have to get this shit to compile somehow
kek
Jitpack ❤️
Press X to doubt

Get the fuck out efe
👀
so my school made an mc server
and my friends and i
decided to go and use a hack client on it
cause the rules were stupid
like
no elytras
you cannot have more than 8 shulker boxes
and then we found out how to dupe
you probably know how that ended
rip
A man of taste
how many lineS is thTat
old one
bring it to your boss
Get out Johnny
shows your dedication
Just shut
😐
um
and that requires
why
why don't u like modded
hack clients
....
i know now
that's just
that is too harsh though
Can we ban this man
lol
Pulse
better clients don't use forge and fabric such as sigma
w h y
guys im banned
I prefer sugma dkim
Inertia
intertia
If you use a hacked client you're a pussy, the end.
well
let the admins know the rules were unfair
No wells lmao, it's fucking sad
and they were exploiting glitches
tries desperately to think of an excuse
lol
Like how sad can you be
I love those kids who hack, then you ban them and they cry 24/7 cause they can't hack anymore
im going to die from dehyrdration though
Sthu Pulse
XD
it was just a troll and the admins were abusing exploits anyways
plus they were admin abusing
Anyhow, if you've got a server, and don't want to get online to respond to ban tickets (since you'd need to use litebans), I have a bot which does that for you. Get it today for only "learn how to compile"$
whats the bot
wattttttttt
lol
hi :^)
hi
So
What does this code print out:
int x = -5;
int y = 8;
System.out.println("Sup: " + Math.abs(x) + Math.abs(y));
Segmentation fault
wat
Kekw
we are assuming this is in the main method alrgiht
and its just standard java
13?
Nope
Wouldn't it print Sup: -58?
Sup: 58
yeah
but close enough
ofc
its dumb lol
It really isn't
well
that's just how + gets parsed
not dumb but like
left to right
It makes sense
Interesting, I am sure spring has a solution for this
Time to tell a story about idempotency, computer science, and the Night of the Multiple Orders. • Sponsored by Dashlane —try 30 days for free at: https://www.dashlane.com/tomscott
MORE BASICS: https://www.youtube.com/playlist?list=PL96C35uN7xGLLeET0dOWaKHkAlPsrkcha
Written with Sean Elliott https://twitter.com/SeanMElliott/
Directed by Tomek
G...
Is there anything spring can't do?

Spring Boot
anyone know how to make ij not highlight random stuff like this?
it also highlights when I start a command with . in terminal
ooo anyone use Minecraft Development plugin?
(in intellij)
just found out about it
I believe most people use it
Yeah it's really great!
Was someone in here developing a plugin which will conver (or something like that) javascript to java?
or was it for another language and not javascript
Kinda, someone had a plugin to make plugins with JS like a script
ye Sellinq just shared this with me https://www.educademy.co.uk/blog/creating-minecraft-plugins-using-javascript I didn't know about this shit until today
oh huh, i'm doing something similar
looks like i'm not the only one
i'm making Skript but for JS
not exactly but similar
ye
that's why I'm saying
ye you were the guy
wanted to let you know you have competition lmao
😂
fair
he's not the only competition tho
also scriptcraft is doing it a bit dif then i am
ye idk I just found that is a thing xD
you can create mc plugins in loads of languages
bukkit is actually designed with that in mind
yall
python, js, lua, etc
denizen is for yaml
it sounds like mammal what can i say

Happens to me too
@obtuse gale bukkit was designed knowing that it won't be exclusively used with java
that's why you extend JavaPlugin

RustPlugin
Jackson probably does
Instead of "live messaging" is a system in which the website like pings the servers for new messages every like 5-10 seconds gonna be better?
cos im tryna work out the easiest way to make this
If anyones familiar with the paypal mesxaging system, I need something like that
also like what part of the website should ido first lol, front or back
also what should i use for website frontend and what should i use for backend? Should i just use spring because im most familiar with it or is there soething else i should use
OMFG
My server crashed last night
and was left on all last night
now my latest.log is 453.7GB
thats quite the log
i have 0 bytes of storage left
yeah
I have been here 10 mins waiting to be able to load the file
just so i can delete all the text XD
just delete the file xD
I cant XD
it wont let me as i have 0 bytes of storage XD
Like, its in my trash
but i cant clear the trash can
Ima use command line to clear it
Well that worked
what use frontend website
?
If PayPal allows websockets then use them
wdym
im not tryna hook into paypal or anything
im just tryna remake a similar system to theirs
This that same project you are working on? Use websockets 🙂
different project
what are you trying to do then
Why not have the server notify the webpage about "new messages" instead?
its like Live messaging that saves even when the browsers closed between multiple people
oh so just a live chat thing?
pretty much
React + Spring Websockets seems like a nice stack
aight, is react just for like the frontend js shit?
Yeah
It's the most popular JS framework so you'll have lots of resources
Although I believe you could also use something more lightweight and just a websocket / AJAX
aight, in terms of the actual html/css should i use something like bootstrap to make that easier on me?
which ones "best"
use whichever you're more familiar with
Bootstrap I guess then
that gonna be the easiest to use?
Probably
so to use bootstrap do i just have to yeet this bad boy at the top of each file or?
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
good morning guys : D
Bonjour
qu'est que tu fais?
wait did I get it right?
ah
not that I'll remember
but close enough
wait
you liar
I was going to say
I was going to say that my teacher didn't know French ...
she used to ask us that every time she entered the class room
and what's that?
I think it should be « qu'est-ce que »
Although I'm not too sure
Informal might be « Tu fais quoi ? »
Or maybe that's formal
ye well still close enough xD
its the very few things I remember from 6 years of learning French#
I mean to be honest the last 4 years (high school) was mostly just sitting and doing nothing or chatting with the teacher about random stuff
passé composé
I'm in the exact same position
j'aurai fait ?
oh
That's futur* proche
Je vais aller
I'm going to go
easy tense
je vais faire du vélo
he's riding a bike
How do i get the giveaways role?
How to stop player from moving items round inventory?
Cancel the click event
i am using InventoryClickEvent
yes. Cancel it
Is there a way to use permissions with it?
becuase event.getPlayer() does not work
What do you mean it doesn't work?
Oh
let me see
Thanks
wait what...
way to get the player
how tf would i use a permission XD
ah nvm




