#dev-general

1 messages · Page 246 of 1

old wyvern
#

^

half harness
#

any way to make releases/tags from intellij

prisma wave
#

VCS tab

#

literally has it

#

somewhere

half harness
#

i cant find it

#

and for me its Git

#

not VCS

prisma wave
#

yeah still

#

it's there somewhere

#

just look around

#

i cant remmeber where

half harness
onyx loom
#

new taG?

prisma wave
#

New Tag

#

🙄

half harness
#

oh

#

I cant read

#

wait

#

where do I put the version

#

on github theres Version and Name

#

in intellij theres just Name

prisma wave
#

tags only have names

half harness
prisma wave
#

that's a release

half harness
#

oh

prisma wave
#

not a tag

half harness
#

wut

#

then how do I make a tag on github

prisma wave
#

im pretty sure you cant

half harness
#

oh

prisma wave
#

because a tag has to be done with a commit

#

maybe you can

frigid badge
#

a release = also a tag

forest pecan
#

Should I take ap computer science lmfao

foggy pond
#

What do you guys think is Microsoft's plan with Minecraft Java edition

#

I have a feeling they'll wanna get rid of it in some way, since it makes way less money than Bedrock Edition

old wyvern
#

Probably not

#

rather they would try to unify the diff platforms and introduce other things from bedrock in JE

steel heart
old wyvern
#

or atleast get Bedrock close enough to JE that people wont care much

onyx loom
#

is bedrock still a mess?

old wyvern
#

Yea

onyx loom
#

ig itll improve over time

#

apparently performance is much better on bedrock tho ive heard

old wyvern
#

I think there still are the fall through world issues from float precision

onyx loom
#

lol

foggy pond
#

Bedrock is bad

#

Imagine paying for mods custom maps and skins slobbyjoy

old wyvern
#

You can use a custom mod launcher too I think

onyx loom
#

in JE u dont pay for anything, except u give ur wallet to servers instead fingerguns

old wyvern
#

There used to be a few a few years back

#

Not sure about rn

half harness
#

How come whenever I ctrl + click a class that has @NotNull in it my IDE gives a billion errors saying that it cannot find JetBrains and stuff?

#

then I have to invalidate caches and restart

old wyvern
#

Probably because jetbrains annotations was used as a compileOnly dependency

wanton sentinel
#

I broke my keyboard

#

Idk how

#

I do alt + 21 and it goes down 21 lines then pastes §

static zealot
#

where does it do that? everywhere?

#

seems like you binded it to something. or the app you're using it in has that key combination binded to something

wanton sentinel
#

Everywhere

foggy pond
#

It does that for me too

#

It pastes § for me asw

#

And on IntelliJ IDEA it goes down 21 lines too

wanton sentinel
#

yeah

foggy pond
#

I'd assume that alt + numbers goes down the typed amount of lines

#

And alt + 21 is the code for §

wanton sentinel
#

Yup

#

The most important one

static zealot
#

well you could probably change it to something like shift+alt+number

#

if that's not taken already xD

jovial warren
#

bit of a random question guys: anyone got any idea how to use in-memory caching with OkHttp?

#

no matter how hard I look, all I can seem to find is the Cache class, which is only for file caching

frigid badge
#

you really do rethink life when you are working at 2 AM

quiet depot
#

still php?

frigid badge
#

yup..

#

atleast I wrote this wrapper in nice code

#

I guess

#

for php's standards

quiet depot
#

bully ur boss into letting you rewrite the php in another language

onyx loom
#

elara

frigid badge
#

we actually wanted to do that

#

since the other php developers don't work here anymore

#

but it's way too big of an application

#

this has been in the works for more than a year now

onyx loom
#

oof.

#

pain.

frigid badge
#

we're so close though

#

even though it's still crappy imo

#

for reference this is the db

#

every line is a relationship

quiet depot
#

lel

frigid badge
#

and that's just the db lol

#

sad life

ocean quartz
#

That is beautiful

onyx loom
#

🥲

weary epoch
#

i need to take a crap

quiet depot
#

okie

weary epoch
#

omg

#

its gonna be a biggie

quiet depot
#

okie

forest pecan
#

I dont understand my issue

#

I'm getting this exception:

[00:14:03 ERROR]: [org.bukkit.craftbukkit.v1_16_R3.CraftServer] null initializing SMPPlugin v1.0.0 (Is it up to date?)
java.lang.NullPointerException: null
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.4.jar:git-Paper-323]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:206) ~[patched_1.16.4.jar:git-Paper-323]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:936) ~[patched_1.16.4.jar:git-Paper-323]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[patched_1.16.4.jar:git-Paper-323]
        at java.lang.Thread.run(Thread.java:832) [?:?]
#

even with no code

#

in my onEnable method

#

like nothing

#

its still getting that weird npe for no reason

#

im also packaging correctly

#

the plugin.yml and classes are there when i extract the jar file

obtuse gale
#

Is it up to date?

forest pecan
obtuse gale
#

that's weird

surreal quarry
#

send your plugin.yml maybe?

forest pecan
#

worked before with no changes toplugin.yml

#

but

#
main: com.github.pulsebeat02.SMPPlugin
name: SMPPlugin
version: 1.0.0
description: Plugin for the SMP Server
api-version: 1.16
author: PulseBeat_02
prefix: SMP Plugin
commands:
  status:
    description: Sets your current status
    permission: smp.status
    usage: /status set [peaceful | war]
permissions:
  smp.status:
    description: Allows the user to set the status
    default: true
  smp.*:
    description: Allows access to all commands
    default: op
obtuse gale
#

if anything it would throw invallid pluginyml or whatever

surreal quarry
#

yea ik but i googled the error and it said something to do with the plugin.yml so i wanted to see it

#

it looks fine tho

obtuse gale
#

smp.*:
oh jesus no please leave wildcards to the permissions plugin

forest pecan
#

its a private server

#

no permissions plugin

obtuse gale
#

hm

forest pecan
#

like just a server with one plugin

obtuse gale
#

might want to put quotations in this tho /status set [peaceful | war]

forest pecan
#

yeah

obtuse gale
#

weird af

forest pecan
#

but either way

#

the npe still there

#

idk why

#

maybe my server jar shit

#

let me redownload paper

#

lol

obtuse gale
#

lol

surreal quarry
#

yea thats really weird ive never seen that before lol

forest pecan
#

nope

#

is it a bug?

#

like a paper bug?

surreal quarry
#

i kinda doubt it but its possible i guess

forest pecan
#

thats my main plugin class

#

if i comment out

#

everything in onenable

#

it doesnt work still :/

surreal quarry
#

dont use Objects.requireNonNull there

#

just null check normally or ignore the IJ warning lol

forest pecan
#

yeah lol

#

i did

#

however

#

see this as my warnings

#

File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

#

And

#

/C:/Users/Brandon Li/Downloads/MinecraftVideo2_Master/SMP-Plugin/src/main/java/com/github/pulsebeat02/SMPPlugin.java: C:\Users\Brandon Li\Downloads\MinecraftVideo2_Master\SMP-Plugin\src\main\java\com\github\pulsebeat02\SMPPlugin.java uses or overrides a deprecated API. /C:/Users/Brandon Li/Downloads/MinecraftVideo2_Master/SMP-Plugin/src/main/java/com/github/pulsebeat02/SMPPlugin.java: Recompile with -Xlint:deprecation for details.

obtuse gale
#

thing is

forest pecan
#

that isnt realted

obtuse gale
#

or even the constructor

#

dk the stages exactly

forest pecan
#

Yeah

#

well

#

it doesnt reach oneanble

obtuse gale
#

lol most defo not

forest pecan
#

Yeah

#

very weird

obtuse gale
#

uuh wait a second

surreal quarry
#

wrong logger

#

maybe

#

nvm

obtuse gale
#

looks like it?

#

something to do with the logger

surreal quarry
#

that was another thing google said but it looks right

obtuse gale
surreal quarry
#

it wont be right before probably

obtuse gale
#

it should

surreal quarry
#

actually i guess it depends where the error is

#

it might be in this case

#

wait

obtuse gale
surreal quarry
#

private final Logger logger = getLogger();

    @Override
    public Logger getLogger() {
        return logger;
    }```
this seems wrong
obtuse gale
#

wut

#

lol

surreal quarry
#

logger = getLogger() but getLogger returns logger

#

why are you overriding getConfig and getLogger

#

leave those methods as they are

obtuse gale
#

lol

surreal quarry
#

idk if that will fix the original problem but its definitely a problem

obtuse gale
#

yeah that will

#

because it initially returns null

obtuse gale
#

since it's null, it throws

surreal quarry
#

ah yea

obtuse gale
#

lmao

surreal quarry
#

you can conveniently fix it with some assertions and annotations :)

oak coyote
#

Ahh yes

#

Sorted no issues will happen with that

surreal quarry
#

theres no warnings i can't imagine an error ever ocurring

oak coyote
#

Well exactly

#

My IDE is perfect and can detect every situation possible

ocean quartz
#

Don't assert it

oak coyote
#

It’s a joke matt

surreal quarry
#

i just did the "smart" fixes that IJ provided lol

oak coyote
#

Don’t worry

ocean quartz
#

o

surreal quarry
#

also yea

#

if you thought that was my code you should have been more worried about the code itself than the annotation xD

ocean quartz
#

Don't mind me, it's 5am

surreal quarry
#

fair enough

oak coyote
#

Initialising with its own getter 😂

surreal quarry
#

logger = getLogger;
getLogger = logger;

#

flawless

viscid charm
#

yo u guys know why i am getting this error upon load up when there is data saved.

[03:59:40] [Server thread/WARN]:     at org.bukkit.Location.getChunk(Location.java:78)
[03:59:40] [Server thread/WARN]:     at codes.biscuit.litcollectionchest.utils.ChunkCoords.<init>(ChunkCoords.java:19)
[03:59:40] [Server thread/WARN]:     at codes.biscuit.litcollectionchest.utils.ConfigValues.loadChests(ConfigValues.java:89)
[03:59:40] [Server thread/WARN]:     at codes.biscuit.litcollectionchest.LitCollectionChest.onEnable(LitCollectionChest.java:19)
[03:59:40] [Server thread/WARN]:     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
[03:59:40] [Server thread/WARN]:     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332)
[03:59:40] [Server thread/WARN]:     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404)
[03:59:40] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359)
[03:59:40] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318)
[03:59:40] [Server thread/WARN]:     at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:403)
[03:59:40] [Server thread/WARN]:     at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:367)
[03:59:40] [Server thread/WARN]:     at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:322)
[03:59:40] [Server thread/WARN]:     at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:283)
[03:59:40] [Server thread/WARN]:     at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:558)
[03:59:40] [Server thread/WARN]:     at java.lang.Thread.run(Thread.java:748)```
#
package codes.biscuit.litcollectionchest.utils;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.bukkit.Chunk;
import org.bukkit.Location;

public class ChunkCoords {

    private int x;
    private int z;

    public ChunkCoords(Chunk chunk) {
        this.x = chunk.getX();
        this.z = chunk.getZ();
    }

    public ChunkCoords(Location loc) {
        this(loc.getChunk());
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) { return false; }
        if (obj == this) { return true; }
        if (obj.getClass() != getClass()) {
            return false;
        }
        ChunkCoords chunkCoords = (ChunkCoords)obj;
        return new EqualsBuilder().append(x, chunkCoords.x).append(z, chunkCoords.z).isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(83, 11).append(x).append(z).toHashCode();
    }
}
#

the issue line is this(loc.getChunk());

hot hull
#

Location is null

viscid charm
#

hmm wtf? but it's not, the data.yml has the coords saved I believe.

obtuse gale
#

The location isn't null

#

If it's getChunk, then the World the Location is in is null

#

Make sure your plugin.yml has load: POSTWORLD

#

And that a world by that name actually exists lmao

oak coyote
#

Isn’t that because the location you are on about isn’t loaded yet?

#

You need to ensure the chunk is loaded

obtuse gale
#

d;spigot location#getchunk

ruby craterBOT
#
@NotNull
public Chunk getChunk()```
Description:

Gets the chunk at the represented location

Returns:

Chunk at the represented location

#
@NotNull
public Chunk getChunk()```
Description:

Gets the chunk at the represented location

Returns:

Chunk at the represented location

obtuse gale
#

Wat

oak coyote
#

If you try to modify a chunk that isn’t loaded you get fat errors

quiet depot
#

o

#

i'm hosting it localhost rn

obtuse gale
#

Why did it do the thing twice

#

O

quiet depot
#

cuz i'm working on orm stuff

#

should probably disable the jda registerable

obtuse gale
#

lol

obtuse gale
#

Even if the chunk is unloaded it should return a valid Chunk

oak coyote
#

Your location is null I believe

obtuse gale
#

That isn't loaded

oak coyote
#

That is where the NPE is caused

obtuse gale
#

The location can't be null, otherwise it wouldn't be caused inside the getChunk method

oak coyote
#

As the subMethod is not nullable

#

Just broadcast your location

#

Check it

hot hull
#

The location is null

#

Since the world isn't loaded yet

#

I said that at the start ;(

obtuse gale
#

Location cannot be null

#

otherwise it wouldn't be caused inside the getChunk method

quiet depot
#

@prisma wave not gonna add that lombok faq because someone had a hissy fit when I pasted it elsewhere and they said the info is outdated

#

I think we should just start recommending people to update java if they want the features that lombok provides

#

because they're slowly being added to java

hot hull
#

He sounds like a butthurt man

obtuse gale
#

ok since generics arent gonna work how should i do this head thing?

quiet depot
#

wat

obtuse gale
#

am making heads plugin some mobs have special cases ie a sheep, bee, wolf etc

#

atm all mobs just drop heads

#

but i need a way to handle special cases

#

was gonna just use generic <T:Entity> then fun getHead(entity:T) then store in map but that wont work cos T isnt known when pulled from mpa

#

so whats best way to do

hot hull
#

Just cast yourself smh

obtuse gale
#

sounds like EfFort to me

hot hull
#

Smh

viscid charm
#

postworld is right

#

but thething is

#

i just added dependancy to multiverse

#

and it worked

prisma wave
#

I cba to crawl through all of that, but the first point is literally based off of experience -- very recently, using a method reference to a Lombok generated method caused weird internal errors which were very difficult to debug

quiet depot
#

lol

#

would rather go with your word on it than the other guy's anyway

#

he was so butthurt and was being a dick about it

prisma wave
#

Yeah the reply is pretty condescending

quiet depot
#

wouldn't even tell me why my info was wrong at first, just said "that's outdated"

#

I had to apologise to him just to get some information lol

prisma wave
#

🙄

#

What server was this in?

#

Spigot?

quiet depot
#

spigot

prisma wave
#

Not surprised then

quiet depot
#

it was a shame because I thought the guy was actually a decent person

#

boy was I wrong

prisma wave
#

People can get toxic pretty quickly when you say their favourite things are bad

#

¯\_(ツ)_/¯

#

Hopefully once java 11 becomes mainstream people start to move away from Lombok anyway

quiet depot
#

doubt java 11 would do that

#

maybe 17

#

because records and shit

prisma wave
#

yeah but that's gonna take a long time

quiet depot
#

eh

#

whatever

#

it'll happen within the next 4 years

#

that's a guarantee

#

might be 4 and a half actually

prisma wave
#

What's it? Paper requiring it?

quiet depot
#

ye

prisma wave
#

hopefully

quiet depot
#

paper said they're going to be bumping the requirement to every new lts release

#

assuming they give 3 years per release, that means by java 22 or whatever the next lts is after 17, paper should be at least 17

#

they may not do 3 years though, it could be done in as soon as 2 years

prisma wave
#

that's good to hear

regal gale
#

Even though I really liked to learn to using Android Studio environment, I can't even with this potato pc..

prisma wave
#

F

#

Android studio is good

quiet depot
#

do you use ij thien?

#

bm ij ultimate has everything android studio has right?

#

yeah it does

#

just checked changelogs

regal gale
#

I use IJ for coding with it, yeah

quiet depot
#

thien if you use ij then you should be able to run android studio

regal gale
#

But as soon as I turned on android emulator, my pc wants to burn already

quiet depot
#

oh

regal gale
#

Is there a way to connect that to a real phone instead? thonk

quiet depot
#

¯_(ツ)_/¯

regal gale
#

I only think of exporting .apk everytime on a USB cable then install

obtuse gale
#

You have to enable debugging in your phone dev setting though

prisma wave
#

Yeah turn on USB debugging and android studio should show it as a device

jovial warren
#

and to access the dev settings mode, go to about and tap the build number 7 times

#

you'll know you're doing it right because you'll get messages like "you're 2 taps away from enabling developer mode" or something like that

#

"you are now x steps away from being a developer" that's the one

prisma wave
#

okay, im looking at the bytecode of stuff and this is pretty interesting

quiet depot
#

of what stuff

prisma wave
#

java already does the implicit else sort of thing we do

#

simple programs

#

1 sec

#
        if(args.length == 0) {
            System.out.println("Hello World");
        }```
this for example, gets translated to ```
1: arraylength //puts the array length on the stack
2: ifne #13 //if the value on the stack is not 0, go to line 13
...
13: return
#

and then it has the printing thing in between 2 and 13

#

kinda cool

#

there's a dedicated instruction for arraylength too which is interesting

quiet depot
#

oh yeah

#

I've actually heard the implicit else thing before

prisma wave
#

yeah I think conclure mentioned it

quiet depot
#

might've

#

idk if it was in here or not

#

just sounds familiar

prisma wave
#

yeah

#

i guess it's easier to do it that way

#

switches are fun too

#

the fallthrough is just because all of the branches are done in sequence

#

and then if you add a break then it just uses goto to break out of the branch code

#

fun

lunar cypress
#

Most compilers work this way with if and else

prisma wave
#

yeah I've just never really looked into it

#

it's pretty interesting

lunar cypress
#

Certainly

#

Certainly

prisma wave
#

do you know how astore would work if there were more than 2^16 local variables?

#

would it just not allow that many?

lunar cypress
#

It wouldn't

#

I assume your program won't compile

prisma wave
#

Makes sense

lunar cypress
#

I mean you can try it out if you want

prisma wave
#

im not sure i have the patience to make that many variables

#

or to try automate it

obtuse gale
#

wrong chat ups

prisma wave
#

does the dup instruction duplicate the value or the reference?

#

all i can find is

duplicate the value on top of the stack

but that sounds pretty wasteful to duplicate whenever you call a method?

lunar cypress
#

how so?

#

dup isn't called whenever you call a method

prisma wave
#

is it not?

lunar cypress
#

also copying primitives and references is basically free

prisma wave
#

i thought the method call popped it from the stack

lunar cypress
#

yes

#

that doesn't mean it needs to be duped

prisma wave
#

so you'd need to dup it if you needed that object later

#

assuming it was a local variable

#

but i think it dupes the reference, according to an explanation i found

#

wait

#

idk

lunar cypress
#

You load the variable and call some method on it

#

the variable still exists

#

you can push it to the stack again

prisma wave
#

hmm

onyx loom
#

what does internal in kotlin comlile to?

prisma wave
#

it scrambles the method name

#

to make it like module$methodName()

#

which is usually a good sign you shouldnt use it

quiet depot
#

yum

lunar cypress
#
aload 0 // push reference to local variable 0 to stack
invokevirtual toString() // call toString method on top stack reference, consuming it
aload 0 // push reference to local variable 0 to stack
prisma wave
#

yeah

lunar cypress
#

doesn't affect the variable

quiet depot
#

til johnny's pfp isn't a still picture

#

i'm so blind

prisma wave
#

oh so in that example is the actual value of local variable 0 on the stack?

#

and then it puts a reference as well

lunar cypress
#

the "actual value" is a reference

prisma wave
#

oh right yeah

#

so dup is only gonna duplicate a reference

lunar cypress
#

yes

prisma wave
#

or a primitive

lunar cypress
#

yes, in any case no more than 32 or 64 bits

prisma wave
#

okay that makes sense

#

so in this example ```
0: new #2 // class Main$1
3: dup
4: invokespecial #3 // Method Main$1."<init>":()V
7: astore_1

then we duplicate that reference, 
then invoke the constructor popping the duplicate, 
and then store the original reference into a local variable
#

is that right?

lunar cypress
#

yes

prisma wave
#

awesome

#

okay that makes sense, thanks

forest pecan
#

i didnt see that

#

weird

prisma wave
#

might want a more catchy name as well

#

the Ultimate Spigot and Java Course

quiet depot
#

MienAcademy

#

or

#

MineCademy

#

idk

#

either or

#

both are unique

prisma wave
#

Sounds familiar...

onyx loom
#

never heard of it

#

sounds like a great name tbh

lunar cypress
#

The verbosity of the notes on the slides is almost script level anyway

prisma wave
#

Yeah that's what I was thinking

#

I'll just add some detail in the video and then attach a transcript with the slides

#

just did a test run, wasn't recording but it seems like there's enough to talk about

#

gonna do an actual recording tomorrow sometime

obtuse gale
#

open_mouth

prisma wave
#

😮

surreal quarry
#

this looks like good stuff BM

prisma wave
#

thank you

#

i think it'll be good

surreal quarry
#

yea probably one of the best YT tutorial series out there if you go through with finishing it

prisma wave
#

ha hopefully

#

ive wanted to do this for ages so i'll try and finish it

surreal quarry
#

nice

#

are you using carbon for those code screenshots?

prisma wave
#

yeah lol

onyx loom
#

dont fall into the trap of "write down this code here, ill explain what it does later" pls

surreal quarry
#

thought so lol. theirs look so good

prisma wave
#

yeah carbon is amazing

prisma wave
#

it's difficult to explain a java hello world to a complete beginner tho

#

what is public, what is class, what is void, what is static, what is String[], what is args, what is System, what is out, what is println

lunar cypress
#

Yeah that is not productive

prisma wave
#

yeah it's a lot harder than something like python

steel heart
#

Best side of java

prisma wave
#

i'll just gloss over it and say "write code in here for now"

surreal quarry
#

you could maybe explain strings there

#

which is pretty basic

prisma wave
#

well I'm hoping they are kind of obvious

#

i'll explain what they actually are later

quiet depot
#

After 30 hours (12 hours straight today :d), 2.3k additions, and .5k deletions, I present to the world docdex, a public bot.

@obtuse gale it's on now btw, and sorry for topic change guys

#

i need to go to sleep

prisma wave
#

but "this bit is in quote marks and gets printed" is pretty self explanatory

#

nice

steel heart
#

Nice

#

Now Ima copy pasta doc dex

quiet depot
#

can't actually add it to ur server yet

#

i need to do some testing

surreal quarry
#

congrats

steel heart
#

Aww

quiet depot
surreal quarry
#

where’s that overview

#

is that on GH?

quiet depot
#

it's a plugin called statistic

#

for ij

surreal quarry
#

oh cool

steel heart
#

Oo let me downloadé that

surreal quarry
#

i’ve always wanted to see breakdowns like that for my projects lol

#

i figured github could provide it but never did

prisma wave
#

wakatime or statistic plugin

quiet depot
#

i use both

lunar cypress
#

What's the bot do?

quiet depot
#

d;string

ruby craterBOT
quiet depot
#

lol bad example

prisma wave
#

I've got a self-hosted wakatime instance because the 2 week limit kinda sucks

quiet depot
#

d;player

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: java.awt.print.Paper java.util.concurrent.Phaser javax.swing.text.html.parser.Parser java.util.concurrent.Delayed javax.swing.Painter

quiet depot
#

d;spigot player

ruby craterBOT
#
public interface Player
extends HumanEntity, PluginMessageRecipient, Conversable, OfflinePlayer```
Description:

Represents a player, connected or not

quiet depot
#

shit like that

lunar cypress
#

Ah, I see

quiet depot
#

it's not just a bot

steel heart
#

d;spigot Player#getPlayer

ruby craterBOT
#
@Nullable
Player getPlayer()```
Description:

Gets a Player object that this represents, if there is one If the player is online, this will return that player. Otherwise, it will return null.

Returns:

Online player

quiet depot
#

it's an api

lunar cypress
#

Maybe send bigger docs regardless but crop them off

frigid badge
#

or paginate

quiet depot
#

I wanted to paginate but I'm not sure how to accurately determine a pagination point

surreal quarry
#

eh i like that it looks

#

links*

quiet depot
#

jdk javadocs often have code examples in them so can't really use newline for a cut off point

frigid badge
#

how do you even load the javadocs

#

scraping?

quiet depot
#

yes

#

check github

wintry sierra
#

Hi, I have a question;
(Java)
if you add an object to a set within an if statement, does it still add the object, example:

something;
}

assuming it obviously returns true, would that object be added to the set?

frigid badge
#

there's probably just an element per method

forest pecan
#

Yes (if it doesnt exist in the set yet)

surreal quarry
frigid badge
#

which you can show

lunar cypress
#

Definitely cool stuff, I tried to make one of these myself and somewhat failed

#

Scraping different javadoc versions is no fun

quiet depot
#

this is a bit different than alternatives

#

most people do a web request every time

#

this one actually scrapes an entire javadoc and stores the data

forest pecan
#

scratch www

lunar cypress
#

It will be public, you say?

forest pecan
#

only if it already contains it tho

surreal quarry
forest pecan
#

it will return true

lunar cypress
#

Or free to host yourself?

wintry sierra
#

thanks Pulse & Brister.

quiet depot
#

both

prisma wave
#

you can think of it like this java boolean added = set.add(obj); if (added) { something; }

quiet depot
forest pecan
frigid badge
#

where's graphql queries @ tho

#

;p

quiet depot
#

yes

lunar cypress
#

We're definitely gonna steal that for our server

#

We've had our half-broken javadoc bot for too long

quiet depot
#

I'd prefer it if you used my public ver which I'll set up tomorrow

#

just so I can get a dev badge if they ever bring it back

#

but if self hosting is essential then the code is there

#

if we're missing a javadoc, just ping me with the javadoc jar and i'll add it

steel heart
#

Yeah I will be using the public one

surreal quarry
#

same lol

lunar cypress
#

They won't bring back dev badges I'm fairly sure

quiet depot
#

i can live in hope

obtuse gale
#

Nighty Piggy ablobwave

quiet depot
#

yep

#

gn people

steel heart
#

Aww they changed it from verified bot developer to early verified bot developer:/

quiet depot
#

that's why i think they'll add it back

#

cuz of that "early"

steel heart
#

hmm yeah mb

prisma wave
#

gn

forest pecan
#

dont sleep stay strong

lunar cypress
#

Oh that is definitely not the reason

#

It's rather because they didn't want to remove the badges they'd already given out

#

But still signify that those aren't the only verified people

#

Any plans on adding html->markdown for javadoc texts?

quiet depot
#

make an issue on the repo

#

it could definitely be done

ocean quartz
#

Someone needs to PR Kotlin to allow

val something = getSomething() ?: {
  println("error")
  return
}

This would be so useful

prisma wave
#

?: run {}

ocean quartz
#

Not as nice

prisma wave
#

no

#

but unavoidable

onyx loom
#

unavoidable for now fingerguns

prisma wave
#

because {} is an expression it would be interpreted as a lambda

#

unless they added a special case

#

and that's gross-er

#

idk

ocean quartz
#

Yeah it'd probably need to like default to run in this specific case

prisma wave
#

you could replicate it

prisma wave
#
inline infix fun <T> T.orElse(other: () -> T) : T {
  if(this != null) {
    return this
  }
  return other()
}

getSomething() orElse {
  println("lol")
  return
}
#

pretty sure that would work

#

but it's quite gross

#

yeah it works

#

mostly

distant sun
#

wait ?: run { } is a thing?

onyx loom
#

🙂

static zealot
#

oh

prisma wave
#

dont

#

horrible

onyx loom
#

cant

prisma wave
#

sounds evil

#

althoughhhhhh

onyx loom
#

🥲

prisma wave
#

planned feature for elara ```rust
let lazy lol = someIntenseCalculation()

#

lateinit val

#

or just laziness

steel heart
#

Pro programming language

old wyvern
#

pro gramming language

prisma wave
#

pro gaming language

old wyvern
#

pro language

prisma wave
#

development general

#

not configuration help

#

ok

#

cry in here

#

nice

onyx loom
#

cry about the fact that no other language has managed to topple visual basic in its greatness

onyx loom
#

na 💯

#

VB is better

#

sorry

old wyvern
#

Actually I know exactly why I started, there used to be this game called Club Penguin. There were people making "trainers" a.k.a hacked client. I wanted to know how to make one

prisma wave
#

lmaooo

old wyvern
#

xD

prisma wave
#

club penguin hacks

old wyvern
#

Yea those old yt tutorials

jovial iris
#

O-o

old wyvern
#

with "hit the floor" as the backing track

jovial iris
#

Hi

frigid badge
#

I started to make a bot in darkorbit

jovial iris
#

I have been S u m m o n e d

frigid badge
#

my first application had imagine recognition and everything

old wyvern
#

Whats darkorbit?

frigid badge
#

a game by bigpoint

#

I wanted to bot picking up shit

jovial iris
#

I’ve just been working on school so no time to code

#

❤️

frigid badge
#

I've been working a lot so no time to do non coding stuff

#

:/

onyx loom
#

☹️

#

no cod

frigid badge
old wyvern
#

Thats sounds vaguely like that weird youtube video

high violet
#

who is she?

frigid badge
#

lmfao

onyx loom
#

"prodigy" programmer

frigid badge
#

that's an old video

high violet
#

AHAHAH

#

no

#

basically my Internet lagged

#

and to me we were still talking about Elara

old wyvern
#

Elara is a programming language

high violet
#

sorry for not seeing gender

old wyvern
jovial iris
#

@obtuse gale why cant i dm you

high violet
#

yeah I know, I just wanted to joker arouns

jovial iris
#

ah

old wyvern
#

ew

high violet
#

Lol ok

#

is it for the anime profile pic?

frigid badge
#

imagine this man opening up ph

#

oh jeez

jovial iris
#

dont worry we all know that efefury is just a 40 year old catfish in his moms basement

#

:V

steel heart
#

lmao

high violet
#

dissing

frigid badge
#

inb4 google starts making discord user bots to see the rich presence of users and make personalized ads

jovial iris
#

no

#

O_O

#

-_-

#

what the hec

prisma wave
#

hot

jovial iris
#

efe we should work on a project together

#

you still play sb?

#

BruHHhHhh

#

aj

#

ah

jovial iris
#

Aight

prisma wave
#

elara moon

#

classic

onyx loom
#

elaramoon2

prisma wave
#

it looks kinda ugly without rounded corners ngl

#

yes

#

much better

onyx loom
#

its not hard to find 👁️

old wyvern
#

BMs discord or Elara discord?

#

one sec

prisma wave
#

theyre both public

#

i cant link them but

#

🙂

old wyvern
#

yea just tried to dm you

#

Your dms are closed

prisma wave
#

lol

old wyvern
#

lol

onyx loom
#

wowwwww advertising bm!

#

ban!

prisma wave
#

🙄

#

what advertising?

#

i dont see anything

ocean quartz
#

Ban this man

prisma wave
#

for what?

#

ive not advertised anything

onyx loom
prisma wave
#

do you see any advertising?

#

i dont

#

ban kali for false accusations

onyx loom
#

☹️

prisma wave
#

absolutely

onyx loom
#

yes

#

2 more days til 2020 NG+

prisma wave
#

let's go

old wyvern
#

2020++

#

Im waiting for the aliens on 31st mid night

#

Gonna be great

ocean quartz
#

31/12/2020 => 1/13/2020
The year just never ends

prisma wave
#

😬

#

obligatory overflow joke

#

-31/12/2020

#

wow

#

okay

#

i see how it is

#

everyone says wheres elara mitten and not how's elara mitten

#

😔

#

excellent

old wyvern
#

hes undergoing metamorphosis. Bristacademy when?

prisma wave
#

🤮

#

fuck

#

i didt it again

#

no

old wyvern
#

😂

prisma wave
#

no

#

tdiuquihdqiudhqiu

#

edited

old wyvern
#

Elara uses qubits, not bits

#

Thank you

prisma wave
#

whats your languafe

onyx loom
#

how we meant to run qubits on a normal pc 😮

prisma wave
#

hurry up discord

#

omfg

#

are you serious

old wyvern
onyx loom
#

o

old wyvern
#

Or fuck it, we simulating a universe just for this

#

Yes

prisma wave
#

tf?????????////

#

what

old wyvern
#

Someone deleting you messages

prisma wave
#

what is going on

old wyvern
#

lmao

onyx loom
#

have u tried sending the message

prisma wave
#

my messages literally took a minute to send and then the silly bots delete them both

#

wot

old wyvern
#

Are you sure its barry?

prisma wave
#

my messages literally took a minute to send and then the ass bots delete them both

#

it's like $5

#

it's the best $5 you'll ever spend

old wyvern
#

uh

prisma wave
#

not allowed to say that apparently

#

shit

#

yes

#

what

#

how

old wyvern
#

lol

prisma wave
#

??????????????/

#

it works now

old wyvern
#

its not barry

distant sun
#

=ping

compact perchBOT
#
Pong!

• Replied in 243ms.
• API Ping is 62ms

prisma wave
#

ok who did this

old wyvern
#

Probably lemmo or gaby?

prisma wave
#

we have a "prankster" in our midst

#

pretty immature tbh

#

=ping

compact perchBOT
#
Pong!

• Replied in 78ms.
• API Ping is 54ms

distant sun
#

Fuck off lol

old wyvern
#

=ping

compact perchBOT
#
Pong!

• Replied in 182ms.
• API Ping is 57ms

distant sun
#

=ban

old wyvern
#

Why is ping allowed in all channels?

prisma wave
#

it must be barry

#

no?

old wyvern
#

Probably not

distant sun
#

You cant delete messages that fast without a bot

old wyvern
#

Selfbot

#

idk

#

welp

distant sun
#

Rip I forgot to turn it off

prisma wave
#

unless it's docdex

#

probably is

old wyvern
#

speaking of which

#

The app and discord module seems to be exactly the same with just 1 extra pckage

#

weird

prisma wave
#

hm?

old wyvern
prisma wave
#

oh

#

lol

old wyvern
prisma wave
#

strange

old wyvern
#

The only difference is the botpackage

prisma wave
#

no http module in the discord package

#

bit weird though

old wyvern
#

bm?

#

Hes a program

prisma wave
#

whats the difference

prisma wave
#

em is my female alter ego

#

like batman or something

#

except nothing like batman

distant sun
#

why is so annoying to publish a kotlin lib smh

prisma wave
#

it shouldnt be

distant sun
#

smh

#

tried even with mavenLocal() and it still doesn't work properly

surreal quarry
#

whats the from components.whatever part cause i always use components.java (even for kotlin projects) and it seems to work

prisma wave
#

^

distant sun
#

that didn't fixed anything 😔

surreal quarry
#

i was asking a question lol

#

i literally dont know what its doing when i add that line

#

i just always add it and it works lmao

distant sun
#
Execution failed for task ':publishGprPublicationToMavenLocalRepository'.
> Failed to publish publication 'gpr' to repository 'MavenLocal'
   > Invalid publication 'gpr': multiple artifacts with the identical extension and classifier ('jar', 'sources').```
what now
surreal quarry
#

oh in your build folder are there two jars

distant sun
#

there is none ...

#

it is supposed to run clean first

surreal quarry
#

last time that happened to me i had to like get rid of the classifier on my shadow jar, but my guess is that your issue is having both the javadoc and sources jar being built or something

distant sun
#

guess what, it worked 30s ago

surreal quarry
#

so its working, orr?

distant sun
#

restarted iij

#

wtf ..

#

ok this error makes no sense

old wyvern
#

Whats the issue?

viscid charm
#
import com.massivecraft.factions.entity.BoardColl;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
import com.massivecraft.massivecore.ps.PS;
import org.bukkit.Location;

class MCoreHook {

    boolean isWilderness(Location loc) {
        return BoardColl.get().getFactionAt(PS.valueOf(loc)).isNone();
    }

    void claimLand(Location location) {
        if (!isWilderness(location)) return;
        Faction faction = FactionColl.get().getByName("RaidEvent");
        if (faction == null) {
            faction = FactionColl.get().create();
            faction.setName("RaidEvent");
//            faction.setFlag(MFlag.getFlagOpen(), false);
        }
        BoardColl.get().setFactionAt(PS.valueOf(location), faction);
    }

    void unclaimLand(Location loc) {
        if (BoardColl.get().getFactionAt(PS.valueOf(loc)).getName().equals("RaidEvent")) {
            BoardColl.get().setFactionAt(PS.valueOf(loc), FactionColl.get().getNone());
        }
    }
}```
Guys a dev says:  you can set the ownership of the ps on the grid for this factioons fork. What does that mean exactly?
surreal quarry
#

what?

#

and in your code blocks do ```java so it has syntax highlighting

#

@prisma wave im sure you will but in the while loops section you should explain the difference between do while and while do

prisma wave
#

ofc

distant sun
#

Someone send help ploz 😔

surreal quarry
#

i think your issue is the sources/javadoc jar. try to remove one and see if it works. it wont fix the problem in the end cause you need both but see if it will publish to maven local without the javadoc one

jovial warren
#

random question (I seem to like these): anyone know anything about cloning Windows to another drive?

#

let me explain what my issue is first actually

distant sun
jovial warren
#

the other day, I cloned Windows to my new M.2 SSD, from my old SATA SSD, and it went well (after about 4 hours lol), but the only issue is: without the drive plugged in, it boots fine, but if I plug my old drive in, it fails to boot

prisma wave
#

i would just reinstall rather than trying to salvage it

jovial warren
#

I removed Windows from my old drive with GParted live and extended the EXT4 partition, and also removed my EXT4 partition from my new drive and extended Windows

ocean quartz
#

Need some suggestion, what would you call the implementation of the interface ChatPlayer?

surreal quarry
#

just toss Impl at the end lol

ocean quartz
#

Never

onyx loom
#

Player fingerguns

old wyvern
#

Just rename the interface to IChatPlayer

prisma wave
#

oh god no

jovial warren
prisma wave
#

can we ban that

old wyvern
ocean quartz
#

Why are yall like this 😭

old wyvern
#

Some cases require it

distant sun
#

CraftChatPlayer and ChatPlayer

old wyvern
#

Unless you want to go through a dictionary and find words that no one would recognize

prisma wave
jovial warren
#

maybe I need to mess around with boot manager a bit, I reckon it thinks I still have the old system there

ocean quartz
#

I have it called PlayerHandle right now xD

jovial warren
#

yeah I'll take a look, thanks

old wyvern
#

What does the interface define?

ocean quartz
#

It's basically a wrapper for Bukkit's player which adds saved settings and a few other things

distant sun
#

BetterPlayer

surreal quarry
#

Player++

jovial warren
ocean quartz
surreal quarry
#

great

old wyvern
#

or actually maybe just Player

prisma wave
jovial warren
#

But the other drive isn't even plugged in

prisma wave
#

oh

#

weird

ocean quartz
#

I would name it just Player but then Bukkit's would be odd

jovial warren
#

And as you can see, they're both on the same drive

prisma wave
#

oh yeah lol

surreal quarry
#

Chatter

#

lol

old wyvern
#

You would probably just use the local wrapper right?

distant sun
#

I hate when easy stuff do not work

ocean quartz
#

Yeah

jovial warren
#

Lemme try booting from both individually

old wyvern
#

Then that shouldnt be an issue unless its exposed

distant sun
jovial warren
#

They both boot into Windows just fine, very odd

ocean quartz
#

I might just go with either what i have or succumb to naming it ChatPlayerImpl

surreal quarry
#

IChatPlayer and ChatPlayer wasn't terrible was it? I forget who said that

ocean quartz
#

Imo it is

prisma wave
#

I think i've had a similar thing before, no idea what the cause is but I've had various boot devices duplicate and both work

ocean quartz
#

The interface should be more descriptive than the implementation

jovial warren
#

Maybe it's something to do with what's in the EFI system partition

ocean quartz
#

IChatPlayer is like "Interface interface chat player"

jovial warren
#

If Windows will even let me look at it lol

distant sun
#

Wondering if the problem is with the project itself rather than how I publish it 🤔

old wyvern
ocean quartz
#

Not bad actually

jovial warren
#

Also, boot seems to be stored on the C drive partition for some reason, rather than it's own partition

distant sun
#

JustAChatPlayer

prisma wave
#

doesnt windows use a combination of both?

#

it has some stuff on c partition and other stuff on the system reserved one

jovial warren
#

ABukkitPlayerWithExtraSettingsAndConfiguration

surreal quarry
#

ASlightlyBetterBukkitPlayerThatStoresMoreDataThanARegularBukkitPlayer

jovial warren
prisma wave
#

huh

#

welp

#

idk, my limited knowledge has run out lol

old wyvern
#

Android devs have this weird convention of naming a variable to start with m to show that its a "member" variable. Disgusting

prisma wave
#

gross

old wyvern
#

mMediaPlayer

#

mRecorder

#

like WHY

old wyvern
#

What about it gab?

surreal quarry
#

mmmmMyPokerFace

distant sun
#

__thi__s__a_vaRia__le

old wyvern
#

xD

ocean quartz
#

Let's vote:
1️⃣ - PlayerHandle
2️⃣ - PlayerContext
3️⃣ - ChatPlayerImpl
4️⃣ - ChatablePlayer

static zealot
#

oh man all developers need help today lmaoo

weary epoch
#

confused

static zealot
weary epoch
old wyvern
#

Really?

#

ChatPlayerImpl

#

xD

ocean quartz
#

Ikr

static zealot
#

well all of them

old wyvern
#

I mean if IChatPlayer is bad, ChatPlayerImpl is equally bad

surreal quarry
#

i always just do impl for my stuff cause im lazy

ocean quartz
old wyvern
#

xD

static zealot
#

yes

#

that's

#

perfection

old wyvern
#

Enterprise by length

surreal quarry
#

add the ++ back and we have a winner

ocean quartz
#

Aight ty I'll decide what to name it xD

static zealot
#

ChatablePlayer is best imo

#

but I think you should never do what I say

#

because I don't even know how to name my stuff

ocean quartz
#

I like that and PlayerContext the most

jovial warren
#

what is this class for again? sorry I missed it lol

surreal quarry
#

a player wrapper

jovial warren
#

what exactly does it do?

static zealot
#

yes

surreal quarry
#

it stores player data like configuration stuff and setitngs

static zealot
#

it does

surreal quarry
#

as well as the player or uuid i assume

ocean quartz
#

Yes

jovial warren
#

MFPlayer? or FrameworkPlayer?

ocean quartz
#

It's not a framework xD

static zealot
#

or FireWorkPlayer

jovial warren
#

what is it?

#

what's the name of the project?

ocean quartz
#

It's a chat plugin

surreal quarry
#

TriumphPlayer

jovial warren
#

ChatPlayer then

old wyvern
#

ThePlayer

ocean quartz
#

That's the interface

surreal quarry
jovial warren
#

ah okay

static zealot
#

TriumfChatPlayer

lunar cypress
#

Why is it an interface exactly?

jovial warren
#

if it's an implementation for the interface then ChatPlayerImpl

lunar cypress
#

No

#

Please

static zealot
#

xD

old wyvern
#

oh btw I was suggesting ChatablePlayer for the interface name

ocean quartz
jovial warren
#

what's wrong with Impl?

old wyvern
#

ew

ocean quartz
lunar cypress
#

Not a good name for anything

old wyvern
#

Theres no reason for that name

lunar cypress
old wyvern
#

The only info it gives is that its an implemention which the class definition already provides

lunar cypress
#

Just asking because I see a lot of people randomly throwing in interfaces when they don't actually have a use for them

jovial warren
#

what do you suggest as a general replacement to Impl then?

ocean quartz
#

Basically the API will be separate and be mostly interfaces, that way i don't need to depend on implementations inside the API

onyx loom
#

is Impl not "convention"?

surreal quarry
#

interfaces are nice for an api cause you can publish only what you want the api to have access to.

lunar cypress
#

There is no "general" name for anything

jovial warren
#

because I use Impl for implementations of my API implementation API interfaces

#

wow that's a tongue twister

lunar cypress
#

Oop was a mistake

ocean quartz
#

Lmao

prisma wave
#

rewrite in haskell

old wyvern
#

Its usually better to specific more of what the implementation does

jovial warren
#

you know like how JDA is an implementation of the Discord API that has an API and an implementation for that API

#

that's what I mean

ocean quartz
lunar cypress
#

JDA is not the pinnacle of software design

jovial warren
#

no but that's what my project's structure is based off of

#

and I wasn't saying it was, I was just using JDA as an example to explain what I meant by that tongue twister

#

I suppose I could use JsonPlayer rather than PlayerImpl as the implementation of Player is basically just to make it able to be serialised into JSON

ocean quartz
#

PlayerImpl : IPlayer

jovial warren
#

starting interface names with I is definitely not something I do lol

onyx loom
#

if its for a chat plugin then i dont see whats wrong with TriumphChatPlayer fingerguns

jovial warren
#

you can see that it's an interface by literally looking at the little green circle with the "I" on it lol

#

also, on a side note, in-memory caching with OkHttp is a nightmare

#

using expiring map for the cache and intercepting requests and checking the cache

#

also, can anyone explain this? ```
java.io.IOException: Unable to retrieve player from API! Error: {"error":true,"descriptor":"Page not found"}

Expected exception: java.io.IOException
java.lang.AssertionError: Expected exception: java.io.IOException

#

my test literally throws an IOException and JUnit goes "nah m8"

prisma wave
#

probably getting caught and handled somewhere?

#

so Junit can't intercept it

jovial warren
#

it couldn't have anything to do with the fact that it's thrown on a CompletableFuture that's .joined to the main thread could it?

surreal quarry
prisma wave
jovial warren
#

any way to force a CompletableFuture to execute on the main thread? I know it sounds counter-intuitive but it's for testing purposes lol

#

actually ik what to do

prisma wave
#

futures have no concept of what thread they're executing on

jovial warren
#

since for tests, I use a custom implementation of the TMP4J interface (the main interface with the methods that get thingys from the API), I can just execute everything in thenRun or something

#

or I can do something else that's whacky

#

like executing the code synchronously and returning null or something

prisma wave
#

that probably wont work

#

just use join() or get()