#dev-general

1 messages ยท Page 414 of 1

old wyvern
#

Bridget of Sweden (c. 1303 โ€“ 23 July 1373); born as Birgitta Birgersdotter, also Birgitta of Vadstena, or Saint Birgitta (Swedish: heliga Birgitta), was a mystic and saint, and founder of the Bridgettines nuns and monks after the death of her husband of twenty years. Outside Sweden, she was also known as the Princess of Nericia and was the mothe...

half harness
#

Bridget of Sweden (c. 1303 โ€“ 23 July 1373); born as Birgitta Birgersdotter, also Birgitta of Vadstena, or Saint Birgitta (Swedish: heliga Birgitta), was a mystic and saint, and founder of the Bridgettines nuns and monks after the death of her husband of twenty years. Outside Sweden, she was also known as the Princess of Nericia and was the mothe...

#

mothe

prisma wave
#

old woman british name

old wyvern
prisma wave
#

๐Ÿ˜ฎ

#

only if i can marry prince peyton-jones ๐Ÿ˜ฉ ๐Ÿ˜ฉ

old wyvern
#

xD

#

Bristress Mitten

prisma wave
#

๐Ÿคจ

old wyvern
#

Mister Britain
Mistress Britain
Bristress Mitten

forest pecan
#
class Human(
   val name: String = "dkim",
   val age: Int = 11,
   val height: Int = 69,
   val profession: String = "pornstar"
)

fun main() {
  val olderDkim = Human(age = 20, height = 170, profession = "janitor")
}
#

u happy now dkim?

prisma wave
#

lmao

#

dkim fell off

#

wait

#

11 years old pornstar ๐Ÿคจ

forest pecan
#

Yep

#

11 year old pornstar

old wyvern
#

ITS DAX!!

forest pecan
#

mhm

prisma wave
#

cursed

half harness
onyx loom
ocean quartz
#

Very cursed ๐Ÿ˜ฌ

forest pecan
old wyvern
#

Harry Potter and the Cursed Dkim

onyx loom
#

๐Ÿ˜ณ

#

would u like to feature in my next show pulse

forest pecan
#

ass

#

yes

half harness
#

i afk

prisma wave
onyx loom
#

๐Ÿคจ

#

potentially

old wyvern
#

lmao

ocean quartz
#

Good person, not contributing to the overpopulation problem

half harness
#

Lmao

forest pecan
#

Lmao

static zealot
#

Lmao

prisma wave
#

Lmao

dawn hinge
#

Lmao

old wyvern
#

Lmao

onyx loom
#

Lmao

obtuse gale
#

Lmao

hot hull
#

Lmao

obtuse gale
#

I got simps bois ๐Ÿ˜Ž

half harness
#

bbbruhhh

#

wait

#

fefo has eyes?

#

O_o

obtuse gale
#

no you don't lmao

#

sure lol

onyx loom
#

how dare u break the lmao chain

old wyvern
#

Lmao

obtuse gale
#

lmao

old wyvern
#

Lmao

half harness
#

lmao

forest pecan
#

lmao

static zealot
#

lmao

dawn hinge
#

lol

half harness
#

lol

forest pecan
#

lol

old wyvern
#

lol

tranquil crane
#

lol?

pale shell
#

lol

static zealot
#

mol

jovial warren
#

lol

#

what have I missed

old wyvern
#

Lmao

jovial warren
#

I just spent the past few hours watching civil war because I felt like it and I come back to whatever this is

tranquil crane
#

I'm disappointed that isn't embedding

static zealot
#

@tranquil crane why no embeds? Or is it just discord being discord?

#

oh lmaoo

tranquil crane
#

I'm gonna rerecord it and see if it embeds then

#

There we go, embedded that time

static zealot
#

nice

half harness
#

oh i thought you turned off the embed on purpose

tranquil crane
#

that would have been comedic

#

I'm not intentionally trying to rickroll people

#

I was just told by somebody that I could also animate it in the chat

old wyvern
#

Yes

tranquil crane
#

And potentially on a map

#

though I don't know how well that would work

jovial warren
#

what embed?

old wyvern
#

the block character and char colors

#

Do it nicole

static zealot
old wyvern
#

The ultimate rick roll

tranquil crane
#

already using the block character in the hologram and scoreboard lol

#

off to chat we go I guess

static zealot
#

omg I just realised that you no longer get pinged when you reply to your own message

#

when did they fix that?

ocean quartz
#

@tranquil crane

static zealot
#

wait for real?

tranquil crane
#

Matt just an fyi this is all your fault for making the hologram display in the first place

ocean quartz
#

I am fine in taking the blame for art

old wyvern
#

๐Ÿ˜‚

jovial warren
#

lol

tranquil crane
#

Can the chat box really only display 10 messages at a time?

static zealot
#

you should take it to the next level tho and change every texture in the game to a rick roll including the sun and all that

tranquil crane
#

it can display more when it's open I guess

#

20 when open

static zealot
#

try making it bigger or smaller from settings. I think more will fit then

#

I'm not sure tho

tranquil crane
#

I'll just set it to 20 and call it good

ocean quartz
#

I think you can increase it in the chat settings but that's client sided

static zealot
#

^^^

tranquil crane
#

I just have this to deal with

old wyvern
tranquil crane
#

I guess those should be titled max

old wyvern
jovial warren
#

oh I've seen that before

grizzled panther
#

hello

#

anyone here work with deluxemenus

old wyvern
tranquil crane
onyx loom
#

lmao

jovial warren
#

why does Minecraft allow this

onyx loom
#

needs more pixels

ocean quartz
#

That was the first thing I did when 1.16 came out xD

tranquil crane
#

well I now have 5 display types

jovial warren
#

why does the client render these squares

old wyvern
#

its a character

jovial warren
#

that ain't ASCII

old wyvern
#

unicode

jovial warren
#

likely from the Unicode font Minecraft has

ocean quartz
tranquil crane
#

going to edit the showcase post in like 30 seconds

#

prepare yourselves

jovial warren
#

I still gotta find something I can show off from Krypton lol

#

but it's pretty fucked rn

tranquil crane
#

I swear if it doesn't embed

#

there we go

#

pure art

#

oh gee matt you put the whole video in there

old wyvern
#

Add map too

static zealot
#

omg

#

that's beautiful

jovial warren
#

what are all those on

#

ik one is in chat and one is on the scoreboard, then one is in particles, but what are the other two?

#

banners or something?

ocean quartz
#

It actually was the entire thing but the video was getting too big xD

jovial warren
#

ah right

tranquil crane
#

going to go grab something to eat then I'll try maps

#

never worked with the map renderer before

#

anyone know how to remove a scoreboard? I'm using player.setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard()); like I've seen suggested but it just doesn't do anything

jovial warren
#

it's Bukkit lol

#

what do you expect

#

scoreboards in Bukkit suck ass from what I've seen

#

send a packet with NMS to tell the client to hide the current scoreboard

tranquil crane
#

the whole scoreboard thing will be packet based at some point

#

couldn't be bothered to do it that way right now though

jovial warren
#

can I just use this as a perfect opportunity circlejerk Krypton

#

Krypton's scoreboard API will be good

tranquil crane
#

I'm having to run the scoreboard process all on the main thread because it can't be used async

prisma wave
#

can I just use this as a perfect opportunity to circlejerk Haskell

tranquil crane
#

everything else is async

ocean quartz
tranquil crane
#

Didn't 1.4 like just come out really recently

jovial warren
#

no...?

ocean quartz
#

1.4 was released in august

jovial warren
#

1.4 was released on the 17th of August 2020

tranquil crane
#

welp nvm then

ocean quartz
#

1.4.32 was released like 2 weeks ago

forest pecan
#

I used Maps as well for video playback

#

It's a bit more complex, but you can gain very good quality out of it

#

I managed to play 1080 before on it

#

However, the issue is you can't directly display it into Minecraft

#

Minecraft has a limited palette of 86 colors

#

(or somewhere around it). It's nowhere close to the full rgb palette

#

However with dithering, you can pretty much achieve the full palette

#

Error diffusion is a type of halftoning in which the quantization residual is distributed to neighboring pixels that have not yet been processed. Its main use is to convert a multi-level image into a binary image, though it has other applications.
Unlike many other halftoning methods, error diffusion is classified as an area operation, because w...

#

It's quite interesting

tranquil crane
#

oh wow

forest pecan
#

ive been working on this for months xD

#

I wanted to get it out in production some day

prisma wave
timber oak
#

Best API to kick, mute and ban?

jovial warren
#

there isn't one

#

might be in the future when I get working on Punishments, but the LiteBans API is trash

#

and the Bukkit API just uses the default vanilla mechanic of saving bans to files

timber oak
#

So I should just work with spigot's basic methods for it?

jovial warren
#

blames that aren't like at least 80% me

jovial warren
hallow crane
#

does krypton currently work

#

can you make a server on it

#

and can you develop plugins

jovial warren
#

yes

#

somewhat

hallow crane
#

So, you are saying that I can, right now, make a functional server that is 100% functional and complete with Krypton

jovial warren
#

there is an API, and it supports as much as the server currently supports atm

hallow crane
#

With MobAI, World generation, etc.

jovial warren
hallow crane
jovial warren
hallow crane
#

Well I'd hold off on boasting about krypton just yet until it is fully functional

#

Looks pretty cool, but I can't use it.

jovial warren
hallow crane
#

would be cool to have an alternative type of world data file

forest pecan
#

i think the current one is fine

hallow crane
#

I never said it wasn't, but I might want to have it be more readable or a different format for various reasons

forest pecan
#

if you had an alternative type of world data file it'd probably take more work

jovial warren
#

you know every chunk is always found at the exact same coordinates, and that the file is filled with empty space in between right?

forest pecan
#

it's really not, but you get what I'm trying to say here

jovial warren
#

it's stupidly inefficient

forest pecan
#

and yes that is dumb xD

hallow crane
#

I think implementing the original type in the first place would be exactly the same amount of work as a different format.

forest pecan
#

didn't Krypton just copied classes from an NBT API

#

lol

jovial warren
#

I only use Anvil for two reasons:

  1. I can't be assed to design and publish a standard for my own format
  2. I am designing Krypton around being a drop-in replacement for vanilla
jovial warren
forest pecan
#

Yeah

jovial warren
#

I just gave up in the end lol

#

I did attempt to do it on my own but just got fed up with being useless

forest pecan
#

yeah you were raging in dev-general and dev chat about it lmfao

#

xD

jovial warren
#

oh I've raged in here about quite a few things

forest pecan
#

makes entirely sense tho cause its a pain in the ass

jovial warren
#

block states was fun

#

๐Ÿฅฒ

forest pecan
#

Palette xD

jovial warren
#

and I didn't even solve that either

#

I just hacked around it

#

because Mojang is a bitch and decided to hard code every single block into the Blocks file, including their block states

#

because no, the files outputted by the data generators aren't used internally by Minecraft

#

unless they are generated by code generation, which is another option

#

that's what Minestom does

timber oak
#

How come AsyncPlayerChatEvent is way better that PlayerChatEvent?

#

Intellij says so atleast

forest pecan
#

because

jovial warren
#

it's in the name

forest pecan
#

its async

#

lol

#

well more specifically

timber oak
#

But arent all events better in async then?

forest pecan
#

its better thread safety

jovial warren
#

not even sure how that's cancellable if it's async

#

is the entire chat mechanism just handled async?

forest pecan
#

if it was sync then servers would die lmao

jovial warren
#

true

forest pecan
#

people spamming chat xD

timber oak
#

Well I want to cancel the event for making a mute thing

jovial warren
#

but this is vanilla

#

not that far fetched

timber oak
#

checking a list etc.

forest pecan
#

check a hashset of uuids of muted

jovial warren
#

also, you know vanilla could handle packets async by handling them when it gets them using Netty's IO threads but they choose to put them into a queue and handle them sync in the tick

timber oak
#

why not just a list with uuid's?

forest pecan
#

because a hashset is significantly faster

#

a hashset .contains only takes O(1)

ocean quartz
jovial warren
#

sounds like a premature optimisation pulse

timber oak
#

So the set contains uuid and what?

jovial warren
#

just UUIDs

#

a set is a collection, not a map

forest pecan
jovial warren
#

anyway, gn, gotta go to bed now

forest pecan
#

unless N = 1

#

or smthing

timber oak
#

So I should always use sets instead of lists?

forest pecan
#

I don't think you quite understand

#

Both data structures are used for different purposes

#

HashSet use an algorithm called Hashing which allows fast contains method checking

timber oak
#

So sets are mostly for stuff like contains() and lists are where you know the index of what you're handling?

#

or wat

forest pecan
#

Yep

#

That's the point

timber oak
#

Aight, makes sense

forest pecan
#

And also

#

set has no duplicates

timber oak
#

so if I add the same UUID twice it does nothing?

forest pecan
#

Yeah

#

well

#

Yeah

#

it just does nothing for the second one

timber oak
#

Yeah

#

Also

forest pecan
#

it just keeps one copy

#

I mean

timber oak
#

Why should I use UUID instead of Player objects

obtuse gale
#

UUIDs are stateless and won't change over time

#

a Player object you don't know how the hashing is done

timber oak
#

Ahhh, so contains() would not always work

obtuse gale
#

that + the server will most definitely won't like it if the player logs in and out and the previous Player object is still somewhere ๐Ÿ˜ฌ

timber oak
#

Ahhh yeah makes sense

obtuse gale
#

plus

timber oak
#

Hmmm, I would need to store this in a file or something though for server restarts

obtuse gale
#

UUIDs are literally just two single longs

#

that is gonna be fast

forest pecan
#

Yeah the Player class has a lot of unnecessary bloat

#

and overhead

#

and it wouldnt even work

#

lmfao

ocean quartz
obtuse gale
#

no

#

I can bully for free

ocean quartz
#

๐Ÿ˜ข

forest pecan
#

wait you were implementing InventoryHolder before?

ocean quartz
#

Yeah, it's still the best way to do it

forest pecan
#

Choco bullied me for doing that lmfao

#

He said that it shouldn't be, but instead using InventoryView

ocean quartz
#

Eh i don't really care what they say lol
I'm changing it for another reason

obtuse gale
#

public interface GuiAction<T extends InventoryEvent>

just add extends Consumer<T> please :please:

#

and default consume -> execute

#

Annotations on fields :why:

forest pecan
#

lol

ocean quartz
ocean quartz
#

Good reason, but I ain't changing it

obtuse gale
#

I'mma fork it then

#

just to add that

#

and maintain my own fork

forest pecan
#

lol

obtuse gale
#

until the end of times

ocean quartz
#

Why does that matter? lol

timber oak
#

Something like this can be static right?

public static HashSet<UUID> mutedPlayers = new HashSet<>();

Or nah

forest pecan
#

then hes gonna spam PRs

#

lol

obtuse gale
timber oak
forest pecan
#

use a manager class

timber oak
#

I don't understand when I should use static

timber oak
ocean quartz
#

Do you know what static does?

timber oak
#

Gives access to all classes

ocean quartz
#

no

timber oak
#

other static methods or smth though right?

forest pecan
#

it loads it into the memory

#

directly

ocean quartz
#

Static makes the member belong to the class not the instance

timber oak
forest pecan
#

because it destroys oop concepts

#

and its called static abuse

obtuse gale
#

static means, as far as fields are concerned, that there is one instance of that field only

forest pecan
#

not using static correctly

obtuse gale
#

Good use of static: final immutable ("unmodifiable") objects and variables (e.g. regex patterns, config key paths); utility methods (e.g. color formatting)

Bad use of static: things that change over time (lists/maps/sets, config values); methods for "data management" and the like

ocean quartz
timber oak
#

So everything that doesnt change can be static?

hallow crane
#

Also singleton main class instance

forest pecan
#

there is usually a reason to use it other than just that. Perhaps stuff like accessing it a ton

#

For example, Reflexive operations

ocean quartz
hallow crane
forest pecan
ocean quartz
#

Everything

hallow crane
#

Lol, DI is overrated.

forest pecan
#

You are overrated

obtuse gale
#

your ass is overrated

hallow crane
#

Singleton is a legitimate design pattern

ocean quartz
#

A bad design pattern

forest pecan
hallow crane
#

It's real, it's for specific cases, and this is one of those cases.

timber oak
forest pecan
#

it's not for this case. It doesn't follow SOLID actually

hallow crane
#

Actually it does, depending on the application. JournalDev has a nice article on it.

obtuse gale
#

a good use case for singletons is for example something I tend to use with Gson, custom TypeAdapter instances

hallow crane
#

what?

#

When did I say plugins

ocean quartz
#

Singleton pattern violates the single responsibility principle, makes it awful to unit test, etc

forest pecan
timber oak
#

So Pulse, should I make an object in the main class and get the set from there or a completely new class for it?

hallow crane
#

Look up "Design Patterns: Elements of Reusable Object-Oriented Software" page 127

forest pecan
#

Horribly coupled code too

hallow crane
#

A main class is categorized as the entry point to a Java program, doesn't have to be plugins.

forest pecan
#

Well, it depends on what your indication of "main class" is. Are you talking about plugin main classes? Or something like Spigot or Bukkit main entry point?

#

Cause yes, plugins are different from the software itself still too

hallow crane
#

General purpose java applications.

#

GoF book says

Use the Singleton pattern when

- there must be exactly one instance of a class, and it must be accessible to clients from a well-known access point.
- when the sole instance should be extensible by subclassing, and clients should be able to use an extended instance without modifying their code.
#

At least, my CS professor recommended this to me. Unless you're saying he's wrong....

forest pecan
#

What's the difference from just enforcing one instance class

hallow crane
forest pecan
#

plus, singletons have tight coupling too

hallow crane
#

sure it breaks the one instance principle that DI uses but consumers will always depend directly on the concrete class to get the instance, while the DIP prescribes the use of abstractions.

forest pecan
#

I mean, di is not much different from those benefits lmao. You can still provide it.

hallow crane
#

^

forest pecan
#

but still, i would choose di

hallow crane
#

Okay, and I have nothing against it

#

I use DI often

#

however in the case of mc plugins, using singleton is probably not the best idea because "singleton" loosely implies that the instance can be recreated if needed, but accessed through a simple means and the JavaPlugin system that bukkit implements is strictly against that

#

would you suggest that a static method that uses main class instances

  1. breaks basic design patterns
  2. doesn't, but I need context in the method arguments
forest pecan
#

is that a question? lmfao

hallow crane
#

yes

#

mostly unrelated to the previous conversation

forest pecan
#

Well, it would depend.

#

Let me think through this for a second lmfao

#

I mean, when I usually use static methods it's usually for some utility method right?

hallow crane
#

right but isnt utility an abstract concept

#

what if the utility involves a calculation factory that is housed in some random instance

forest pecan
#

Well, then I would create some manager class instead of a utility method

#

and put the method in that manager class

spring canyon
#

Manager Classes ๐Ÿ‘€

ocean quartz
#

Plus on an utility method, nothing prevents you from passing the main class instance in the parameter of the method

forest pecan
#

though if I were to be honest, I actually much rather prefer such methods to be enclosed in another class instance so if other people use it they don't have to deal with main class instantiation and that stuff.

#

After all, idk if that would be considered utility lol

hallow crane
ocean quartz
#

Another big issue with the singleton pattern, your instance will be flying around with no control what so ever
When you use DI you can control exactly what gets in and out of the classes you choose

hallow crane
#

I would need reflection to access it

spring canyon
oak raft
#

I'm seeing a lot of companies require c++ knowledge so it's probably a good idea to learn ๐Ÿ™‚

hallow crane
forest pecan
#

depends on what manager is about

#

and what is involved

spring canyon
forest pecan
#

in this case, I don't think it would

spring canyon
#
  • it's a pretty generic name
oak raft
#

yo pulse since when did you do work on among us?

forest pecan
#

the backdoor?

#

or the plugin?

#

lmfao

oak raft
#

plugin

forest pecan
#

like a while ago

oak raft
#

oh shit fefo too?

steel heart
#

Arguably you create a manager to follow srp not to break it

forest pecan
#

it was messy at the end and none of us really played among us anyways lmao

#

so we just gave it up

ocean quartz
oak raft
#

ah lmao

spring canyon
hallow crane
steel heart
#

Most people?

spring canyon
#

In my experience

#

It is different from your experience :smart:

ocean quartz
#

Why does that matter? You can easily apply the same system to any application
And if you want you can also use Guice or any other DI framework

steel heart
#

Guice :0

#

Juice

hallow crane
#

that implementation in bukkit only exists because bukkit houses the instances of the plugins inside of it...in a general purpose app that doesn't exist

steel heart
#

Jesus the Bukkit class

#

๐Ÿ˜ซ

forest pecan
#

lol

#

Bukkit class be like

#

fuck srp

steel heart
#

Nevertheless is it static

#

Or

#

The methods in it are

ocean quartz
#

Or take the approach of Kotlin and ditch static fingerguns

steel heart
#

Companion and jvmstatic?

ocean quartz
#

A companion object isn't static and jvmstatic is just for interop

steel heart
#

Yeah

#

Well companion objects are similar to static arenโ€™t they

spring canyon
#

Aren't there object classes in Kotlin?

ocean quartz
#

Similar but doesn't work the same way

ocean quartz
forest pecan
#

always did for a while

spring canyon
#

They work like a class full of static methods although it is a singleton internally iirc

ocean quartz
#

Object is a singleton, which is nice
Though you wouldn't do for example your main class on a plugin be an object or anything like that

steel heart
#

Btw anyone that knows how an objects System#identityHashCode is calculated btw?

spring canyon
#

Haven't done any Kotlin in the last months :/

ocean quartz
#

For example:

class PluginName : JavaPlugin() {
  
  override fun onEnable() {
    instance = this
  }

  companion object { 
    private var instance: PluginName? = null
    fun getIntance(): PluginName {
      return instance
    }
  }
  
}

Which would be the Java equivalent to what most people do, it wouldn't work, it'll error out because it's not allowed

oak raft
#

so, in c++ you're supposed to have brackets like this?

int main()
{

}
ocean quartz
lunar cypress
#

There are different c++ conventions

#

Like the language, it's pretty much all over the place

oak raft
#

You're not a fan of c++?

spring canyon
#

Thanks for the explanation tho

lunar cypress
#

"C++ is all over the place" is an objective fact

#

Every C++ programmer will tell you the same

oak raft
#

oh lol

ocean quartz
lunar cypress
#

There's people who enjoy making sense of it and understanding it to an extent that they can be very productive with it and there's people who don't

ocean quartz
obtuse gale
oak raft
#

actually true lol

lunar cypress
obtuse gale
#

the brain can't

dusk holly
#

Hello

oak raft
#

not you again -_-

dusk holly
#

I am not Donald

oak raft
#

where are the other 2?

dusk holly
#

Busy

#

in Russia

oak raft
#

ah

dusk holly
#

So how are you

oak raft
#

im doing well

#

how have u been doing

dusk holly
#

I am bored

oak raft
#

before matt yells at us

dusk holly
#

It has been 8 years since I bombed a country

dusk holly
#

9 years

#

10 years

#

I have lost count

timber oak
#

Does java applications usually use DI or static? Like things made other than mc plugins etc.

half harness
#

yes

#

you should always use DI

#

anyone have minecraft 1.16 open to test something

#

because i only have 1.8 open rn and lunar only allows 1 mc instance and i cba opening regular launcher

#

because regular = ๐Ÿคข

ocean quartz
#

Mentions 1 big issue with the client still says the other client that doesn't have said issue is bad lol

half harness
#

wdym

ocean quartz
#

You just said lunar client doesn't let you open 2 instances at the same time lol

half harness
#

ye

#

i dont like regular because it makes my fps poop

timber oak
ocean quartz
#

Well vanilla client lets you fingerguns
Just use optifine

timber oak
#

Pressed enter by mistake

ocean quartz
timber oak
ocean quartz
#

Static is useful but no point in using it for instance getters stuff when you have DI

dawn hinge
#

You could actually open two instances of Lunar, just not directly

timber oak
ocean quartz
#

How so?

prisma wave
#

That is why you use a DI framework

timber oak
#

Well 6 parameter and so on, I could just use DI for one class then use instance getters in that class. Not saying I should do this for everything but yk

timber oak
prisma wave
#

If you reach a big enough codebase that this becomes an issue you could look into a DI Framework like Guice

timber oak
#

But like let's say I have 3 different kinds of data handlers, I could just get all the instances with one class then use DI with that?

forest pecan
#

did you watch the medical vidoes

#

i remember that comment

#

exactly

forest pecan
#

from a brain dissection video

#

or smthing

#

where these people dissected an actual human brain

#

i scrolled down the comments and i think of them was that

#

lmao

timber oak
#

BM?

prisma wave
#

Bmm

#

Hmm*

#

It depends

#

It's sorta situational

obtuse gale
timber oak
#

that's what I mean

prisma wave
#

That's arguably violating the dependency inversion principle though I think

#

You're injecting more than you necessarily need

#

It might be one of the other principles idk

#

Too many to remember

timber oak
#

Only if I use the getter though?

#

Or no?

static zealot
#

yo so I'm trying to git fetch from another repository's main branch. I've set the remote but it fetches from all branches when I do git fetch upstream where upstream is the name of the remote

#

ah nvm its just git fetch upstream main

obtuse gale
#

but yeah if you really have to pass too many things a DI framework is probably best to use

half harness
#

what is a DI framework?!

obtuse gale
#

a framework

#

that does DI for you

half harness
#

example of code usage?

obtuse gale
#

it... depends.. on the framework

timber oak
#

But if I have 5 instance getters in a class and only actually use one of them in the class will it be a problem? Or nah

half harness
#

isn't all DI just passing through constructor

obtuse gale
#

not necessarily, post-construction setters

obtuse gale
timber oak
#

Not sure what BM meant then

forest pecan
#

i dont use a di framework cause im only passing 1 instance, but can the framework help with if its passed around a ton?

prisma wave
#

well

#

Idk what the exact term is but I guess it's sorta to do with liskov

#

If you only need 1 part of a class it's better to just inject that 1 part than the entire class

obtuse gale
#

well yeah but if it gets to the point you need 6 out of 8 classes you have getters for in a central api/main/whatever class...

timber oak
#

I just don't see how having too many getters is a problem, they take no memory or anything before they are run anyway? Or are they?

prisma wave
#

It's about clean code not performance

obtuse gale
#

if anything it takes a handful of bytes so 100% nothing to worry about unless you have millions upon millions of methods lol

timber oak
#

mb

half harness
#

btw fefo i got rid of inventorycloseevent because you were right :c
weird

prisma wave
#

Nah

#

ic

obtuse gale
#

mhm

half harness
#

also

#

can i modify contents of InventoryView after i close the view/inventory?

prisma wave
#

Sounds dangerous

half harness
#

since this: view.setItem(rawSlot, item.clone()); isn't working.. and i have a horrifying entry:
Map.Entry<InventoryLoc, Map.Entry<ItemStack, Map.Entry<Integer, InventoryView>>> to store the data

#

Integer being the raw slot

#

idk how to put the item back in the chest though :/

prisma wave
#

๐Ÿฅถ

obtuse gale
#

get the inventory from the raw slot and change it on the inventory itself ig?

half harness
#

how do i convert raw slot -> regular slot

obtuse gale
#

uh there was a method

#

InventoryView#convertSlot

#

Converts a raw slot ID into its local slot ID into whichever of the two inventories the slot points to.

half harness
#

thx

obtuse gale
#

you should really start reading the jd yourself more often

#

like

#

for real

half harness
#

lemme try just setting the inventoryview first

#

since i just printed it out and the item is air

#

lol

prisma wave
half harness
#

java.lang.IllegalArgumentException: Cannot drop air aww why

#

hm lemme try amount 0

prisma wave
half harness
#

java.lang.IllegalArgumentException: Cannot drop air awww

#

still

#

how do i make the player drop nothing

obtuse gale
#

well idk what you're doing so

#

ยฏ_(ใƒ„)_/ยฏ

half harness
#

i explained in development channel ๐Ÿ˜ซ

#

oh

#

what if i do this

#
try {
  // blah
} catch (IllegalArgumentException ignored) {}
```lol
#

/s i need a real solution

cinder flare
#

Is there not an event for an item going into a players inventory that you can cancel too?

#

Or maybe just delete the item instead of canceling it

ocean quartz
#

Why is this nullable? thonking

obtuse gale
#

ยฏ_(ใƒ„)_/ยฏ

ocean quartz
#

Fucking Bukkit

half harness
#

lol

steel heart
#

Maybe if itโ€™s like the players own inventory or smtng

obtuse gale
#

@ocean quartz this is the single most stupid thing ever

#

you know how the method is in HumanEntity, right?

ocean quartz
#

This method is a mess

#

Yeah checking it right now

obtuse gale
#

it checks for an entityplayer...

#

this is beyond stupid

steel heart
#

Bruh

ocean quartz
#

Bukkit never ceases to surprise

#

So this is the only time it's null?

if (getHandle().activeContainer == formerContainer) {
  return null;
}
obtuse gale
#

idek what that means ngl

ocean quartz
#

Me neither

steel heart
ocean quartz
#

Sounds like it's checking to see if the current inventory being opened is the one already opened lmao

steel heart
#

Is this for mfgui btw Matt?

obtuse gale
#

why wouldn't it return the already existing view... i.e. getOpenInventory

ocean quartz
steel heart
#

Uh Bukkits Inventory and InventoryView api isnt the best I recall trying to use InventoryView, only god knows where that project ended up

ocean quartz
#

I tried with the inventory and it worked to some degree but it wasn't perfect, with the view it seems better because even though two players can have the same inventory opened the views will be different

steel heart
#

Yeah, I mean to be fair InventoryHolder is the most solid thing. From my experience using Object#equals or just == on inventories to compare wonโ€™t go well. InventoryViews are just a mess I mean itโ€™s sort of doesnโ€™t make it easier at all (to compare) so I ended up going back to InventoryHolder.

ocean quartz
#

Yeah, ugh fucking Bukkit

steel heart
#

Canโ€™t deny using nms might be easier

ocean quartz
#

How would you do this with nms?

steel heart
#

Hmm differently to a certain extent. I donโ€™t remember what I did but I can try finding my abandoned gui thing if you wanna have a look. Basically we wouldnโ€™t rely on InventoryHolder, Inventory nor InventoryView but I remember getting some other issues

#

I think I extended their container class and did some funky stuff

obtuse gale
#

Matt you noob

#

Just compare using the view title

ocean quartz
#

Interesting, I might just do inventory holder, can't be bothered with this anymore

obtuse gale
#

Git gud

ocean quartz
#

True!

forest pecan
#

Also String.format is so damn useful for filepaths lol

cinder flare
#

printf gang reversed_fingerguns

steel heart
#

I used to call print(String.format())

forest pecan
#

isnt that just string.format and sysout combined

steel heart
#

Such a pain

forest pecan
oak raft
#

printf too complicated

forest pecan
#

its just string.format

#

lol

#

but with sysout

oak raft
#

no

steel heart
#

Yes

forest pecan
#

its not?

#

pretty sure it is

obtuse gale
#

It is lol

oak raft
#

its not

steel heart
cinder flare
#

It is in C, which is what I was referring to

forest pecan
#

theres printf in java too

obtuse gale
#

PrintWriter/Stream or w/e

obtuse gale
forest pecan
#

now imagine

#

if adventure had printf

#

wait well

#

that wouldnt work well

#

lmao

cinder flare
#

But adventure isn't a logging framework lol

forest pecan
#

lol

#

i was talking about like

#

sending players messages

#

that

obtuse gale
#

I mean that's what translatables do in the end I believe

obtuse gale
#

Estaba hablando de componentes traducibles ๐ŸŒš

steel heart
#

player.sendMessagef when :0

obtuse gale
#

send a translatable component nub

forest pecan
#

whats estaba

#

lol

#

ik the rest of the sentence

obtuse gale
#

I was

forest pecan
#

but not estaba

#

ah

steel heart
#

Spanish literally confusing lol

forest pecan
#

Yo quiero un coc

obtuse gale
#

:o

ocean quartz
#

Hola me llamo la biblioteca

forest pecan
#

we just learned about preterite tense verbs

#

Matt you are named "the library"?

#

damn

steel heart
#

Tengo tienes

forest pecan
#

tengo -> i have

#

tienes -> you have

steel heart
#

oh ye

obtuse gale
#

pog

forest pecan
#

wait one sec

#

let me construct a sentence

ocean quartz
forest pecan
#

Anoche, tu fueron en mi cama

#

is that correct?

#

besides accents lol

steel heart
#

Mi means me right?

forest pecan
#

yes

#

or my

#

well mi doesnt mean me

ocean quartz
#

Fefo, can you understand Spain's spanish well?

forest pecan
#

it means my

steel heart
#

Oh

obtuse gale
#

Hi

#

I'm bacj

#

K

steel heart
#

Tengo mi tienes

forest pecan
#

what lol

#

I have my you have

#

lol

steel heart
#

Lol

obtuse gale
forest pecan
#

oh

forest pecan
#

is that correct

#

ik fueron needs to be past tense

#

cause it was last night

#

(anoche)

obtuse gale
forest pecan
#

they use vosotros

#

a ton

obtuse gale
#

Yeah

ocean quartz
#

Interesting, I have a hard time understanding them but I can understand mexican for example super well

obtuse gale
#

It's more the mangled ones, Venezuela, Colombia, Chile oh my fucking god Chile what a mess

forest pecan
#

well most vosotros forms of verbs have extra accents

#

and very different pronounciation

ocean quartz
#

I agree Chile is horrible, I heard Paraguayan is bad too

forest pecan
#

Matt you're portaguese

#

right

ocean quartz
#

Definitely that

#

Portaquese

forest pecan
#

lol i used q

#

xD

ocean quartz
#

I am Brazilian-Portuguese

forest pecan
#

ah

#

ic

#

Kotlin Karen Brazillian-Portaguese dude

#

i see

obtuse gale
#

Amazing ๐Ÿคก

ocean quartz
#

Dude, took me so long to be able to understand Portugal's portuguese well

forest pecan
#

ohhh

#

i meant fuiste

#

yea

#

Ooof

obtuse gale
#

All past btw

forest pecan
#

so that was "Yesterday, he was in my bed"

#

not

#

"Yeserday, you were in my bed"

#

right

#

oh wait

#

i added tu

#

that makes it completely wrong

#

lol

#

tu fueron xD

#

tu fuiste

obtuse gale
#

Oh yeah but fui etc comes from ir (go) so you basically said "went"

forest pecan
#

yea

obtuse gale
#

Estar being
Estuvo was
Estuvieron were
Etc etc I cba

forest pecan
#

Yeah thats what we just got tested on

#

it was soooo confusing

#

prolly the hardest concept

obtuse gale
#

Dinner time owo

hallow crane
#

When velocity is lacking so many features that you have to create your own event bus to handle server connections...

sweet cipher
#

The crafting inventory is so buggy

oak raft
#

Any Linux users wanna confirm?

cinder flare
#

nah it's more like yay -S google-chrome -> y

#

and then it's done

oblique heath
#

a one liner like apt install chrome -y is usually enough

#

but i guess it depends on if you already have gnome set up

cinder flare
#

ew apt lame

oblique heath
timber oak
#

If a server normally uses LiteBans for bans and mutes, should I then also use it in my plugin or what, I want to bannear and so on

#

Or should I just use spigot anyway

oblique heath
#

if you know your plugin will always be used alongside liteBans it's definitely nicer to work with their API

#

it's always nice to be able to use the same system for something everywhere imo

stuck harbor
lunar cypress
#

Chrome ๐Ÿคฎ

stuck harbor
#

๐Ÿคข chrome

old wyvern
#

@prisma wave would you recommend xfce or kde for manjaros de?

quiet depot
#

kde is the most beautiful de

frail glade
#

The who what now

quiet depot
#

kde plasma

#

desktop environment

#

linux

#

beard

old wyvern
#

Any advantages of xfce over kde? Or is kde the obvious choice?

prisma wave
#

XFCE is more lightweight

#

KDE looks better

quiet depot
#

do u have a source on that?

#

kde is meant to be pretty lightweight these days

prisma wave
#

No source but that seems to be the common conclusion

#

XFCE is better on low end stuff

#

Afaik

old wyvern
#

Hmm I think ill go with kde, thanks bm and piggy

prisma wave
#

np

#

KDE best DE anyway

lunar cypress
#

Xfce should be more lightweight, yeah

hot hull
#

Can someone go help the dude in development, I can't understand shit

onyx loom
#

"support" role ๐Ÿคก

obtuse gale
#

Good morning, 'murIca ๐Ÿ’ช ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ’ช ๐Ÿ˜Ž ๐ŸŽ†

dawn hinge
#

@dusk holly

#

Where's Joe

dusky ibex
#

add compileonly()

#

in your build.gradle

forest pecan
#
  getServer().getPluginManager().registerEvents(new Listener() {
      @EventHandler void onLogin(final PlayerLoginEvent event) {
         event.disallow(Result.KICK_BANNED, "Go away you fat bitch");
      }
  }
forest pecan
#

lmao

half harness
#

ohhh maybe ill try adding test folder
try making another folder, put ur package/classes in there, then delete the src/main/java and make it again

#

since i dont really know what else to do

steel heart
#

send ur settings.gradle

#

and build.gradle

#

may wanna delete .idea and regenerate it also

compact perchBOT
half harness
#

btw dont use compile

#

use implementation

#

also i dont think they're on jcenter anymore

steel heart
#

^

#

also dont use +, it will always bump latest version which can be a catastrophe sometimes

half harness
#

i dont think theres much you can do.. try making a new project and move ur package/classes to there, along with build.gradle...

#

since you've done literally everything

steel heart
#

restart and invalidate caches efe

half harness
#

oh

#

wtf

steel heart
#

the chances are something went wrong and its in a loop trying to recover itself

#

uh yeah well thats weird, and you're on latest version? I mean it could eventually have received a patch in newer versions

#

I use 6.7

#

but shouldnt matter

#

Help -> Check for updates

obtuse gale
#

-> > >

steel heart
#

exciting

obtuse gale
#

lol

forest pecan
#

good luck

#

lmfao

steel heart
#

did you do anything to your intellij before?

#

might actually wanna re install intellij entirely but Idk you may lose some preferences etc

#

ye

#

its cuz certain patches require a certain version

forest pecan
#

File#getAbsoluteMethod gets the path but it is native right?

#

so it uses backslash

#

and forwardslash for different operating systems right

obtuse gale
#

just use paths smh

forest pecan
#

i cant lmao

obtuse gale
#

why not

forest pecan
#

and also how would it be any different

#

if i did

#

File#toPath

steel heart
#

Paths are much better

obtuse gale
#

what are you trying to do

forest pecan
#

I have stored my video file as a File object. I must have it as a File object because I need to get information such as

#

size, extension

#

etc

quiet depot
#

sir this is dev general

obtuse gale
forest pecan
#

need it for an mrl

#

to pass to native libraries

quiet depot
#

mrl?

forest pecan
#

A media resource locator (MRL) is a URI used to uniquely identify and locate a multimedia resource. It is used by the VideoLAN and Xine media players, as well as the Java Media Framework (JMF) API.
VLC, for example, supports the following MRLs:
dvd://[โŸจdeviceโŸฉ][@โŸจraw deviceโŸฉ][@[โŸจtitleโŸฉ][,[โŸจchapterโŸฉ][,โŸจangleโŸฉ]]]
vcd://[โŸจdeviceโŸฉ][@{E|P|E|T|S}[โŸจn...

obtuse gale
#

ah, a URI

steel heart
#

go to the dev portal

#

then go to ur app

#

then go to auth2

#

check the bot box

#

then check the permission u want

#

then use the link generated

forest pecan
#

so does File#getAbsolutePath use native paths or java paths (like forward slash)?

#

it says the error right there lol

steel heart
#

d;jdk File#getAbsolutePath

ruby craterBOT
#
public String getAbsolutePath()
throws SecurityException```
Description:

Returns the absolute pathname string of this abstract pathname.

If this abstract pathname is already absolute, then the pathname string is simply returned as if by the getPath() method. If this abstract pathname is the empty abstract pathname then the pathname string of the current user directory, which is named by the system property user.dir, is returned. Otherwise this pathname is resolved in a system-dependent way. On UNIX systems, a relative pathname is made absolute by resolving it against the current user directory. On Microsoft Windows systems, a relative pathname is made absolute by resolving it against the current directory of the drive named by the pathname, if any; if not, it is resolved against the current user directory.

Returns:

The absolute pathname string denoting the same file or directory as this abstract pathname

Throws:

SecurityException - If a required system property value cannot be accessed.

steel heart
#

I always use Path so Idk

obtuse gale
#

the pathname string is simply returned as if by the getPath() method

steel heart
#

but usually I call Path#toAbsolutePath then

obtuse gale
#

The resulting string uses the default name-separator character to separate the names in the name sequence

quiet depot
#

wait so why can't you use the nio api?

#

out of curiosity

#

does nio literally stand for "new input output"

steel heart
#

non-blocking ?

obtuse gale
#

ยฏ_(ใƒ„)_/ยฏ

#

pulse smh

forest pecan
#

I mean, I'm just passing in a path from a File object provided before from installation

steel heart
#

sadly bukkit hasnt adapted to Paths so Ig thats a good enough excuse

#

assume you're working with bukkit api that is

forest pecan
#

Of course

#

I don't have anything against nio obviously

#

you need to give ur bot perms

forest pecan
obtuse gale
#

from file to path? yeah

forest pecan
#

well, that uses os dependent separators

#

right

steel heart
#

and then ofc if u want the file back just use Path#toFile I think,

yeah it does with high certainty

obtuse gale
#

I mean I answered your original question above lol

forest pecan
#

first one isn't true. Read on lol

#

If this abstract pathname is already absolute

#

And "default name-separator". I am assuming that means Java specific?

#

So forward slashes

obtuse gale
#

ยฏ_(ใƒ„)_/ยฏ

forest pecan
#

let me run some tests

obtuse gale
#

?tryandsee

compact perchBOT
steel heart
#

d;jdk File%pathSeparator

ruby craterBOT
#
public static final String pathSeparator```
Description:

The system-dependent path-separator character, represented as a string for convenience. This string contains a single character, namely pathSeparatorChar.

steel heart
#

d;jdk File%pathSeparatorChar

ruby craterBOT
#
public static final char pathSeparatorChar```
Description:

The system-dependent path-separator character. This field is initialized to contain the first character of the value of the system property path.separator. This character is used to separate filenames in a sequence of files given as a path list . On UNIX systems, this character is ':'; on Microsoft Windows systems it is ';'.

steel heart
#

wait

quiet depot
#

path separator is for separating paths

forest pecan
#

shouldn't that work still?

obtuse gale
#

path separator != separator

quiet depot
#

are you sure that's what you want?

steel heart
#

d;jdk File%separator

ruby craterBOT
#
public static final String separator```
Description:

The system-dependent default name-separator character, represented as a string for convenience. This string contains a single character, namely separatorChar.

steel heart
#

it probably use the constants provided by File as its path separator

forest pecan
#

Yeah and that is system-dependent so it should be native

obtuse gale
#

are chunk snapshots cached or something?

quiet depot
#

wtf are you doing

#

what do you need that separator for

obtuse gale
#

a URI

quiet depot
#

uri should work with /, no?

forest pecan
#

Basically, the issue is passing a path

#

to the native libraries

#

cause the path doesnt allow java paths if you know what i mean

#

it only allows like os specific paths. And I wanted to verify

#

that the resource being passed in is correct

#

Because there were some ugly jna issues that were happening

#

causing this

obtuse gale
#

I know for a fact Paths work well with the system dependent path name separators

quiet depot
#

can't you just do a simple .replace?

obtuse gale
#

that's on File btw

#

so yes

forest pecan
#

Well yeah it should work i mean

#

then it's not that

#

which is causing the issue

obtuse gale
#

... you could have printed the bloody thing all this time

#

ffs

forest pecan
#

i can't

obtuse gale
#

to debug if it was the cause of the issue or not

#

how can you not?

forest pecan
#

I'm on my school laptop

#

lmfao

obtuse gale
#

smh

old wyvern
#

What exactly is the issue then?

obtuse gale
#

classic xy

forest pecan
#

Uh wot?

quiet depot
#

o yugi

#

glad you're here

#

what gpu do you hvae?

forest pecan
#

Did you try replace the Java-convention forward-slashes with the native convention backward slashes?
/shrug

old wyvern
quiet depot
#

pre warning, nvidia and linux is questionable and will require a reasonable amount of tinkering

#

if you're switching to linux though I imagine you're already familiar (and an advocate of) tinkering

old wyvern
#

A bit

#

Ive only used kde neon like you recommended

#

On a vm

quiet depot
#

and I recommend sticking with that

#

is this your first time using linux?

#

apart from on a vm

old wyvern
#

Would manjaro not install nvidea drivers automatically?

quiet depot
#

oh that's not the problem

old wyvern
quiet depot
#

the problem is the drivers are eh

#

there's two sets of drivers for nvidia on linux

old wyvern
#

I've used linux for my vps

quiet depot
#

you've got the open source drivers (noveau) and nvidia's proprietary drivers

old wyvern
#

Apparently manjaro provided a setup for "nonfree" drivers

quiet depot
#

so does ubuntu (kde neon)

old wyvern
#

Oh would anything else need to be done after that?