#dev-general

1 messages · Page 597 of 1

static zealot
#

probably action bar

#

and the top things are probably boss bars

sick belfry
#

yeah yeah

#

but how is it posible to add the numbers dinamically?

#

without replacing tons of characters

static zealot
#

those are just numbers. you can use fonts to move text to the right/left or top/bottom

sick belfry
#

@static zealot ez 314377521963466762

static zealot
static zealot
static zealot
sick belfry
#

@charred yew

#

he left lel

static zealot
#

nah

#

banned

#

but please DM barry next time

sick belfry
#

gotcha

#

sorry

obtuse gale
#

I mean it only makes sense, you can use the API however you want

#

Have you learned NOTHING about GOOD DESIGN?!?

#

I'll have to teach you myself

static zealot
#

lmao

loud seal
#

anybody can help me please?
Im stuck on creating custom commands using playercommandpreprocessor event
I wanna do command can change in config.yml file

sick belfry
#

ok so

#

oh nvm suprakekw

obtuse gale
#

This is gorgeous

ocean quartz
#

Looks pretty cool, time to add it to the benchmark? kek

obtuse gale
#

lol

forest pecan
#

Is there somebody that can help me with the earth map?

quiet depot
#

@boreal needle everything is explained in depth in the wiki but I can walk you through it if you’re confused

half harness
#

YESS

#

FINALLLLYYY_ _ _ _

#

now i have to handle ping/pong and close stuff

#

atm its assuming client & server are always online

#

and client and server never goes offline

#

(and if it goes offline it throws a bunch of errors)

frail glade
#

Nice job

humble silo
eternal compass
half harness
#

:D

half harness
humble silo
eternal compass
#

nice!

humble silo
#

fast connection

eternal compass
#

what's it written in?

half harness
#

oh also

#

scrolling won't work D:

eternal compass
#

web? or installed

half harness
#

uhhh

#

wdym?

eternal compass
#

the client

half harness
#

its a desktop app

eternal compass
#

okay

half harness
#

kotlin/jvm

#

👀

humble silo
half harness
humble silo
#

ya it does

#

well

#

more features and buttons obviously

#

but i like the look

half harness
#

lol

#

im trying to make it not too discord-like

#

but i like the blue color scheme

#

🥺

humble silo
#

lol

ocean quartz
#

ChatChat!

eternal compass
#

HelpHelp!

half harness
#

ChatHelp!

eternal compass
#

DkimBad

#

oh wait

half harness
#

👀

humble silo
half harness
#

XD

eternal compass
#

exactly

humble silo
#

could get confused for database cord unfortunately...

#

otherwise perfect name

eternal compass
#

someday I plan to make a live chat client/server :p

half harness
#

😮

eternal compass
#

on my to-do list

#

for the web

half harness
#

stealing my idea 😠 /s

eternal compass
#

I want to make a comments thinggy

#

but like live

#

idk how to explain it

half harness
#

reddit live comments?

eternal compass
#

idk what that is

half harness
#

replace comment section with live chat

#

thats basically what it is

#

¯_(ツ)_/¯

eternal compass
#

sure kinda like that

humble silo
#

I kinda made a version of that for a meme website for one of my teachers like a year ago

#

that was alot of fun

humble silo
half harness
#

1 sec

#

lemme show u my sketch

humble silo
#

lol how many times r u gonna reply to that message???

#

someone might as well pin it at this point 4 u

half harness
#

🤣

#

rate 1-10

humble silo
#

0

#

what even is that

half harness
#

lol

humble silo
#

my eyes are burning

#

i like the other one much better

#

adios

half harness
#

i sorta like how jetbrains compose uses design in objects and stuff instead of css

#

but at the same time i dislike it

#

since its so hard to find out how to design something that isn't obvious

#

and sometimes just doesn't have the feature

#

ex border-radius = clipping to a rounded-cornered shape

eternal compass
#

that makes perfect sense?

#

that's what css calls it

half harness
#

no i mean

#

css is border-radius

#

but in compose

#

its Modifier.clip(RoundedCornerShape(10.dp))

#

imo overall its a lot more readable than css

#

¯_(ツ)_/¯

#

(imo)

sweet cipher
half harness
#

the app?

sweet cipher
#

Compose

half harness
#

i think so - sort of

#

its supposed to be able to work on web, desktop, and android

#

i think

sweet cipher
#

Oh nice

#

I'll have to try it out

half harness
#

¯_(ツ)_/¯

#

compose is still in beta though

#

so

sweet cipher
#

Do I have to use Kotlin?

half harness
#

yes

sweet cipher
#

Unbelievable

half harness
#

lol

sweet cipher
#

Supporting outdated languages

half harness
#

🤨

forest pecan
#

i ran gradle build and slimjar task was taking 12 minutes

#

then i looked at my laptop battery

#

and it went from 100 to 10 percent

sweet cipher
#

lol

forest pecan
#

Lol

#

The issue was likely due to because of blocked websites (like Github for example) and some repos cannot be connected to. Idk how slimjar handles blocked sites but there should be a way to make it connect 5 times or smthing and give up

sweet cipher
#

Is slimjar better than shadowjar?

forest pecan
#

they are different uses

#

slimjar does use shadow plugin however

#

I would say to use slimjar if you are dealing with bulky dependencies

#

but if you're dependencies are small you can just shade them tbh

sweet cipher
#

So if I use slimjar for a spigot plugin, and had multiple plugins depend on one thing,
would they share the same library, or have individual instances of it, like how shadowJar
just adds them to your project in new packages?

sweet cipher
#

Oh

forest pecan
#

one of the things you can do in slimjar is relocate packages too

#

it does its own separate relocations

#

and creates a folder for each specific "application"

#

and custom relocated jars

#

tbh id even use it over the library loader

sweet cipher
#

I've never used the library loader

obtuse gale
#

Hey, does anyone know what this IntellJ error means and how to fix it?

#

Module 'APCS-A-Labs' production: java.lang.ClassCastException: org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType cannot be cast to org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType

empty flint
#

I just read that paper is moving away from Waterfall and towards Velocity for server proxys. Does that mean that BungeeCord plugins won't work with it anymore? Should I also stop developing for Spigot/Bungee and switch to Paper/Velocity then?

obtuse gale
golden sun
#

does anyone know how to get all combinations of the sum 4?
IE 1111,112,121,211,31,13,22?

potent nest
#

there are infinite combinations, it really depends on the domain

golden sun
#

@potent nest
there are 7 combinations, what do you mean

#

1+1+1+1=4
1+1+2=4
2+1+1=4
1+2+1=4
3+1=4
1+3=4
2+2=4

#

I can't think of any more

#

excluding adding 0

potent nest
#

0.5 + 3.5 = 4

hot hull
#

ignore decimals

quiet depot
#

5 + -1 = 4

hot hull
#

Otherwise it trully is an endless combination

hot hull
potent nest
hot hull
#

What's the use case would be better to know

potent nest
hot hull
#

Well yes, but again, infinite list if you don't have boundaries of which numbers can be used

golden sun
#

I mean there are no negatives, no decimals

potent nest
#

for natural numbers, the amount of combinations is limited

golden sun
#

yes I know

#

but how to get all the combinations

potent nest
#

programmatically?

golden sun
#

I have tried every version of a combinationalSum algorithm I could find and attempt to edit

#

yes

#

I can only get 1111,31,13,22,112

#

I can't seem to get 121 and 211

#

and those numbers are a combination of two different algorithms

potent nest
#

do you want permutations or combinations?

golden sun
#

permutation of the combinations

#

121,112,211 are permutations of one of the combinations

#

I'm now in my 11th hour of attempting to figure this out

#

I will gladly give a cash reward for helping me solve this

#

for my mental and physical health

potent nest
#
public static void main(String[] args) {
    permutations(4).stream().map(Maths::toString).forEach(System.out::println);
}

static String toString(Expr expr) {
    return switch (expr) {
        case Const c -> Integer.toString(c.value());
        case Add a -> toString(a.left()) + " + " + toString(a.right());
    };
}

static List<Expr> permutations(int sum) {
    if (sum == 1) {
        return List.of();
    }
    List<Expr> result = new ArrayList<>();
    for (int i = 1; i < sum; i++) {
        List<Expr> a = permutations(i);
        for (Expr l : a) {
            result.add(new Add(l, new Const(sum - i)));
        }
        result.add(new Add(new Const(i), new Const(sum - i)));
    }
    return result;
}

sealed interface Expr {
}

record Add(Expr left, Expr right) implements Expr {
}

record Const(int value) implements Expr {
}

doesn't look that difficult

golden sun
#

what is record?

potent nest
golden sun
#

that entire set of code is wayyy over my head

#

streams, maps, pretty sure you are using lambda statements

quiet depot
#

don't see any lambdas in there

golden sun
#

maybe I'm calling it wrong

#

whatever -> is

quiet depot
#

those are the new switch cases

golden sun
#

oh

quiet depot
#

lambda uses the same -> thing

golden sun
#

that is why I thought it was a lambda

potent nest
#

oh wait that's still a preview feature

#

sorry for confusion

golden sun
#

its okay, again it's still way over my head

quiet depot
#

better to ask questions than just accept defeat

potent nest
#

the permutations method is the relevant part

golden sun
#

I mean I am dead right now

quiet depot
#

then go to sleep and ask tomorrow

golden sun
#

I can't

#

I assumed a homework wouldn't be this hard..
I stand corrected

quiet depot
#

incase sirywell wants to claim said reward

golden sun
#

yeah

#

i'm still open for that

#

he did answer

potent nest
#

I mean in best case you understand what's going on

golden sun
#

I'm attempting that

#

Because I gotta figure out how to also put it all into 1 method

#

like permutation but like Add and Const & Expr is out of it

potent nest
#

basically the approach is that if a + b = c, then c + d = e and a + b + d = e

old wyvern
#
import java.util.*;
public class Solution {
   public static void main(final String[] args) {
        final Set<Integer> res = new HashSet<Integer>();
        permutations(0, 0, 4, res);
        for (int i : res) {
            System.out.println(i);
        }
   }

   public static void permutations(final int sum, final int cur, final int target, final Set<Integer> results) {
       if (sum == target) {
          results.add(cur);
          return;
       }
       for (int i = 1; i < target; i++) {
          if (sum + i > target) break;
          permutations(sum + i, cur * 10 + i, target, results);
       }
   }
}
#

There you go, simpler

golden sun
#

yeah
so like 1+1=2 2+2=4 so 1+1+2=4

#

so I understand that^

#

except, why final?

potent nest
#

that doesn't change anything

old wyvern
#

why final what?

golden sun
#

oh oh oh

#

nvm I get it

#

yeh

quiet depot
#

just a cleanliness thing

golden sun
#

That is crazy how you can just come up with that

#

I don't know if its because I've been at it for so long or I'm just not smart enough yet

hot hull
#

Usually just overcomplicating so you can't see an easier solution

#

Good nights sleep usually tends to help if you're stuck

old wyvern
#

What the hell

golden sun
#

I love 3 man chess

#

3d chess is fun too

barren oar
#

since getOfflinePlayer() is deprecated it disables the plugin while the server is starting, is there an alternative way of getting a player ignoring if player is online or offline?

#
    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(new DeathListener(), this);
        plugin = this;
        i = 0;
        do {
            i++;
            getServer().getConsoleSender().sendMessage("açıldı");
        } while (i < 10);

        saveDefaultConfig();

        List<String> s = getConfig().getStringList("kills");

        for (String str : s) {
            String[] words = str.split(":");
            DeathListener.kill.put((Player) getServer().getOfflinePlayer(words[0]), Integer.parseInt(words[0]));
        }

    }```
old wyvern
#

Its deprecation is for completely different reasons, blame md_5

#

Look for any stacktrace on enable

barren oar
#

so i can use it perfectly, the error is a completely different thing?

old wyvern
#

You're probably having some othe exception being thrown

#

getServer().getOfflinePlayer(words[0]), Integer.parseInt(words[0])

#

This doesnt look right

barren oar
#

huh

old wyvern
#

arg 0 is player name and a number?

barren oar
#

OOH

#

is that about that?

old wyvern
#

Most likely, check your logs for exceptions

barren oar
#

java.lang.ClassCastException:

old wyvern
#

The entire stacktrace

barren oar
#

oh

#

am i allowed to post it here

#

its a little ~long~

old wyvern
#

=paste

#

use /paste

compact perchBOT
old wyvern
#

That still isnt the entire stacktrace

#

Cant tell where the exception is happening without it

barren oar
#
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_16_R3.CraftOfflinePlayer cannot be cast to class org.bukkit.entity.Player (org.bukkit.craftbukkit.v1_16_R3.CraftOfflinePlayer and org.bukkit.entity.Player are in unnamed module of loader 'app')
        at me.SolidSteed.bukkit.prestige.Main.onEnable(Main.java:32) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Purpur-1082]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.5.jar:git-Purpur-1082]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.5.jar:git-Purpur-1082]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[patched_1.16.5.jar:git-Purpur-1082]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[patched_1.16.5.jar:git-Purpur-1082]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:593) ~[patched_1.16.5.jar:git-Purpur-1082]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:293) ~[patched_1.16.5.jar:git-Purpur-1082]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1070) ~[patched_1.16.5.jar:git-Purpur-1082]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Purpur-1082]
        at java.lang.Thread.run(Thread.java:831) [?:?]```
old wyvern
#

Whats on line 32?

barren oar
#

String[] words = str.split(":");

old wyvern
#

whats the type of DeathListener.kill

barren oar
#

why would it give an error tho

#

wdym

#

Player, Integer

old wyvern
#

Something seems to be attempting to cast a player to an nms player

#

oh I know

#

it was right there

#

(Player) getServer().getOfflinePlayer(words[0])

#

You cant cast OfflinePlayer to player without checking

barren oar
#

checking what

old wyvern
#

Checking if the player is online

#

or just instanceof Player

barren oar
#

can i just use if(!(Bukkit.getOfflinePlayers.isOnline()))

#

it seems not

#

as i thought :(

old wyvern
#

That is the inverse

#

Why are you negating the isOnline

#

You want to cast only if its true

barren oar
#

oh im being dumb

#

this doesnt work either

#

thanks a lot for helping me btw

wintry plinth
#

Welp, today I learnt that docker has options to configure cpu cores etc, and I've only been using half of what my system actually has :(

static zealot
#

interesting

wintry plinth
#

I was watching a youtube video and someone mentioned it, checked settings

#

I had like half the cpu cores set

#

o/

static zealot
#

oh I was going to ask

#

am I not supposed to be able to click this?

#

bcz it looks a lot like a button but its not xD

wintry plinth
#

Oh fuck I forgot thats still dead

#

Thank you 😂 I haven't done the linkedin thing either oops

static zealot
#

als maybe make this clickable?

wintry plinth
#

oo interesting, yeah that would work

static zealot
#

that'd be pretty ool

wintry plinth
#

because thats in the viewport on mobile

static zealot
wintry plinth
#

Yeah shows on both, but mobile is mainly to show people its not just one section

#

as people can click off

static zealot
#

ah

static zealot
#

like the iphone SE

wintry plinth
#

Ahhh ty, i didn't test that, I think I tested a small device, but not that small

#

let me emulate now

static zealot
#

wait iphone se is not old

#

is it?

wintry plinth
#

eh, a bit haha

static zealot
#

no lmao. I Was thinking of the iphone 3g when was saying iphone se

#

lmao

#

yeah

#

its old but not very

wintry plinth
#

oh LOL

#

ye not that old

#

haha my devtools says its old

static zealot
#

well the 5

#

but the 8 also has se

wintry plinth
#

oh dear

static zealot
#

yeah xD

wintry plinth
#

it looks mangled 😂 😂

static zealot
#

think about the small guys smh

wintry plinth
#

ahaha

#

quite shocked apart from that site looks ok on an SE

static zealot
#

well. it opens new tab

#

but same thing xD

wintry plinth
#

ye

#

aha

static zealot
#

ah is it meant to be like that??

#

man I hate this keyboard

#

sometimes when I type a ? it puts in 2

wintry plinth
#

I can make it just open, but its mainly to prevent people going away from the site

static zealot
#

and it sounds like I'm in a rush or something

#

or really questioning stuff

wintry plinth
#

and hahah

static zealot
#

yeah but my point was

#

that it opens a new tab

#

with the charlie link

wintry plinth
#

oh wtf

static zealot
#

not the analyse linkl

wintry plinth
#

oh you mean that

#

thought you meant at top

static zealot
#

oh yeah

#

I didnt realise there's one at the top

wintry plinth
#

because we were talking about top I got confused aha

static zealot
#

yeah my bad

#

also.the top uses, domains, twitter and github doesn't actually go to new tab

wintry plinth
#

Finding all kinds of flaws 😂 ty tho, helps a ton, fixed the links you just mentioned, with the projects its just because its a coming soon, but I could just force it to use the actual link still

#

Fixed both, should be live in next few mins

#

Damn, i bought police.io yesterday as I saw it expired, I've had some nice appraisals, kinda shocked

static zealot
#

I see you have quite a few domains

wintry plinth
#

Yeah aha, became quite the addiction

#

the only thing I honestly "collect"

#

holy crap

static zealot
#

88888 nice

wintry plinth
#

i always wonder who are behind those sales

#

whether its huge companies secretly buying, or individuals

static zealot
#

I mean you can go and see what the domain does now

wintry plinth
#

But a lot of the time the domain is nothing, this time yeah it has a landing

#

but usually they don't redirect anywhere

static zealot
#

yeah just a landing lol

#

nothing else

wintry plinth
#

I'd love a sale like those, this domain if I held on I could prob get a decent amount, but eh, I've been offered $200 so far

static zealot
#

OMGGG. All this time I Thought that the F in FOSS stands for free as in price lmao

#

that's why I wasn't fully sure why everyone is pushing FOSS and not OSS xD. but turns out its not free as in price

#

all it took is googling FOSS lmao. its literally the first thing they mention on the wiki

wintry plinth
#

wait really

static zealot
#

yeah

#

it stands for free as in everyone is free to use, change and modify

#

or something like that

#

and the GNU page has a really good analogy for this

wintry plinth
#

oh wow lmao

#

first ive heard wow

static zealot
#

Think of “free speech,” not “free beer.”

wintry plinth
#

ye

#

hahah thats crazy i thought the same thing

static zealot
#

my keyboard 😦

prisma wave
#

99/100 times FOSS is also free though

#

as in free price

static zealot
#

well yeah. but its not what it stands for

#

I always thought it stands for free as in price

prisma wave
#

Yea

static zealot
#

different subject. I Don't suppose C# has anything similar as kotlin's raw string or whatever its called? the one that uses 3 quotes

brittle leaf
#

im currently in the process of figuring out how to use sqlite

#

and its something id rather use then mysql or some flatfile like yml cause i dont have a mysql server for testing and flatfile is flatfile mainly cause i want to store an array of itemstacks in this db

boreal needle
#

@quiet depot

#

i got the docdex api going but it's giving me npes when i try to index the jdk

#
"javadocs": [{
            "names": ["jdk", "jdk17"],
            "link": "https://javadoc.lucypoulton.net/jdk/index.html",
            "actual_link": "https://docs.oracle.com/en/java/javase/17/docs/api"
        },
...]```
#

i have other javadocs that get indexed fine, its just the jdk ones

static zealot
distant sun
#

Pretty nice

static zealot
#

yeah I've seen the @ string literal or whatever

#

but a bit too late

#

as well

distant sun
heady idol
#

Does anyone know how to make client packets?

distant sun
#

Is it me or this code is .. wrong?

#

It just removes the first number

static zealot
#

lmaooo

#

you probably won't get anyone to give you that. If you have like 30$ I'd recommend getting a Raspberry Pi

prisma wave
#

oracle 😏

static zealot
#

right... if it works for you that's an option

static zealot
wintry plinth
#

$5 d.o droplet, or even hetzner US

#

is the goat

static zealot
#

1GB of RAM and 25GB of SSD storage for 5$? nah xD

wintry plinth
#

but then burden of self hosting, but ig if on a budget then ye aha

#

by that i mean like you've gotta make sure its plugged in and on always

winter iron
#

yeah and get a direct fiber line into the pi too

#

🙂

#

2 actually

#

redundancy

wintry plinth
#

May as well get a bomb proof ddos protection while you're at it, ha ha

winter iron
#

and 24/7 security

obtuse gale
#

@remote goblet.

static zealot
#

youre trying to cast a primitive to a non primitive

sturdy zinc
#

I believe this line is causing an error in Paper? System.out.println which one works in both Spigot and Paper?

half harness
#

what error?

#

also use logger

sturdy zinc
#

Nag author(s): '[Ironic_8b49, original author kroimon]' of 'IronicChest' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).

#

I have never use logger, guess I should look it up

half harness
#

Please use your plugin's logger instead (JavaPlugin#getLogger)

quiet depot
#

@boreal needle it can’t index j17 yet

boreal needle
#

ah that explains it thanks

sick belfry
quiet depot
#

yes

sick belfry
#

and u now of a dcevm version that works on java 17?

quiet depot
#

jetbrains runtime

sick belfry
quiet depot
#

it’s installed already

#

it’s part of ij

#

just use it as ur jvm

sick belfry
#

noice

#

no need to setup anything?

sturdy zinc
#

I thought changing the version number in pom should change this [Server thread/INFO]: [IronicChest] Loading IronicChest v1.18.1

quiet depot
#

that’s from plugin.yml

quiet depot
sturdy zinc
#

I have this there version: ${project.version}

quiet depot
#

delete ur target folder

#

and try again

sturdy zinc
#

it has been about a year or more this I opened this project

#

I change the version in plugin.yml to actual version number still not changing

half harness
#

are you using an old jar?

obtuse gale
#

Or do mvn clean package instead of mvn package, exact same thing as Piggy's suggestion but uh ""properly""

sick belfry
#

bc I have modules

pallid sequoia
#

Hey,
does someone know of an opensource/free discord bot for verifying Github and Spigot accounts?
I want to check my premium plugin buyers and auto invite them as readers into my private github repository.

static zealot
#

yo can someone confirm me that spigot 1.12 does not support java 11 at all? bcz I really can't test rn and I've heard it a few times now

#

nvm. the person that just said it, tested and it works.

oak patrol
#

i am trying to replicate the old mc beta arrows where u right click and the arrow just spawns out of no where (bows were not introduced to mc back then).. what vector do i assign to the spawned arrow ? i want it to be the same value as it was in mc beta (i posted this in the wrong channel before sorry about that)

boreal needle
#

anyone else getting spam about some anticheat

static zealot
#

but do you want to see my anti cheat?

boreal needle
#

no thanks

#

ive had 6 pms from different accounts in the last half hour

static zealot
#

apparently matt is also getting it

#

lmao

ocean quartz
#

It's comming from Polymart @boreal needle

distant sun
#

lame

boreal needle
#

yeah just saw the announcement

distant sun
#

what annoncement?

steel heart
#

Polymart getting botted I believe

obtuse gale
#

having DMs open 😷

ocean quartz
#

I wish dms were opt-in instead of opt-out

lavish notch
obtuse gale
#

what is what?

lavish notch
#

What's coming from Polymart?

static zealot
#

dm spam about an anti cheat

obtuse gale
#

bot DMs advertising a probably shit ass AC

lavish notch
#

Oh right.

static zealot
#

OK

lavish notch
#

Somewhat related but has anyone heard about more about the recent "HostFlow" server backdoor?

obtuse gale
#

again?

static zealot
#

whats that?

wintry plinth
wintry plinth
static zealot
#

that's what he meant

lavish notch
#

It's affected a lot of servers, and even ReviveNode pushed an announcement about it... and additionally Dan, from PebbleHost has been talking about it.

wintry plinth
#

Oh

lavish notch
#

Obviously it stems for the usual Javaassist stuff, but I've seen servers get affected by this and they haven't even touched cracked plugins/jars.

static zealot
#

but they might've touched spigot plugins. ez

lavish notch
#

😆

ocean quartz
wintry plinth
ocean quartz
#

I want to have dms open to 2 servers and off to everything else
If i turn off on the settings i can't opt-in for those 2 servers
Soo i have to disable for every single server i join

onyx loom
#

nah for the average user having dms opt out is much better

#

i bet most people they dont even know that u can turn dms off

wintry plinth
static zealot
ocean quartz
static zealot
#

since when you turn it off globally you can inherit that to every server

#

which I'll do rn xD

wintry plinth
#

ye

obtuse gale
#

When you switch the setting, it asks you if you want to apply it to all of your current servers

#

Then you can change it per-server

static zealot
#

yeah. cool. dont think it was like this before

ocean quartz
obtuse gale
#

Uh I did that like 6~7 months ago and I had that option lol

#

Does it matter anyway ¯\_(ツ)_/¯

wintry plinth
#

Yeah I thought its been there a while, but thats dope, I just never toggled it

#

time to apply it, even though I'n not in many discords

kindred hatch
#

The DB from before was breached

lavish notch
kindred hatch
#

The hostflow one

lavish notch
#

as all I can find is a related to AirBnB xD

kindred hatch
#

Lol

#

So, an infected plug-in modifies all the jars in your plugins folder and your main server jar using Java assist

Then, that connects to a DB on start and accepts web requests

#

Someone breached the DB and is sending messages and kicking players using console

#

Then, it spreads cause guys send JARs and stuff

lavish notch
#

I know all that, but I mean how did this spread so fast as I know some folk who haven't touched a leaked jar at all or any suspicious downloads yet they still got it.

kindred hatch
#

I’m in the same boat

#

Like I said

#

An infected jar was probably downloaded a lot

#

Cause i got in my lobby server lol

#

All jars were free even

lavish notch
#

I mean... it's gotten to the point that ReviveNode did a public announcement, so it can't just be a few silly kids downloading infected jars or something like that.

kindred hatch
#

It’s old

#

It’s just been dormant

#

So

#

Over 3 years

#

A lot could have happened

lavish notch
#

Ah... so the infection has been spreading for a while and only now has been used?

kindred hatch
#

It was just a proof of concept

lavish notch
#

🤨

kindred hatch
#

And then it was breached

#

Simple to remove tho

lavish notch
kindred hatch
#

Like

wintry plinth
#

TL;DR from what I understand:-

Hostflow was a proof of concept malware to show what it can do, and then it has gone into bad hands, added to public plugins, and people have downloaded it. In turn, infecting other jars, and nothing happened until now, in which a bad actor has taken over the DB (of infected servers), and ran malicious commands.```
lavish notch
#

Is there some article somewhere that explains this in more details or?

inner umbra
#

When malware gets "hacked" lol

kindred hatch
lavish notch
kindred hatch
#

Anyways

lavish notch
#

I know about those already haha

static zealot
#

wait. bw1058 was os all this time? xD

distant sun
#

no

static zealot
#

what the hell? xD

steel heart
#

yeah lmao

static zealot
#

love it

prisma wave
#

Permission SEX

onyx loom
#

SEX

forest pecan
#

mm

zinc vapor
#

so all of the players on my a new server i set up are invisible

#

i dont really have many plugins loaded in besides stuff like multiverse, world edit, essentials, the works

sick belfry
#

lel

humble silo
#

@cinder flare Im cool again!

cinder flare
#

hell yeah dude!

#

it's been long enough

humble silo
#

Ikr, and a 100 day streak

cinder flare
#

fuck yeah

humble silo
#

I spent 10 dollars just for this

#

which is rly dumb

#

but im like that

cinder flare
#

worth

drifting drum
#

I am learning python

#

I am learning the basics

#

Any tip?

steel heart
#

Work on a project you can apply your skills on whilst learning

drifting drum
#

Ty :)

old wyvern
#

😌

sweet cipher
#

How would I replace everything that doesn't match a regex?

steel heart
#

Negate the regex maybe and then find all those groups where the negated regex matches

potent nest
#

or just extract everything that matches

static zealot
#

or

static zealot
#

why not

rotund egret
#

Doesn't really make sense.
Just regex what you want.

sly sonnet
#

no but he want's to replace everything that doesn't match !!

rotund egret
#

So make the match not include those characters/strings 😉

obtuse gale
#

regexn't

static zealot
#

lol

steel heart
#

🌞

humble silo
#

Omg i actually found a use for a FSM... Im so happy

static zealot
humble silo
#

Im gonna be using it for event chaining/handling

static zealot
#

cool. no idea what that is

humble silo
#

uhh

#

ill send a pic

#

like this or something

#

with different states and then transitions between them

#

This is a good example too

obtuse gale
#

Something something reactive streams

humble silo
#

Isnt that just async streaming?

#

Or is it similar?

static zealot
brittle leaf
#

ive just figured out one usage of the static keyword, in an object you can use the static keyword to keep a variable the se between instances. ive been so against using static cause of static abuse that i missed the point in static all together

humble silo
#

The actual design pattern isnt too common, but im sure you've seen something similar before just havent heard the name

static zealot
humble silo
#

ya, i cant tell exactly what its doing but i think thats the idea

static zealot
#

vending machine. with just 1 product that takes 20 cents

#

or costs*

humble silo
#

oh lol, well ya, thats a really good example

forest pecan
#

please no

static zealot
#

pulse. so when can you pulse my beat?

humble silo
#

already implemented

forest pecan
static zealot
#

lmao

forest pecan
#

beat your meat

#

😏

static zealot
humble silo
static zealot
#

cool

#

I want that pulse

forest pecan
#

Same

static zealot
# humble silo

lmaoo. Opened the wikipedia page to read about this and I love that the first image there is this

frigid badge
humble silo
#

dkim19375 is typing

half harness
#

nvm

sweet cipher
prisma wave
static zealot
#

cool

#

OH MY FUCKING GOD. I just had a random realisation

#

All this time I was so confused why forks can't have the ISSUE tab and for some reason I randomly thought "hmm maybe they're just disabled in settings by default". Turns out they are just disabled by default in forks

prisma wave
#

ok

#

cool

static zealot
#

indeed

lean void
#

hey, im just wondering if deluxemenus can count votes? - i wanna sell some ranks that they have to meet the vote requirements to buy it, is it possible?

lean void
#

ah ok

static zealot
#

but if your voting plugin can and has placeholders you can use those in deluxemenus

#

next time

lean void
#

oh ok thanks

half harness
#

copy jar task doesn't work because it runs before the jar gets built D:

#

even tho i call it after shadowJar

#

oh wait

#

aaaaaaaaaaaaaaaa why does gradle run all of the tasks whenever it starts a new task

#

😖

#

how do i disable it for some tasks?

#

OOH

#

I THINK doLast FIXES IT ```kt
tasks.create("copyFile") {
doLast {
val jar = tasks.shadowJar.get().archiveFile.get().asFile
val pluginFolder = file(rootDir).resolve("../.TestServers/${server}/plugins")
if (pluginFolder.exists()) {
// Copy task doesn't work with doLast apparently
jar.copyTo(File(pluginFolder, tasks.shadowJar.get().archiveFileName.get()), true)
}
}
}

#

:D

obtuse gale
#
21.11 01:24:45 [Server]  Failed to parse item tag: TextComponent{text='{id:"minecraft:diamond_pickaxe",Count:1b,Damage:1s,tag:{Enchantments:[0:{id:"minecraft:efficiency",lvl:13s},1:{id:"tokenenchant:autosell",lvl:1s},2:{id:"tokenenchant:excavation",lvl:31s},3:{id:"tokenenchant:fly",lvl:1s},4:{id:"tokenenchant:gemfinder",lvl:10s},5:{id:"tokenenchant:luckyrewardsone",lvl:20s},6:{id:"tokenenchant:luckyrewardssix",lvl:2s},7:{id:"tokenenchant:luckyrewardsthree",lvl:2s},8:{id:"tokenenchant:luckyrewardstwo",lvl:10s},9:{id:"tokenenchant:merchant",lvl:30s},10:{id:"tokenenchant:tokenimpact",lvl:31s},11:{id:"tokenenchant:tokenminer",lvl:11s},12:{id:"tokenenchant:treasurehunt",lvl:1s}],display:{Lore:[]},Damage:1,HideFlags:1}}', siblings=[], style=Style{ color=null, bold=null, italic=null, underlined=null, strikethrough=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null, font=minecraft:default}}
21.11 01:24:45 [Server] INFO com.mojang.brigadier.exceptions.CommandSyntaxException: Expected ']' at position 71: ...ntments:[0<--[HERE]
#

Using ChatItem and Deluxechat

#

doing [item] doesn't show the lore of my pickaxe

#

with custom enchantments

#

Why not tho?

brittle leaf
#
    @EventHandler
    public void customInventoryClick(InventoryClickEvent e) {
        Player p = (Player) e.getWhoClicked();
        PlayerData specificdata = playerhashmap.get(p.getUniqueId());
        if (!(specificdata.getInvtype().equalsIgnoreCase("ENCHANT"))) {return;}
        if (e.getClickedInventory() == null) {return;}
        if (e.getClickedInventory().getType() == InventoryType.PLAYER) {return;}
        if (e.getSlot() == 19) {return;}
        e.setCancelled(true);
    }

so much cleaner then nested if statements

half harness
#

rn with my chat app, i have the ip of the server set to localhost
but what if i want to let others use the app?
I don't want them to know my ip ;-;

half harness
obtuse gale
#

hmmmmmm

#

hey

#

can you help me ?

half harness
#

what plugin?

obtuse gale
#

this is the code for me to create a copy of squid game

half harness
obtuse gale
#

but PlaceholderAPI plugins don't download ecloud squidgame

#

so ... how to fix

#

?

obtuse gale
#

You have a local client and a remote server

half harness
#

thats what i do

#

but you can still get the ip if i post to github

#

or decompile

#

D:

obtuse gale
#

I mean the client has to know where to connect
You can also, just like Minecraft, let people host their own server and tell the client where to connect

half harness
#

hm how should i add a way to delete/edit/etc messages

#

🤔

#

jetbrains compose doesn't have a stable version of a context menu

eternal compass
#

what protocol?

half harness
eternal compass
#

tcp?

half harness
#

websocket? 🤷

eternal compass
#

if it's websockets than yes

#

okay

half harness
#

oh

#

alr

eternal compass
#

yeah tcp

half harness
#

._.

eternal compass
#

😉 😉

half harness
#

but i'd need a vps or smth to host the proxy

eternal compass
#

correct

half harness
#

i don't know if theres one already out there such as tcpshield but for non mc

eternal compass
#

does cloudflare support websockets?

half harness
#

it supports only http(s) iirc

eternal compass
#

Websockets are HTTP(s)

#

you just never close the request

half harness
#

wdym?

eternal compass
#

basically you send a HTTP request, then send an "upgrade" packet

#

and it's upgraded

#

from http

#

to websocket

#

and then if noone closes it

#

it well, stays open

half harness
eternal compass
#

thats how websockets work. if you use a library for them, then it's built in

half harness
#

but if cloudflare supports it

#

why doesn't it work? 👀

#

if its on the gray cloud it works

#

but on the orange cloud i think it just kept trying to connect

eternal compass
eternal compass
#

it supports websocket connections

half harness
#

hm

eternal compass
#

maybe you're using ws and not wss?

#

and have auto https enabled?

half harness
#

idk what that is

#

🥲

eternal compass
#

websocket vs websocketsecure

#

iirc

half harness
#

rn my client is using ws

#

and if i change it to wss

#

Invalid TLS record type code: 72 I get this error message

#

🤔

eternal compass
#

or gray cloud

half harness
#

rn just doing localhost

eternal compass
#

that won't work

#

since you're not on https

#

but since cloudflare proxies to https

#

you need it there

half harness
#

oh

#

so ws for localhost?

eternal compass
#

definitely

half harness
#

o

eternal compass
#

but try wss over cloudflare

half harness
#

alr

eternal compass
#

50% chance it'l work

half harness
#

thats a big number 👀

eternal compass
#

man I love being taught what a variable is in school 🥲
my homework is learning what a variable is

half harness
eternal compass
#

it's in Javascript

#

just teaching simple coding stuff

half harness
#

Connect timeout has expired [url=wss://cloudflare-domain-thing:25575/chat, connect_timeout=unknown ms]

#

☹️

eternal compass
#

they used var though 🤢

half harness
#

naus?

eternal compass
#

no idea then

half harness
#

ty for trying tho :)

eternal compass
half harness
#

oh xD

#

als

#

o

#

nvm

eternal compass
#

👀

half harness
#

um

#

fred

#

do u know why these images are in f12 console 🤨

#

when going to ws://localhost:25575/chat or wss://localhost:25575/chat

eternal compass
#

and send a screenshot

half harness
eternal compass
#

well uh

#

probably something

half harness
#

hm

#

note that its unrelated to this issue since it pops up on every localhost thing i put in the browser

#

🤔

eternal compass
#

or similar

half harness
#

ah

#

probably

#

what extension has a music symbol tho 🙃

old wyvern
half harness
humble silo
#

I mean ya, but not for this

old wyvern
#

regex uses fsm

#

Oh wait, Did you just mean you found a place to apply the pattern?

humble silo
old wyvern
tranquil crane
#

you ever just writing code and suddenly you realize something looks incredibly illegal

prisma wave
#

😷

old wyvern
#

🥶

tranquil crane
#

I put a space between the ++ and + don't worry

#

I'm not a complete psychopath

prisma wave
#

while(i --> 0)

old wyvern
tranquil crane
old wyvern
#

That weirly reads well tho

tranquil crane
#

while i approaching 0

#

that actually makes sense

old wyvern
#

People throw that at almost any problem with multiple testcases per case in codechef

old wyvern
prisma wave
#

yeah it's kinda nice

#

too bad intellij ruins the formatting

old wyvern
#

You can change that I think

#

Ligatures work for --> as well thankfully

tranquil crane
#

how much cpu does that use for larger code blocks lol

#

looks really cool though

old wyvern
#

No idea 🥲 , will need to test more

lavish quiver
#

Hallo i need help can someone help me?

#

my discord error

barren oar
#

ok this might be a stupid question, but how do i understand if player started sneaking or ended sneaking in PlayerToggleSneakEvent? I want to do stuff when player released sneak key.

#

i think i can use !isSneaking() for this, if player is no longer sneaking i can start doing stuff

sly sonnet
#
while (player.isSneaking()) {
//    Do stuff
}
ocean quartz
gusty glen
half harness
#

so idk what the old code was

#

1 sec

#
tasks.create("copyFile", Copy::class) {
    val jar = tasks.shadowJar.get().archiveFile.get().asFile
    val pluginFolder = file(rootDir).resolve("../.TestServers/${server}/plugins")
    if (pluginFolder.exists()) {
        from(jar)
        into(pluginFolder)
    }
}
#

i think this is what it was before

gusty glen
#

that is fine, but what I want to see is the rest of your build.gradle

half harness
#

this also happens in all of my other projects

#

(which is why if you look at my os projects i don't use the Copy task)

#

at least i think thats why i don't use that

#

🤷

gusty glen
#
    doLast {
        File(project.rootDir, "build/libs").deleteRecursively()
    }
}```?
half harness
#

so that i dont have a billion jars :)

gusty glen
#

hmm

#

also

#

you need to put this line on the end of your shadowJar task scope: kt finalizedBy(tasks.getByName("copyJar"))

#

by doing that, you link your shadowJar task with your copyJar task, running copyJar AFTER (finalizedBy) shadowJar

half harness
#

i'm already using gradle shadowJar copyFile tho (which works now)

gusty glen
#

and if your shadowJar task is up to date, then it should not run your copyJar (untested)

#

I recommend doing that by using finalizedBy

#

if you run those tasks separately, it'll always copy the file (which will always be slower) than just skipping the task if the shadowJar is up to date

eternal compass
#

Wtf I just had a ping appear than disaapear

#

Does editing pings remove them now?

sly sonnet
#

idk

eternal compass
#

That didn't work

#

Well half did

#

But that might have just been discord being discord

foggy pond
#

You guys recon Minecraft 1.18 brings any big changes to how Paper and Spigot will handle things?

eternal compass
#

By updating :p
They already support large worlds iirc, so generally things should be fine

obtuse gale
#

"handle things"?

#

What things? Handle how?

prisma wave
#

handle ​‌‌‌
​VERB
UK

/ˈhænd(ə)l/
WORD FORMS
+
DEFINITIONS4
1
TRANSITIVE to take action in order to deal with a difficult situation

humble silo
old wyvern
old wyvern
brittle leaf
#

currently looking through how other custom enchant plugins work and its quite interesting how its done

humble silo
#

@old wyvern Im gonna ping you since you seem to know a bit about FSMs, but this is my event fsm system. I included a diagram about what its suppose to do, does the api i made for it(the code part) make sense at all? Anyone think there is a way to make it more concise?

old wyvern
#

Yea that looks about right. Usually using fsm as a pattern means switching between implementations to change states.
Altho this looks more of like triggering conditions than events

humble silo
steel heart
#

Yeah poggy pog

ocean quartz
#

Yugi let me know if you need IJ plugin help blurryeyes

obtuse gale
#

ok

old wyvern
#

Wow damn you dyno

tight dune
gusty glen
#

also e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getLore() can throw NullPointerException if the item being held is AIR

tight dune
obtuse gale
#

Hey guys, I am trying to figure out how to create invite links to my server, and not a channel. BUt every time I press invite people it gives me an invite link to a specific channnel

half harness
#

where else do u want it to invite to thonking

obtuse gale
half harness
#

choosing the channel just tells discord where you want the user to be in

#

when they join ur server

obtuse gale
#

But how do I create a invite link that is not for a channel? Just for the server? Because when i create invite links to a channel it never shows offline and online members.

half harness
#

for me it always shows

#

lemme test

#

1 sec

obtuse gale
#

It doesn't for me. Is there any way to just send to a server only? not a channel?

obtuse gale
half harness
#

ah

#

ic

#

in the top left

#

where it shows ur server name

#

click that and then click Invite

#

that should work

#

@obtuse gale

#

idk where it sends u tho 👀

#

lol

obtuse gale
#

See, when I send it it doesn;t say active and offline members

#

you get what i mean?

half harness
#

yes

eternal compass
half harness
eternal compass
#

hm

#

I did that

#

still didn't work

half harness
#

hmm

obtuse gale
#

I clicked the server name, then "invite people" and when I send it to my friends it doesnt show the online and total members

eternal compass
#

but still no member count

#

idk ._.

obtuse gale
restive ravine
#

It shows online and members for me

half harness
#

maybe ur server is too small or smth? 🥲

eternal compass
#

underneath

obtuse gale
half harness
#

🥲

eternal compass
half harness
#

lol

eternal compass
#

wtf

#

hacks

half harness
#

wait

obtuse gale
half harness
#

what if its someone else send it?

#

idk

restive ravine
#

Maybe because u sent it

eternal compass
half harness
#

no clue

obtuse gale
half harness
#

this maybe?>

obtuse gale
#

lmao

#

man

#

it was an inv to here 🤣

half harness
#

just tested with a server with 100+ members

obtuse gale
#

You know how some invite links have https:// discord.gg / and then the name of the server and not a custom letters and numbers. How do you do that?

half harness
#

thats different

obtuse gale
#

That's what I am trying to get

eternal compass
half harness
#

either enough boosts or partner/similar-i-forgot

eternal compass
#

maybe above like 25,000 or smth

half harness
restive ravine
#

Name invites are partners aren't they?

eternal compass
#

and boost lvl 3

half harness
#

and iirc u can get them from having enough boosts

eternal compass
#

both

restive ravine
#

Ah, I don't pay attention to the boost stuff

obtuse gale
#

I have booster my server and its at level 3 so i should be able to have my server name on the invite link no

eternal compass
#

if it's at 14 boosts

#

and you've unlocked level 3

#

it's under server settings

#

"Vanity URL"

obtuse gale
#

I have level 3 and when i go to server settings, it doesn't show me vanity url

obtuse gale
eternal compass
#

nope

obtuse gale
#

How do I see the total number of boosts?

half harness
eternal compass
half harness
#

or that

obtuse gale
#

tf yeah i have 14 boosts

#

and i dont see vanity url

eternal compass
#

send the server id here please

obtuse gale
#

You mean an invite to the server?