#dev-general
1 messages Β· Page 35 of 1
Don't feel like arguing with autocorrect on that
But add the entire folder to gitignore
well at least some of those files should be commited according to jetbrains docs
I find it annoying when multiple people use different IDEs on the same project and each IDE adds its own folder
So you have vscode, idea, netbeans and so on
that's true, yeah
I'll refrain from committing it in the future. However, any comments on the code itself?
Link?
Ex for code styling you should use something universal
Forgot the name atm
Ah it's called editorconfig
Also it's set up to your setup
Ex if I don't use the same jdk name and version as you, it gives me an error iirc
Unless u want kotlin specific suggestions, I haven't worked with gradle plugins enough, so sorry I can't really help in that part π₯²
https://rider-support.jetbrains.com/hc/en-us/articles/207097529-What-is-the-idea-folder-
Some files should be committed to source control, some should be excluded. Usually, one needs to share the following: ...
yeah I'm a total kotlin noob. Every suggestion will be helpful for me
You're committing files that they didn't list (although those aren't official docs)
Tbh it's really good, especially since I thought you just started kotlin lol
Couple things tho
yeah I know, but let's not talk about so much about that lol. Next time, I'll just not commit that folder at all
thanks :3
I'm listening
These are all small things but first, u can do "string with $variable and ${expressions()}"
https://github.com/mfnalex/gradle-fix-javadoc-plugin/blob/master/src/main/kotlin/com/jeff_media/fixjavadoc/Extensions.kt#L9-L13
Note that all the this (except for when it's by itself) is optional
Although some ppl prefer this
oh you mean I could inline stuff like that, yeah I know
A lot of this is also preference
Ah ok
Also I think u can do String#first
But not 100%sure
In the extension function
yeah I prefer to use "this" so I know that I'm actually calling a method on String and not on something else, idk, java habits I guess
Alr
https://github.com/mfnalex/gradle-fix-javadoc-plugin/blob/master/src/main/kotlin/com/jeff_media/fixjavadoc/FixJavadoc.kt#L11
Is this supposed to not be a Regex?
yeah that's not a regex because I throw that into the following actual regexes
it's basically a placeholder that I need in other regexes
that's also why I called it REGEX_STRING... instead of REGEX...
oh yeah I tried to make my regex objects const but it complained that only primitives and strings can be const
but you're right, that one could be const
I also missed using my REGEX_STRING... thingy in line 14
Mhm
I think idea also warns u about variable naming for that since it's not const but I ignore that π₯²
I'm still looking for a regex to detect double annotations that are not inside <a> tags
https://github.com/mfnalex/gradle-fix-javadoc-plugin/blob/master/src/main/kotlin/com/jeff_media/fixjavadoc/FixJavadoc.kt#L80
Also here u can do the fun a() = result thing if u want
I came up with this weird shitbut it doesn't seem to work properly
(?<before><span class="annotations">((.|\s)*?)(?<annotation>@[A-Za-z0-9_.]+)\s*?)(?<between><\/span>(.|\s)*?<span class="return-type">)(.|\s)*?\k<annotation>
Hm
Regex is fun
Maybe later I can play around for a bit although I'm no regex pro and only know basic syntax lol
basically I wanna catch @Whatever things that are both part of the <span class="annotations"> and the span with class "return-typr", then remove it from the return-type span only
Also this code seems a lot better than my first kotlin code lol
Did u like study the docs or smth?
i got it working fine for <a>@Whatever</a> things but not for stuff without the link tag
kotlin docs you mean?
Yeah
I just jumped right in
Like you're even using File#writeText
How'd u find that out
Took me a while to find out things like that
I read a few things about kotlin many years ago but already forgot everything. the only things I really remember are
- methods are
funlol - return type is after variable name
varName: varType - val = final, var = normal variable
- lambdas are weird, it's not forEach(thing -> { ... }) but just forEach { (optional name -> ) }
that's basically all I know about kotlin
oh and ofc the weird thing that you can call setters using = and stuff
I'm still a bit confused over AutoClosables though
here I'm opening a file, reading it, changing the contents, then write them again - I have tried the regular java syntax like try(AutoClosable ...) { ... } but kotlin complained https://github.com/mfnalex/gradle-fix-javadoc-plugin/blob/master/src/main/kotlin/com/jeff_media/fixjavadoc/FixJavadoc.kt#L41
I'm wondering if my current code leaves the file open, or not
In that case I don't think u need to close anything but usually you'd use closable.use {}
yeah I tried to do file.readText().use { } but that didn't exist
so no need to close it again or use .use { }?
Yea
ok great, thanks
Tomorrow I'll try to fix my regex to avoid duplicate non-linkted annotations that appear both in Annotations and Return-Type columns
I already pull-requested this plugin to papermc but ofc they complained about not wanting to use a third-party-repo π
(which is understandable)
although didn't you request your plugin to gradle plugin portal?
also going back to this code, you could prob do something like ```kt
project.tasks.create(fixJavadocTaskName, FixJavadoc::class.java, javadocTask).apply {
group = "documentation"
description = "Removes duplicated annotations created by " + javadocTask.name
dependsOn(javadocTask)
javadocTask.finalizedBy(this)
}
or ```kt
project.tasks.create(fixJavadocTaskName, FixJavadoc::class.java, javadocTask).apply {
group = "documentation"
description = "Removes duplicated annotations created by ${javadocTask.name}"
dependsOn(javadocTask)
javadocTask.finalizedBy(this)
}
or if create is a kotlin method, ```kt
private fun addFixJavadocTaskToJavadocTask(project: Project, javadocTask: Javadoc): FixJavadoc = project.tasks.create(
name = "${javadocTask.name}FixDuplicatedAnnotations",
type = FixJavadoc::class.java,
constructorArgs = javadocTask
).apply {
group = "documentation"
description = "Removes duplicated annotations created by ${javadocTask.name}"
dependsOn(javadocTask)
javadocTask.finalizedBy(this)
}
Β―_(γ)_/Β―
all preference
im just showing some options
although note that this would return a FixJavadoc instead of a Unit/void
but i feel like that would be better
Β―_(γ)_/Β―
edited code to clarify this
or even better
// line 13
tasks.withType(Javadoc::class.java).map(::addFixJavadocTaskToJavadocTask)
private fun Project.addFixJavadocTaskToJavadocTask(javadocTask: Javadoc): FixJavadoc = tasks.create(
name = "${javadocTask.name}FixDuplicatedAnnotations",
type = FixJavadoc::class.java,
constructorArgs = javadocTask
).apply {
group = "documentation"
description = "Removes duplicated annotations created by ${javadocTask.name}"
dependsOn(javadocTask)
javadocTask.finalizedBy(this)
}
```although idk if this will work
might error
tasks.withType<Javadoc>().forEach(::addFixJavadocTaskToJavadocTask)
forEach makes more sense there than mapping
Also cleaner:
fun Project.addFixJavadocTaskToJavadocTask(javadocTask: Javadoc) =
tasks.register<FixJavadoc>("${javadocTask.name}FixDuplicatedAnnotations") {
// Make it an input property instead of injectable argument
originalJavadocTask.set(javadocTask)
group = "documentation"
description = "Removes duplicated annotations created by ${javadocTask.name}"
dependsOn(javadocTask)
javadocTask.finalizedBy(this)
}
Love gradle π
oooh nice
although does the forEach work with that not returning Unit?
Yeah, works the same way
i still strongly suggest using all instead of forEach there
if a javadoc task is created after your plugin is applied then your fix task won't be registered for it, forEach takes the existing task set, all runs the callback for existing tasks and tasks that are created in the future as well
Alex this is like the 4th time I say that π₯²
other than that + the other things mentioned (and the opinionated things, but being opinionated, those are debatable), looks good
Wdym
It doesn't return a boolean tho
class PlayerManager(
private val players: MutableMap<UUID, Player> = HashMap(),
private val users: MutableMap<UUID, User> = HashMap()
)
Why does using PlayerManager() cause java.lang.NoSuchMethodError?
More context?
This is how I'm trying to use it val PLAYER_MANAGER: PlayerManager = PlayerManager()
Idk there isn't much context
PlayerManager.<init>(java.util.Map, int, kotlin.jvm.internal.DefaultConstructorMarker)'
wait does kotlin not use the new keyword?
It doesn't
wack
Also you can do mutableMapOf() for the map instead
That's pretty odd, something about how you have it setup/shaded? What is the full error?
What Kotlin version?
Doesn't mutableMapOf() use a LinkedHashMap?
Yeah, there is also hashMapOf if you really need it to be a hashmap
Weird it was using shadow jar that caused it
What's the benefit of that over HashMap()?
None, just more idiomatic for kotlin
ohhh
Okay I see
u mean hashMapOf()
what
what does that have to do with what I said
i still strongly suggest using
allinstead offorEachthere
and if you're talking about kt tasks.withType<Javadoc>().forEach(::addFixJavadocTaskToJavadocTask) turning into kt tasks.withType<Javadoc>().all(::addFixJavadocTaskToJavadocTask) that wouldn't work because all requires a Boolean: ```kt
inline fun <T> Iterable<T>.all(
predicate: (T) -> Boolean
): Boolean
but addFixJavadocTaskToJavadocTask returns a TaskProvider<FixJavadoc>
that's why I suggested map, because it also doesn't return a Unit (which is in forEach) so I'm not sure if it'd work and kotlin allows that
ah that's a gradle method
yes'
Executes the given action against all objects in this collection, and any objects subsequently added to this collection.
whats the diff between that and forEach?
dkim
for god's sake
read
i said that before and now i link to the method
the reason why i suggest all over forEach is so even if a javadoc task is registered after the plugin is applied, a fix task will be registered for that newly added task too
6th time
Is there any way to make this work?
destroy as? BlockHandler.PlayerDestroy /* THIS HERE, I want to call.user()*/ .user() ?: DUMMY_USER
yeah just make it work
like this ```kt
(destroy as? BlockHandler.PlayerDestroy)?.user() ?: DUMMY_USER
Yes thank you lol
@half harness why did you need it for making people plugins tho
was it to host a demo on your own server?
they test on my server
yeah
gotcha
previously i used tk
since it was free
but then i just decided to do .me
dont remember the reason tho
maybe just cuz it's hip π
π«‘
personally I started to work in my 3rd/4 year of my bach degree
prob one of the best things I could've done lol
Yeah, companies are really scared of hiring complete newbies.
yeah if i could rewind time i would def try to get an internship really every year of being in college
my college required an internship / research before graduating, so it forced me to get one, and i'm glad for it
yeah well same
but that was in the second semester
and I started working in first lol
Don't worry though, it's just the first job that is hard to get. After that is's smooth sailing no matter how many internships you did during uni.
but honestly, you've done projects and you understand version control software. Those two things weed out a lot of clowns
so the intership was basically was another day in the office
in my mind my strat so far is to try to boost myself up as much as i can for the best starting salary
since if i can get even an extra 5k now that'll probably carry over into negotiations for my next job, etc
not sure if that's the best path to take since it's at the expense of potentially landing a job later
+5k on top of your current salary?
+5k to a potential salary had i not put in the extra effort to bolster my portfolio projects, resume, etc
figure came out of my butt, but i do expect some difference
maybe for naught idk
oh, i see, yeah it will likely help
I would definitely prioritize getting a decent job soon over waiting months for a potentially better higher salary.
How is your next job even care about it? You can just state your demands, you dont have to tell them your old salary.
Yeah they dont need to know
that's a very good point
Though what salary do you have that you want 5k extra? Assuming that is the amout per month in eur/usd
0 dollar π
rule no. 1, never talk about your previous salary and don't tell them the exact salary that you want
lol
Lol ok
again the 5k is just what i expect to be offered more after the months of extra polishing, assuming i apply to the same job in both cases
What domain btw?
While you polish your review for that extra 5k/year you are missing out on real world working experience and on 20k monthly salary.
https://www.ivansthings.work/ is my (still wip) portfolio
yeah π tbh i'm pretty convinced to not do that now
Make the image a bit bigger, I don't think it's big enough
Though idk what experience you have or where you live, but since you said your current salary is 0, I would say you are a jr, 5k sounds like double the amount a jr would get xD
I can still see the glasses when I first open it
20k monthly? I assume US lol
We are talking per year π
oh i meant 5k yearly
Oh... gotcha
No, I mean he is missing out on that over multiple months
Now it makes more sense haha, you live in Eu ivan?
again for total clarification gabby, my thoughts were that if I apply to job A with my current resume/portfolio, they would offer say 70k a year. If i work on it for a few months, they might offer 75k a year
yeah im in the USA π
it's just a junior role. Interview for as many companies as you can and dont overthink it π
yeeee
just feels bad because i've applied a fair bit with crickets
but from what i understand it's not just me so it makes me feel a bit better
Ive recently appied to like 14 jobs and got a reply from 3 of them, two were negatives and I'm signing the contract for the third this Wednesday xD
yeah well personally I got through like 3 or 4 applications
before I landed my current job
"you guys are getting replies?" meme
so true
3 out of 14 is meh, esp after 1mo
but if it doesnt work then there's a lot more to go lol
how liberal do you guys think i can be when applying for positions that don't match my exact skills
is it just like fake it till you make it and just apply everywhere
well I applied to php dev role without having too much knowledge of it at that moment
would of learned it on the fly lol
Sell more than you have, fake it till you make it :)
Fake it till you make it π€£
Jokes aside, if you feel like you can do it but you will have to learn/exercise some of the stuff they require, I'd say go for it. After all you are a jr
alright π thanks guys
They dont have to know you suck
time to carry this energy into applying to stuff for the next while
Make it seem you are very confident 
yeah well thats usually pretty difficult starting out your first job haha
it was pretty difficult for me when I first started, but now after working a year and a half I feel way more confident if/when Im going to apply to a new job
Oh tell me about it haha, it is kinda hard for me too to be confident when I don't know a lot about something D:
Im not good at bullshitting π€£
well Im good at it until I have to prove it lmao
Oh shit he's alive
Wow
Blame dkim
lol
apparently it seems like its the plugins
might take a while to figure out which tho βΉοΈ
i just restarted it tho and its only using 3gb
Yeah I don't use nearly that much
yeah idk why mine went up so much
tried running a server & mc but that didn't work since apparently my 32gb of memory (recently upgraded from 16 :D) isn't enough π₯² (screenshot is without the server tho)
works now tho, yay
oooo dark mode
Which plugins do you use? ;o
oh wow
dkim, have you increased ij's max memory usage?
I think a bit but I assume the memory issue was coming from some plugin since it was going waaay over the limit
After a point, increasing memory limit can give negative returns
i capped it at 3gb
alr
yeah I'll prob just do the restart-intellij workaround for now π
lol rip
aaaaaaa im getting OOMs with vscode and java -jar even tho I have 5.6 gb free
whats happening
first time I saw this π₯²
I don't get it
I had more than 536870912 bytes available
unless task manager is lying to me π€
oh
its going to the paging file
dont know why but I adjusted page file size to "System managed" so lets see
Does anyone know how to fix running a Kotlin project after making changes to a file not actually applying the changes?
I checked the task and it does have Build set to Before Launch
It specifically seems to be happening with editing an inline function maybe?
How are you running it?
what is Build
Just with the IntelliJ shortcut, and also clicking the green arrow next to main
what's in the green arrow? Also what IntelliJ shortcut? Are you using maven π€¨
run gradle task
I also tried switching the Build for gradle build and that didn't work either
The main package
use gradle run
Task 'run' not found in root project
add the application plugin
the run task worked, but it didn't seem to fix the issue
Can you test with a simple ```kt
fun main() = println("does this print")
if that prints, then ig try seeing what part of your code is the issue or upload it to github
if it doesn't print, still I'd need to see the github π₯²
It only seems to be happening when editing this function
inline fun <reified E> shiftArrayToTopLeft
I just added a println as the first line
I might be able to later
alr
It's not too big of a deal, I just don't understand why it's doing that
lol
downloaded from the marketplace yes
o
I just realized a bunch of the plugins I have are because of spring 
this do be kinda nice
Oh damn
hello
A member of staff has requested I move your message to a paste,
Most likely because it contains a config/error/code snippet.
this is my class for my give commands
doesnt work
i did register commands
i dont get any errors in console
i just want to know why isnt it working im trying to learn oop but it should work??
Chill out, if you have nothing to contribute then don't
Saying "please learn OOP first" helps with nothing, at least point to something to improve or help with the issue
Things to check:
- Make sure the command is actually registered on the plugin.yml
- Make sure that onEnable you are setting this command as the executor of the command registered before
- Add debug messages (
commandSender.sendMessage("hi")is enough) at the start of the method, to see if the command is actually running or not
commands:
b3givegrenade:
description: Give a grenade
usage: /b3givegrenade
b3givelgrod:
description: Give a lightning rod
usage: /b3givelgrod
plugin.yml looks like this
how do i set executor
onEnable
not directly related to your problem but you don't need to reapply the item meta to the item every time someone runs the command
i have 2 commands in the same class how do i need to set executor for each one if i do how
this.getCommand("b3givelgrod").setExecutor(new b3give());
this.getCommand("b3givegrenade").setExecutor(new b3give());
like this
or
??
yes
@ocean quartz Sorry to bother you, but I noticed that on MCC you have some Junior NPCs (smaller NPCs). (https://imgur.com/a/58L5TSX) May I ask how do you achieve shrinking the NPC size? (If you can comment on this matter) I've thought that it was an armor stand with an NPC model, but F3 suggests that it's a real NPC.
trade secrets
π«
They just haven't grown too much yet, they'll be a normal sized NPC one day
Why were you looking at that NPCs feet?
Yeah, it breaks the effect if they move
Still nice trick tho
Perfect moment to name it Walter Jr. instead
how realistic is it to create something in php that converts csv -> xlsx without external libraries

work placement, they said they'd prefer not using external libraries for it
but i feel like that'd take a really long time to do, especially with my little knowledge and mental capacity for this dogshit language 
Why PHP
php is the goat thats why
I totally wrote this code Ori, but it seems possible
<?php
// Create an XML-based XLSX file for Excel 2007+
function createXLSX($csvFilePath, $xlsxFilePath) {
$rows = array_map('str_getcsv', file($csvFilePath));
$numRows = count($rows);
$numCols = count($rows[0]);
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
// Create the root element
$root = $dom->createElement('Workbook');
$root->setAttribute('xmlns', 'urn:schemas-microsoft-com:office:spreadsheet');
$root->setAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office');
$root->setAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel');
$dom->appendChild($root);
// Create a Worksheet element
$worksheet = $dom->createElement('Worksheet');
$worksheet->setAttribute('ss:Name', 'Sheet1');
$root->appendChild($worksheet);
// Create a Table element
$table = $dom->createElement('Table');
$worksheet->appendChild($table);
for ($i = 0; $i < $numRows; $i++) {
$rowElement = $dom->createElement('Row');
$table->appendChild($rowElement);
for ($j = 0; $j < $numCols; $j++) {
$data = $rows[$i][$j];
$cell = $dom->createElement('Cell');
$rowElement->appendChild($cell);
$dataElement = $dom->createElement('Data', htmlspecialchars($data));
$dataElement->setAttribute('ss:Type', 'String');
$cell->appendChild($dataElement);
}
}
// Save the generated XML content
$dom->save($xlsxFilePath);
}
// Example usage
createXLSX('input.csv', 'output.xlsx');
?>
nice
god what an ugly language
how can i live without excessively being able to call final
Nah itβs the elephpant
meanwhile with laravel theres prob a nice package π
absolutely there will be
Supercharged Excel exports and imports in Laravel
LOL
Excel::load('file.csv', function($file) {
// modify stuff
})->convert('xls');
cock and balls really
oi oi]
reminder, i have to do all of this using sublime text with no plugins on a crusty hp keyboard
my tuesdays are PEAK
tell them you want phpstorm, you'll 10x your productivity
and a mechanical keyboard for extra 
i still need to try and get the macbook from my parents that they're planning to sell

ooo yes
well, technically composer is not specific to laravel β π€
Good point actually
well you can use composer to install packages everywhere, even without any framework
but if you're not using an ide then it will be a little bit more difficult to import and use them lol
Whatβs the Item name for an Netherite Chefplaner with prot 4 and mending in shopguiplus
Wrong channel.
thats an interesting name
shopguiplus legit has documentation, its like people dont even try to find out themselves properly
how is that thing called?
like not the context
the tool used to create such a images
stupid
these things are called entity relationship models and they're shit
That looks like diagrams.net
That's an UML diagram if I'm not wrong
my friend suggested me to use it he told me look if u gonna plan everything before coding it will make coding more fast
thanks!
so i want to give it a try maybe if i create a diagram and going raw from brain
i just googled and UML is basically like a "language" to "write" such diagrams
Yeah ig
when I was in school (like thousands of years ago) these things we had to draw for sql normalization were just called "entity relationship model". but my teacher knew very little so maybe it's wrong lol
just wondering guys before u work on an project
u write like a concept blueprint
or u figure out during the coding how u want things to look a like
no, I just get started without thinking about anything ahead. Sometimes it works out and sometimes it doesn't work out at all
u can create uml diagrams in ij
but I also didn't study computer stuff so my approach is very poor lol
if u have ultimate
$$$$ imma get fake student documents i think i dont do any profits from coding
all you need is an email address from a known university
same
stealing someones identity's actually rly easy and cheap
why cheap , free
and also i wont steal identity
its different
my university e.g. allows me to have 5 email aliases which I can change at any time, hence for jetbrains I have unlimited email addresses lol
so they just send me a verify + -
and check whats the ___@HERE
if its in their priority list?
just write out some interfaces
theres no need to spend time creating a fancy uml diagram and then have to write out interfaces later anyway
i can use the fancy uml diagram to write other things beside stracture
I had to send them an enrollment letter which was checked automatically
Iβm in my 20th semester of law lol
They donβt even care what you study
haha well as long as ur an student
Yeah thats the only thing they wanna know
imma try to use just custom domain @...
not regular one like gmail or something it might work
that won't work
you need one of these
here's their list of accepted domains https://github.com/JetBrains/swot/tree/master/lib/domains if your isn't there, they won't automatically accept it
oh my university was renamed
I didn't notice
Ok So I am trying to learn how to make a paper plugin. Now how do I do something when the player sends a message?
not configuration help ............
ive just been so drained, like i wannaa make something but the motivation to keep up with the project just fizzles out so quick
+1
i wonder how to get out of this burned out rut im in
@ocean quartz does ktor's gradle plugin provide a way to specify dev environment variables on run?
Not sure actually, I know you can do jvm args on the application block but environment I don't know
IJ might have a thing for that on the run configuration
I tried the ij one, but it doesnt seem to be available durig the actual runtime
I remember it did use to work
I have used it before too and remember it working
Nvm, got it, apparently it not the actual environment variables but rather from a config file we need to define and point to
can I ask M$ Excel questions here too lol?
I currently have a table that uses a ton of XLOOKUPS and somehow they fail if I enter just a regular number into a cell that later gets used as "input" for the XLOOKUP. It complains about me entering a "number as text" - but that's on purpose, as the input may sometimes be only numeric (12345) but might also sometimes have letters in it (12345AB).
unfortunately my excel is set to german but the "quick fix" it suggests is to say "convert to number" which doesn't seem to do anything besides fixing it
TL;DR: Issue is, XLOOKUP seems to does a === check (compare datatypes too, not just values) instead of == and that my target and/or source matrix has both numbers and varchars instead of only varchars
but I somehow also have no clue on how to tell excel that "this column is always text", I can only change the "conditioned formats" but that only affects displaying values, IIRC?
not sure I really understand what ur trying to do, but =value function exists
I'm just trying to make excel ignore whether "123" is stored as string or number
because if I XLOOKUP("123";SomewhereLookup;SomewhereResult), then it does not detect 123 in SomewhereLookup if that one only contains strings but "123" is a number, and vice versa
I somehow have to manually tell excel that "123" is a string for the lookup cell, although clicking on that doesn't even change the actual cell's value
sooooo I got no clue how it even memorizes which cells I marked as being strings or not
maybe this explains it - XLOOKUP only works after I marked the "lookup" cell to be a number (even though it's a string)
and yeah my excel is in german, very annoying. the option I clicked that fixed it was "convert to number" (ignore the red cell formatting, that's only because of a duplicate key in that column)
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
also #development for dev support ^
kinda random question but are there any languages except for scripting languages and jvm that can have a "plugin" system?
any language that allows for dynamic library loading and linking
so, C/C++/Rust
for example
hm
bc I saw a discussion on rust where someone was trying to recreate the minecraft server, and when asked about the plugin system, they weren't sure about it
1 sec
edit: nvm
:))))
There's Valence (https://github.com/valence-rs/valence) which is Rust MC server implementation built on top of Bevy engine which implements plugin system (https://bevyengine.org/learn/book/getting-started/plugins/) so you can create plugins for Valence
i mean, it's certainly not impossible
dlopen/LoadLibrary for plugins as dynamically loaded native libraries
for languages that have a runtime like the jvm, then it might be worth seeing what options the runtime offers for dynamic code loading
change it ;-; wtf
The interface OfflinePlayer does not have the hasPermission method. So how can i check if offline player have permission?
offline players do not have any permission system. as Gaby mentioned, you can use Vault, but only if the permission plugin supports it, and many just return "false" for any offline player
Thanks β€οΈ π π
Btw just curious - how come it's annoying?
german
Excel functions are localized so if you try to use =IF in non English Excel, it won't work π
I'm pretty sure that's not the case, because school PCs are set to Romanian and I can use the normal functions just fine
is there any website that will let me play all minecraft sound libary
Ohhhh π₯²
When deprecating something (respectively a method), should I fully remove all it's javadocs (description, @param, @return, etc) and only have the @deprecated javadoc there or should I still maintain everything until removal?
No as long as it exists
When u deprecating something itβs more like no longer supported itβs like a warning before removal at least this is how bukkit used it
Hmm okay, it's just cause it looks a bit cluttered since everything is basically doubled lol
Sometimes it's simply just saying "don't use this... But it's here in case you really need to"
Wait wdym
basically changing the format of methods, got recommend to use the deprecated annotation for now, until I remove it instead of just straight out removing it, so basically, all methods are almost duplicated lol (I do call the new methods inside the old methods though)
Also u should prob have deprecated annotation
yeah forgot about those lol
already added them
Are you changing it just to remove the get?
that's very ew naming imo
I feel like having it just be version() implies it's an attribute of the class, instead of having to make an HTTP request
Naming it fetchVersion would be the best in my opinion
Or something along those lines
it isn't clear nor faithful at all what the function does, not saying that the name should be the only piece of "documentation" to ever exist, but it should be far clearer, might wanna refer to https://github.com/kettanaito/naming-cheatsheet#naming-functions
i'd go with fetchResourceVersion but yeah
True, just realized that I think it's supposed to act like it's calling a field, just with () after
Oh shoot
Clicked the ping button twice lol
Hmm thanks for all the feedback
I prefer the "paper" style of naming methods
or if you want to be more correct it's objective C style getters/setters
What is the paper style?
probably .something() and .something(set value)
"fluent accessors"
but it makes sense where it makes sense, not for everything, inb4 naming cheat sheet
I'm fine with whatever Afonso wants to use. I'm ready to test it. π
It's fairly nice yes, but since that isn't a getter for a field, but actually making a request that takes time etc, fetchVersion would be the best imo too
tbh I'd just keep it getVersion for the sake of not making a breaking change
for a super minor issue
TBH, I do agree it makes a lot more sense, will use this style (fluent style) for stuff that doesn't need to get fetched.
tbh I personally hate the typical set/get style
lol
I already made all the changes, like, not needing the author in most things (since you only require slug now) but will also add some neat things like filters which already existed before in the api but weren't implemented.
why?
i mean like in this case
I have honestly no idea, I simply dislike it? idk from where or why lol
uh tbf I will see, since it's not an api solely for me, gotta think about what most people are used to.
I think fetch is better in this case bc its a web request, but I'm not sure if it's worth removing get
π you just like to keep me waiting, I see. I guess I'll be patient and go do something.
well the conventions exist for a reason
nooooo, never. I actually just really want to add filters lol
I can always make a commit so you can use it though if you want
love it or hate it, its often more convenient to have get/set prefixes. you just type something.get and you can see all the getters all at once (that is if youre using an ide)
Here's the thing, if I do use fetch, then having get would just make it have duplicated methods there
that is true....
I mean, the library is open sourced if you wish lol
yeah all methods are in the HangarClient class, everything is handled in there
Totally up to you. I'd work on adding in the changes today on my end if I had something to work with.
Yeah will probably publish in a few minutes? Although it will have a tiny breaking change since the author is mostly useless rn, so that parameter will be removed
this is why i hate semver
i aint doing a new breaking version because of a tiny breaking change
Are authors being removed entirely? Or just from the slug for the project?
They are still present in namespace and required for only a few things, think the only thing it is required in the library is to generate a download url, otherwise, slugs are now unique. So, no duplicated projects from 2 different people.
Yeah for sure. I know I do author banners too so as long as I can still pull a HangarAuthor object or whatever then I should be good to go.
yeah you still can, it's just not required for anything projects related
Perfect! Then I'll happily be your tester for the new version π
Uhm so, somehow, accidentally switch my tab from 4 to 8 spaces in intellij, any ideas where to change it back? Can't find it anywhere
lol
at the bottom right, it should say "8 spaces" and then have a thing either for EditorConfig or for your file format settings
wow
jetbrains academy/hyperskill now has all courses for free, with a 10 problem limit daily!
π
(used to only have kotlin basics as the free course i think)
O
That is awesome
#showcase message
@ionic gust
btw the reason those versions don't have javadocs is because they don't exist server-side
I haven't had minecraft that long ago but I assume it was really small client side update
so if you add them I'd add some kind of indication
like a red border or smth idk
o wait true so can anyone even run those versions?
and what do u think of it in general?
last thing i wanna do is embed injection cause rn its just this: https://srnyx.com/docs and https://srnyx.com/docs/spigot
Easily share Javadoc members across multiple program versions!
Easily share Bukkit/Spigot Javadoc members across any Minecraft version!
but with embed injection i can include the path that ppl provided
in server-side, both are considered 1.8.8 ig
I don't know how the version checks work
but can u even run a 1.8.9 spigot server?
ok yea so no point in making button for it!!
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
yep, no 1.8.9
oh ok
1.8.9 was just a client side bug fix iirc
so it simply doesnt have a server side version
@half harness π https://srnyx.com/docs/spigot/org/bukkit/Bukkit.html#broadcastMessage(java.lang.String)
Easily share Bukkit/Spigot Javadoc members across any Minecraft version!
Made by srnyx β€οΈ
couldnt get last part of url (after #) to show in embed as only the client knows about it, server has no idea it exists
How is the URL generated?
wdym
Like how can I convert spigot docs to ur site?
replace https://helpch.at/docs/VERSION/ with https://srnyx.com/docs/spigot/
altho u cant use any of these versions when converting:
nodejs express
pushing new changes rn hold on
done
@half harness added LATEST button what do u think https://srnyx.com/docs/spigot/org/bukkit/Bukkit#broadcastMessage(java.lang.String)
Easily share Bukkit/Spigot Javadoc members across any Minecraft version!
Made by srnyx β€οΈ
oh thats nice
should prob stand out though a little bit
why not use client-side?
Β―_(γ)_/Β―
idk how π
oh π₯²
and just not that big of a deal to have to probably rewrite everything
yea
o actually i am doing stuff client-side (obviously...)
i just dont think its possible to set embed client-side
wdym
isn't it just tags in <head>?
or is that not editable
also ignore link on embed title, i did some magic to remove it if a member is specified (cause it doesnt include the text after #), discord cache just silly
yeah but i have to inject it when the server gets the request

at least i hope its just discord cache
o wait discord has an embed checker now
ok wth it still has url????
skill issue
i need a suggestion matrix/Vulcan which 1 is better
hm
- why do u say Vulcan? any specific reason why is it better than matrix
how do i make a item show as being "enchanted" whilst not actually having any enchants
don't crosspost
has anyone used kotlin multiplatform to make ios and android apps?
Probably
try expo
why dont they update deluxechat for 1.20?
you can only preview the app via webserver or sum, no? I mean yeah it looks like a mobile app, you just cant build the actual (insert apple apk equivalent here) file
Yeah hmm, I would like to use kotlin, and have a good user experience
I know there's Flutter but I don't feel like learning a new language D:
no wdym
u make code on pc and then you can connect with android or ios
and it will build that code to that platform and run on that phone
You connect to what?
Yeah React Native plus Expo is like unironically really good
Way easier to use and easier to do cross platform
I didn't mean thatr you go to 123.256.789.321:8000 to preview your app or sum, but expo basically creates a webserver and renders in on your mobile phone
yeah it lets you see your app on an actual iphone without doing a whole signing/emulating it
so you can do it without a mac, super nice
hot module reloading and all that
If anyone know anything about docking stations, I would appreciate some help here β€οΈ https://www.reddit.com/r/laptops/comments/16m2iyj/docking_station_compatible_with_two_different/
yeah just get a KVM and plug the separate power adapters in whenever you need em
surely those laptops have more than one port/have a dedicated charging port
Yeah I've realized that now, duh 
You bring a monitor to work? π
No, it is for home, at work we only have a monitor on the desk 
I think they are like 34'' curved monitors, probably enough for most of us xD
Annoying! But at least I can give lenovo credits for placing most of the ports on the back - there is also a lightning thunderbolt port on a side and an usb on the other
I thought this ππ
lmao lightning would be so scuffed
Ah yeah, this. Idk what it was at first and I somehow mixed them lmao
looking for dev expert on mcmmo factions dm me
a
B
is it possible to use nginx to only allow a specific ip while using cloudflare?
There's https://developers.cloudflare.com/support/network/understanding-the-true-client-ip-header/, and I know how to allow certain IPs, but I don't know how to combine those two
or actually I could just use cloudflare firewall, but they only allow 5
what exactly are you trying to achieve
are you trying to allow only specific IPs of cloudflare to access your nginx server
or
you are trying to allow only specific IPs to access your nginx server that is behind cloudflare
This
I want to limit my server to certain user IPs while being protected by cloudflare
oh
i misread
well i dont think its possible due to it being proxied through cloudflare so it would only show their ips
would be noice if you find a way tho
kinda want it aswell
Alr I'll lyk if I find smth :))
ty!
Anyone knows how to add private skyblock island with a portal
I believe the modern alternative now is forcing Nginx to use Cloudflare cert, https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/ (if this does a similar thing, to only allow Cloudflare)
This is what I have setup anyway
I see, I'll keep that in mind
Is there any good documentation of how to send get requests with body json and stuff with Java? I cant find any good tutorials
gson + java 11 http client
Body json?
Json in body
body in json
Still no clue what that is.
wait no
GET requests aren't supposed to have bodies
i think?
I mean sometimes apis require that but I think okhttp for example doesn't let you
the body is data that can be sent, ex the contents of a paste: https://github.com/lucko/paste#pastesdev-api (look at the upload bullet point)
so json in the body is having the body in json form instead of regular text
note that pastes.dev doesn't use json in the body
that's why Content-Type is text/... (for json it'd be application/json I think)
Ah ok. I thought he was meaning like header -> body etc... lol
I figured out how to do it
This is a prototype landing page for my project, It is still in the works so it isnt perfect, but I am looking for suggestions. What could I do to improve this? I dont know what to do to fill the empty space.
disclaimer: i suck at design
I feel like the black is too bold, what if you make that light mode as well? Then when switching to dark mode (I noticed that you have a theme switcher), it goes to the current color (talking about the black box on the right, along with the button
sorry it doesn't answer your question π₯²
or if you want to keep it dark then maybe a lighter tone?
Β―_(γ)_/Β―
Oh so the contrast of the quote is a little much?
I could make it transparent and then add some like TailwindCSS like blurred orbs in the background
imo, yes
also theres like the 60 30 10 rule or something (idk if thats the real numbers) thats nice for designing themes
its like 60% main color, 30% secondary, 10% accent
shouldn't be followed strictly but its a base idea
oh ok
why does another SpawnerSpawnEvent fire when I cancel the event and manually spawn a mob into the world? Does not make sense
@cinder monolith maybe you pass spawn reason as spawner?
Use creaturespawnevent
And check if spawn reason was spawner
Real chads use 50/50 main/secondary
I'm no pro but the swirly and code-y combination doesn't look good imo
@long dagger what font did you use for the logo?
Lobster
Yeah I forgot to change the code font, it was supposed to be something different
I believe there is also too much white space
Maybe add some swirrls and dots with 30% opacity idk
i also think there isn't enough whitespace
text look cramped
and also maybe a soft gradient in the blue title would look awesome
maybe play with sizes a little bit
there is one
very faint
What about this?
are any of you aware of a guide on how to go about structuring your plugin so that you can expose a developer api without providing all of the implementation?
Heck yes I like it
You will be adding more content below, correct?
yes
someone is telling me to just check for the name in an item instead of using the #isSimilar method, what are the arguments on that?
Whatβs the context? And that seems wrong
checking if the item in the players hand is similar to a specific item, he is saying that I should check the name instead of the whole itemmeta (which is what isSimilar does)
pdc moment
cant sadly, coins can be anything, input by the user
coins arent from the plugin itself.
Can you explain more what youβre trying to do?
Yeah but what is a coin
an item
It can be any item at all?
its a specific item set by the player using a cmd
but can be enchanted or not
named or not
whatever
Then use isSimilar like you said
you can always check manually if you think isSimilar does extra checks
Β―_(γ)_/Β―
gtg rn so I can't check source myself
same as .equals, but without checking the amount
oh
yeah but isn't isSimilar overall a more secure choice?
Well, regarding my last message, not sure what isnt secure about '.equals'
You use isSimilar if you dont care about the amount
Also pretty sure the internal equals does 'return isSimilar(obj) && getAmount(obj) == this.amount'
You can always check the implementation by looking at source code of the method
Or just implement your own comparison
Β―_(γ)_/Β―
basically yeah
just checked
also just realized the docs say that as well lol
Is it possible to edit a font to set its Bold weight to SemiBold instead? (Using the SemiBold ttf file doesn't work, same with all the other ttfs)
This is because I'm trying to use https://github.com/LibrePDF/OpenPDF/, but it seems like the normal weight is using the thin weight instead, and the only other option is to make it fully bold :/
This image is using https://fonts.google.com/specimen/Inter+Tight but the other fonts I've tried do this as well
or is there a way to remove font weights?
Hmmmmmmmm
it spaces it as if it was semi bold but doesn't actually semi bold it lol
this is what it should look like btw (this is when double clicking the ttf file)
ok I even tried with https://fonts.google.com/specimen/Tauri which has no other styles other than Regular (which is already kinda bold) and it's still thin
why D:
hmm... tried importing a font into Glyphr Studio, exporting it while making a random change, but that change only shows in Windows when I double click it, but in the pdf, it shows the old version?
why am I getting these issues
anyone else know another pdf library besides pdfbox and openpdf/itext :((
maybe I'll try pdfbox again
anyone aware of an app/software, that works like a home-cloud?
I just want to serve a folder on my drive for quick file upload/download.
Nextcloud is probably what you're after
My friend just runs an ftp server on one of his old machines and put like 10 TB of storage on it
the harlenko filebrowser docker image is awesome
wondering guys
u do all events under 1 event
or many small classes
sperate
i have many different items that listen to interact
not sure if i just better should make single huge code block
or many small listeners
yeah I've been looking into it, though having some issues with docker
currently trying out OwnCloud
perhaps split each listener based on the responsibilities?
Hi, im trying to create a plugin api/base for all my player related data. This plugin main purpose is to serve as a service plugin that gets and sets player data.
Im having trouble importing the jar file into my new Plugin, through intelliJ. Can someone please provide some documentation or help?
Hello Sir, please read my dm I need to contact you
Uhh
This is weird
Ideally you make classes depending on context
its what i do at moment
So for example, if you're handling player data, you have a listener for join/quit
yes
For custom items, I'd make a class for each custom item
lets say i have interact class to listen if player nteracts with custom items
like a weapon so it does x ,y ,z
but also i have different tools
like wands and other stuff
and i have like 4 classes that listen to that event
i could use switch case
and make all of the listeners in 1 class no?
Not a good idea
Ideally you make a class for each item
Something like this
So you can split your logic
yeah at moment everry class returns
I don't think it's bad to have multiple listeners for the same event btw
If you want to remove an item you just don't register that item in the first place
so i can recognize them
Different items have different actions, some can just give a boost when held / worn
Others have click actions so you need to make a system to handle that
In my case I just have methods to subscribe to events and handle it myself
did u just recreate it into ur own event?
No clue what that means
In my case I just have methods to subscribe to events and handle it myself
this is what I mean with that sentence
and some other funky stuff
icky
i check.
not the uppercase class names
haha dont judge lol i know it goes likeThis
@quiet sierra 
u stink
so classes contain for example what happens onInteract
bro has 0 grasp of oop
so Illusion u think i should keep do it that way
I already gave my take
like sperate listeners?
oop? more like boop
i just want to verify π
then my opinion doesn't matter at all
about nuking t
because it works both ways except one ends up nicely and the other is a tentacular monster
this not but how u sort ur listeners
let me make you a drawing
π that would be fantastic
Each gun class is its own listener
Alright
Now you make a registry for AbstractItem so that you can do stuff like
/giveitem ak47
and as long as getName() returns "ak47" it'll work
polymorphism OP
What do you guys think of this website design? It feels incomplete to me, like it is missing something. What do you think?
Put an ad on the right side of the page
That's what it's missing
And make it slowly expand left to cover the whole screen
So they have to read quickly
and if they reload, it keeps it there with a paywall
But in complete honesty, I might have ads, but it would either be free to remove them (just a button on the ad itself) or like a $10 one time purchase
I feel like so many people would jump at a one time purchase rather than a subscription
thanks
I have been working on the colors for like 6 months now
(and more, not just colors)
Pay-per-ad
They have to pay for each ad they want gone
skript ad
YES
i know you love skript fisher
whats that
π
isnt that like a GTA mod thing
Skript is the most amazing programming language ever created
don't worry you're not missing out on much
Someone should make a Minecraft server implementation in Skript
a programming language inside a yml file
this was the first prototype π
yeah
and a fucking pain
true
ab:
? - !!map
a: 1
b: 2
: 12
---
a: &b
c: 1
d:
<<: *b
c: a
valid yaml i think
i see
IMO I think a light theme would fit better here, it looks too dark
I have both
There is a switcher
The logo doesnt fit imo
the font wavy, old, fancy, and then the content is so modern and new
how does it make it old
no idea
like the wavy cursive style in comparison to the modern, very straight style
just my opinion though
does anyone know a keyall plugin or skript?
does it make any sense to make a single document in a mongodb with it's own collections which simply contains a list of X thing? lol
im no mongodb'er but i think that's fine to do with it depending on how large the collections will get
not sure if the analogy is
documents -> tables and collections -> relational dbs
,or
(documents in collections) -> tables (like in rdbs)
oh but there's also this article, which seems to indicate that you don't want large growing arrays in one document?
https://www.mongodb.com/docs/atlas/schema-suggestions/avoid-unbounded-arrays/
the wave logo?
It is mostly just a placeholder, I made it in like 5 minutes
I dont know what to do instead tho
Any recommendations on a skin/nick api? (preferably that doesn't require an external plugin like disguiseslib and nickapi....?
Also, what would be the best way to do a random disguise/nick of a random player that hasn't played in the server before but also has a skin and exists?
Does anyone know how to make item (HOE) with booster etx. multiplier(drops,exp etc.)?
yes I do
Looking for dev can help me setup my server while im learning
what exactly does this api do? lol
unclear
"NameMC Java wrapper"
I think they just misunderstood your question
would anybody know how to fix my luckperms prefix not working on my scoreboard plugin?
its just showing as &7Citizen
anyone know what processing-java is
Whatβs the context?
well, then, uhm, I still need answers for it π’
It's a Java wrapper for namemc website api
Namemc shows skins and stuff
But it doesn't integrate into the minecraft server or anything
I meant what I asked before that
aka a skin/nick api (without external jars)
exactly π
god can't find a single good api
Make your own lib π

