#dev-general

1 messages · Page 595 of 1

half harness
#
setObject(0, 0x20) // Entity data - invisible
setObject(10, 0x01 or 0x02 or 0x08 or 0x10) // Armorstand data
``````java
setObject(0, 0x20) // Entity data - invisible
setObject(10, 0x01 | 0x02 | 0x08 | 0x10) // Armorstand data
```anyone know what im doing wrong? (<https://wiki.vg/index.php?title=Entity_metadata&oldid=7415>)
distant sun
#

| is or

#

you want &

half harness
#

wait lemme try seeing which one crashes

potent nest
#

if you use & it will always be 0

half harness
#

but im not sure why | is also not working 🤔

#

WAIT

#

i commented out that line and it still crashes

potent nest
#

(also, create constants and name them accordingly - that will make it easier to look into in a few months)

half harness
#

true - although atm im just writing this all in the command function so I didn't make constants yet - but thats a good idea 👍

half harness
#

okay so

#
setObject(0, 0x20) // Entity data - invisible
```this line is crashing it 🤔
#

hmmm

#

wait

#

no both are crashing it

obtuse gale
#

just git gud

half harness
#

D:

#

i need bardy

#

🥺

half harness
#

wait

#

yes

static zealot
#

I won't wait

#

fuck you dkim

half harness
#

D:

half harness
#

🤔

static zealot
#

great

half harness
#

i think i know the issue

#

nvm

forest pecan
#

dkim life be like

potent nest
#

i mean it sounds odd that the method is called setObject but you're giving it an int

half harness
#

wait

#

int?

#

it has to be byte

#

uh

#

wait

#

im confused

potent nest
#

or well, byte

half harness
#

plus this is in the crash report

potent nest
#

lol

#

look if there is a setByte method, otherwise cast the number to a byte

half harness
#

nope just setObject 🤔

potent nest
#

setObject(x, (byte) z) should work then I guess

half harness
#

YES

#

TY

#

finally after an hour

#

😤

#

wait

#

YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS_ _ _ _ _ _

static zealot
#

👍

half harness
#

:D

static zealot
#

just another conversation with dkim. lol

potent nest
#

lol

half harness
#

new issue

#

if i move too fast the hologram doesn't catch up to me

#

D:

#

should i just spam teleport packets

#

atm im doing move & look packets

static zealot
#

how about you tell me what private server you're on?

half harness
#

oh right i changed the domain

#

🥲

static zealot
#

why?

#

all this time I thought you just didn't want me to see

half harness
#

domain expired

#

oh

#

D:

static zealot
#

lamo. you ain't got github pack?

half harness
#

i do

#

plz no ban for advertising

static zealot
#

banned.

#

lmao

half harness
#

😭

static zealot
#

cool. no whitelist

half harness
#

i added u to whitelist

static zealot
#

wrong name maybe?

#

or is it offline mode?

half harness
#

wait

static zealot
#

there we go

eternal compass
#

not gonna spam #showcase because I'm nice, but finished the discord slider fingerguns

static zealot
#

@jovial warren mind if I just rip off your bardy bot and add its functionality to my private bot? xD I can't deal with lavaplayer rn

eternal compass
#

thanks

#

and I change the values 1/2 way through

#

because fast refresh fingerguns

#

gotta come up with more UI components to copy

#

that make for good panels

#

(since this is meant to be for a discord bot panel)

static zealot
#

buttons

#

or did you do that and I just don't remember seeing in #showcase ?

#

bcz from what I can see you don't even have a way to add buttons using your embed creator thingy

eternal compass
#

forgot about those things

static zealot
#

just exposing @half harness

half harness
#

D:

jovial warren
half harness
#

@static zealot why 😠

#

wait

static zealot
#

lmao. I love banning dkim from his own server

half harness
#

@static zealot

static zealot
#

asked?

half harness
#

me

static zealot
#

lmao

#

you deserved that

#

going to play some bw now

#

join if you want

half harness
#

alr

static zealot
#

we can play the halloween one

half harness
#

halloween?

static zealot
#

yes

half harness
#

ooh we should do parkour

#

😋

static zealot
#

I suck at parkour

half harness
#

D:

#

ok

#

i need to work on this holo thingy tho

#

1 round?

#

:)

static zealot
#

what parkour?

sick belfry
half harness
#

magic

sick belfry
half harness
sick belfry
half harness
#

lunar client is a custom mc client

#

eliminates the forge mod loader so its pretty fast 🤩

sick belfry
#

ik ik

#

I was saying the mod that makes the chat work

#

nvm custom one

half harness
#

uh

#

you can't use any other mods besides the ones already included in lunar

sick belfry
viral grove
#

Hear me out: Minecraft plugin development, but with Python /j

steel heart
sick belfry
prisma wave
eternal compass
#

eww

sick belfry
#

sooooooo

#

have a question

obtuse gale
#

ok

sick belfry
#

for doing discord rpc on minecraft mods, what fucking library should I use? and if I use Jagrosh's one (the one that Origins Enhanced uses, dont ask lol) why the fuck I cannot get it working?

tame bane
#

ahh i need a builder that can build a small spawn fast

#

i cant find one

#

bruu

sick belfry
tame bane
sick belfry
obtuse gale
gentle sparrow
#

In a world too often governed by corruption and arrogance, it can be difficult to stay true to one’s philosophical and literary principles

obtuse gale
#

hey

#

you

#

what are your opinions on anarcho-capitalism?

dawn hinge
#

@gentle sparrow

gentle sparrow
#

Yes?

gentle sparrow
#

People relying on their inner beliefs for moral guidance rather than socially acceptable beliefs

#

Society would devolve into a giant power vacuum and a bloody multi sided war for control

#

And there’s no confirming that the winner is the most morally ethical person

#

That’s a rather specific question though

#

May I ask why you raised it?

obtuse gale
#

are you familiar with someone that goes by the name of "Titanic"?

gentle sparrow
#

I can’t say I remember any encounter with someone like that

ocean quartz
#

Could one have an encounter with themselves?

gentle sparrow
#

Of course they could

#

It’s important that everyone takes time to reevaluate and reassess their stances

#

While talking with others can sharpen your beliefs since you take into account things you hadn’t thought of before

#

Thinking about them by yourself can make yourself certain they represent you to the best they can

obtuse gale
#

Thank you for your words

sturdy zinc
#

what's the maven dependency for placeholerAPI?

obtuse gale
#

is it possibel to have a world that's only in memory and doesn't take up a folder anywhere?

half harness
old wyvern
#

I think he means Minecraft Java Edition

#

Did google stop working for anyone else?

static zealot
old wyvern
#

Yea its fixed nope

#

The search engine stopped working for me for like 10-15 mins

half harness
static zealot
#

Dkim missed that "and""

distant sun
#

I just found out something cool about yaml, if you use the same list or object in two places you can make it shorter with anchors

list: &some-anchor
- value
- value
- value```
Which can be reused with `key: *some-anchor`
distant sun
eternal compass
winged oyster
sick patio
#

Interesting

eternal mica
#

does anybody know what " curl: (2) Failure establishing ssh session: -5, Unable to exchange encryption keys" means

#

I'm using a FTP action deploy and its not working for this specific host, but it is working for other hosts. It was working on this host before though and then randomly stopped working

#

and yes i've tried googling it please ping me if you respond. thanks

wintry plinth
#

Doesn’t FTP not use SSH keys? I thought that was SFTP

sturdy zinc
heady frost
#

The repository URL should be https iirc

sturdy zinc
#

I got this from PlaceholderAPI wiki to setup expansions

static zealot
#

also. papi is 2.10.10 now Ironic

#

so do it https instead of http and get the latest version

sturdy zinc
#

yes I know, it will not let me use 2.10.10

heady frost
sturdy zinc
#

I copied and pasted, so not sure how I got it wrong

static zealot
#

when did you copy it? before it used to be http but its been updated for months now

sturdy zinc
heady frost
static zealot
#

that's an old wiki

#

lmao. I was bout to do a screenshot pointing to that as well

sturdy zinc
#

Cannot connect to the Maven process. Try again later. If the problem persists, check the Maven Importing JDK settings and restart IntelliJ IDEA

#

I resetarted IDE and it's downloading now

static zealot
#

wow. imagine listening to what the warning says and it working. xD

sturdy zinc
#

2.10.10 still in red, but 2.10.9 works

#

I rebooted last night and it did no good, this fork has been a nightmare most of the maven lines didn't work

sturdy zinc
#

only got one more to figure out I need the maven info for groupmanager

#

oops forgot about McRPG

gusty glen
#

did you know you can use generics this way in java? java public void <T extends Event & Cancellable> cancelThis(T event) { event.setCancelled(true); // do other thing with our event T } kt version kt fun <T> T.cancelThis() where T : Event, T : Cancellable { isCancelled = true // do other thing with our event T }

obtuse gale
#

Yep, it's p sick

#

I think they are called "intersection types" internally

#

Or at least that how the compiler api exposes them as

gusty glen
#

almost an union type, but without union :/

obtuse gale
#

Union types exist too, they are used for example in multi-catch blocks catch (IOException | SQLException e)

#

We are used to a very basic notion of "types" tbf

prisma wave
#

puny type system

#

you should try a language with a REAL type system

#

like python

obtuse gale
#

please get out

#

hand me your "support" role

#

😷

old wyvern
obtuse gale
#
var obj = new Object() {
  int i;
};

obj.i = 123;

v pog

eternal compass
#

oh the fact that its not a custom class?

obtuse gale
#

yeah

eternal compass
#

ig its an inferred type

obtuse gale
#

it is, hence the var

eternal compass
#

actually kind cool ngl

eternal compass
obtuse gale
#

heh

eternal compass
#

right

#

when was var added?

#

and is it good to use?

gusty glen
obtuse gale
#

9 I think?

eternal compass
#

oh hm

#

never seen it before

obtuse gale
#

or 10?

gusty glen
#

Java 10

eternal compass
#

only objects?

#

or primitives too

gusty glen
#

I think primitives work too

obtuse gale
#

it's just type inference for local variables

#

any variable

eternal compass
#

aha

obtuse gale
#

it compiles down to the type known at compile time

#

wow what did i just say

#

it compiles down to the type known at compile time

#

i'm a genius

ocean quartz
#

Var for fields wen? ugh

obtuse gale
#

var for fields bad

#

dependency inversion principle

ocean quartz
#

No, you bad

obtuse gale
#

WHAT

ocean quartz
#

YES!

obtuse gale
#

?ban @ocean quartz

eternal compass
#

I'm trying to make a tournament API for myself to use (to manage the data, connect to MC servers, and have a discord bot attached).

I feel like this isn't enough data, but I guess it is?
is there any glaring part of a bracket tournament this is missing

#

(for internal use only)

ocean quartz
eternal compass
obtuse gale
eternal compass
#

no

#

noo

#

nooo

#

this is turning into Javascript

obtuse gale
#

lol

#

the decompiler just doesn't know how to reverse it, but it is obviously known in the bytecode as it is just an additional class file

eternal compass
#

wtf is tat Bytecode?

obtuse gale
#

yes

eternal compass
#

I tought it would have more raw bytes, less text

obtuse gale
#

well that's how IJ shows it lol

eternal compass
#

a

obtuse gale
#

it's obv just a bunch of, well, bytes

eternal compass
#

damn I thought I broke my h key just now

#

it wasn't working

#

and I just changed all my keys out

obtuse gale
#

a

eternal compass
#

tat

eternal compass
#

ah

#

I challenge you to write something in bytecode

#

anything

#

even just a sysout

obtuse gale
#

watch me

eternal compass
#

okay. I will.

ocean quartz
#

It's actually not that hard

eternal compass
#

spigot plugin in bytecode wen

#

`

obtuse gale
#

learning bytecode and the class file format is actually a very interesting thing in my opinion

#

`

eternal compass
#

I was fixing my keyboard

#

and accedently pressed enter

obtuse gale
#

accedently

eternal compass
#

yessir

ocean quartz
#

Yeah, i read a bit of it on the java website it's quite interesting
`

obtuse gale
#

yes this is the server you cannot make a single typo

eternal compass
#

hwat?

#

hm?m wh'yed yuo raect with the :sukll: eomj?i

half harness
#

sending 40000+ (i think) packets per second to a player is probably the reason why i have 200ms ping on my local server, right?

#

🙃

half harness
# gusty glen just... why...

20 ticks per second hologram updating

rn 1k holograms (and 500 cows which I link the hologram to that displays info about the mob)
each update i teleport the hologram to the mob and set the name to updated info - which I should probably avoid doing every tick

#

but still even if i forget the renaming exists i need to teleport the hologram every tick - which is still 10000 packets per second

#

i think

#

since that's 500 packets per tick and 500 cows

gusty glen
#

I'm curious about why display holograms using cows

half harness
#

nono the holograms are armorstands

sweet cipher
#

What are you doing?

half harness
#

but there are 2 holograms linked to each cow

#

which display information about the cow (health & mob name)

sweet cipher
#

Can names not use multiple lines?

half harness
#

no

#

u have to use scoreboard stuff

#

but i have 0 idea how to use them

#

i did this without packets without the excessive ping (well, I never checked the ping but i assumed that it wasn't 200ms).. idk why using packets is making me have 200ms ping

#

im not sure how i could optimize this though

#

since i have to send a packet for each entity

half harness
#

oh no what is it

#

👀

sweet cipher
#

line 28

half harness
#

HEY

#

HEY

#

I THOUGHT WE WERE OVER THAT 😭 _ _ _ _

#

lol

sweet cipher
#

They use it in the whole project lol

half harness
#

💀

obtuse gale
#

@half harness just out of curiosity, are you sending the packets on the main thread or not?

sweet cipher
#

It’s for a fake player

half harness
#
val holo = HoloPacketData(Int.MAX_VALUE, player.location, Vector(0, 0, 0), setOf(player.uniqueId), "&cEpic Hologram"))
holo.spawn()
holo.move(player.location.add(0.0, 5.0, 0.0))
holo.teleport(player.location.add(0.0, 5.0, 5.0)) // different packets
holo.setVelocity(Vector(0, 5, 0))
holo.setName("&aGreen Hologram now!")
holo.remove()
```i'm finally packet hologram pro 😎
old wyvern
sweet cipher
static zealot
half harness
gusty glen
half harness
#

I used to though so i have it shaded, but not anymore

#

oh wait

#

my jda lib uses coroutines i think

#

but still, is it supposed to just say parked 100%

obtuse gale
half harness
#

makes it look like my plugin is the laggiest (on the cpu) compared to the others D:

obtuse gale
#

Not for modifying

static zealot
#

I just said why they do it

obtuse gale
#

it's fucking dumb

half harness
#

interesting if statement

#

lol

obtuse gale
#

fuck that

#

If you un-cancel events you deserve to be brutally murdered

static zealot
half harness
#

without the if statement

static zealot
#

bccz.

#

that doesnt make it interesting dkim

#

just stupid

#

that's why all my homies are not using HD anymore

sturdy zinc
#

I have 22 maven dependencies that worked before I invalidate the caches I took them all out and placed them back in one at a time, I need to know hao to make them work again, did I update something I should not of?

steel heart
#

Holy moly

#

What issues are you getting?

sturdy zinc
#

I only put in one of the dependencies to get that

steel heart
#

Can you post entire pom?

steel heart
#

I don’t know if this has a significant role

sturdy zinc
#

?

steel heart
#

But this is redundant

    <java.version>1.15</java.version>
#

iirc that’s for spring boot merely

#

Anyhow, have you ever tried gradle?

sturdy zinc
#

it was 1.8

#

nope still getting 34 errors

#

could there be something in my pom I can't see?

steel heart
#

Possibly

#

I am not a maven expert sadly, but after the invalidate and cache restart you did import it as a maven project?

wind patio
#

finally got github co-pilot

#

lets go

#

😩

sly sonnet
#

whats that

wind patio
#

do you not know?

sly sonnet
#

no

wind patio
#

you type
// Invert binary tree
and it does it for you

#

😩

sly sonnet
#

ah i have heard of it

sturdy zinc
#

and what does the GitHub Copilot do?

wind patio
#

types code for you

#

you just click one or two buttons

steel heart
#

Ai code assistant

wintry plinth
#

Copilot is insanely good

half harness
#

i wish i had access 😩

wintry plinth
#

Rip

half harness
#

do u have access?

wintry plinth
#

Yeah

half harness
#

when did u join waitlist?

wintry plinth
#

It’s so useful, has helped me a lot already

#

Many many months ago

half harness
#

o

wintry plinth
#

When they first revealed it

half harness
#

luckyyyyyyyyyyyyyyyy

#

i just joined a few days ago

#

D:

wintry plinth
#

Haha took me ages, but from what I hear the delays are much less now

half harness
#

😮

#

🥺

wintry plinth
#

So you may find doesn’t take you long, I’m guessing they’re mass accepting people now

half harness
#

how come they dont accept everyone? since it doesn't even require an application

wintry plinth
#

But it’s so useful, has genuinely helped me in situations

#

And not sure

half harness
#

hm

wintry plinth
#

Maybe it’s server strain? Not sure

half harness
#

maybe

sweet cipher
#

// finish project

wintry plinth
#

Hahahah if only

gusty glen
half harness
#

ooh interesting

#

i applied 3 days ago 👀

obtuse gale
#

I applied tomorrow

#

not that I'm gonna use it anyway

#

lmao

half harness
obtuse gale
#

this meme is from the future

#

you didn't get the reference yet

half harness
#

ah

ocean quartz
#

Time is a social construct

half harness
#

👀

obtuse gale
#

why do I remember this meme

#

2016

#

damn..

humble silo
ocean quartz
#

Right now i think it's just TS/JS

obtuse gale
#

Not strictly true

#

GitHub Copilot works with a broad set of frameworks and languages. The technical preview does especially well for Python, JavaScript, TypeScript, Ruby, Java, and Go, but it understands dozens of languages and can help you find your way around almost anything

#

therefore

#

kotlin bad

#

java good

ocean quartz
#

Do it for Java then Ctrl+Alt+Shift+K cheat the system sunglasso

obtuse gale
#

mf copilot doesn't know about record classes 💀

ocean quartz
obtuse gale
ocean quartz
humble silo
#

thats annoying

obtuse gale
#

who said it doesn't

#

GitHub Copilot is available as an extension for Neovim, JetBrains, and Visual Studio Code

humble silo
ocean quartz
#

I think i signed up like 4 months or so ago

gentle sparrow
#

Man hands on misery to man
It deepens, like a coastal shelf
Get out as early as you can
And don’t have any kids yourself

ocean quartz
#

It goes almost as deep as your quote

ocean quartz
obtuse gale
#

my god that is horrific

ocean quartz
#

Ikr lmao

#

This is actually quite cool
Idk when i'll ever use it but still quite nice

old wyvern
#

I wonder if it works fine with user-defined structures

ocean quartz
#

You can choose an implementation

half harness
#

is there any concurrent implementation of List?
if not, how come theres hashmap/set, queue, and deque but no list?

ocean quartz
#

There is ConcurrentLinkedQueue, Collections.synchronizedList, and some other external implementations

old wyvern
half harness
#

but theres no concurrent List ☹️

#

and synchronizedList doesn't have the kewl magic of the other concurrent ones

ocean quartz
#

Concurrent Collections
Besides Queues, this package supplies Collection implementations designed for use in multithreaded contexts: ConcurrentHashMap, ConcurrentSkipListMap, ConcurrentSkipListSet, CopyOnWriteArrayList, and CopyOnWriteArraySet. When many threads are expected to access a given collection, a ConcurrentHashMap is normally preferable to a synchronized HashMap, and a ConcurrentSkipListMap is normally preferable to a synchronized TreeMap. A CopyOnWriteArrayList is preferable to a synchronized ArrayList when the expected number of reads and traversals greatly outnumber the number of updates to a list.

half harness
#

i mean i was wondering if there was any from another library or smth ¯_(ツ)_/¯

#

since CopyOnWriteArrayList would copy on write

obtuse gale
#

Vector is the synchronized version of ArrayList

#

but I don't think it's much different from Collections.synchronizedList(new ArrayList<>()) tbh

half harness
#

oh

obtuse gale
#

it's also kinda old and sorta deprecated

#

it'll work fine regardless

#

the javadoc for it suggests using C.sL anyway

#

(I think)

#

yeah it's just a bunch of synchronized methods, nothing equivalent to what something like a ConcurrentHashSet would use

half harness
#

welp

#

i have no idea how the concurrent maps work but apparently its faster

#

¯_(ツ)_/¯

#

also

#

just found something out

obtuse gale
#

ok

half harness
#

if you do ```kt
val map = ConcurrentHashMap(mapOf(1 to 2, 3 to 4))
for (item in map) {
map.remove(item.key)
println(map)
}

#

😮

#

interesting

#

im always used to it erroring

obtuse gale
#

I guess a CopyOnWriteArrayList is what you're looking for

#

by the looks of it

#

ig

#

but it's kinda dumb because it's probably a shit implementation

#

oh jesus

old wyvern
#

Yea copies the entire thing on every write ofc

obtuse gale
#

this is the absolute worst thing

#

pcollections ftw

half harness
#

👀

#

pcollections?

obtuse gale
#

immutable data structures

old wyvern
#

Dkim, why do you need to modify during iteration?

obtuse gale
#

removeIf smh smh

old wyvern
#

^

ocean quartz
#

How many elements will even be in that list? Unless we're talking about thousands and thousands then copying is totally fine

half harness
old wyvern
#

A complete copy seems too much still

#

Something like a persistent list might be a viable alternative, not really sure tho

old wyvern
ocean quartz
#

YO WTF

#

Copilot actually just went insane, it literally read my mind, i was going to do alias and i typed for ( and this happened

#

This is insane

#

the alias.forEach is wrong but still

obtuse gale
#

lol

#

man

#

reactive streams are so pog

#

it's like streams but x10000 better

ocean quartz
#

Reactive streams? ;o

obtuse gale
#

From what I understand, reactive systems are outstandingly good in the microservices world we live in today

#

very functional much wow

potent nest
#

And hard to debug

hot hull
#

Debugging? What's that

wintry plinth
#

It’s just learning by code

sly sonnet
obtuse gale
#

hey, I didn't write the samples ¯\_(ツ)_/¯

wintry plinth
#

Oh I thought you wrote Java in that LOL

golden sun
#

Ayo anyone know how to do a POST via putty?

#

or a better tutorial than the shit one's I've been finding

eternal mica
wintry plinth
#

You can use Postman or Insomnia

golden sun
#

I need to

#

assignment

#
5. At http://45.79.189.210/358fall2021/hw9-5.php there is a form that will only give you a
success message if you submit a product name equal to chocolate and a price of 3.50. Your goal is to
get the success message using each of the methods below. For each, give a screenshot of the success
message as well as the command/code/raw request that you use.
(a) cURL
(b) a programming language’s web request library (such as Python’s requests)
(c) a raw HTTP request using something like Putty or Telnet.
wintry plinth
#

Oh then use CURL within your Putty instance

golden sun
#

o.o

#

i don't know if that is how he wants it

#

but fuck it

#

xD

wintry plinth
#

Hahaha

#

Yolo

golden sun
#

ooo

#

it didn't likle that

#

ohhhh fuck

wintry plinth
#

Oh you have to do them each

#

A B and C

golden sun
#

yes

wintry plinth
#

curl -X POST "http://45.79.189.210/358fall2021/hw9-5.php" -H "User-Agent: YourAgent" -d "product=chocolate&price=3.50" -H "Content-Type: application/x-www-form-urlencoded"

#

Managed to do this from mobile somehow

#

There’s your curl for that form

#

It returns success

#

@golden sun there ^

golden sun
#

impressive on mobile

#

thanks

wintry plinth
#

😅

static zealot
#

@wintry plinth random question. what font is this?

wintry plinth
#
Gumroad

A typeface designed for coding aesthetes with modern displays in mind. Delightful ligatures and an italic variant and bold style.The included character set includes latin uppercase and lowercase letters, all modifiers, and diacritics covering most European languages. Additionally it covers an exhaustive list of math symbols, the basic Greek glyp...

static zealot
#

ty

wintry plinth
#

🥰

#

It’s super nice and clean

prisma wave
#

Jetbrains mono or nothing

frail glade
#

VS 2022 baby.

#

.NET 6 tomorrow.

gusty glen
#

is there much (if any) performance difference between injecting our own packet listener vs using protocolib to listen to and modify packets?

prisma wave
#

probably not anything significant

ocean quartz
golden sun
wintry plinth
gusty glen
#

I'm trying to understand what is this code java Class<?> unsafeClass = Class.forName("sun.misc.Unsafe"); Field theUnsafeField = unsafeClass.getDeclaredField("theUnsafe"); theUnsafeField.setAccessible(true); UNSAFE = theUnsafeField.get(null); ALLOCATE_INSTANCE = UNSAFE.getClass().getMethod("allocateInstance", Class.class); what are "unsafe", "theUnsafe", and "allocateInstance" used for?

#

they're being used like this java static Object createPacket() { try { if (!isParamsVersion()) { return packetClass.newInstance(); } else { return ALLOCATE_INSTANCE.invoke(UNSAFE, packetClass); } } catch (Exception e) { e.printStackTrace(); return null; } }

steel heart
#

Unsafe is a class to work with memory directly which as the name hints is unsafe

#

the instance to do it is called theUnsafe and is private so you have to reflect it

prisma wave
#

^ allocateInstance can make objects without calling the constructor

steel heart
#

They probably only use reflection since some jdks don’t have unsafe I believe?

prisma wave
#

No you need to use reflection

gusty glen
steel heart
#

Not for allocateInstance?

prisma wave
#

You can't get an instance without it, it's protected by the SecurityManager

#

Oh

#

Hmm

#

It's public iirc

steel heart
#

Yeah

prisma wave
#

Idk why they use reflection there

gusty glen
prisma wave
gusty glen
#

will it throw when used by plugins?

prisma wave
#

Yes

#

It will usually throw anywhere outside of internal code

#

Things like Atomicinteger use it just fine

gusty glen
#

in this class, for example, even the Strings will become null when initiated through allocateInstance?

steel heart
#

Yes

#

Or maybe not

#

I think so, iirc Gson also use this, and not having a constructor when wanting to do Gson stuff with serialization makes deserialized objects fields always null

forest pecan
#

I think they do yes

#

cause that is like the same as assigning them inside the constuctor

gusty glen
#

what is the difference between this and just calling f.setAcessible(true);, then f.set(secretHolder, 1)?

steel heart
#

setAccessible iirc overrides final if it’s not a true constant and makes private fields mutable.

#

then Field::set just takes the instance (or null if static) and sets the value for that field

gusty glen
#

and unsafe.putInt won't modify final fields?

steel heart
#

Unsafe bypasses that shit

#

hence unsafe

#

It gives you arguably too much authority

#

Only thing you still can’t do with unsafe would be modifying true constants as their values are inlined

gusty glen
steel heart
#

Unsafe is faster than reflection yeah

#

well doesn’t matter Secret

gusty glen
#

i might have found the perfect excuse to use reflection haha

steel heart
#

Reflection must sometimes go through the security manager which happens to be a bit slow

#

Unsafe has no limitations other than what I mentioned afaik

#

Though you can’t really class scan with unsafe as opposed to reflection shrug

gusty glen
#

yeah, but that's not an issue hehe

steel heart
#

Yuh

#

Also unsafe is subject to removal in the future, to be replaced with safer memory api stuff, which has to a certain extent already begun

gusty glen
#

is there any reason to use Class.forName("sun.misc.Unsafe") instead of just importing and using it directly?

steel heart
#

to my concerns, no, might just be the case the developer who wrote that code did not have access to those sun misc classes at compile time

gusty glen
#

I see, thanks

forest pecan
#

and a big fat warning shows up if you use any of the sun packages

steel heart
#

EMC hahayes

forest pecan
#

🥲

steel heart
half harness
steel heart
eternal compass
#

what's a good sFTP client?

#

that isn't ugly / painful to use

steel heart
#

I use WinSCP which works excellently

half harness
#

FileZilla

#

except that it's ugly

#

🙃

#

it does let u pick a background color though

#

but its light mode

eternal compass
#

FileZilla is buggy for me

half harness
#

👀

#

how come?

eternal compass
#

doesn't allow for me to specify what I want to do when editing a specific file

#

eg. open text files in np++ not notepad

half harness
#

u can

eternal compass
#

it has a feature, yes.

#

it's buggy though

half harness
#

oh

eternal compass
#

and does not work as intended

half harness
#

🤔 interesting

#

like u mean it works sometimes?

eternal compass
#

no

#

never on this computer

#

another one, yes

half harness
#

oh O_o

forest pecan
#

sounds like a skill issue

eternal compass
#

nah, its due to some weirdness in my PC

sweet cipher
#

I agree with Pulse

viral grove
#

Is there any ai coding tools I can (and should) leverage? (Exclude Github copilot) I'm currently using the Intellij suite of tools.

obtuse gale
#

tabnine

#

I think that's what it's called

#

I personally don't use it but @​Matt uses it (or an older version of it) and shows pretty promising results

#

well.. used to, now he's on with copilot haha

ocean quartz
#

Used to use Codota, it was okay
Copilot though kreygasm

eternal compass
# obtuse gale tabnine

tabnine is meh at best.
I used it for a bit, and it kept suggesting dumb things that had nothing to do with my current situation

ocean quartz
#

Tabnine was pretty annoying from my tests, super slow
Codota was nice before it was bought

gentle sparrow
#

"Life is thickly sown with thorns, and I know no other remedy than to pass quickly through them. The longer we dwell on our misfortunes, the greater is their power to harm us."

#

Voltaire said that

ocean quartz
gentle sparrow
#

Gandhi was a pretty terrible person

#

He was an anti-vaxxer and a hindu supremacist in addition to that

#

His failure to acknowledge women's rights can be largely blamed for the lack of women's rights in modern day India

delicate vapor
#

hello guys

#

how to contact with discord support

#

please awnser

old wyvern
#

Ah, Dial 911

delicate vapor
#

AH ComUniTy

#

m*

old wyvern
#

m*

delicate vapor
#

fr

old wyvern
#

yes fr

delicate vapor
#

how to live chat with em

#

I have a problem while I'm screen sharing on my xiamoi lite device

old wyvern
#

Go to your neaby railway station and walk though the wall after the 9th compartment. You should enter the 9 3/4th area. Someone should be waiting there to chat lively to you

delicate vapor
#

wtf

#

bruh

#

can some one help me!

#

PLEASE!

old wyvern
#

Yes

#

God

delicate vapor
#

for god sake

#

fk off

old wyvern
#

God wont fk off, dw

delicate vapor
#

hey Yugi do you no joe ?

#

know*

ocean quartz
old wyvern
delicate vapor
#

thanks m8

old wyvern
#

🥲

viral grove
viral grove
#

If I have a project under GPLv3, can I release a specific module under MIT, while the rest is GPLv3?

steel heart
#

Never seen that in practice happening but probably

dense dew
distant sun
#

Horrible

wintry plinth
#

That is next level shocking

prisma wave
#

Yeah, imagine using j*va

hot hull
#

Bruh

#

That's cancer

restive ravine
#

My god that's a crime

static zealot
#

@delicate vapor this is not discord support. if you want support you'll have to use support.discord.com. Here you can get general development or minecraft help.

distant sun
#

I just found out that you can do this O.o

wintry plinth
#

Wait really

#

Holy crap

gusty glen
distant sun
#

Yea

static zealot
#

@ocean quartz if I were to import the IJ theme (the one you gave me a while ago) in Rider would it work as nicely with C#? Or would it not even work in Rider?

quiet depot
#

try it

static zealot
#

well I Dont want to import it, break everything then not know how to go back to default xD

#

but I guess I will

ocean quartz
#

Most likely, it works fine with TS and html

static zealot
#

so I have to go in IJ export all settings and import them in Rider?

#

or wait. why all. just the code style?

#

oh wait there's Color options

#

ok. seems to work.

obtuse gale
#

Hey!

steel heart
#

Hola

ocean quartz
#

Oi @obtuse gale didn't you write something for splitting components by \n?

obtuse gale
#

aaaaaaaaaa

#

hi

#

yes

ocean quartz
#

@frail glade ^

#

Is it on Github?

obtuse gale
#

it is on GH yeah

#

let me find it lol

#

I haven't tested it in a good while, I know it has a few weird things here and there but nothing that changes how the component(s) looks

#

so component compaction would help there
and there's probably a better way now with the component iterator API though, used to traverse the tree manually

#

but nevertheless here it is

#

(...)

frail glade
#

Hmm?

frail glade
#

You could always rewrite it using the compaction like you mentioned 😛

obtuse gale
#

I should continue that project lol

#

but yeah compaction + iterator API would be way better

#

maybe with a custom flattener..?

frail glade
#

Yeah. I have an issue where I need to read in a component and split it into multiple by \n. I wonder how much easier it would be with the newest Adventure changes.

obtuse gale
#

hm I wonder if MM replaces \n with actual Component.newline() since this does that, it splits by Component.newline() by identity, not "content only"

frail glade
#

You down to test it rn or should I?

obtuse gale
#

which is uuh a questionable decision but I did it that way because messages are built internally

#

hm I could give it a quickie

#

actually I can't

#

sad

frail glade
#

I can. I'll have your answer in a moment.

#
TextComponentImpl{content="MyNewGuild\n0.0", style=StyleImpl{color=null, obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}
obtuse gale
#

lol thinking about that you could use the TextReplacementConfig to replace \n with Component.newline() and it would work

frail glade
#

Tried that too

#

The problem is here that my usage here is to use it in lore. So that approach doesn't work.

#

I have to split it into multiple components.

obtuse gale
#

would make the splitter work* :d

frail glade
#

It might work in chat though.

#

And probably clean it up too.

obtuse gale
frail glade
#

LOL okay this doesn't like me. I just tried out the splitter and now the lore is entirely gone.

obtuse gale
#

for some reason it doesn't add the last component if it's not there lol

frail glade
#

I wonder if it didn't split it because it doesn't contain a Component.newLine()

#

I'll try it.

#

Oh that still won't work because it's never a new line component, it's always still \n

#

Even tried adding in a replacetext on \n to new line think

sweet cipher
#

SERIALIZER.serialize(component).split("\n") lol

static zealot
#

oh. my poor laptop. I went to compile something while in a google meet with a live on youtube opened. and it is bad

static zealot
#

anyone know if there's like a math formula to calculate the multiplying of n numbers from 1 to n. I know the one for sum n * (n + 1) / 2 but idk if there is one for this. if not a loop it is.

quiet depot
#

a factorial?

static zealot
#

RIGHT. fuck. xD I'm stupid

quiet depot
#

don't think there's a formula for a factorial, just use a loop (or recursion), although there might be a util somewhere

static zealot
#

yeah ty.

distant sun
#

is logger.log(Level.FINE) not supported but bukkit?

obtuse gale
#

I think it's enabled up to INFO, so DEBUG, FINE and ALL won't log

#

I know you can change that, I don't know how lol

prisma wave
#

stupid xml configurations

distant sun
#

From PluginLogger setLevel(Level.ALL);

#

stupid bukkit

static zealot
#

🥲 that happened to me few days ago when started adding audio to my bot. just gave up lmao. going at it again now

static zealot
#

hi

old wyvern
#

hi

static zealot
#

someone got a music bot that uses lavaplayer I can look at?

jovial warren
#

I mean, just look at the example in the repo

static zealot
#

oh right. ccompletely forgot theres an example

#

its so fucked. I got almost everything to work, the song is loaded and its supposed to play but no sound is actually played

#

omg it workss

#

thank you @jovial warren

#

I messed up my audioplayersendhandler class

jovial warren
#

yw

#

what did you do wrong?

static zealot
static zealot
#

man lavaplayer made me way more problems than it should have

steel heart
#

If the problems extend Throwable, just catch them and suppress them like they never existed

static zealot
#

it was throwable lmao. spent the first couple hours trying to figure out their logger. for some reason my logger was messing with theirs. also had to add my own properties file for it

steel heart
static zealot
#

then it was just me messing up a method

distant sun
#

This is nice tbh

dawn hinge
#

agreed ^^

sly sonnet
#

boyss, which key opens that Generate thingy? It appears that I have been missing so much in these 2 years... 🙄

distant sun
#

alt insert

distant sun
quaint isle
#

What 2fa app do y'all use? I've been using Microsoft Authenticator, but it bugs me that the backup is somewhere hidden invisibly in OneDrive

sly sonnet
#

Authy

quaint isle
#

Heard about that. Has it any downsides compared to Microsoft or Googles' authenticator apps?

sly sonnet
#

idk

distant sun
#

Authy is the best imo

sly sonnet
#

it has the widget

quaint isle
#

Does it support auto-backups to OneDrive or GDrive?

sly sonnet
#

idk

#

it has a backup password

#

but dont know if it saves it somewhere

quaint isle
#

I might just give it a shot, thanks for the suggestion 🙂

sly sonnet
#

no no

#

dont give it a shot

#

just switch to it

quaint isle
#

If it interest you, Aegis seems to be another highly-rated 2fa app.
UI looks nice and it's open source. Seems to be available on Android only tho. https://getaegis.app/

wind patio
#

who's running haste server for paste.helpch.at?

#

anyone has an idea how to move everything at a subdirectory like paste.url/pastes/<key-name> with haste-server?

wintry plinth
#

I think that would be handled at your web server side

quiet depot
#

@wind patio simply provide a path on your location block with the proxy pass to haste

gusty glen
obtuse gale
#

Must be

#

That plugin is FULL of many small qol feats

#

I just take advantage of like two lol

distant sun
#

Ye

distant sun
humble silo
#

Does kotlin have non-nullable generics yet? That was suppose to be added right?

old wyvern
#

You can already do that

#

T: Any

half harness
#

oh

#

i was too slow D:

old wyvern
#

The new addition just makes it more concise

humble silo
#

Ya thats what ive been doing, but wasnt there gonna be a <T!!> or something?

half harness
#

!! 😖

humble silo
#

is that a thing yet?

old wyvern
#

yes, its only mentioned at the moment

humble silo
#

ah alr

#

well ty

ocean quartz
#

Iirc they'll change that in the future i don't remember exactly though

#

I think it'll be T!

humble silo
#

ah alr

half harness
#

🤔

#

where did all the options go??

prisma wave
#

kotlin bad

static zealot
#

oh wait

#

nvm

#

maybe?

#

idk

#

bye

#

I am dkim 2.0

#

yes

#

indeed

steel heart
#

Joe Mama

half harness
#

anyone know how to prevent some tasks from running when reloading gradle in IJ?
i tried making a task that would set a variable but even though i call the set variable task first, it apparently runs last thonking (test is when I set the variable)

#

but then after its done configurating project

#

it skips the task because it's UP-TO-DATE

#

same with the other task that I'm trying to prevent

eternal compass
#

anyone know of a good (maintained) API (preferably shadable?) that allows for easy creation of custom items?
instead of a janky listener setup

sick belfry
#

Got Copilot!

#

or maybe I'm dumb and it has been already released but idk

sick belfry
#

ohhh my gosh

#

it just generated an entire discord bot in ts base out of a comment

#

I'm crying of joy rn

#

it just made an entire command system

#

I'm freaking out

humble silo
#

wait what

#

like made it well?

#

How can it do that? How much training was it given on that?

humble silo
#

Im signed up but havent gotten it yet

eternal compass
sweet cipher
#
finally {
                if (resultSet != null) {
                    try {
                        resultSet.close();
                    } catch (final SQLException exception) {
                        exception.printStackTrace();
                    } finally {
                        try {
                            resultSet.close();
                        } catch (final SQLException exception) {
                            exception.printStackTrace();
                        } finally {
                            try {
                                resultSet.close();
                            } catch (final SQLException exception) {
                                exception.printStackTrace();
                            } finally {
                                try {
                                    resultSet.close();
                                } catch (final SQLException exception) {
                                    exception.printStackTrace();
                                } finally {
                                    try {
                                        resultSet.close();
                                    } catch (final SQLException exception) {
                                        exception.printStackTrace();
                                    } finally {
                                        resultSet.close();
                                    }
                                }
                            }
                        }
                    }
                }
            }

I have a problem

forest pecan
#

imagine if you could use varargs on generics

#

lol

sweet cipher
#

Wdym?

forest pecan
#

Something like

#

<A> -> <A...>

#

and specifying generics would be many like

#

<A, B, C, D, E,...>

#

idk lol

sweet cipher
#

What would it do?

#

Oh I think I get it

#

Like SomeClass<...>
new SomeClass<A, B, C>()?

forest pecan
#

Yeah

rotund egret
sweet cipher
#

Needs more ```java
try {

} catch() {

}

rotund egret
#

Needs less

humble silo
#

final var array = {new Object(), "", 5, 5L, new ArrayList<String>()}

Cursed array

#

well, ig it would be a array of objects

#

so nvm

#

still weird though

sly sonnet
#

What would be the best way to schedule a task in kotlin?

prisma wave
#

The most idiomatic way is probably with coroutines

#

But well, I doubt you want a 1.3MB library just for that

#

Bukkit scheduler?

old wyvern
#

You wont be able to use the parameterized type that you dont know for sure exists

prisma wave
#

for(* T : types) {
...
}

old wyvern
#

the what

#

xD

prisma wave
#
  • -> * f = T a
median quiver
#

How can I get the Location infront of a player by the yaw ?

#

I'm asking because it's some math crap I don't understand

dawn hinge
median quiver
#

for example the player yaw is 45 and I want to get the location of 2 blocks forward of him

#

oups I'm writing in the wrong channel

#

sorry

plain dragon
#

e

lost finch
#

yo

#

[14:42:42] [Server thread/ERROR] [me.clip.placeholderapi.PlaceholderAPIPlugin]: [PlaceholderAPI] Failed to load expansion class VaultExpansion - One of its properties is null which is not allowed!

#

someone knows how to repair that?

#

never had this before

sweet cipher
#

With shadowJar, is there a way to make a method parameter of net.kyori.adventure.text.Component accept
the one from the shaded library?

obtuse gale
#

what

sweet cipher
#

I probably messed something up

#

So I am am using MiniMessage, and MiniMessage#parse is returning
io.github.fisher2911.fishcore.adventure.text.Component, but another library
requires net.kyori.adventure.text.Component

#

I'm depending on the plugin that has adventure shaded

obtuse gale
#

when you shade and relocate a library, the classes are your own, it's basically as if you were to write it out yourself inside the project

#

it's like saying "well I have a class conveniently named UserManager, why can't I interchangeably use it with LuckPerms' UserManager?"

#

your best bet is to do some reflection bs to do: shaded component -> json -> "real" component

sweet cipher
#

Would there be any way to have Adventure be downloaded if its a Spigot server, and then shared between plugins?

obtuse gale
#

I would also expect issues arising from method lookups, that's gonna be something..

obtuse gale
sweet cipher
#

Doesn't it break maven central's tos or something?

obtuse gale
#

yes

sweet cipher
#

I guess I just won't use the other library then lol

#

Thanks for the explanation

sturdy zinc
hazy widget
#

Assigning a boolean value to a int 🤔

sturdy zinc
#

I see that but intellij will not allow it

hazy widget
#

wdym

#

Ofcourse intelij will not allow it

sturdy zinc
#

I get errors on the two lines, I forked a plugin and I never can understand what goes in others heads

hazy widget
#

i guess just remove the the "int level = false;"

#

because then it shouldn't show any errors

sturdy zinc
#

but why did he want level to false?

hazy widget
#

How am i supposed to know that, ask that to the owner of the plugin?

sturdy zinc
#

he has not responded to anything in a year

#

I can comment out that line and when I get to the point of testing it will remind me what I changed

hazy widget
#

hmm

sturdy zinc
#

there was like 20 lines like that in code

hazy widget
#

This plugin you forked, is it a plugin open source on github or on another place or is it something you decompiled?

forest pecan
#

decompiled code wouldnt even give that XD

sick belfry
#

@humble silo also for u

eternal compass
#

wow

humble silo
sweet cipher
#

Why would multiverse not teleport players if they have a passenger?

sick belfry
#

you get all commands from a package, then add em to a list, on message event using some content filtering you get the command and execute it

humble silo
#

Well im so glad that we are celebrating the piece of software that will put us all out of jobs in 20 years! much fun

gentle sparrow
# old wyvern eh?

Do you not understand what I’m saying or do you not believe what I’m saying?

olive jackal
#

quick question

#

if im using purpur api

#

would I need to use build tools

#

and if anyone could go into a little more indepth explanation of build tools and if I should and why have it on my plugin

#

i would really appreciate it, pls ping me if anyone knows

sick belfry
#

what dis

eternal compass
#

For purpur NMS run the purpurclip jar with the install argument

#

Buildtools is spigot's legacy server compiler, which modern software replaced with PaperClip

sick belfry
eternal compass
#

Would not be surprised

sick belfry
#

yeah yeah

#

but da heatmap name

#

I wanna do something with that map

#

anyone lel?

olive jackal
sick belfry
#

this map, I'm planning on developing a special anti-cheat