#dev-general

1 messages · Page 617 of 1

quiet depot
#

just made it even better

tranquil sinew
#

why am i getting "Method call expected" ?

    
    private Main plugin;
    public TeleporterGUI(Main plugin) {
        this.plugin = plugin;
    }

    private Inventory gui;

    public void openTeleporterGUI(Player player) {
        gui = Bukkit.createInventory(null, InventoryType.HOPPER);
        gui.setItem(0, new ItemCreator(ChatColor.RED + plugin.getConfig().getString("Slot1_name"), Material.RED_BED).build());
        gui.setItem(1, new ItemCreator(ChatColor.RED + plugin.getConfig().getString("Slot2_name"), Material.DIAMOND_SWORD).build());
        gui.setItem(2, new ItemCreator(ChatColor.GOLD + plugin.getConfig().getString("Slot3_name"), Material.COMPASS).build());
        gui.setItem(3, new ItemCreator(ChatColor.RED + plugin.getConfig().getString("Slot4_name"), Material.GRASS_BLOCK).build());
        gui.setItem(4, new ItemCreator(ChatColor.RED + plugin.getConfig().getString("Slot5_name"), Material.CAKE).build());
        player.openInventory(gui);
    }
    @EventHandler
    public void GUIClickEvent(InventoryClickEvent event) {...}

    @EventHandler
    public void OpenGUIEvent(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        if(player.getItemInUse().equals(Material.COMPASS)) {
            TeleporterGUI(player);      <<<
        }
    }
}```
remote goblet
#

im gonna assume you're either trying to a. create a new instance of the gui class or b. open the gui for the player
a)
you need to do new TeleporterGUI(plugin) since you missed the new keyword and you also are providing wrong args
b)
you need to do this.openTeleporterGUI(player) to run the function above the events

tranquil sinew
#

b helps, thanks a lot

slender roost
#

How do you properly use Git? Like do you commit for every small changes?

#

I saw a statistic or whatever on someone else GitHub profile, and it's crazy to me for some reason.

wintry plinth
#

Ye you commit each change with a message

slender roost
#

And your GitHub contributions statistic is like that too xd

inner umbra
#

God I would hate committing every change. I hate committing every update.

wintry plinth
#

Well not ever change, but every substancial change

slender roost
#

Yeah that's what I'm saying, it'll slow down the coding process I guess.

#

I usually just complete the code and then commit and push the whole thing at once.

inner umbra
#

I wish github allowed you to delete previous commits when you comitted.

slender roost
#

But it looks pretty cool, lots of green thingy

inner umbra
#

Mines probs mostly red xD (Deleted code)

slender roost
#

Does committing to private repository will count as contributions?

obtuse gale
#

Fairly sure there's an account setting for that

slender roost
#

Alright

#

Time to make my thing filled with green thing

inner umbra
#

👍

dawn island
cursive jolt
#

it does

#

You can change previous commits and then force push

#

it's a fun way to insert malicious code into an open source codebase. Simply change some old commit to be malicious, and then hope no one notices.

fickle niche
#

Hi I'm coding a api for my bungee server which consists of 2 plugins to communicate with eachother and I've ran across a weird issue
This is the error that I am getting:

 java.lang.NullPointerException: Cannot invoke "me.fiftyone.ventediaApi.API2.getDatabase()" because "this.api" is null

I understand that the part of code that is causing this is:

this.api = API2.getInst();

This calls to the second plugin which has the getInst function and should be returning to this:

 public API2(API api) {
        API2.api = api;
        this.inst = this;
        this.network = api.getRedisAPI();
        this.database = api.getDs();
        this.backend = api.getApplicationAPI();
        this.settingsManager = api.getSettingsManager();
        this.reworkConfigs();
    }

Which in my understanding shouldn't be null however throws a null in the console.
I'm not sure how to really explain it as these are 2 plugins of which its saying when pulling the api from 1st is null but shouldn't be.

#

If anyone would be willing/interested to fully understand what I am trying to do here and try help i can send the full code via private message.

wintry plinth
#

Would be better to post the code here, via paste or something

#

?paste

compact perchBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

wintry plinth
#

also why name things API and API2, so hard to keep track of

agile galleon
#

And then fix it

fickle niche
#

So this is the full error I am receiving:

[17:38:00 ERROR]: java.lang.NullPointerException: Cannot invoke "me.fiftyone.ventediaApi.API2.getDatabase()" because "this.api" is null
[17:38:00 ERROR]:       at me.fiftyone.ventediabungeecore.Bungee.initDBs(Bungee.java:97)
[17:38:00 ERROR]:       at me.fiftyone.ventediabungeecore.Bungee.onEnable(Bungee.java:49)
[17:38:00 ERROR]:       at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:312)
[17:38:00 ERROR]:       at net.md_5.bungee.BungeeCord.start(BungeeCord.java:293)
[17:38:00 ERROR]:       at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
[17:38:00 ERROR]:       at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
[17:38:00 ERROR]:       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[17:38:00 ERROR]:       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[17:38:00 ERROR]:       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[17:38:00 ERROR]:       at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[17:38:00 ERROR]:       at IlIlIllllIlllIIIIlllIIIIIIlIII.IlIIlIIlIlIIllIIllIl(Native Method)
[17:38:00 ERROR]:       at java.base/java.util.Optional.ifPresent(Optional.java:178)
[17:38:00 ERROR]:       at lllIIIIllIlllIIlIIlIlIllIIllIl.run(Native Method)
[17:38:00 WARN]: Exception encountered when loading plugin: VentediaBungeeCore
java.lang.NullPointerException: Cannot invoke "me.fiftyone.ventediaApi.API2.getNetwork()" because the return value of "me.fiftyone.ventediabungeecore.Bungee.getApi()" is null
        at me.fiftyone.ventediabungeecore.core.CoreManager.<init>(CoreManager.java:63) ~[?:?]
        at me.fiftyone.ventediabungeecore.Bungee.onEnable(Bungee.java:50) ~[?:?]
        at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:312) ~[?:?]
        at net.md_5.bungee.BungeeCord.start(BungeeCord.java:293) ~[?:?]
        at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67) ~[?:?]
        at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at IlIlIllllIlllIIIIlllIIIIIIlIII.IlIIlIIlIlIIllIIllIl(Native Method) ~[server-eyfen.jar:?]
        at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
        at lllIIIIllIlllIIlIIlIlIllIIllIl.run(Native Method) ~[server-eyfen.jar:?]
[17:38:03 INFO]: IP Address: 88.198.179.23

this is my "Bungee" file:

https://paste.helpch.at/horicapele.java

Api file:

https://paste.helpch.at/vamipifiga.java

ApiApi file:
https://paste.helpch.at/cuyumihonu.java

fickle niche
# agile galleon API2.getInst is null

Yes the API2.getInst now renamed to ApiApi.getInst is coming back null, but from me checking the code I dont think it should be and I don't know why

#

That's why I am asking if anyone can see what can be wrong here I have looked through this about 100x at this point changing some bits and bobs around and its just not making sense to me how its returning it as null... :/

#

Like the null that it's returning ik is 100% in either the Api or ApiApi file but I do not see where, how and/or why it looks fine to me

eternal compass
#

since that obfuscation looks odd

fickle niche
#

I am using i fork of bungee

#

Let me check which version

eternal compass
#

oh that's bungee not spigot

#

still odd

fickle niche
#

Yeah its on bungee it's like a private fork built in with anti packets and stuff

#

Just ran it on the latest build of plain bungee and it still looks basically the same way:

18:04:12 [SEVERE] java.lang.NullPointerException: Cannot invoke "me.fiftyone.ventediaApi.API2.getDatabase()" because "this.api" is null

18:04:12 [SEVERE]     at me.fiftyone.ventediabungeecore.Bungee.initDBs(Bungee.java:97)

18:04:12 [SEVERE]     at me.fiftyone.ventediabungeecore.Bungee.onEnable(Bungee.java:49)

18:04:12 [SEVERE]     at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:265)

18:04:12 [SEVERE]     at net.md_5.bungee.BungeeCord.start(BungeeCord.java:285)

18:04:12 [SEVERE]     at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)

18:04:12 [SEVERE]     at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)

18:04:12 [WARNING] Exception encountered when loading plugin: VentediaBungeeCore
java.lang.NullPointerException: Cannot invoke "me.fiftyone.ventediaApi.API2.getNetwork()" because the return value of "me.fiftyone.ventediabungeecore.Bungee.getApi()" is null
    at me.fiftyone.ventediabungeecore.core.CoreManager.<init>(CoreManager.java:63)
    at me.fiftyone.ventediabungeecore.Bungee.onEnable(Bungee.java:50)
    at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:265)
    at net.md_5.bungee.BungeeCord.start(BungeeCord.java:285)
    at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
    at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
#

I am just finding it really odd why that's getting returned as null :/

agile galleon
#

We cant help you with an error and your proof that apparently is useless

fickle niche
#

I did sent the class

#

These are the 3 classes

agile galleon
agile galleon
fickle niche
#

Well yes ApiApi is called here in my "Api"

public Api(HikariDataSource ds, String redisHost, int redisPort, String redisPassword, int redisDBIndex) {
        this.inst = this;
        this.ds = ds;
        this.redisApi = new RedisApi();
        this.applicationApi = new ApplicationAPI(this);
        this.redisApi.connect(redisHost, redisPort, redisPassword, redisDBIndex);
        this.settingsManager = new SettingsManager(this);
        new ApiApi(this);
    }
#

And then this is the Main class for the Bungee onEnable:

private Api api;

    public void onEnable() {
        System.out.println("Enabling VentediaAPI");
        Configuration settings = createConfig("settings");
        HikariConfig cfg = new HikariConfig();
        cfg.setJdbcUrl("jdbc:mysql://" + settings.getString("mysql.host") + ":" + settings.getInt("mysql.port") + "/" + settings.getString("mysql.database") + "?useSSL=false&connectionCollation=utf8mb4_unicode_ci&useConfigs=maxPerformance");
        cfg.setUsername(settings.getString("mysql.user"));
        cfg.setPassword(settings.getString("mysql.password"));
        cfg.setMaximumPoolSize(50);
        HikariDataSource ds = new HikariDataSource(cfg);
        this.api = new Api(ds, settings.getString("redis.host"), settings.getInt("redis.port"), settings.getString("redis.password"), settings.getInt("redis.dbindex"));
    }
#

Like I must be doing something wrong

#

Like on the enable Api gets initliazed

#

Which then Api initializes ApiApi

public Api(HikariDataSource ds, String redisHost, int redisPort, String redisPassword, int redisDBIndex) {
        --- Other Code Is here ---
        new ApiApi(this);
    }
#

But then it still comes out as null, ive been sitting with this problem for couple days now and im just mind boggled at this point 🥲

sly sonnet
#

idk man, your code looks scuffed

cursive jolt
#

I'd suggest learning how to debug code

#

step into what these calls are actually doing and see why it returns null

tranquil sinew
#

why am i getting an error message with "Non-static method 'openTeleporterGUI(org.bukkit.entity.Player)' cannot be referenced from a static context" in this code ?


        gui = Bukkit.createInventory(null, 9, "Lobby Teleporter");
        gui.setItem(0, new ItemCreator(ChatColor.RED + "Bedwars", Material.RED_BED).build());
        gui.setItem(2, new ItemCreator(ChatColor.RED + "PVP", Material.DIAMOND_SWORD).build());
        gui.setItem(4, new ItemCreator(ChatColor.GOLD + "Spawn", Material.COMPASS).build());
        gui.setItem(6, new ItemCreator(ChatColor.RED + "Survival Server", Material.GRASS_BLOCK).build());
        gui.setItem(8, new ItemCreator(ChatColor.RED + "Events", Material.CAKE).build());
        player.openInventory(gui);
    }```

```public void OnKeyClick(PlayerInteractEvent event) {

    if(event.getItem() != null) {
        if(event.getItem().getType().equals(Material.COMPASS)) {
            TeleporterGUI.openTeleporterGUI(event.getPlayer());
        }
    }
}```
half harness
lofty jackal
#

can anyone help me by creating a plugin

#

if so dm me in private

cursive jolt
maiden pivot
#

Can someone explain why when i canceled my boost it continued and the price raised at that, till this day i keep getting a 4.99 declined charge because i have told my bank that i have canceled it plenty of times.

mental trench
#

why would we know?

maiden pivot
#

i was forwarded to this discord nvm ill leave

mental trench
#

yeah

#

wrong discord

boreal needle
#

?not-discord

compact perchBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

boreal needle
#

damn they left already

mental trench
#

yeah

obtuse gale
cursive jolt
#

As long as they know what the code is doing, it's fine.

#

which is why they should learn how to debug

#

Strangely I can't find "?useSSL=false&connectionCollation=utf8mb4_unicode_ci&useConfigs=maxPerformance" on the internet

obtuse gale
#

It’s fine to take credit for something if you copy it?

#

But you understand it

cursive jolt
#

Yeah, I've used SQL before

obtuse gale
#

Like your reach check

cursive jolt
#

and also redis

agile galleon
#

just serialize it with gson?

wintry plinth
agile galleon
wintry plinth
#

Would I change the file from string then if I've already got the string?

#

In the code I linked above on github, I pull from the api

agile galleon
agile galleon
wintry plinth
#

So we're supposed to #fromJson and then use it again to convert to our type? If so, I now have:

            JsonObject bodyJson = GSON.fromJson(response.body().string(), JsonObject.class);
            final JsonObject serverJson = bodyJson.getAsJsonObject("data");
            final JsonObject teamQuotaJson = serverJson.getAsJsonObject("team_quota");

            ServerStatistic[] stats = GSON.fromJson(teamQuotaJson.get("stats").getAsString(), ServerStatistic[].class);

            getServerResponse = new GetServerResponse(
                    serverJson.get("name").getAsString(),
                    serverJson.get("uuid").getAsString(),
                    Instant.parse(serverJson.get("created_at").getAsString()),
                    teamQuotaJson.get("current").getAsInt(),
                    teamQuotaJson.get("limit").getAsInt()

            );

I'd be looking to get a List<ServerStatistic> instead, how would I adapt it?

boreal needle
inner umbra
boreal needle
#

was it really that hard to google

wintry plinth
wintry plinth
#

As if

stats: { "nickname": "Y" }

etc existed

inner umbra
#
ServerStatistic[] stats = GSON.fromJson(teamQuotaJson.get("stats").getAsString(), ServerStatistic[].class);
List<ServerStatistic> serverStats = Arrays.asList(stats);
wintry plinth
#

Ahh so I'd have to convert it, GSON wouldn't provide such built in?

#

I wasn't sure once I did GSON.fromJson earlier on, if I could then map additional stuff, I wasn't sure how heavy on perf that call was

#

To do GSON.fromJson for every individual section

#

As I do it once originally to get the main contents from the api like so

JsonObject bodyJson = GSON.fromJson(response.body().string(), JsonObject.class);
inner umbra
#

Well you'd have to test it yourself to figure that out. (Performance)

agile galleon
#

wouldnt that be easier

wintry plinth
#

As I said, i'm still getting my head round gson aha, not touched it much, more of a web dev guy

#

So trying to get to grips with object conversion

agile galleon
#

then do that?

wintry plinth
#

Would I have to create a class then and change JsonObject to the class?

agile galleon
#

yes

wintry plinth
#

Ah dope

agile galleon
#

just make the structure as it would be in the json object

#

and then

#

you have everything you need strong typed

wintry plinth
#

Would I need to use an annotation to make sure the key from the json maps up?

agile galleon
wintry plinth
#

Ah I see

distant sun
#

Does github mobile app open the files at the right lines for anyone? Or was this feature not implemented

steel heart
#

nope, not for me yet

distant sun
#

Spawn an entity with a name and male it invisible

static zealot
#

anyone using flameshot, is there any way to disable the "do you want to upload this capture?". There's a button to upload without confirmation but I Don't want it to be uploaded and I also don't want to be asked

static zealot
#

nice one github

quiet depot
#

@wintry plinth u get the gson thing sorted?

#

i is good with gson if u still need helps

hot hull
#

Oh hey Porkchop

#

help youth in what way

wintry plinth
quiet depot
potent nest
#

someone deleted their message

hot hull
#

Yus

quiet depot
#

o

hot hull
#

Look at this massive chode

quiet depot
#

what does that chode do

#

i aint ever seen a chode like that

hot hull
#

It's a 500W router

#

It's a spinning chode

#

about 10k rpm if I'm not mistaken

quiet depot
#

i've only ever used a handheld router

#

this looks funky

hot hull
#

The top part is the spinny chode, the bottom part is a z axis with a motor

#

Kind of surprised how punny the z axis looks compared to the router

distant sun
static zealot
#

anyone know if there's a way to disable windows 10 from spamming "update to windows 11" notifications? I Can't seem to find anything related to this

#

when I google, I always get "how to block from updating to windows 11" or similar. nothing related to actual notifications

#

found it. lol

drifting aspen
#

:)

static zealot
#

yeah for you and me. not for who's pc that is

drifting aspen
#

oh then

#

Install windows 11

static zealot
#

kek

timber oak
#

Currently trying to apply for Junior Java software developer jobs, but I'm not sure where to begin, found some posts but no idea how to write a proper CV or application. Found one with these requirements https://paste.helpch.at/epemurekik.coffeescript

I'm not sure if I meet them tbh, some in here might be able to tell me if I do meet the requirements? Been developing in Java for almost 4 years, and then a bit JavaScript, CSS, HTML and Python

hot hull
#

junior dev?

timber oak
#

Yeah?

forest pecan
#

well, communication skills are arguably one of the larger factors too

#

even if you write good code, if your social skills are shit then you prolly wont get accepted

distant sun
#

That should be good for jr imo, but apply for mid as well, the key is to be accepted for an interview

#

From there you just have to impress the interviewer

timber oak
timber oak
#

Created 3 different ones now, all ending with smth like this

#

It's so annoying

distant sun
timber oak
#

Would help a lot

distant sun
#

Yeah, looks like resume.io is also paid, bullshit

#

Looks nice

timber oak
#

How about the text? Just a quick skim if possible

distant sun
#

Could make a matrix of skills at the bottom, where you list the languages you know and how well you know it and for how many years you worked with it.

#

Btw whats Sorø

timber oak
timber oak
#

So something like this?

SKILLS
Expert in: Verbal and written communication, Usability principles, Updating Software, Maintaining Applications
Intermediate in: Customer Assistance, Software Automation, Project Management, Conceptual understanding

Languages: Java (4 years), C# (2 years), Python (2 years), HTML + CSS (1 year), JavaScript (1 year)

distant sun
#

Yeah, or literally a matrix

timber oak
timber oak
distant sun
#

hyper text markup language

#

it is not a programming language

#

but is ok to put them both there lol, why would you know css and not html?

timber oak
#

I guess I could rename the title to maybe "Experience:" or something (nvm, already got a title called experience)

timber oak
#

but what did you mean by a matrix?

#

Like a spreadsheet?

distant sun
#

a table

timber oak
#

Other than that, should the CV contain more information?

sly sonnet
#

Is it possible to disable this message on IntelliJ IDEA? Explicit type argument Integer, Pair<Integer, Integer> can be replaced with <>

onyx loom
#

hover over the yellow line and ull see a light bulb appear, then it should allow u to disable it from there

#

although, why would u want to disable that message?

sly sonnet
#

it's annoying

#

found it

#

thanks

onyx loom
#

well u dont need to type out the type parameters again

sly sonnet
#

i know

#

but i like to see what i'm working on

#

with*

onyx loom
#

whatever floats ur boat

prisma wave
#

🤨

#

you will always already know what you're working with

timber oak
#

Application should be job-specific while CV is just past experiences, correct?

sick belfry
#

they

#

they did it

#

emotes in mc without mods

#

no exclusive to certain skins confirmed

sly sonnet
#

how

inner umbra
#

Bedrock

sick belfry
#

idk kekwhyper

#

its also java

#

not bedrock

inner umbra
#

Models

sick belfry
#

but it can load your own skin

#

without updating RP

obtuse gale
#

where are you getting all this from?

sick belfry
#

their server

#

discord

obtuse gale
#

the official mc discord?

#

that's like the cringiest place to ever exist 💀

static zealot
#

isn't that the RP server or whatever?

#

its called

sick belfry
sick belfry
#

and its a bit weird

#

but I like that place

static zealot
#

yeah that one

river citrus
#

hey im about to reset my server for a new season is there any way to stop ppl from entering the end for like a week?

#

like so that the end portals dont light or that the eyes dont get thrown or...

sick belfry
#

you would need to stop all of that events I think

#

if there are

cursive jolt
#

spigot likely has a disable end option

inner umbra
#

But he doesn't want ender eyes to be throwable. (would need plugin for that)

stuck shard
river citrus
#

umm so i am a stoopid ass owner and my dev is busy and i may be in a bit of a pickle, when i replace a plugin with a the newer version of that same plugin do i delete the jar or the folder thingy?

cinder flare
#

you delete the old jar and leave the folder, as the folder contains your settings

river citrus
#

shittle

#

ok so i am in a big pickle

#

bcz i did the wrong thing for all 64 of my plugins

#

crap.

cinder flare
#

you updated 64 plugins at once? holy crap dude

river citrus
#

i had to update the server to 1.18.2 and had to do all the plugins to that update

#

but i have a backup

cinder flare
#

oh man 1.18.2 is a spooky update

#

can't backdate the world after that one

river citrus
#

what does that mean?

cinder flare
#

once you update to 1.18.2, you can't run that world on 1.18.1 or lower

river citrus
#

viaversion works for 1.18.2

cinder flare
#

yeah?

river citrus
#

also when i go to press backup a checkbox comes up and it says "remove all files and folders before restoring this backup"... do i click it?

cinder flare
#

depends

#

i wouldn't

river citrus
#

what would like happen tho

#

would i have double the files?

#

or like

#

...

cinder flare
#

no it should replace them

#

i dunno man, this is Ptero?

river citrus
#

yes

cinder flare
#

yeah I never click it

river citrus
#

ok thanks

distant sun
hot hull
#

Pog site

river citrus
#

in ptero in server-properties where do i input the seed of the world?

#

level-seed?

cinder flare
#

sounds about right

river citrus
#

alr

#

just making sure

cinder flare
#

i mean ptero doesn't touch that

river citrus
#

one last thingy (sry) I asked my provider to give me a little extra cpu space so that pregenning can go much quicker but chunky is only taking up like half of the new cpu space so is there any way to make chunky go faster?

cinder flare
#

set it to more threads, use Paper, have a better CPU, have an SSD, use Aikar's flags

river citrus
#

i just mean like is there a command to tell chunky to go faster?

dawn island
#

It’s limited to what star mentioned. You can’t just say
“Abracadabra finish my chunks”.

river citrus
#

damn

#

alr

#

thanks

dense dew
stuck shard
#

I jus realised

urban sleet
#

Is it possible to setup a debug configuration to work on a pterodactyl server?

#

I don't think it is, but just checking

cinder flare
#

Ptero just uses Docker

#

so you could attach to the Docker container possibly

sturdy magnet
#

ok so it is taking me too long to split 1 class (actually 2 declared classes in same file) into 2 acutal class files
one is like plugin's module class (i have core plugin which has modules) and other class is listener class for that module (it doesn't really need to be dedicated to that module's class but it's better in my opinion to be, if possible, yes)

* This is the error log:
https://pastebin.com/uenvtUNC

~~ ~~

* Top part of LimiterModule (module's name) class:
https://i.imgur.com/2aXyUWO.png
* This is the line which error logs says it's having NPE:
at me.thejoshua.mcfcore.modules.limiter.LimiterModule.getDroppedItemLimit(LimiterModule.java:137) ~[?:?]
https://i.imgur.com/RNicmaA.png

~~ ~~

* Top part of Listener class (that new class i am trying to make work):
https://i.imgur.com/J01EmW8.png
* Part where 99% of the error is related to:
https://i.imgur.com/c4wS1ro.png

distant sun
#

what are these?

sly sonnet
#

aggregators

#

and extractors

obtuse gale
#

You sound intelligent bro

hot hull
#

You don't bro

obtuse gale
#

Frosty Skids in the house

#

Who makes join plugins lmaooo

sly sonnet
#

dude who even are you

obtuse gale
#

The creator of boat magic

cursive jolt
#

just ignore billyb, he's toxic

obtuse gale
#

Oh here’s check skidder

#

With an ac that prolly crashes in production

cursive jolt
#

sure

#

unusable in production

obtuse gale
#

Sounds about right

hot hull
#

Owie we got an intellectual in the house, mans talking more smack than his braincells can handle, can't be talking smack when noone knows who you are my guy

obtuse gale
#

You act like I give a fuck about some volunteer workers kno ing who I am

cursive jolt
#

he keeps insulting my 3.001 reach check because it's "skidded"

obtuse gale
#

Od skidded not even proper

cursive jolt
#

because apparently there's some other open source 3.001 check

#

that I just copied and pasted from

obtuse gale
#

Imagine open sourcing a check that you didn’t even make

inner umbra
cursive jolt
#

No you can't

obtuse gale
#

Look at my 3.0001 i skidded guys

#

Aren’t I a good dev

#

For open sourcing a check I had no clue about for 5 years

onyx loom
#

if u dont have anything nice to say, dont say at all

#

stop

cursive jolt
#

Where do you think I got the check?

hot hull
#

billyb, out of curiosity, can I see some of your work

obtuse gale
#

Probably from a friend?

cursive jolt
#

Hey, at least he thinks I have friends! /s

obtuse gale
#

Or any other 3.01 skidded ac

cursive jolt
#

Okay, where did I get my 1.005 timer check from?

obtuse gale
#

Another anticheat

#

Keep talking like you’re the first to do this stuff bud

cursive jolt
#

There's no timer check designed like that

obtuse gale
#

You’re an idiot

#

Ego ac devs that use checks they gather. If your ac wasn’t shit servers would use it because it’s free

#

But that’s just not the case

cursive jolt
#

At least insult the checks I actually skidded like the sensitivity calculator

#

But you are insistent to insult original ideas

hot hull
#

Can't even get a response anymore, feels bad

obtuse gale
#

After I saw your massive data class I stopped looking

#

Frosty wanan see my join plugin?

#

It shows off my skill

hot hull
#

Hell yes

cursive jolt
#

Yes, I'd love to see it's source code

obtuse gale
#

My forked join plugin

hot hull
#

Show

#

Guessing you only have 1 monitor, since it's taking you ages to find that repo link

cursive jolt
#

do you have no original plugins?

#

Or have you only written hello world and therefore your code is perfect?

obtuse gale
#

I’d have one monitor if I did volunteer work like both of you

#

That’s just not the case tho

cursive jolt
#

you are in creative mode lol

#

also you can't debug reach like this anyways

#

it's a bit more complicated than just using bukkit events...

hot hull
#

Hey that's amazing, can I pay you 500$ to use it on my minecraft server?

cursive jolt
#

holy shit guys he just solved cheating

inner umbra
cursive jolt
#
    @Override
    public void onPacketReceive(PacketReceiveEvent event) {
        // If the player sends a flying packet, but they aren't flying, then they are cheating.
        if (WrapperPlayClientPlayerFlying.isFlying(event.getPacketType()) && !player.isFlying) {
            flag();
        }
    }
#

Here's a godlike flying check while you are at it

hot hull
#

billy, still talking shit, but I've still no idea who you are. And yes I don't even program so not sure why exactly you're loud

inner umbra
#

Let me see if I can find my old anticheat (Its shit probs the 6th plugin I coded xD)

cursive jolt
#

and, here's a timer check that catches 1.00000001 timer

    int lastFlying;

    @Override
    public void onPacketReceive(PacketReceiveEvent event) {
        if (WrapperPlayClientPlayerFlying.isFlying(event.getPacketType())) {
            if (System.currentTimeMillis() - lastFlying < 50) flag();
            lastFlying = System.currentTimeMillis()
        }
    }
#

maybe while you are at it,

    @Override
    public void onPacketReceive(PacketReceiveEvent event) {
        if (WrapperPlayClientPlayerFlying.isFlying(event.getPacketType()) && !player.isFlying) {
            WrapperPlayFlying flying = new WrapperPlayFlying(event);
             if (event.getPlayer().getFrom().distance(flying.to()) > 1) { 
                flag();
             }
        }
    }
#

Here's a speed check

hot hull
#

Who?

cursive jolt
#

I'm giving him shitty checks because apparently he thinks you can measure reach distance using bukkit

inner umbra
#
int loc1 = (int) (player.getLocation().getX() - event.getEntity().getLocation().getX());
int loc2 = (int) (player.getLocation().getZ() - event.getEntity().getLocation().getZ());
int reach = loc1 - loc2;
         
if(reach > wat.getConfig().getInt("ReachBlockAmount") || reach < Integer.valueOf("-" + wat.getConfig().getInt("ReachBlockAmount"))) {
``` Its sooooooo bad lmfao
hot hull
#

A piece of art

cursive jolt
#

If you didn't get the first check, it's a joke because the flying packet is the movement packet

#

so if would instantly ban everyone, which would ban all cheaters

#

the timer check will constantly false with any lag spike

inner umbra
#

@cursive jolt you never answered BTW How come you don't just extend player instead of copying all the variables?

cursive jolt
#

Because you can't do that.

#

Latency is involved everywhere

#

and bukkit based anticheats are very weak compared to using packets due to bukkit's limitations. And working with bukkit causes race conditions.

inner umbra
#

... You can. And it wouldn't effect it like you're thinking.

hot hull
#

Man skiddadled instead of showing me his join plugin, I'm kind of dissapointed to be honest

cursive jolt
#

considering that is your reach check I think I can just ignore you

inner umbra
hot hull
#

Mans trying to help you, and you're being an ass

#

What has this community become

cursive jolt
#

He's trying to tell me how to write an anticheat properly

inner umbra
#

That code is from 2014 I think

#

And was probs the 6th plugin I made. Maybe 5th

#
public class GrimPlayer extends Player {}
```This will shorten your class by over 100 lines and You can just use `this.<variable>` because you're extending the Player class. (Won't need to set all the variables which would cause performance issues.)
#

And memory leaks since you're just copying the same variables to your own class.

distant sun
#

I dont think you are supposed to extend Player

obtuse gale
prisma wave
hot hull
#

Oh hi BM

#

How's the wife and the kids

prisma wave
#

gday

inner umbra
distant sun
#

How do you even use that class?

inner umbra
#

You have to look at his code.

obtuse gale
#

It's easier to just make a wrapper

prisma wave
#

composition over inheritance

steel heart
#

lombok extension functions /s

hot hull
#

Conclure

distant sun
#

Leave

hot hull
#

Chosen death you have

steel heart
hot hull
#

Where's that trike

steel heart
#

yuh must be hidden pretty well

obtuse gale
#

@steel heart frosty makes join plugins don’t let him hurt your feelings

steel heart
#

hehe

#

join plugins

#

totally dont know what that is

hot hull
#

Man still talking smack, but too big of a puss to show his join plugin

#

Absolutely pathetic

steel heart
#

👀 dunno what you talkin' 'bout

hot hull
#

Talking to billy

steel heart
#

ah

#

billyb makes join plugins also? BulbaWOW

hot hull
#

No clue, he talking too much smack for someone who has nothing to show tho

steel heart
#

he dope tho

hot hull
#

From what I've gathered today is he's a salty boyo, who speaks plenty yet shows nothing

obtuse gale
#

BillyB?

limpid musk
#

is deluxemenus just discontinued?

onyx loom
#

no?

limpid musk
#

it doesn't support 1.18.1 or 1.18.2

#

and hasn't been updated in months

onyx loom
#

?dm-builds

ocean quartz
compact perchBOT
limpid musk
#

no like it literally doesn't work on either version

#

@ocean quartz

#

nevermind thanks kaliber

#

newest build doesn't work for 1.18.2

onyx loom
compact perchBOT
#
FAQ Answer:

Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.

limpid musk
#

ok

#

?paste

compact perchBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

limpid musk
#
[17:10:29] [Server thread/ERROR]: [org.bukkit.craftbukkit.v1_18_R2.CraftServer] me/clip/placeholderapi/PlaceholderAPIPlugin initializing DeluxeMenus v1.13.5-DEV-131 (Is it up to date?)
java.lang.NoClassDefFoundError: me/clip/placeholderapi/PlaceholderAPIPlugin
    at com.extendedclip.deluxemenus.nms.NMS.setupAccessor(NMS.java:23) ~[DeluxeMenus-1.13.5-DEV-131.jar:?]
    at com.extendedclip.deluxemenus.DeluxeMenus.onLoad(DeluxeMenus.java:57) ~[DeluxeMenus-1.13.5-DEV-131.jar:?]
    at org.bukkit.craftbukkit.v1_18_R2.CraftServer.loadPlugins(CraftServer.java:423) ~[paper-1.18.2.jar:git-Paper-235]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:288) ~[paper-1.18.2.jar:git-Paper-235]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1165) ~[paper-1.18.2.jar:git-Paper-235]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.2.jar:git-Paper-235]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: me.clip.placeholderapi.PlaceholderAPIPlugin
    at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:151) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    ... 7 more```
#

Do I need updated PlaceholderAPI?

onyx loom
#

awesome leaked plugins 👍

limpid musk
#

dude 👍

#

I am poor can't afford plugins

#
[17:10:47] [Server thread/ERROR]: [DeluxeMenus] Could not hook into PlaceholderAPI!
[17:10:47] [Server thread/ERROR]: [DeluxeMenus] DeluxeMenus will now disable!
[17:10:47] [Server thread/INFO]: [DeluxeMenus] Disabling DeluxeMenus v1.13.5-DEV-131```
compact perchBOT
#

🔨 A user has been banned for using plugin leaks, be like me and use legit copies of plugins.

prisma wave
#

🤨

obtuse gale
#

#skript

#

Wait till they see my join plugin they finna hire me

lime mirage
#

heyy

#

uhh i was wondering

#

I want to make a certain enchanted book go up

#

Which is renamed in a anvil to IkiuninUIUIuiinNN

#

And make it be teleported to A armour stand

#

1.18.1 btw

#

anyone know how to do that?

sweet pagoda
#

any US guys that can help me ?

obtuse gale
#

🤨

#

why from the US only?

sweet cipher
#

It’s the smartest continent

compact perchBOT
#
✨ Channel Cleaned!

• Removed 12 messages.

pallid gale
#

Stay on topic.

pastel imp
#

uh how does the new libraries feature work? (plugin.yml) Does it get stuff from mavenCentral?

quiet depot
#

yes

pastel imp
#

(Adds support for modals which alpha 9 doesn't have)

brave merlin
#

Possible for admin's to make the updates channels followable?

distant sun
#

If it is not on mavencentral, then you cant access it @pastel imp

zenith fog
#

anyone had this issue with gradle before?

#

Starting a Gradle Daemon, 8 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 9 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 10 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 11 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 12 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 13 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 14 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 15 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 16 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 17 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 18 busy Daemons could not be reused, use --status for details
Starting a Gradle Daemon, 19 busy Daemons could not be reused, use --status for details

#

endless

#

until the vps is about to reboot itself

#

until i manage to kill it

cursive jolt
#

why complain when this is efficient?

dusky mist
#

Hey im trying to make a throwable fireballl.
I want the fireball to explode, and the surrounding entities to be counted into a map and sent to the shooter as a message "You hit 5 entities for 22.4 damage" and for the entities hit, "you were hit for 6.8 by <player>"

could i use

Map<UUID, Double> totalDamageInner = new HashMap<>();```

Then in my listener:
```totalDamageInner.put(shooter.getUniqueId(), totalDamage.getOrDefault(shooter.getUniqueId(), 0F) + damage);
totalDamage.put(e.getDamager(), totalDamageInner)```
shooter being the player that originally threw the fireball, and the getdamager being the fireball entity
rotund egret
noble gulch
#

Hey

noble gulch
#

I am getting a NullPointer exception at line 26 where i do Game.gameAdd(player);

distant sun
#

game.gameAdd(null)

sly sonnet
#

Add this before that line:

if (player == null) return;
#

@noble gulch

noble gulch
noble gulch
sly sonnet
#

yeah

distant sun
#

Basically what I said :)

noble gulch
noble gulch
scenic oak
#

I'm having an issue with Maven when trying to preform a sync

Could not find artifact api:org.geysermc.floodgate:pom:2.0-SNAPSHOT in

I don't use floodgate in my project so I assume it is being included from one of my other dependencies. Is there a way to bypass this or just fully exclude it from my project without adding an exclude to every one of my dependencies?

primal crystal
sly sonnet
scenic oak
noble gulch
primal crystal
noble gulch
primal crystal
#

of which you get the error

noble gulch
# primal crystal of which you get the error
public class joinCommand implements CommandExecutor {

    Main plugin;
    Game game;

    public joinCommand(Main plugin) { this.plugin = plugin; }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    Player player = (Player) sender;
        if(sender == null) {
            plugin.console.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + "(!)" + ChatColor.RED + "Only players can execute this command.");
        }

        if (player != null) {
            if(plugin.ingame.contains(player.getUniqueId())) {
                player.sendMessage("You are already in a match. Type /blleave to leave.");
            }
            else if(!plugin.ingame.contains(player.getUniqueId())) {
                player.sendMessage("Sending you to BlockIn Practice!");

                if (player == null) return true;
                game.GameAdd(player);
                    // test

            }
        }


        return true;
    }
}
sly sonnet
#

if (sender instanceof Player player) {}

primal crystal
#

^

noble gulch
potent nest
#

instead of the blind cast

#

the sender will never be null, but if it isn't a player, it can't be cast this way

primal crystal
sly sonnet
#

?learn-java

compact perchBOT
#
FAQ Answer:

Online Courses:
Online courses are also great for learning java. Some websites that offer them are:

  • Coursera - Free unless you want a certificate
  • PluralSight - Great courses from what I've seen. Mostly Paid
  • Udemy - Never used them myself but they seem to all or at least most be paid.
    My first ever course was one from Coursera. - I can say it was pretty good at introducing me to the programming world as a whole not just java.

Oracle Docs:
Oracle docs can help a lot at learning and understanding java:

  • Start with this,
  • Breeze through this (skipping stuff that doesn't seem relevant like bitwise operators),
  • Hit this.
    They're the first three from this larger thing which you should definitely go through overall. But those three should be enough for slightly better understanding of what is happening here without feeling like a huge time sink.
    That one is a small part of this larger site wherein "Essential Java Classes" and "Collections" also have good useful stuff

Other services:
Some other cool services that will help you learn java are:

As you can see there are plenty of good ways to learn as long as you're willing to invest the time. Have fun learning!

noble gulch
primal crystal
#

also... player won't never be null

#

so check for a better logic for the implementation below that

sly sonnet
primal crystal
sly sonnet
#

?mf

compact perchBOT
noble gulch
#

@primal crystal Still receive the same error...

sly sonnet
#

also this

primal crystal
noble gulch
#

Line 41 is game.GameAdd(player);

primal crystal
#

is game null?

#

what is game?

potent nest
sly sonnet
#

then learn java

primal crystal
#

wait

noble gulch
primal crystal
#

you didn't create an object of game or referenced it from anywhere

#

the game is null there

noble gulch
primal crystal
#

well according to the code you provided...it is

static zealot
#

would it be safe to shrink a partition that I have linux booted on from window's disk management and give it to windows? if not what should I use to achieve this if even possible.

mellow blaze
#

sorry for pinging

potent nest
#

seems like you forgot to include the error

dawn island
static zealot
static zealot
dawn island
#

I'd possibly backup your linux/windows to a separate drive if it was a emergency for space.

static zealot
#

well I have a 500 gb ssd and gave 350 to my linux partition :)). and yeah don't have any external drives

quiet depot
#

dual booting on the same drive is always a mistake

#

ALWAYS

static zealot
#

ok. I am a mistake

#

so what's your point?

#

:))

dawn island
#

how is your drive speed with dual booting?

#

half?

quiet depot
#

dual booting shouldn't effect speed

dawn island
#

thought it might but I don't run dual booting on the same drive/ nor run linux atm

static zealot
#

not had any problems with read/write speeds no.

drifting aspen
#

Most people I know do it like that

quiet depot
#

easier to fuck it up

#

and issues like this with resizing partitions

#

it's just safer and easier to have them on separate drives

drifting aspen
#

The issue I see most is

#

That people have one SSD and one HDD

#

They want both of their OSes to be on SSD

old wyvern
#

Yea thats a major issue

#

Its takes a few minutes to boot from harddisk

static zealot
#

yeah. ssd is such a big improvement. even if its SATA.

potent nest
#

Just have multiple SSDs

distant sun
#

ping royalsaga.net shows a different IP address though

dawn island
#

I think personally it may be overlapping with your third page rule. Have you pinged discord.com yet to see if it matches.

distant sun
#

I tried to disable it

#

although the first two should have a higher priority

dawn island
distant sun
#

Website

dawn island
distant sun
#

i dont have a host for it, I want to use cf's routes to keep some URLs alive

distant sun
#

Question about git patches, is possible to apply them without building a jar? Like, I want to be able to see the new paper api (and craftbukkit is possible) with all these patches applied

#

Or is that what gradlew applyPatches does?

boreal needle
#

my training provider are teaching everyone about the web and post requests

#

they've got this site where you can post stuff to it and itll be included in the next refresh

#

they forgot to check for scripts

prisma wave
#

💀

static zealot
#

he just closed it last month

#

kek

#

its been in his about me for quite a while before that

distant sun
#

Yeah, I just want to keep these URLs alive, as I said

remote prism
#

Hello guys, I’m making an minecraft server and finding good icons to my custom server resource pack, do you have some websites or some icons in pc for me please?😵‍💫

boreal needle
#

i'd love to be able to contribute to chatchat

#

sadly i lack the technical skill

onyx loom
#

im sure u dont

prisma wave
#

yeah if kali can manage it then im sure anyone can

rotund egret
#

Lucy, you have at least 1 hand

#

You're qualified

static zealot
#

kali? what about me? I'm even worse

boreal needle
#

if i were to contribute where would i start?

onyx loom
#

well it depends

#

what do u want to contribute to?

obtuse gale
#

chatchat

#

she said that already duh

boreal needle
#

^

onyx loom
#

thanks for that

#

is there anything in particular in which you would like to contribute to make chatchat a better project

boreal needle
#

whatever needs doing to get the thing ready to go really

#

i could and try to fix one of those bugs i reported earlier

onyx loom
#

u can do the first issue if u want, thats an easy fix

boreal needle
#

yeah ill do that

onyx loom
#

as for the second issue, were trying to think of a way to do that without it being a crappy solution, so id hold off on that issue

boreal needle
#

yeah makes sense

#

i guess it gets weird when there's concurrency involved

gloomy siren
#

@ocean quartz there are issues in plugin

onyx loom
#

seriously?

gloomy siren
#

my expansions are not showing

onyx loom
sturdy magnet
#

how can i use net.minecraft.server.v1_18_R1

#

i already have both spigot-1.18.2.jar and spigot-api-1.18.2.jar

#

it doesn't exist in both of them

inner umbra
boreal needle
#

wrong issue

inner umbra
#

I only see 2 open

boreal needle
#

yeah it's the other one

#

incorrect channel name with message prefixes

inner umbra
#

Ah let me look.

sturdy magnet
inner umbra
boreal needle
#

that's not the issue we're facing

#

it's more complicated than that

inner umbra
#

Thats all I'm reading based on the issue.

#
if(chatevent.isCancelled())
    return;

user.channel(channel != user.channel() ? channel : user.channel());
boreal needle
#

that is still not the issue we're facing

inner umbra
#

Can you explain it then cause that's what's written

boreal needle
#

every user has a current channel stored as a state

#

that channel can be overriden per-message through message prefixes

#

to include the channel name in the message, we currently use a papi placeholder that references the user's state which is not correct as the message itself overrides it

inner umbra
#

The playerchat event checks for a channel even by prefix, the code I posted will set the channel if the event isn't canceled. The place holder checks ChatUser.channel()

boreal needle
#

you're still missing the point

inner umbra
#

The papi placeholder isn't updating....

boreal needle
#

the reason message prefixes exist is to avoid touching the user state for a one-off message

inner umbra
#

You can define the check with if statements to not run the channel method every time but I just 1 lined it.

boreal needle
#

if it were that simple do you not think we'd just do that

inner umbra
#

I know the simplest code is usually overlooked.

You could always try it. I'm not on pc

boreal needle
#

it still does not solve the problem

inner umbra
#

Then I don't think I'm understanding the problem.

boreal needle
#

we're trying to override it, per message, without touching the user's set channel

light venture
#

gaby looking cute

distant sun
#

Is there something that stops use from switching the channel?

#

Sellinq too

light venture
#

<3

inner umbra
boreal needle
distant sun
#

Hm

#

Where is this part of code?

onyx loom
#

its not that the fix is hard, its just that the solutions we have arent very nice

#

i dont think it is to do with concurrency is it?

inner umbra
#

It's not

distant sun
#

Kali, link please :>

boreal needle
#

not sure if concurrency is the right word there

#

it has effects elsewhere

inner umbra
#

He wants to send a message to a channel, while not changing the channel but changing the placeholder of the current channel.

#

Could just add a temp variable and have the placeholder check that.

distant sun
#

Line 65 is where I look, kali?

boreal needle
#

it's not a specific line

distant sun
#

Aight

onyx loom
#

thats what we did before (before i removed it without knowing the implications lmao), its just not that great of a solution. although i think were going to back to this solution

boreal needle
#

or just add a non-papi placeholder that we manually replace

distant sun
#

So the problem is related to formatting the message, right?

#

Hmm, I thought I had an idea, but nvm

steel heart
distant sun
#

Are %channel_name% and %channel_prefix% the only placeholders? (Not exactly these)

steel heart
#

ye

#

at least from what I can see

distant sun
#

Well, I guess we can just use mini tags for that and call it a day

steel heart
#

I must be deplorably slow, can't wrap my head around what the issue even is 🤢

onyx loom
#

dw about it 😄

inner umbra
#
// ChatUser class

Channel lastUsedChannel;
public Channel getLast() {
    return lastUsedChannel;
}

public void setLast(Channel channel) {
    lastUsedChannel = channel;
}

// ChatListener

if(chatevent.isCancelled()) {
    return;
}

user.setLast(channel);

// ChatPlaceholders

if (params[0].equals("channel")) { switch (params[1]) { case "name": return user.getLast() != null ? user.getLast().name() : user.channel().name(); case "prefix": return user.getLast() != null ? user.getLast().channelPrifix(): user.channel().channelPrefix(); } }
#

What a bitch to do this on phone.

steel heart
#

you'd have to make that variable volatile (in principle) but sure

distant sun
#

When the user uses the shortcut (aka message with a prefix) to send a message to a certain channel, they dont want to switch the channels, and therefor the papi placeholders for channel will have the value of player's current channel, not of the one where they sent the message on
Conclure

steel heart
#

ah

inner umbra
#

Thats what the code above is for. The place holder will check the getLast channel.

distant sun
#

People will need to know when to use the method for lastChannel and when to use channel(), yapp

inner umbra
#

What's the point of auto correct if it doesn't correctly, correct my texts?

distant sun
#

Imo MM tags seems like the best way

wind patio
#

Is my HDD done for it's lifetime?

1    Read Error Rate    0    118    99    6    0x00000AB681DA
3    Spin-Up Time      0 ms    98    94    0    0x000000000000
4    Start/Stop Count    20,625    80    80    20    0x000000005091
5    Reallocated Sectors Count    0    100    100    36    0x000000000000
7    Seek Error Rate    0    84    60    30    0x00000ED23674
9    Power-On Hours (POH)    1526d 20h    59    59    0    0x000000008F24
10    Spin Retry Count    0    100    100    97    0x000000000000
12    Power Cycle Count    10,732    90    90    20    0x0000000029EC
183    SATA Downshift Error Count    0    100    100    0    0x000000000000
184    End-to-End error    0    100    100    99    0x000000000000
187    Reported Uncorrectable Errors    965    1    1    0    0x0000000003C5
188    Command Timeout    103,080,988,729    100    97    0    0x0000001B1039
189    High Fly Writes    0    100    100    0    0x000000000000
190    Airflow Temperature    36 °C    64    49    45    0x000024240024
194    Temperature    36 °C    36    51    0    0x000000000024
195    Hardware ECC Recovered    0    31    25    0    0x00000AB681DA
197    Current Pending Sector Count    1    100    100    0    0x000000000001
198    Uncorrectable Sector Count    1    100    100    0    0x000000000001
199    UltraDMA CRC Error Count    1    200    200    0    0x000000000001
240    Head Flying Hours    2470d 23h    100    253    0    0x00000000E7A7
241    Total LBAs Written    2,130,925,249    100    253    0    0x00007F0356C1
242    Total LBAs Read    2,278,281,776    100    253    0    0x000087CBD230

:Clueless:
(Image format https://imgur.com/a/j5ELCjf)

steel heart
#

ye yapperyapps, a last used channel state with its own placeholder might not be such a dumb idea

wind patio
#

1526d POH 🥶

distant sun
#

mm tags

#

Gn guys, good luck with this

steel heart
#

whats mm tags btw? 😮

onyx loom
#

u can create ur own placeholders within minimessage

steel heart
#

oh

#

ah nice

#

are channels supposed to go over different backend servers btw? (or well r they capable of that?)

onyx loom
#

not yet no

#

bungee support is planned

steel heart
#

oo thats fancy

inner umbra
half harness
steel heart
half harness
steel heart
#

alr

half harness
#

idk what object destruction is 🥲

steel heart
#

🥲

half harness
steel heart
inner umbra
#

So it's just converts params to a list?

half harness
#

yea

#

but i didn't know i could make multiple variables off of a list

#

quite cool

steel heart
#

yeee its very nice

onyx loom
steel heart
#

java might get sth similar for records in the future btw 👀 tho I suppose as a kotlin chad u couldnt care less

half harness
#

kotlin already ahead 😎

steel heart
#

ye

obtuse gale
#

Wait until you hear about Scala 😌

steel heart
half harness
#

wdym by bloated?

steel heart
#

has a colossally gigantically enormous amount of features

#

like

#

yes

half harness
#

but

#

isn't that good

#

😌

#

although coroutines, most reflection, etc are separate

#

ig to keep it smaller in the main stdlib

steel heart
#

well it gets hard to know what to use as there is always 10 different options you could go with each one of them being equally acceptable

half harness
#

hm

#

¯_(ツ)_/¯

half harness
steel heart
#

adverbs x:)

half harness
#

AA

#

enourmous

#

isn't that adj tho

#

but the rest i think are adverbs

steel heart
#

ye

obtuse gale
#

Go back to middle school smh

half harness
#

hey i just looked at the last word

obtuse gale
#

worde

half harness
#

😭

steel heart
#

features

wind patio
#

K 🤮 tlin

steel heart
#

btw dkim since u have already tested out kotlin and haskell, I see no harm in you trying out a superior language such as scala :>

half harness
steel heart
#

its never too late

half harness
#

i went into haskell bc bm kept talking about it lol

#

but now

#

he doesn't talk about it

#

so i forgot a lot of it

steel heart
#

hehe

half harness
#

Good Choice!

#

13 upvotes

#

nice

steel heart
#

well google says so

#

so it must be true

wind patio
half harness
wind patio
#

🥶

half harness
#

i've got vs java

#

🥲

steel heart
#

lmao

half harness
#

thats saying that google comparing to java

#

thus

#

it's more similar to java

#

thus

#

I must stick to kotlin

obtuse gale
#

Scala is really really really nice

wind patio
#

I don't like kotlin syntax tbh

obtuse gale
wind patio
#

its poopoo

obtuse gale
#

It's more different to java than Kotlin is imo

half harness
#

ooh no semicolons

half harness
steel heart
#

m0dii yes, I personally believe their interoperability they so much flex about is quite shit

half harness
#

ooh 966 xp to level 58

#

yay

#

almost tier 7

#

:OOOOOO

obtuse gale
#

Also

#

I have reached 1999 uwu's

half harness
#

WHAt

#

what server

#

how did you see

steel heart
half harness
#

lol

obtuse gale
#

Rory fanclub

half harness
#

oh

wind patio
#

I mean I do like the data class in kotlin

steel heart
#

record :3

half harness
#

so many neat things in kotlin 😌

#

btw question for you guys

#

c# or java

wind patio
#

tho lombok does it in java too

#

🙂

steel heart
#

Sadly C#

half harness
#

😌

wind patio
#

jk lombok is garbo

half harness
steel heart
#

its quite sad but true, C# is clearly superior to Java

wind patio
half harness
wind patio
#

uh, not even sure honestly

#

just lang? no specific framework like ASP, .net, core?

half harness
steel heart
#

Probably dot net

wind patio
#

Well, I think C# is indeed superior to java

#

mainly cuz daddy microsoft

#

yeah well scala is closer to kotlin than java

half harness
#

mhm

#

reminds me of py

wind patio
#

py 💀

obtuse gale
half harness
#

lol

#

wait does scala have None

#

is this part wrong

#

since it has ERROR

wind patio
obtuse gale
#

None is an Option case

#

Basically empty optional/none maybe

half harness
#

wait what

#

but it doesn't have anything to check

#

its basically !! in kotlin 🤢

#

also doesn't scala have !!

#

and ?

wind patio
obtuse gale
half harness
#

well

#

its just doing None.map

#
val dateSel = Option[LocalDate] = None
val day = dateSel.map
#

from the image above

obtuse gale
#

Yeah and day will be None too

half harness
#

oh

#

ic

#

interesting

obtuse gale
#

As will day in the kt version be null as well

half harness
#

wait does this compilet o jvm

#

or no

wind patio
#

yes (scala)

obtuse gale
# wind patio

I don't see why that would error tbh lmao (besides a syntax issue elsewhere)

ocean quartz
wind patio
#

there's scala.js? 🧐

obtuse gale
# wind patio

yeah as I said that's not even syntactically correct lol

prisma wave
#

Scala came first

rotund egret
#

While that is in a literal sense, true.
That's not really the spirit of the idea being conveyed.

urban sleet
#

I'm learning java and made a relatively simple program which will calculate the offset between two objects (in this case, some armorstands)

Is there a way to optimize this code or does it seem good?

lunar cypress
#

I would implement a method to calculate the distance in ArmorStandObject itself

#

and you can avoid the manual rounding hack by simply using string formatting/ System.out.printf

urban sleet
#

I knew there was a better way to round it, just couldn't remember 😅

#

Thank you!

boreal needle
#

are you calling add on the same instance

primal crystal
#

TestList list = new TestList(); is basically creating a new object.... think it as an another container.... you are creating new container, while the first object is the one that holds the data.... So you need to get the reference of the original object

urban sleet
primal crystal
#

So consider you are having 3 different classes... Class TestList, class AddCommand and the Main class....

So you can basically create an object of TestList in the main class and store it their on a variable.... so on your main

public final TestList testList = new TestList();

So a object of the TestList is created and stored on the main... so if in case later if you want to access them from the addCommand you could either pass the main class through constructors or have a static reference for your main class... so in your AddCommand class would be something like this

  private final Main mainInstance;

  public AddCommand(final Main main){
    this.mainInstance = main;
  }

  //other stuffs....
  //and you can call the TestList like this

  mainInstance.testList.add(uuid, code);
#

I hope you understand what i said xD

lunar cypress
cinder flare
#

makes me yearn for tuples

lunar cypress
#

sorry, distance is the wrong term

#

what is this called again

#

i guess you could say difference

urban sleet
#

Yeah it'd be difference

cinder flare
#

he called it distance

lunar cypress
#

distance is usually a scalar

cinder flare
#

oh true true

#

could look at how Bukkit's Location class does it for inspiration

lunar cypress
#

the reason why i hesitated with difference though is because the class is "ArmorStandObject"

#

dunno what else it is besides a positional 3d vector

cinder flare
#

true true, Bukkit calls it subtract

#

verbs and all that I suppose lol

lunar cypress
#

i don't really like bukkit's location

#

from a mathematical standpoint i would expect a location to be a point, but it's sometimes used as a directional vector too

#

idk

obtuse gale
#

It's dog water

#

over a decade old

lunar cypress
#

also mPogFishtable

cinder flare
#

well it is a point

#

but it also has pitch and yaw, to represent a direction

#

so you can use one class for like, every positional thing about a Player or something

#

I prefer that over having two separate ones

lunar cypress
#

sure, ok

#

what happens to pitch and yaw when subtracting?

obtuse gale
#

Nothing

#

They are left untouched omegalul

lunar cypress
#

so, that's about what i figured

#

my point is the difference should still be a 3d vector

cinder flare
#

well yeah it is, isn't it?

cursive jolt
#

Look is also represented as a 3D vector

cinder flare
#

a 3d vector from between the two points, just ignore the pitch and yaw completely

cursive jolt
#

Although at least it’s X and Y so it makes sense

cinder flare
#

what lol

lunar cypress
#

the existence of this implies that - is a binary operator over locations

#

the fact that it's mutable makes it a bit dumber of course

cinder flare
#

wait yeah what does that actually return

lunar cypress
#

this

#

🥲

cinder flare
#

well no I mean like what does it do

#

subtracting locations doesn't even make sense

lunar cypress
#

that's what i've been saying

#

it ignores everything but x,y,z

cinder flare
#

is it like the location relative to the origin is the length?

lunar cypress
#

no it literally just pretends the argument is a 3d vector i think

cinder flare
#

huh

obtuse gale
#

Yeah it treats both locations as 3d vectors

#

Literally just

Location subtract(Location o) {
  x -= o.x;
  y -= o.y;
  z -= o.z;
  return this;
}
prisma wave
obtuse gale
#

?

prisma wave
#

untouched odin zero

boreal needle
#

touched odin zero sunglasso

light venture
#

what ever happened to untouched @prisma wave

boreal needle
#

santa mitten in march

prisma wave
#

he is still alive though

prisma wave
#

without boosting

#

so im keeping it as a sign of protest

static zealot
#

lmao

light venture
prisma wave
#

yea it did go a bit under the radar

light venture
#

yeah i can see

#

last thing i see is about a pfp

sturdy magnet
inner umbra
#

Package names changed

sturdy magnet
#

how?

#

but i saw somewhere

#

people used in their plugin net.minecraft.server.v1_18...

#

look

inner umbra
#

I don't click links. Screen shot?

sturdy magnet
#

my mistake
org.bukkit.craftbukkit._v1_18_R2

sturdy magnet
#

server don't allow me to send

inner umbra
#

You can use imagur to embed them

sturdy magnet
#

ok i will but why you don't click github links?

inner umbra
#

I don't click any links from discord. If it doesn't embed I don't bother with it lol

sturdy magnet
#

oh ok

inner umbra
#

add .png

sturdy magnet
inner umbra
#

Might need tier 2 Thats fine...

#

Yeah thats bukkit/craftbukkit not nms.

sturdy magnet
#

ok but

#

ok still
i want to use that (not nms)
now, what i need?
spigot-api-1.18?

inner umbra
#

In 1.17 almost all package names changed as well as class names

inner umbra
sturdy magnet
#

ok remapped works

inner umbra
#

Based on those imports I am assuming NMS methods are used so you will more then likeley need the remapped jar.

sturdy magnet
#

spigot api doesn't

inner umbra
sturdy magnet
#

i didn't check remapped, so now i did

#

thank you man

#

!

sturdy magnet
#

like nowhere?

#

or?

inner umbra
#

NP. remember the class names will revert back to mojang in the remapped so You need the maven plugin MD_5 posted to remap the methods when exporting your plugin.

inner umbra
#

Makes it easier to adapt to future versions.

sturdy magnet
#

ohhhhhh

#

alright

#

good man

#

thank you

inner umbra
#

👍

jaunty maple
sly sonnet
#

?mf

compact perchBOT
prisma wave
#

Mother fucker framework

obtuse gale
#

shut up

brave spindle
#

anyone down to start a minecraft server with me?

compact talon
brave spindle
#

something with Skyblock, a survival server and other things later on

compact talon
brave spindle
#

Alright! I'll definitally DM you :)

obtuse gale
#

If so, I have a 3 month free gold membership gift thingy in discord, if anyone wants it, just ping me and the redeem code is yours, i dont want it.

eager fern
#

@obtuse gale not the right channel

obtuse gale
#

how do i get help... i have 2 accounts , how do i delete one?

nova venture
#

After how much time can i post the same dev question again?

lavish notch
obtuse gale
#

hi, how do i use [broadcast] in deluxemenu pls i don't understand it doesn't work

#
  • '[broadcast] %player_name% just buy &aChevalier'
#

i got this line on my left_click_command

static zealot
normal ivy
#

what about you @static zealot

quiet depot
#

yeah what about you @static zealot