#dev-general
1 messages · Page 596 of 1
where do I install paperclip/purpurclip
and also does paperclip/purpur nms or whatever I'm supposed to use have a guide
yeah but how the heck can I make it 
google doesnt help
wdym make it?
nonono, just a fricking heatmap
like any guide, docs, link
does anyone have any answers to my question?
damn
https://www.javaheatmap.com/ im assuming not like this right?
yeah but I dont really wanna use libraries
copy their source code!
ol
lol
um
well idk i got like a thousand hits when looking it up
so
dont think it is open source lol
uh
nvm thats not helpful
You could create a question on stack overflow or something ig
might get a response
ye
First time playing with proper tests in my code: do I need to put them in packages like how I put my main code in packages? (Java/Kotlin)
dunno
Im not sure about the anti-vaxxer allegations, never heard of his opinions on that. About the other 2, he was never a hindu supremacist afaik neither does our constitution fall behind on women rights. The problem that arises with women here have more to do with the people( either criminals or people who dont move on from old traditions ).
not that bug!
ah. my bad
or i would used hit! epic solution for bugs!
Executors.newSingleThreadExecutor().submit {
throw IllegalStateException("test")
}.get()
```never completes - anyone know how to fix it?
hmm, why are you using executors in kotlin?
I used to use coroutines but after running into some issues i just decided to use executors
i don't remember what the issues were but i think it was something which coroutines not being in its own separate thread, idk
well, idk what you're doing, but I think Future have a getOrExceptionally or something like that
nope D:
but i think i should have googled with the term "executorservice" so i think this should work: https://stackoverflow.com/a/2248166/14105665
¯_(ツ)_/¯
oooh I know
you can't just throw stuff inside futures, dkim
you have to catch them and use completeExceptionally
then whoever calls get() will get ExecutionException with your exception nested iirc
how?
what do I run completeExceptionally on
ExecutorService#submit only has a runnable or callable parameter
let me hop to my ide to make an example code
ooh, and you should be using some method of CompletableFuture class which accepts an executor
hmm, could we make a test? runnable does not throw exceptions (it just "swallows" them, per say), but callable does, try to add a return "ass" below your throw statement
oh wait, I think nvm? If you figure out a way to force the usage of Callable, them you should be good, else probably what I said of using CompletableFuture will be a better option
well afaik
You can provide an exception handler or whatever that’s called
(Through a thread factory)
Idk if it would have an impact on the future but worth a try
that snipped throws my "some ass" IllegalStateException nested inside a ExecutionException ```kt
fun main(args: Array<String>) {
println(someAsyncComputation().get())
}
fun someAsyncComputation(): CompletableFuture<String> {
val executor = Executors.newSingleThreadExecutor()
return CompletableFuture.supplyAsync({
throw IllegalStateException("some ass")
"ass"
}, executor)
}```
a method?
no i mean what does it do
I just created the executor inside the method for demonstration purposes only, you probably should handle them differently (like caching them) or smt
Just use CompletableFuture::completeExceptionally then
CompletableFuture::supplyAsync is a static factory method which begins a future with where it uses the supplier passed to compute a value through the given executor
yeah I know, but my example was just showing that dkim could throw exceptions inside the supplyAsync and it would work
if you have an exception ready to be returned before running the async part of your code, you can just use CompletableFuture#completeExceptionally to accomplish that feat (by creating an empty completablefuture, them completing it using that method (instance method)
Yeah cuz it wraps it with an execution exception
Anyways dkim
Have you tried
smtng like
Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setUncaughtExceptionHandler((t,e) -> e.printStackTrace()).build()).submit(blah).get()?
Yes but does it complete?
and this response didn't seem to work either
why isn't this working for me 😩
using this
hmm could you try future.get without the timeout, just in case
same result 🤔
So how are you testing this?
scratch file
Try setup a unit test
in my experience, snippets don't handle exceptions very well
but the exception should have been caught
ooh
okay welp ig it was scratch issue
interesting
Running some tests rn
Yuh
ohhhhhhhhhhhhhhhhhhhhh
🤦
if you want to know the issue: I had another Future that ran that future but I didn't do Future#get - I just looped and checked Future#isDone
so
it never threw
🥴
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
hm
do u think that would work 🥲
wait what
🥴
🥴
i removed the future.get() and now its printing "got error" (my debug) but with future.get() it doesn't print that
❓
above is underlined bc of the throw
what does it say?
the throw
which is?
throw IllegalStateException("")
that makes sense
hmm
it's not printing anything
🤔
but if it's done it should be able to get the value, right?
oh wait
nvm i think i know the issue
yeah well these 3 lines snippets you send is extremely hard to puzzle together and decipher
sorry - i think the issue is that the 3 lines are being ran async so the throw doesn't go anywhere 🤔
¯_(ツ)_/¯
?paste
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
yeah paste the damn thign lol
the entire thing is like 400 lines ;-;
ok idm
wait lemme test this first
at least it would fully contextualize it
You disgust me
lmaoo
what else can i do ;-;
not catch Throwable
ah
ye
well
maybe i should wrap the entire code around a try catch
throwable
eh
idk
https://youtu.be/Ayc7QOadBa4 hey look functional programming in excel !!!!!
Brand new in Excel for 2021 - LAMBDA is the most powerful function ever. LAMBDA lets you create your own functions and use them throughout a spreadsheet.
Brian's Blog Post: https://techcommunity.microsoft.com/t5/excel-blog/announcing-lambda-turn-excel-formulas-into-custom-functions/ba-p/1925546
Dynamic Array Formulas Video: https://youtu.be/...
Simon wrote an article about that
He probably had something to do with its design
Excel is a functional programming language!!
I'm using Rider and I have console applications and I'm trying to get user input but every time when I do so I get a fucked up terminal. For example I want to read a number and when I enter a digit, it doesn't display it in the terminal. the program works well and it prints the correct number but for the user that entered the number it looks like its missing the first digit.
Also another problem I have is that backspace is displayed like a space
Here I entered 2245 then double backspace then 2444 and the output is right
is there anyway to improve that terminal?
because it annoys me so much
it is just the RUN terminal
not the normal terminal. that one looks fine. just like the one in IJ
Unironically it is lmao
tried googling but found nothing about this
Damn
You can also use VB afaik
No need for VB anymore 😌
😌
Prof. Simon Peyton Jones is a computer scientist who specialises in functional programming languages. He is most known for being one of the designers of Haskell, and a lead developer of the Glasgow Haskell Compiler. Peyton Jones currently works at Microsoft as a Senior Principal Researcher. He has also been heavily involved in advocating computi...
Episode 7 | January 10, 2018
When we look at a skyscraper or a suspension bridge, a simple search engine box on a screen looks tiny by comparison. But Dr. Simon Peyton Jones would like to remind us that computer programs, with hundreds of millions of lines of code, are actually among the largest structures human beings have ever built. A princi...
POG I REINSTALLED MY RASPBERRY PI AND GOT IT WORKING 🎉 🎉 🎉 🎉 _ _ _ _
|| i dropped my pi a couple months ago but ig it works now that i reinstalled the os 🤷 ||
I just cut instead of copying a script I worked on for 3 hours, and deleted it. There goes my work 😦
Here’s a quote from his book “Vaccination seems to be a savage custom. It is one of the poisonous superstitions of our times the equal of which is not to be found even among so called primitive societies […] Vaccination is a filthy remedy. Vaccine from an infected cow is introduced into our bodies; more, even vaccine from an infected human being is used […] I personally feel that in taking this vaccine we are guilty of a sacrilege.”
He has stated many times that he believes that Hinduism is the most liberal and tolerant religion of all of them
Also lack of women’s rights in India doesn’t have to mean it’s written in the constitution. As for that here’s something I found. https://www.theguardian.com/commentisfree/2010/jan/27/mohandas-gandhi-women-india
Can a compiled c++ file be run by end users without installing the C compiler?
assuming they're on the right system, yes
Eh? lack of women’s rights in India doesn’t have to mean it’s written in the constitution Where should they be described then?
Nor is he an author on the constitution
So as long as it is renamed to the correct extension?
paste?
And where is it stated again?
Doesn't work if you cut (at least on my DE)
You can't ctrl z rm
ye
at least for me that copies + deletes
Yep. But for some reason, it doesn't get saved in my clipboard
interesting
I didn’t say he was? Why do you keep bringing up the constitution lol
Anyway I don’t think this is the place to argue about this. I probably won’t respond again
Read the question just above before continuing on to the next part
Alright
no, there's more to it than the extension
Is anyone aware of a way to get a specific name on bStats that is already claimed? - I want BungeeStaffList and the current claimed name has 0 stats and the Author appears inactive for over a year and a bit.
help
no
I won't help you
i need a name for a module
basically im planning to have one (mc) server to be sorta like the "hub"
and a bunch for the other servers
the hub is where im going to make a websocket server that will communicate with the other servers
atm i only have 1 module - plugin which is for the other servers but obviously that won't work either..
🤔
i need help
There is no time to wait! Ask your question @obtuse gale!
@everyone
The 'everyone' mention is disabled so you can't annoy people.
no you dont
I actually do
i disagree
I do, I need to see a psychologist
No, I really don't think that's the case
Yes you do, now go do it now!
I really wish it wasn't lol
hello
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
```anyone know how to fix this? I'm using CompletableFuture#get
lines 382 - 398 in `CompletableFuture` (won't be same as stacktrace prob because of different java versions): ```java
private static Object reportGet(Object r)
throws InterruptedException, ExecutionException {
if (r == null) // by convention below, null means interrupted
throw new InterruptedException();
if (r instanceof AltResult) {
Throwable x, cause;
if ((x = ((AltResult)r).ex) == null)
return null;
if (x instanceof CancellationException)
throw (CancellationException)x;
if ((x instanceof CompletionException) &&
(cause = x.getCause()) != null)
x = cause;
throw new ExecutionException(x);
}
return r;
}
fix what?
fix it from throwing
should i just.. try/catch NullPointerException 🥲
there's like nothing in there that can throw an npe lmao
ik 😩
wait
wait
it says Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
but
im confused
I mean you shared like 3 lines so idk
Post the entire stacktrace
dont question plz

Hmmm. So I have a string input that's made out of 0s and 1s. And you can basically replace the 1s and 0s with brackets. I need to tell if the string is a valid bracket sequence.
This would be valid sequences: 00100111, 100100
This would be invalid sequence 011001
first checks I made is for the string length to be even and then made sure that there's an even number of 0s and 1s. but how would I proceed from here? because it still doesnt count stuff like this one 0101 for example.
why is 011001 invalid?
oh, because there are 2 )'s?
ok
easy
use a stack
actually you dont even need a stack
im confused
literally just an int
why can't you just check if there are an even number of 1s
011001 = ())(()
theyre the same number but unbalanced
0 = (?
the last opened 1 is not closed
no no
my bad
didn't explain it well
🥴
oh
well actually 11 = []
that makes even less sense
yeah yeah I know. I got like 30 questions on my assignment already written down. this teacher has no clue how to explain the homework lmao. he's like tell me if the answer is wrong or right and then tell me what does it mean to be wrong or right lmao
I think I'll just give up for now and ask the teacher monday
oh wait
Hmmm. So I have a string input that's made out of []s and ()s. I need to tell if the string is a valid bracket sequence.
This would be valid sequences: []([])(), ([])[]
This would be invalid sequence [()][(
first checks I made is for the string length to be even and then made sure that there's an even number of []s and ()s. but how would I proceed from here? because it still doesnt count stuff like this one [(]) for example.
can't you just check if they're both even?
problem is that it doesn't actually say 1 is [] and 0 is () it just says it represents brackets... thats all
wait is 0101 valid or invalid?
Id assume its invalid. but anyways forget about it. its too messed up
ik but i was just using it to help me see the task
the question
assume 
yeah... as I said pretty bad teacher
so, let's just say 0 = (), 1 = []. is that ok?
aw cmon bm
i already wrote it with 0 = [] and 1 = ()
☹️
yeah ik
well that's the problem. we don't know. its just what I remember from the class. but it might not be that. I'll just ask the teacher.
i just wanna make sure that's right
oh
I remember in class we did something similar where 1010 would be [(])
and the overall problem is checking if that bracket string is "balanced"
this is just a mess overall. theres problems that just tell you to work on numbers and don't tell you what type of numbers. like it could be doubles, it could be integers, it could be unsigned integers. as I said I already have 30 questions about this homework to ask xD
woozy face
ok
well
you can probably do it with a stack, but if you don't know what the problem is then i sure don't
oh also. one more thing lmao. can't use arrays or lists at all
like any collection at all
and the input can maybe be a string or just be 1 read line for each character. not even that is explained
yeah
like at least the other teachers just steal the questions from books and stuff
this guy makes the questions but its a mess
lmao. I have a teacher that basically told us shes learning with us bcz she has no idea what shes doing. apparently its her first year
thats uni in Romania for you
well school in general
fun
we had that too tbf
our latin teacher was just reading the textbook, a few weeks ahead of us lmao
another teacher also works as a medic so she's never coming to class but she told us to be present every time otherwise ... she never told what happens if we dont go. but I never went xD
OMG. We have a teacher that does that during the class. Like actually just has a book and thats all we learn. what she reads xD
like half of my teachers don't even know what they're doing,
its fun
fortunately not. at least not for this year. we'll see how I do in my exams lmao
got in one of the free spots bcz I had ok-ish grades
that's good ig
well. didn't get in the free spots at first but the thing is, that free spots are distributed across all profiles and other profiles got no students at all so they redistributed those spots to us
To be fair, the only reason I went to uni is the degree. I was aware that the school system here is fucked so didn't expect much than I currently get
@half harness what u doing?
coding & testing
wanna take a break?
uhh
xD
Dkim they brackets / parenthesis just have to be next to each other?
ask blitz 🥲
lol
and probably will come back to ask here after
What's the question?
dw about it master. its messed up. like most questions in this assignment. very unclear instructions

xD
If I distribute a lib under LGPL, does a person who shades my lib have to make their code LGPL as well?
Are there any benefits of using Github packages over Jitpack?
Cause it feels like almost noone uses Github packages
both bad imo
iirc github packages require auth - which I still don't know how to setup so I just download the jar from libs that use github packages lol
and jitpack requires creating a new github release for each version
im pretty sure
and jitpack is limited
for simple libraries jitpack is fine though
since mvn central/hosting a maven repo for the first time is not easy
You can also use commits but yeah it's pretty shit
o
wait
but wouldn't you need the commit id 🥲
wait are tags git or github?
Yeah jitpack lists all commits there and you can choose one as the version
ah
Is it worth submitting a small lib that (realistically) only I will use to Maven Central?
imo depends on how often you're going to update it
but probably not
True, will probably start on jitpack, then move to maven central if it gains enough mass
hi
I'm the owner of a minecraft-centric Discord bot. It doesn't currently have that many features (they're currently focused on skins), so which features would the mc community like to see?
Roles by stats in servers like hypixel or something
Oh, good idea
is it possible to make a calendar claim daily plugin using deluxemenus?
I believe so, yes
do you have any idea how
Problem is, Its hard for me to explain but i can show you it. 🤣
just send me an example code or show me
Ummm, Cant really show you or send anything at the moment. Due to im really busy and Working on something for a client.
when can you
how do I use Applicative with new version of Arrow KT (1.0)?
their docs say Option.applicative() but that doesn't exist
ooh kotlin 1.6 came out
i wonder what was added 👀
are the changelogs even out yet ;-;
sorry for ping #2 but @gusty glen do you know how to use exposed gradle plugin?
i at least want to try a bit more before using raw sql because i have 0 experience in sql 🥲 (yesterday was my first day of touching sql lol)
me = smol brain
and i remember u saying that the issue fixes (but rarely) with this plugin
but as far as i can see all it does is instead of configuring the db in the code it configures in build.gradle instead 🤔
build.gradle.kts: https://paste.helpch.at/rimenidano.js
what task do u run? or is it just shadowJar?
since i assume u need the exposedCodeGeneratorConfig for gradle generateExposedCode
but you don't have it
I stole grabbed this build gradle from the project I used Exposed, just shadowJar, just pay attention for the kotlinRelocate on the shadowJar task
whats the difference between kotlinRelocate and relocate? and am I supposed to relocate or kotlinRelocate kotlin? (since the line relocating kotlin is commented out for yours)
the other guy suggested using kotlinRelocate for all relocates in case you get this issue https://paste.helpch.at/okeroqiciw.md, but tbh I didn't even bother testing it, since it wasn't gonna work, probably
kotlinRelocate passes through an special ASM parser made to relocate Exposed resources
no idea what ASM is but im assuming it also relocates stuff in Exposed that shadowJar normally wouldn't?
yes it should
ASM = library to manipulate java bytecode, very low level
haha, my secret method was exposed to the internet
i couldn't figure out how to do this so I just ended up going back to build.gradle
unable to resolve class com.jetbrains.exposed.gradle.plugin.shadowjar.kotlinRelocate
uhh
:/
secretx u have any idea?
🥺
did you add its gradle plugin?
yes
could you paste it on paste.helpch.at?
you're missing the very first line of the build.gradle I've send up there
you need to manually add that line in most cases
It just ended up giving this error
and com.jetbrains apparently didn't exist
It might only be compatible with KTS dkim
welp this is going to be like the 3rd time xD
haha, at least now you have a working example of how to copy the jar and how to parse the resource placeholders
mhm 
also why do you delete your plugin.yml from the build folder?
just randomly stopped updating itself
and i didn't want to clean on every build
so
oooo I had that
👀
I know a better way of fixing that
how do i fix?
the second line of this snippet forces the update, so that bug never happens kt tasks.processResources { outputs.upToDateWhen { false } val main_class = "${project.group}.${project.name.toLowerCase()}.${project.name}" expand("name" to project.name, "version" to project.version, "mainClass" to main_class) }
I need to studyyyy, ping me if you can't import kotlinRelocate, I'll be back to Anki
alr
ty
what issue?
.
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
oh wait
yeah
cool
don't send screenshots
of text
especially blurry ones
I can't read anything there
copy it and paste it here:
?paste
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
yep it imports now - but doesn't work :( ```
Can't relocate from org.jetbrains.exposed to me.dkim19375.coolplugin.libs.org.jetbrains.exposed as it clashes with another paths: org/jetbrains/exposed/
Caused by: java.lang.IllegalArgumentException: Can't relocate from org.jetbrains.exposed to me.dkim19375.coolplugin.libs.org.jetbrains.exposed as it clashes with another paths: org/jetbrains/exposed/
I got some trouble with some artifact stuff. Uploaded my first artifact here: https://pulsebeat02.jfrog.io/ui/native/pulse-gradle-release-local/io/github/pulsebeat02/emc-installers
I added the repository with url https://pulsebeat02.jfrog.io/artifactory/pulse-gradle-release-local/
Then added artifact with "io.github.pulsebeat02:emc-installers:v1.0.1"
But it says it cant find it
Is #dev-general the new #development ?
just tell plz
Please don't ping me. I'm busy atm
ok
managed to fix the issue
that is the issue that the other guy had in my exposed issue thread, go check the solution he provided and see if it works for you
in c# Array#toString returns the type. this is fun
Doesn’t it do that in Java also? Or well along with the memory address thingy
Hello turbo smart devs,
I'm taking a course called "Advanced Programming" at uni this year and the first two classes were tough. We had to solve problems from programming contests such as ICPC and I realised I'm super bad at this kinda stuff.
I plan to do some challenges from reddit every now and then and maybe participate in an event like advent of code.
Do you have any other tips on how I could get better at this kinda stuff?
(average smart devs may reply as well)
it might. idk. I just know that I wasted 5 minutes of my life trying to figure it out. yes long time 5 minute
Yup
js wut????
Don't you love JS?
No. I do not.
I wonder what actually is going on there
yo how can I get the name of an entity by String, im trying an dying inside, getName is also deprecated.
This is what i got so far
@EventHandler public void onPlayerHit(EntityDamageByEntityEvent e){ String ent = e.getEntity().getType().getName(); DEPRECATED e.getDamager().sendMessage(ent); TRYING TO FIGURE OUT WHAT getType() RETURNS boolean check = this.getConfig().getBoolean("entities."+ent+".check"); if (e.getDamager().getType() == EntityType.PLAYER && e.getEntity().equals(this.getConfig().getString("entities."+ent)) && check) { e.setCancelled(true); e.getDamager().sendMessage(Objects.requireNonNull(this.getConfig().getString("entities." + ent + ".message"))); } } }
Config
entities: villager: check: false message: "Non puoi uccidermi, smetti di colpirmi >("
I want the users to set as much entities they want from the config so I check in there with e.getEntity().equals(this.getConfig().getString("entities."+ent)) but getType does not return a string so I added getName
alr
nope doesn't work
:(
looks like it didn't work for u either
🤔
um
Hey, so I've been messing around with fake blocks using spigots sendBlockChange and I'm looking for a way to detect when a player clicks these fake blocks.
I've been able to disable right clicks to prevent them from going away but I need to do this only for the select blocks. Just really need the cords and maybe material. Is that possible with what I have? Just looking to be pointed in the right direction.
getServer().getPluginManager().registerEvents(this, this);
protocolManager = ProtocolLibrary.getProtocolManager();
protocolManager.addPacketListener(
new PacketAdapter(this, ListenerPriority.NORMAL,
PacketType.Play.Client.USE_ITEM) {
public void onPacketReceiving(PacketEvent event) {
Player p = event.getPlayer();
if (event.getPacketType() == PacketType.Play.Client.USE_ITEM) {
event.setCancelled(true);
i++;
p.sendMessage("Use Item event fired! " + i);
}
}
});
@old wyvern Yugiii my PR for SlimJar 
Ben Dover
IMMATURE
yes
yugi when slimjar on central or repo back up 🥺
u die
does anyone else start to work on a project and then end up procrastinating most of it and after a couple hours get very little done?
i only do that if i run into issues and can't get it fixed
¯_(ツ)_/¯
yes. every true developer does this
dkim is not a developer so don't mind him
i started working on a plugin that was a replacement for the vanilla enchant table and now im trying to make a box system that stores all the items that could be lost from custom inventories cause i didnt want to just drop it on the floor
and then ended up rewriting half of it and now i have a project that wouldnt do anything cause i havent got it working yet
also i tried to organize my code and ended up making a bunch of little classes that do small tasks and just interwiring them together and now im stumped and bored and going back to watch youtube about game design
i have no clue how people come out of it with a viable project
quite happy that im not the only one
i might just scrap the box since its more trouble then its worth and ill come back to it another time
🥲
i need to stop overcomplicating things
r/woosh
r/woosh
woosh/r
R /woosh
assert 👀
♻️
LIES
Error: AssertionException
can you talk about server developement in this channel or is it just for coding related stuff?
coding related stuff
i still don't get why #development isn't named #coding 😖
so would #minecraft be the place to talk about server development?
either that or #placeholder-api, #general-plugins, or #general-plugins-2
its just cause i was in the planning stages of a server i wanted to make and those seem more plugin help sorta thing instead of actual design talk places
hmm
yea i think u can ask in #minecraft
although most of the active members here code rather than manage a server
i mainly wanted to brainstorm a couple ideas and make some sort of prototype just to see if i could do it rather then release publicly
because public servers are a bag of snakes that i dont want to get into really
i just wanna code some stuff and see where it goes
and also wanna look at nms and see what packets i can modify
also looking at the wiki.vg site gives alot of info on the packets but not much on how to actually go about manipulating them
what mc version?
currently 1.17.1
https://github.com/dmulloy2/PacketWrapper/tree/master/PacketWrapper/src
note that it might not always be correct, but you should be able to identify the mistakes
i wouldn't recommend copying/pasting the classes
i just look at how packetwrapper does it and do it on my own 😌
btw does a mc developer write that?
or does someone decompile mc
packet manipulation has nothing to do with the packet stream spec (so neither with wiki.vg), and how you achieve that also depends on the platform you use, it's not the same for bukkit than for fabric
it's all reversed engineered
very
especially before deobfuscation mappings were released
because the spigot api atleast doesnt allow me to put any random itemstack on my head i wanted to figure out how to do that, and packets are the way to go it seems
I'm fairly certain you can do that lol
^
i mean click on the slot
inventoryclickevent not enough?
inventoryclickevent doesnt fire when you take for instance a stone block and click your head slot
hm
wdym
like place a stone on ur head slot?
it does
helmets or player heads work
but no event is fired when i try to do that with any other items
it fires when i take it off but doesnt when i try to put it on
im going to figure out how to make a wrapper that console logs every packet that gets sent and received
that's gonna get really spammy real fast
i've made that before 
ill just use ProtocolLib
its not that hard - protocollib PacketType has a thing that lets u get all incoming packets
just filter out the move packets and stuff
I got bored and wanted to do some gui stuff. So I made a log file reader:
Wdy guys think? 🙂
Kotlin/TornadoFX which is a Kotlin Framework on top of JavaFX
Aha! I'm also not sure if it's just me but it looks somewhat difficult to read stuff there since a lot of information are displayed within close reach
I have no trouble reading it on my Screen, it looks different from what Discord shows in the screenshot though
perhaps I just got used to it, idk
i believe it's just discord
Hi there, I have several questions about loading/storing datas on database:
My plugin saves datas for each players connected on the server every 5 minutes from the player connexion but:
-
Isn't it better to save the data of all players connected at the exact same time ?
-
In that case, shall I keep the desync data save?
I would save at 5 minute intervals based on server time rather than player connection time
it just makes coding it a bit simpler too
You can do batch updates then too
That means I should save all players simultaneously ?
If it’s async yeah
You will just idle out that separate thread for a bit but otherwise no issues really ever occur
Make sure to make your onDisable a main thread save
Ok I use async by default, I should add it sync on onDisable
Yes
You need it to block onDisable
CompletableFutures are nice here
You can have it async by default or force it to block when you need
Ok thanks !
oh @half harness btw. the 1 and 0 problem turned out to be just 0 = ( and 1 = ) lmao ...
Kotlin 1.6.0 just released (10 hours ago)!
cool
Just saw that.
Just updated one of my projects to it and my jar size went up over 1MB and then I realized my old jar was minimized and I forgot to minimize the new one. Got scared for a second.
I'm a unique Discord bot created especially for HelpChat.
I was created and I'm maintained by @pallid gale with support from the Staff team.
I'm created in Javascript using Discord.JS
At this stage I'm closed source due being a mess and some secret internals. However you can contribute to my links/version knowledge here.
Lmaooooo. I got scared reading the first part of your message
intellij no like kotlin 1.6.0
and discord doesn't like sending messages
this is fun
oh now you send
Kotlin 1.5.31 and earlier had issues with kapt when using Java 16 or later. Kotlin 1.6.0 was supposed to fix it. Haven't tested though
oh did they say they'll fix it in kotlin 1.6.0? I didnt know
oh wait nvm... I Knew that lmao
I had to use the release candidate for Krypton lmao
yeah. its fixed. it was fixed in the release candidate as well
Dw they think they are the cool kids
based
Wow
so bad
Answer (1 of 12):
I was playing around with several cubic representation problems in the style of previous work by Andrew and Richard Guy. The numerical results were fascinating…” (comment on MathOverflow)
This is how Allan MacLeod, a retired mathematician, stumbled upon this equation just a f...
Petition: Rename #dev-general to #kotlin-general
I can
can someone help me? I got a new extended storage devise for my computer and I have set it up and it appears on my files and it works as I have tried installing a game on it but there is an application I'm trying to download on there but it download on my normal storage which is full and cant download it is there any way to make it to download it on the extended storage device?
what app are you trying to install?
adobe premiere pro
are you setting the correct drive in the installer?
yes
I put the place to install as my extended storage but it keeps trying to install on my normal storage space
:objectively-no-kotlin:
is there no actual way to modify a final field past java 12 without adding extra commandline parameters?
if it isnt static, then no
it gets inlined iirc
That should be possible
I don’t know if reflectively setting the field’s value would overwrite it, but if not then I guess good ol’ Unsafe
I'm currently trying unsafe to see, using reflection was a no-go
I believe it's only static final fields that get inlined
Yeah nvm my life is a like lmfao. i just realized that is an anonymous class
yeah it would be real hard for that class to get inlined lol
i originally thought of unsafe but i didnt know if it'd work
well we're about to find out
I will yeah
hm I couldn't even access Unsafe
java.lang.IllegalAccessError: class dev.rosewood.rosestacker.nms.v1_17_R1.NMSHandlerImpl (in unnamed module @0x3ee60427) cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @0x3ee60427
Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe");
unsafeField.setAccessible(true);
unsafe = (Unsafe) unsafeField.get(null);
It doesn't look like it was the reflection that failed but simply trying to use the Unsafe class
that was with the jdk.internal.misc.Unsafe class, I'll try the sun.misc.Unsafe one and see if that's any different
Yeah try the other one
oh my god it worked
Yeah i read a post online regarding it
cause one is exposed
but the jdk internal one isnt
can you show the code lmfao
Kk ty
iirc only primitives get inlined 🤔
primitives and strings I believe
yea i just wasnt clear what the final var was
Field field_SpawnerBlockEntity_spawner = ReflectionUtils.getFieldByPositionAndType(SpawnerBlockEntity.class, 0, BaseSpawner.class);
Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe");
unsafeField.setAccessible(true);
Unsafe unsafe = (Unsafe) unsafeField.get(null);
long offset = unsafe.objectFieldOffset(field_SpawnerBlockEntity_spawner);
unsafe.putObject(spawnerBlockEntity, offset, new StackedSpawnerTileImpl(stackedSpawner));
|| naming conventions 🙃 ||
I purposely name my reflection variables terribly like that so I can actually read them
and also just cache unsafe ig in general if u havent done it
yeah it is cached I just put it all together there for you
mhm thx
complain about my reflection variable names all you want lmao
💀
that reflectionutils thing is because I use mojang mappings so the fields end up having different names during runtime
can't be bothered trying to switch between the two so I just look up fields based on type and position
Huh interesting someone forked my lib and committed "changed reflection naming to be more readable" and they also named the variables like that 
A dude called "evernife"
that is kinda similar
mine goes reflectionType_className_fieldName
reflectionType being field/method
I do it purely for readability even though I know it goes against conventions
anyway glad I can do this with unsafe at least for java 16, going to hope 17 also works since 1.18 is using java 17 confirmed now
poggers
Lmao
Discord mobile is nearly unusable on android right now
ever since a couple months ago performance has just plummeted
It has been fine for me, but yeah it's always buggy
I literally havent noticed anything lol
do you use a phone made within the past 2 years
I use an LG G7 ThinQ and it's so incredibly painful to use discord
going to be getting a new phone at the end of the month though so hopefully it'll be better after that 
Ya, its a really cheap 70$ one or smth, basically cant run games, but discord seems to work fine
I blame discord 
lol fun
Ive like never updated any apps on it, so i could also just have an outdated version of discord
idk
That is definitey possible, one of the versions did make it worse
final instance fields with a primitive data type inc String would also get inlined iirc, where the value of the field is known at compile time ofc.
DkimCord™️
Oh cool, what did you make that in? the browser?
now make discord v2
app - Jetbrains Compose
jetbrains
=
@half harness, Help menu!
best
I hate your nick, im sorry...
ok barry
@forest pecan, Help menu!
whats that?
Now that’s a bit too far
Dkim making Discord 2?
=
@humble silo, Help menu!
=
@humble silo, Help menu!
messages pls send
gotta do it before TriumphCord exists 
Lol

It cant be taken back now
=
I guess no 🍉 for you then
@humble silo, Help menu!
shut
🥲
=
@steel heart, Help menu!
jeez this took ages to upload
Wth
Repository for miscellaneous repository management and discussions: https://github.com/revoltchat/revolt/discussions - GitHub - ipsk/triumph-cord: Repository for miscellaneous repository management...
Done
😠
lol
smh dkim
Lmao
https://i.imgur.com/YBDKEDr.png 🤔 interesting alt name
Dkim cancelled
lul
Yeah i deleted it xD
👀
Last time I checked you were 12 
Pulse is a baby
Yeah lol
Both are 😔
@forest pecan, Help menu!
Kotlin Karen lol
I guess gradle kotlin dsl kinda hits the vibe
i use kts
Hmmmm
Dkim is fluid, one day it's one the other it's other
🥰
lol
👀
You got some baby hairs growing
🪑
🍼
🥲
Ur mom
One only becomes a true adult when they contribute to the jdk
Shi, I might postpone that then… not ready for true adulthood
Emily!
Same tbh, i don't want adulthood
🤮
D:
Wildcard imports 
eww
less lines = faster code 
- They slow down compile time, and it's not precisely negligible
- Like it or not, you're gonna have ambiguities
- They suck, get over it
do you know what else you can suck
sucl
Sucl
SUcl
import *
You could consider that to be the case already, since you don't have to declare imports for classes in the default/"unnamed" package 👀
Maybe, or it imports every possible class from every possible library in existence and causes a blackhole
It probably wouldn't have enough energy and would just disappear 
sad

I don't remember using any features exclusive from ultimate edition, my workflow was the exact same when I got it, been the exact same when it expired
Only thing i really use is the database integration
I did try using it once
It was, meh idk
I used it once for a reason lmao
The only thing that achieved mostly was "data source not present" "errors" all over the place lmao
Netty is an asynchronous event-driven network application framework
for rapid development of maintainable high performance protocol servers & clients.
o
Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server
but https://ktor.io/docs/engines.html which one should i use?
someone called me?
🥲

:Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning:

:Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning: :Warning:

:Warning:
smh @compact perch do a better job moderating
Barry is the victim here
Cursor-chan... where ya goin??? 😦
lmao
Idk. I'm more attracted by that keyboard sound rn
yes
Lmao
Ok I guess time to fallback to swing for the textbox
😷
😷
Even better...
fun includeProjects(vararg names: String) {
names.map {
include(it)
return@map it
}.forEach {
sanitizeSubProject(it)
}
}
Does there exist a cleaner way of doing this? Yeuhah I'm new to kotlin lol
fun includeProjects(vararg names: String) = names.onEach(::include).forEach(::sanitizeSubProject)
@steel heart
oo thanks
oh. 1.18 will require java 17. cool
W
what the fuck
how can i add my public ip on oracle cloud to my vm?
it appears that the machine doesnt have it
@quiet depot how do i add my own javadocs to a docdex instance?
everything in the config looks predefined
Dont you just add the javadoc jars on a folder and they will be loaded or whatever?
you're talking about latest showccase?
the past of the past one
dunno how its said lol
oh coins?







