#help-development

1 messages Ā· Page 369 of 1

regal scaffold
#

Where is that placeholder from?

remote swallow
#

you replace {MESSAGE} with message, replace it with "%2$s" instead

regal scaffold
#

Yes yes

remote swallow
#

%2$sis the string format placeholder for the 2nd arg in the string passed through so would replace it with the message when ran, would stop the change to have messages doubled on some servers

regal scaffold
#

format = format.replace("{MESSAGE}", "%2$s");

remote swallow
#

yeah

regal scaffold
#

Same

regal scaffold
remote swallow
#

any other chat plugins?

regal scaffold
#

It has to have something to do with this method because if I disable it I can see name in chat

#

Negative

remote swallow
#

somethings like replacing it with air

regal scaffold
#

Vault, luckperm, Papi, via

remote swallow
#

ive got no idea what would cause that to happen

regal scaffold
#

Ok so

#

If I comment out the entire code block

remote swallow
#

something else is modifiying chat im guessing

regal scaffold
#

I will attempt to find out

sterile token
remote swallow
#

unless TEST is on the display name

remote swallow
regal scaffold
#

It is

#

Like I'm setting the display name

#

In the plugin

remote swallow
#

you got essentials chat?

regal scaffold
#

As well as the tablistname

sterile token
regal scaffold
#

No, that's what my plugin repalces

remote swallow
sterile token
remote swallow
#

luckperms never has modified chat

remote swallow
sterile token
#

I mean luckperms api modify the chat format

#

If not how does they displayed their format?

#

Doesnt make sense

remote swallow
#

straight from their discord

remote swallow
#

something has to change it getting info from the api

sterile token
#

Hmnn so how do they display their palceholders so?

regal scaffold
#

So what could it be

remote swallow
remote swallow
#

im pretty sure they modify base chat for some reason

regal scaffold
#

no, I listed the 4 plugins

sterile token
remote swallow
#

they store all the data in a database, you can request info about a player through their api prob

#

and it would call it from the db

sterile token
#

No no

#

you dont udnerstand my point

#

Soem minutes please, i will finish coding and send you the message translated to english

remote swallow
#

idk how that would work

sterile token
#

Wait, Vault doesnt format the chat?

remote swallow
#

on its own no

sterile token
#

How they work so??

remote swallow
#

how who work

sterile token
#

If none of them (Vault nor Luckperms) modify the chat format, how luckperms format is displayed, doenst make sense...

remote swallow
#

its not luckperms format

regal scaffold
#

...

remote swallow
#

he is setting the players display name

regal scaffold
#

lol

sterile token
#

Thats not what he was asking

#

He was asking something related to chat format, didnt he?

remote swallow
#

context is important

regal scaffold
#

^

remote swallow
#

the chat format is displaying the display name

sterile token
remote swallow
#

he is calling player.setDisplayName("Something")

#

the server is displaying that

sterile token
remote swallow
#

base server doesnt format chat

sterile token
#

I thought he was having issue with custom chat formatting, which was being overriden by anothe rplugin. I mean thats what i have readen

#

šŸ¤¦ā€ā™‚ļø

remote swallow
#

the format works in game but somehow wont show the display name in console

dry yacht
#

That looks cursed, xD

regal scaffold
#

how so? It's native placeholder support and then papi addition onto it?

dry yacht
#

You're replacing on format, which you declared as a string literal of "%2$s". How can that ever replace anything.

regal scaffold
#

And changed back

#

To an actual format string

dry yacht
#

What are you currently running?

eternal oxide
#

I don;t see you fetching YOUR format from anywhere

regal scaffold
#
    @EventHandler(priority = EventPriority.HIGHEST)
    public void onChat(AsyncPlayerChatEvent event) {

        if (CHAT_ENABLED) {
          String message = event.getMessage();
            Player player = event.getPlayer();
            event.setMessage(ChatColor.translateAlternateColorCodes('&', message));
            String format = CHAT_FORMAT;
            format = format.replace("{PREFIX}", getChat().getPlayerPrefix(player));
            format = format.replace("{NAME}", player.getName());
            format = format.replace("{SUFFIX}", getChat().getPlayerSuffix(player));
            format = format.replace("{MESSAGE}", "%2$s");
            format = colorize(translateHexColorCodes(this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI") ? PlaceholderAPI.setPlaceholders(player, format) : format));
            event.setFormat(format);
        }

    }
eternal oxide
#

you are reading the default format from teh event

regal scaffold
#

I am and have been

#

The problem is not the formatting

eternal oxide
#

ah ok

regal scaffold
#

Thje formatting works perfectly

#

The problem is the message in the console

#

That's ingame, good, amazing, beaituful, whatevber

#

And that's the console

eternal oxide
#

yes

regal scaffold
#

That's the issue

eternal oxide
#

console only displays message

regal scaffold
#

negative

#

It will display the name of the sender

#

And I had it working with this exact code to even display colors

eternal oxide
#

only if yoru format contains a %s

#

the initial %s is the players name, the second %s2whatever is the message

#

you are removing the %s so console can only display the message

regal scaffold
#

tf I am?

#
          String message = event.getMessage();
            Player player = event.getPlayer();
eternal oxide
#

show your base format line

remote swallow
#

dafuq? if i set the format to be something like "server name >> %2$s" it would show in console

#

is that because i have the %2$s or something

regal scaffold
#

CHAT_FORMAT: "{PREFIX} {NAME} {SUFFIX}&e&lĀ» &7{MESSAGE}"

eternal oxide
#

yes, theres no %s in there

regal scaffold
#

Why do I need that?

#

If my code is getting the message

#

The entire message

eternal oxide
#

I believe console needs it

regal scaffold
#

Ok lets run a test

eternal oxide
#

its been many years since I wrote a chat plugin so I may be talking out my arse

remote swallow
#

one sec

dry yacht
#

String message = String.format(queueEvent.getFormat(), queueEvent.getPlayer().getDisplayName(), queueEvent.getMessage());
PlayerConnection.this.server.console.sendMessage(message);

#

So the result from String#format is sent to the console sender as is, it seems like.

regal scaffold
dry yacht
#

What version are you on?

regal scaffold
#

Cause it will show duplicate

#

Cause by default all chat messages are sent to console anyways

dry yacht
regal scaffold
#

latest paper

regal scaffold
#

The only difference with alex's is how he gets the player nickname

dry yacht
#

I'm gonna have to laugh so hard if that's paper specific behavior, xD. Would be very, very weird tho.

regal scaffold
#

It's not

dry yacht
#

Have you checked the source?

regal scaffold
#

I'm telling you if I downgrade to a few versions before

#

It works

#

Perfectly

#

And that code hasn't been changed at all

#

My plugin version that is

eternal oxide
#

you sure you've nto got your plugin jar in there twice?

regal scaffold
#

'm sure

#

Ummm wait a second here

dry yacht
regal scaffold
#

I just tested my old version

#

[11:18:45] [Async Chat Thread - #1/INFO]: [Not Secure] :dev: TSans_ test

#

nvm it did work before

#

:dev: is the correct prefix

sterile token
#

Okay something definitly is wrongly coded

#

Also database, just contains 464 ms of time played for that player

#

in theory 1000 mili-seconds = 1 second, doesnt make sense tho

#

I will have to recheck whole code

dry yacht
sterile token
#

Can i get an explantion of why getting that result?

lost matrix
#

We need to see some code for that

sterile token
#

right

lost matrix
#

How are you tracking the players time?

sterile token
#

1m im writting the math i follow

regal scaffold
#

The chat method has stayed the exact same

sterile token
#

@lost matrix

I saving the players time into a mongo document as a long value, and once his join the proxy, the data is loaded into redis cache, this is dnne over Bungee

Also, when he left the server i update the cache with the differece of ms he played, and save it to redis cache, to finally save his cache into mongo document and get removed from redis cache

dry yacht
# regal scaffold Pretty much nothing at all

I'm loosing track of what doesn't work and what you're switching up, xDD. All I can tell from looking at the source is that paper handles chat packets completely different in comparison to spigot, which is why I can't really provide any further help on why that behaves as weirdly as it does for you.

regal scaffold
#

The only problem here is that messages are sent to console incorrectly. That's it. This has worked on spigot and paper for a while now. Without an issue

dry yacht
#

I get what your issue is by now. But why don't you think that it's a paper issue when it doesn't work after upgrading? Seems like they changed their internal behavior. Kinda follows by logic.

lost matrix
regal scaffold
#

Because it's worked before on paper and spigot

dry yacht
regal scaffold
#

Before as in 3 years ago and today?

regal scaffold
#

less than 24 hours ago

dry yacht
#

Oh, that's what you mean by before, lol

regal scaffold
#

And If I remove my logic

#

From the chat event

#

It literally works

regal scaffold
dry yacht
#

Have you printed out the final format, at the bottom of the event block?

regal scaffold
#

I did at one point. let me do that again

sterile token
#

That is working perfect, also the mongo saving

#

It must be issue related to math on spigot side

#

I will send my bungee code, in case im missing something

regal scaffold
#

[00:41:53 INFO]: [BetterPrefix] [STDOUT] §4ADMIN§r §4ADMIN§r TSans_ §r §e§l» §7%2$s

#

Ignore the double admin that's was my doing

lost matrix
sterile token
#

I think its the same logic, but written different

#

Also the issue is not related to that tho

#

Is mainly in spigot side, where i have the actual logic

regal scaffold
sterile token
#

But i prefer to start from there, in case there is an issue there

regal scaffold
#

???????????????????????????????????????????????????????????????????????

lost matrix
#
user.setPlayed(System.currentTimeMillis() + user.getPlayed());

???
Are you actually only using a single long for evaluating 3 time states?

regal scaffold
#

And no, I changed

#

Nothing

#

whattf

sterile token
#

Isnt how most plugin do it?

dry yacht
regal scaffold
#

I added that to test too

#

It still wasn't working without

#

But now it suddenly

#

Worked?

sterile token
#

i will open a thread its a mess this channel

lost matrix
#

This logic is flawed.
If a player has played for 1day in total but he only plays for 10s now then
he loses time...

sterile token
#

No, because he can do it only once

regal scaffold
#

[00:47:56 INFO]: [BetterPrefix] [STDOUT] &4ADMIN&rTSans_ &e&l>> &7This is the actual test

#

Ok I see what the issue is............

#

mthfker that's so dumb

#

Why is that a thing

sterile token
#

Oh yeah smile, you are right, my logic is wrong written

#

Yes its still broken tho

#

Because let me explain how it works

dry yacht
lost matrix
# sterile token No, because he can do it only once

Lets make a thought experiment:

JOIN:
now = 100_000
played = 10_000
>> played = now + played
played = 110_000


LEAVE: (after 1000 time)
now = 101_000 
played = 110_000
>> played = now - played
played = -9_000

???

regal scaffold
#

[00:47:56 INFO]: [BetterPrefix] [STDOUT] &4ADMIN&rTSans_ &e&l>> &7This is the actual test
^^^ works

[00:41:53 INFO]: [BetterPrefix] [STDOUT] §4ADMIN§r §4ADMIN§r TSans_ §r §e§l» §7%2$s

#

You see?

#

For some reason § was never changed...

#

So I assume console just can't read that character

sterile token
#

Let say, you invite to play on the network, so i join and if play for x time, i will receive some points and then that ability will get locked, because you can only get invited by 1 player

#

I will open a thread

#

its imposble LMAO, i cant concentrate on my issue seeing another guy spamming code haha

dry yacht
sterile token
#

Timestamps related

regal scaffold
#

Well it worked now

#

Just needed an extra Chatcolor#translate

dry yacht
#

Yeah, seems like it works pretty sporadically, xDD

regal scaffold
dry yacht
#

Let's see if it stays fixed this time

regal scaffold
#

And there you go

#

Jesus that was the dumbest error I've seen

#

Still not sure what the error was then

#

But so dumb

dry yacht
#

translateAlternateColorCodes is also just replacing & with §, xDD.

#

Don't think that this was the issue.

regal scaffold
#

xd?

#

I mean all I changed was

#
            format = colorize(translateHexColorCodes(this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI") ? PlaceholderAPI.setPlaceholders(player, format) : format));
            event.setFormat(format);

to

            format = translateHexColorCodes(this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI") ? PlaceholderAPI.setPlaceholders(player, format) : format);
            event.setFormat(ChatColor.translateAlternateColorCodes('&', format));
#

That's litearlly it

eternal oxide
#

so you removed your colorize method call

regal scaffold
#

My colorize method call is just ChatColor

#

xd

#

github is dying,

eternal oxide
#

ah

subtle folio
#

yus

halcyon hemlock
#

sup guys

lost matrix
#

Hi#

sterile token
regal scaffold
#

Hey guys, what you doing rn

lost matrix
#

Fighting with my serializer impl

regal scaffold
#

Sounds fun

#

You need anything?

halcyon hemlock
regal scaffold
halcyon hemlock
#

it takes money bro :<

#

i dont got any

regal scaffold
#

Everything takes money with amazon

halcyon hemlock
#

its azure not amazon

regal scaffold
#

I meant

wet breach
#

azure is microsoft

regal scaffold
#

mc

#

But it's the same

#

azure and aws

wet breach
#

they are not the same

regal scaffold
#

They both charge for everything

#

Is what I meant

halcyon hemlock
#

ah yeah

#

I was trying to make an API through asp net lol

regal scaffold
#

I'm interested into looking into making a plugin autoupdate

#

But I don't know how feasible this is because I don't see pretty much anyone doing it. Must be a reason for that

halcyon hemlock
#

ok goog

#

i wont go bankrupt anytime soon

#

idk why it says 0 though, i thought it was 70dollars per month

wet breach
#

they probably have a free limit

#

that is if its under a certain limit it doesn't charge you but starts doing so once its over the threshold

#

or you have a free trial period

halcyon hemlock
#

I'm using azure student

wet breach
#

ok, that is fine doesn't mean you don't have a free trial period

#

or they don't charge students instead the organization the student is part of

halcyon hemlock
#

šŸ’€

#

lets pray its not like that

sterile token
#

Okay something weird is happen, post login debugg messages are not being displayed into proxy console

sterile token
tender shard
#

Auto update? Admins will hate you

#

Introduce one bug and get rekd

#

Auto update is nice for normal desktop apps but not for any server things

halcyon hemlock
#

like get latest update and download it?

#

i mean its probably possible

#

make it and let me know if it works šŸ˜

remote swallow
#

fuck cmi lib

#

it auto updates and doesnt delete the old version

tender shard
#

I already expressed my feelings about CMI in the 1 star review I gave it a few weeks ago

#

I usually do not give any <5 star ratings on spigot

#

but for CMI, I just had to

#

it's been 15 months now since my bug report that is still valid, without getting an answer from the dev

#

I got a few useless answers from their supporters

remote swallow
#

the colour picker is the only nice thing in it

buoyant viper
#

color picker?

#

is it just like a bunch of colored leather armor?

tender shard
remote swallow
#

you know that colour picture thingy

#

that

tender shard
#

the actually really only nice thing in CMI is their portal feature

remote swallow
#

portals boring

#

could make myself

tender shard
#

lmao when googling one of my plugins, it starts off with a few pictures made by me, then a bunch of weird youtube videos (none of which I watched), then it starts to continue with a mixture of weird things, tattoos, and other videos about my plugin haha

remote swallow
#

love the angel chest api photo

#

insane graphics from github

regal scaffold
cunning canopy
#

I love it when I spend my morning troubleshooting, looking in the main class and realizing I did not register the event listener

halcyon hemlock
#

when u tryna win an argument

#

(very funny joke)

tawny remnant
regal scaffold
#

Ummm is it just me or you never set the lore onto the item?

#

@tawny remnant

tawny remnant
regal scaffold
#

np

quaint mantle
#

hi

#

does java have a queue data structure?

#

or can i just use an ArrayList as a queue?

#

if it has proper runtime complexities for the usual operations of a queue?

#

actually nevermind, i might not need random access, i could just use a linked list, nevermind.

quaint mantle
#

ok i have another question though, how do i go about implementing a hashmap with two keys? like both key pairs have to match to get the value. Java stores things as references, and i am not really sure how to deal with that, unlike C++ where things are probably always going to be stored as values or memory pointers.

#

i was thinking of making two hashmaps to store the key pairs, like HashMap<key, HashMap<key, value>>(); but i was wondering if there is a more efficient way to do this in java.

#

storing two key pairs for a value.

#

or combining the two key pairs into one key of some sort.

#

to match values against.

tender shard
#

e.g. a clickable message, like "Yo, admin, wanna update?"

#

then it's fine

#

and in that case, you can use CraftBukkit's auto update feature

#
BukkitWiki

This guide explains how to install most basic plugins on your server. You must already have a running CraftBukkit server set up and have knowledge of how to use the Minecraft server console. If you do not have a server set up please go to Setting up a server and follow the instructions there. This guide does not cover setting up an SQL database ...

#

note: the wiki is wrong. the "update" folder must be in plugins/update/ and NOT in plugins/<yourplugin>/update

regal scaffold
#

Hmmm

tender shard
#

oh actually the wiki is right, I was just too stupid to read it properly

regal scaffold
#

I still see practically no one doing this

#

Even with a "wanna update?"

#

They just say, "go update, idiot"

tender shard
#

well I would be glad if a plugin would have this

#

if a plugin would mock me to update, I would do. And it would be handy to be able to do it with one click

#

however, it could never work for paid plugins

regal scaffold
#

Yeah of course

#

Then leaks would be insane

mortal hare
#

if (std::shared_ptr<int> spt = gw.lock())

#

hey guys

#

can you do smth like this in java

tender shard
mortal hare
#

apart from instanceof clause

regal scaffold
#

I'm surprised no one has made a library or addition

#

To stop leaks

#

Like a normal cpp licensing system

mortal hare
#

can you add variable declarations inside if statement in java?

mortal hare
#

ik you can cast with instanceof and create a variable since jdk 16 iirc

#

i wonder if you can declare custom ones yourself

regal scaffold
#

Like themida

#

Imagine we had this for mc

mortal hare
#

like

if (Player player = event.getPlayer(); player.getUniqueId() == this.id) {
  player.sendMessage("Hey!");
}
#

can you do smth like this

#

by attaching the variable to that if block only

#

in java

#

in cpp its legal

#

but idk if its legal in java too

tender shard
#

that will not work

#

if(...) expects an expression

#

that evaluates to true or false

mortal hare
#

that way you're releasing stack objects quicker

#

if you dont need that object besides in that if statement

tender shard
#

do not worry about "stack" in java

#

java uses garbage collection for this purpose

mortal hare
#

i mean that would work only for primitives for java but still

#

seems neat feature to have tbh

tender shard
#

TL;DR: No, this doesn't work in java

mortal hare
#

😦

tender shard
#

just don't worry about it

#
        String test = "asd";
        if (test.equalsIgnoreCase("asdasdasdasdasd")) {
            player.sendMessage("Hey!");
        }
        // If you stop using "test" now, your "test" variable will automatically be garbage collected.
#

this is how it works in java

mortal hare
#

closest thing that exists to this is

if (player instanceof Player player) {
  player.sendMessage("Hey!");
}

i guess

tender shard
#

erm wtf

#

oooh

mortal hare
#

jdk 16

tender shard
#

no I get what you mean

#

I was confused because you said "releasing stack objects quicker"

mortal hare
#

well it releases stack primitives faster tho, since it goes out of scope quicker

#

but yea

#

its just cleaner to look

#

in some ways

tender shard
#

yeah, maybe it WOULD

#

but a reference is only a mere 8 bytes or so

#

(on 64 bit)

#

why would you worry about it

#

the beautilfuleness of java is that you do not have to worry about this. no offense, but the compiler and the JVM are usually much smarter than you

#

they know exactly when they can dispose stuff

#

once a reference is unreachable, it'll get flagged for future GC

#

(you could manually trigger GC, but that's usually considered a bad choice, because... it's not up to you to clear up garbage - you are the owner of the house, not the house's cleaning lady in java)

#

is there any specific reason why you worry? if so, please explain it

cunning canopy
#

I am assigning a namespacedkey to an itemstack on a give command. I am later checking for that key in an eventlidtener. Does it need to be the exact same key object or can I initiate a new one with the same name?

hazy parrot
#

As you don't really need to create new object every time

#

But it will work eather way

cunning canopy
#

Thanks

fast violet
#

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${spigot.version}</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
The maven warehouse does not exist, how to solve it?

tender shard
#

with "warehouse", you mean "dependency" right?

#
  1. did you even define any property called "spigot.version"?
#

?paste your pom.xml

undone axleBOT
tender shard
#

(just copy/paste your whole pom.xml into that, then click on the "save" button in the upper right corner, then send the URL)

fast violet
tender shard
#

you gotta run buildtools

#

?bt

undone axleBOT
tender shard
#

run buildtools with the "--remapped" flag

#

example:

java -jar BuildTools.jar --rev 1.19.3 --remapped```
fast violet
#

ok, thank you

tender shard
#

if you still got any troubles, feel free to ping me

fast violet
#

ok

tawny remnant
#

Ive got a question, how do i add xyz to playe.getLocation?
what i want to do:

world.strikeLightning(loc //+ 1x, 0y, 0z)

regal scaffold
#

jesus alex is in a good mood today

regal scaffold
tawny remnant
#

yes!

regal scaffold
#

player#getLocation#getX

#

player#getLocation#getY
player#getLocation#getZ

#

And you can just do player#getLocation#getX + 1

#

Does that answer your question @tawny remnant ?

hazy parrot
#

Isnt there some method like #add or smth on location

regal scaffold
#

If you need to store the location

#

But he just wants to spawn a lightning

#

Don't need to keep it

hazy parrot
regal scaffold
#

Well there's a add(x,y,z) method

#

But that's not really helpful

hazy parrot
#

?

regal scaffold
#

If you just need a location to be x + 1

#

Cause #getX returns a double anyways

hazy parrot
regal scaffold
#

oh you mean that

#

Indeed that would simplify it a lot, apologies goksi got lost

buoyant viper
#

reverse engineering?

desert tinsel
#

How to get playerHead with Base64 textures without using GameProfile?

fast violet
mortal hare
#

or mineskin api

#

with https requests

#

but this would only work with premium accounts

#

if that's doable for you can also fetch it from mojang restful auth api

#

if you need functionality of custom textures, you need to use GameProfile option or use a wrapper that wraps the internal stuff for you

frank kettle
#

I'm doing custom heads like that. Is there a issue with doing it that way?

mortal hare
#

you cant use https based api in that case

#

as @frank kettle said, what's wrong with using GameProfile in that case?

sinful kiln
desert tinsel
frank kettle
#

You can

desert tinsel
frank kettle
#

I'm doing it on 1.19.2 without any nms or different apis

lavish wing
desert tinsel
#

I'm on 1.19.2 and I cant

frank kettle
#

It's just Profile

sinful kiln
#

PlayerProfile this class is basically a wrapper for the GameProfile

desert tinsel
#

ah, ok, thx

frank kettle
#

I can check my code in few minutes when I'm on the computer

#

But there's surely a way.

sinful kiln
#

The texture is encoded in an url though so you would need to extract it from there if required

#

The url should look something like this: http://textures.minecraft.net/texture/<texture here> if you call #toString() on it

tender shard
fast violet
tender shard
#

yeah but

#

what exactly is the problem?

#

any error messages?

#

if yes, please send a screenshot of the error message

fast violet
#

the buildtools.jar work is done, what do i need to do next?

tender shard
#

that's it

#

it should work now

fast violet
#

? no?
I guess it needs to import local dependencies

sinful kiln
#

Try updating / reloading the project

tender shard
#

click this button in INtelliJ

#

the "maven reload" button

#

still any errors? If so please, tell us the error you are getting

tender shard
fast violet
#

?
I mean, BuildTools.jar he gave me a jar
spigot-1.19.2.jar
Don't need to import this jar locally?

sinful kiln
#

That's not the remapped jar

tender shard
#

buildtools automatically installs all the dependencies into your local repository

#

if you ran buildtools with the "--remapped" flag, you normally just have to reload your project (see screenshot above)

#

no need to copy any files

desert tinsel
fast violet
sinful kiln
desert tinsel
#

so can I create a playerhead with custom texture using PlayerProfile?

sinful kiln
#

Yes

tender shard
#

so yeah, its the same, but it isnt

tawny remnant
#

Is there any way to make lightning not make fire?

desert tinsel
sinful kiln
#

Well that is way faster than explaining it here

tender shard
#

thats why I wrote all those blog shit haha

#

same questions every day šŸ˜„

sinful kiln
#

x)

desert tinsel
#

saving your blog then

tender shard
tender shard
#

yes

#

i simply write blog posts about questions i had myself

fast violet
#

very good

sinful kiln
#

I'm currently trying to add a new Event to spigot (to contribute it, see here https://hub.spigotmc.org/jira/browse/SPIGOT-7261)
For that I need to modify nms classes however I still don't fully understand how I am supposed to do that.

For example since 1.17 I think it was the nms package structure is retained on runtime so do I need to do that as well when contributing to nms or simply follow the instructions provided on the CraftBukkit stash README

tender shard
#

?contribute

tender shard
#

the second link

#

scroll waaay to the bottom

#

second link, second bottom most headline

sinful kiln
#

No I haven't seen this one yet, the other urls I already saw

tender shard
#

the "usual" work flow is like this:

sinful kiln
#

I mean I currently have a net.minecraft.server package in my project however it doesn't yet contain all files only already modified ones

tender shard
#
  1. clone bukkit

  2. apply your changes

  3. commit/push your changes to bukkit

  4. clone craftbukkit
    4a. run this weird "applyPatches.sh" thing

  5. implement your bukkit changes
    5a. run "createPatches.sh"

  6. commit/push your changes to craftbukkit

#

oh wait

#

I just see, you only submitted a "feature request" yet, right?

sinful kiln
#

Yeah that's more or less it

#

I've a way to implement it so I wanted to try it out

#

If it even makes sense

tender shard
#

I doubt that it'll get approved. and even if you or someone else would create a custom event for it - you'd have to implement it for EVERY vanilla strucuture, otherwise this event would be pointless

sinful kiln
#

I also forked the repositories and got stash access as well

fast violet
#

Your Commissions: 105€ / hour + VAT
Means: answer plugin question?

tender shard
#

so yeah my opinion is: your feature request will be kept open for years, without anybody implementing it. unless you do it yourself, but then you gotta take ANY vanilla structure into account, then it might get merged

sinful kiln
sinful kiln
tender shard
#

however

#

hmm well if you implement this event for EVERY structure... why not

#

sounds like a nice addition

sinful kiln
#

Yeah exactly, that's also the point of the Event

tender shard
#

I'm 100% in favor of this addition

sinful kiln
#

<3

tender shard
#

just added a comment to that request - if you could make it possible to maybe even change the location, this could be very useful to destroy those usual "structure finder" hacks

#

e.g. where people can look for 3 to 4 buried chests, and then they can derive where e.g. desert temples are

tawny remnant
#

how do i do the player.getRightClicked? Its not working for me

@EventHandler()
public void PlayerInteractEvent(PlayerInteractEvent event, PlayerInteractEntityEvent entityEvent) throws InterruptedException {
Player player = event.getPlayer();
Player clicked = (Player) player.getRightClicked;

tender shard
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

tender shard
#

also your code obviously throws a syntrax error because "getRightClicked" is not a field, but a method

#

...

tawny remnant
#

fixed it already

@EventHandler()
public void PlayerInteractEvent(PlayerInteractEvent event, PlayerInteractEntityEvent entityEvent) throws InterruptedException {
Player player = event.getPlayer();
Player clicked = (Player) entityEvent.getRightClicked();

tender shard
#

yeah you added () and that fixed it, right?

#

two things I wanna tell you:

#
  1. PLease use code tags
#

Then your code doesn't look like this:

myCode() {

#

but it'll isntead look like this:

#
myCode() {
#

second: check out the following links. It's not being unfriendly, but trust me - checking out "basic java tutorials" will help you be able to code spigot plugins much faster

#

?learnjava

undone axleBOT
tender shard
#

I personally can recommend the third link ^

cold tinsel
#

So after asking this question on the Forums (here: https://www.spigotmc.org/threads/no-sound-when-using-entities-as-sound-source.591444/#post-4547211) i wanted to know whether someone here knows how the playsound method works:
Whenever i call

Player.playSound(entity, sound, volume, pitch)

there is no sound being played on the client (1.19.3). It doesn't matter if the entity is the player himself or another entity. Only if switched out to

Player.playSound(entity.getLocation(), sound, volume, pitch)

there is a sound.

sinful kiln
tawny remnant
hard lion
#

heyyy
is getNearbyEntities() method still considered unoptimized?

rapid aspen
#

i dont know why but when i put this it makes an error

tall dragon
#

does any1 know why i get this error when compiling

#

while my ide is not complaining

#

shoulnt this just work fine?

quiet ice
#

I'd use file:// repos just to be sure, but it should work I guess

smoky oak
#

did u reload ur maven

tall dragon
#

i sure did

quiet ice
#

Is there any other error?

tall dragon
#

oops wrong reply

tall dragon
smoky oak
#

wait isnt that import different? one says com.bedwars and one com.andrei1058.bedwars

tawny remnant
smoky oak
#

we use ?paste here

tall dragon
smoky oak
#

im not sure actually

quiet ice
#

it does not.

tall dragon
#

its just so weird. idk how to fix it

quiet ice
#

Give the full maven log

tall dragon
#

i also tried invalidating caches as that sometimes fixes it

rapid aspen
quiet ice
# tall dragon how does that work
    <repositories>
        <repository>
            <url>file://${project.basedir}/deps</url>
            <id>local-potemkin-repository</id>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>empty</groupId>
            <artifactId>modlauncher</artifactId>
            <version>999.0.0</version>
        </dependency>
    </dependencies>
tall dragon
#

ok let me try that

quiet ice
#

oops, it should be "file://", not "file:(("

#

The layout within your deps folder would then looks somewhat like that:

.
└── empty  // {group}
    ā”œā”€ā”€ log4j // {artifact}
    │   └── 999.0.0 // {version}
    │       ā”œā”€ā”€ log4j-999.0.0.jar  // {artifact}-{version}.{type}
    │       └── log4j-999.0.0.pom
    └── modlauncher
        └── 999.0.0
            ā”œā”€ā”€ modlauncher-999.0.0.jar
            └── modlauncher-999.0.0.pom

the .pom files are not required per-se but can be useful from time to time

(however the folder can be named in any shape or form - it needn't necessarily be "deps" - can also be "libs" or whatever)

tall dragon
#

tried this

quiet ice
#

You must also add the version thingy

tall dragon
#

o u also add the version as folder?

quiet ice
#

Yep

#

And the file name is named accordingly

tall dragon
#

ArtifactId is the file Name?

quiet ice
#

basically the path is "{group}/{artifact}/{version}/{artifact}-{version}.{type}"

quiet ice
#

Same goes for {group}. And in 90% of cases {type} will be "jar"

tall dragon
#
     <dependency>
            <groupId>empty</groupId>
            <artifactId>bedwars</artifactId>
            <version>1.0.0</version>
            <type>jar</type>
        </dependency>

got this rn

#

but that doesnt do it yet

quiet ice
#

The file name must follow "{artifact}-{version}.{type}", so bedwars-1.0.0.jar in your case

#

(also make sure to declare it as provided unless you want to shade the dependency in)

tall dragon
#

i do not

#

well that dependency indeed works now

tender shard
#

Am I a jerk for saying this?

#

because I dont think so

tawdry echo
tall dragon
tender shard
#

people expect to buy a plugn for 4€ and then expect me to invest my lifetime to add their "special feature" that NOBODY else cares about

quiet ice
#

Whatever the cause it is a bit hard to figure out I guess

#

Could you show the whole build log?

tender shard
tall dragon
#

ah wait heres a bit more of an error message

#
[ERROR]   bad class file: C:\Users\Bertg\.m2\repository\empty\bedwars\1.0.0\bedwars-1.0.0.jar(com/andrei1058/bedwars/api/events/player/PlayerItemMoveEvent.class)
[ERROR]     class file has wrong version 55.0, should be 52.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory of the classpath.```
quiet ice
#

yeah, you're compiling with the wrong java version

#

Try compiling with a JDK 17 or whatever class file version 55 is

tender shard
quiet ice
#

And that's one of the reasons I'm not touching minecraft in a high capacity

#

Although from my experience people are rather understanding when it comes to me not implementing stuff (in fact I very rarely get feature requests)

small hawk
#

Hi, guys, quick question for you. Is it possible to edit nickname above head without using any API or NMS? I heard about PlayerProfile in Spigot, i tried that, it seems not to work for me. Any ideas?

quiet ice
#

Why is there no API for this yet?

tender shard
small hawk
tall dragon
#

@quiet ice its compiled with java 11

tender shard
tall dragon
#

finnaly

#

thanks geol

tender shard
#

I dont even know if there's an open feature request for it eixsts

sinful kiln
#

I just found out that there is a typo in the package name org.bukkit.craftbukkit.generator.strucutre - is that something that should be fixed or just doesn't matter now that its in there for some time?

sinful kiln
#

Isn't it structure instead of strucutre

tender shard
#

oh

#

yeah

#

wtf

#

actually?!

sinful kiln
#

yeah its in the code

tender shard
#

you got a javdocs link?

quiet ice
#

NMS

sinful kiln
#

didn't rename it

quiet ice
#

No javadocs there, but a stash link would be possible

#

?stash

undone axleBOT
tender shard
#

haha

#

nasty

#

oh damn

tawny remnant
#

?paste

undone axleBOT
quiet ice
sinful kiln
tender shard
tawny remnant
tender shard
#

NOT EVEN A JIRA ISSUE?!

sinful kiln
#

I don't think so, guess nobody noticed

tender shard
#

damn damn

quiet ice
sinful kiln
#

I didn't notice as well until I was writing the whole package name in class for an import and eclipse was like: 'No this class doesn't exist, try spelling structure wrong'

eternal night
#

internal names are so important upsidedown_cry

tender shard
#

that is

#

erm

small hawk
#

Is it actually worth to touch NMS, when we have such a beautiful thing as Spigot?

tender shard
sinful kiln
#

exactly xD

tender shard
#

please open a jira report

#

issue

sinful kiln
#

yeah I will

tender shard
#

whatever

#

thanks

#

link it here

quiet ice
sinful kiln
#

Bug ticket?

tender shard
#

even if it not - we'll find a way to "asm" it possible haha

#

I mean

quiet ice
tender shard
#

just a tiny classloader hack

quiet ice
#

Nah, classloader hacks won't work

#

You can't return a class the JVM didn't request

tender shard
#

oh we can

#

have you not seen how Material class works?

quiet ice
#

You would need to intercept any Class#forName calls and such

tender shard
#

no problem

quiet ice
#

Which just means Mass ASM

tender shard
#

we already do that

quiet ice
quiet ice
tender shard
#
  1. we should get it fixed
  2. for "older" plugins, still no problem
sinful kiln
tender shard
#

every spigot plugin has its own class loader

quiet ice
#

that is right but a classloader on it's own isn't needed

eternal night
#

kekw commodore for a random typo in a non important package name seems bleh

quiet ice
#

In fact, you could only use javaagents for that.

quiet ice
raw halo
#

Hi, I am currently generating a custom block and I have a problem when I break a block below my custom block it refreshes and the note block texture appears. How can I prevent this from happening, thanks in advance and have a nice day.

tawny remnant
quiet ice
tawny remnant
quiet ice
#

uh, yeah then that is your issue.

#

But I don't remember the code on how to register events, should be in the PluginManager class - look it up yourself

quiet ice
#

?jd I meant that PluginManager class

sinful kiln
quaint mantle
#

hi

#

does java have doubly linked lists?

smoky oak
#

you mean a->b b->a mapping

#

then yes but i dont recall the name

eternal night
#

default linked list is linked both ways

smoky oak
#

im dumb lol

#

ye just use linkedlist

quiet ice
#

that being said a list implementing java.util.RandomAccess is usually more performant than a linked list

smoky oak
#

i select my collections with this lol

quiet ice
#

smh, not mentioning Queues or concurrent collections

#

Also ignores COWArrayList

smoky oak
#

why do we listen to you again?

#

where do you get all this esoteric stuff from anyways

#

are you one of those people that just remember random stuff for no reason?

quiet ice
#

I mean concurrency is stuff you should have heard

#

ConcurrentHashMap allows to iterate over it while you remove or add objects for example - really useful if you just want to be dumb and not care about performance

smoky oak
#

tbf i usually dont have to worry about concurrency in my stuff

quiet ice
#

Queues are useful for writing Stack machines or well ... queues, alongside other things

quiet ice
smoky oak
quiet ice
#

Yep, but not for concurrent collections

tawny remnant
#

Anyone know how i can keep applying effect to a Player that is wearing a certain helmet? Ive got the itemstack ready.

mortal hare
#

ConcurrentHashMap is really useful

#

but i love IdentityHashmap even more

#

although its not advised to be used 😦

#

but its in theory faster than hashmap, since it compares values by their memory locations instead of compare method

smoky oak
#

also create scheduler on login and plugin load

rotund ravine
mortal hare
rotund ravine
#

Huh?

#

It just puts the hashed object in an array?

mortal hare
#

no, it uses mathematical equation to determine the index in the internal array

#

if you specify the same object the same index would be calculated

frail gale
#

what

smoky oak
#

doesnt hashmap support duplicates?

frail gale
#

I heard first time about ConcurrentHashMap and that type of list

smoky oak
#

yea it does

pseudo hazel
#

a duplicate key gets overriden

rotund ravine
smoky oak
#

what are you on about

pseudo hazel
#

does it not

smoky oak
#

do you mean hashset maybe

rotund ravine
frail gale
#

and as I see it seems super useful. Why I have gone on the hard way of doing these type of things xD

smoky oak
#

ah

mortal hare
sinful kiln
mortal hare
#

hashmap does not guarantee O(1) time complexity every time, since hash collisions could occur (two different objects get the same index)

mortal hare
#

but its mostly O(1)

#

for small sets of data

rotund ravine
#

The average is O(1)

mortal hare
#

you shouldnt use hashmaps

#

they could be slower actually

#

than just iterating couple of indexes linearly

pseudo hazel
#

hashmaps are fine

mortal hare
#

if you have a lots of objects (lets say a player object hashmap), its ok, but if you store something that's really not big, its not worth it

pseudo hazel
#

so what should I use if I still want to have a string key

#

are there better maps?

mortal hare
#

Hashmap supports key value pairs

#

if you want to "map" a value to another value

#

generally just use a Hashmap'uh

pseudo hazel
#

yeah so why are you saying we shoulnt be using them lol

hushed spindle
#

what else would people use hashmaps for

rotund ravine
#

You’d be surprised

mortal hare
#

there are situations where you wouldnt need to use it, lets say you store 10 entries of data and want to find something from that object

#

comparing the objects with hashmap would be slower than iterating it one by one in that case, since amount of objects is small

pseudo hazel
#

so how ould you store that if not in a map

mortal hare
#

List

#

Arrays

pseudo hazel
#

but then you cant map values

mortal hare
#

If you need to map values use it

#

you have no option

pseudo hazel
#

well nvm

mortal hare
#

but if you have an option not to map it and the data set is small dont

pseudo hazel
#

I see what you mean now

hushed spindle
#

are you saying that if you wanna get a mapped entry from a small map you might as well iterate through it instead of using .get()?

pseudo hazel
#

like obv dont use a map if you dont have to map any values

mortal hare
#
    public V get(Object key) {
        Node<K,V> e;
        return (e = getNode(hash(key), key)) == null ? null : e.value;
    }

    final Node<K,V> getNode(int hash, Object key) {
        Node<K,V>[] tab; Node<K,V> first, e; int n; K k;
        if ((tab = table) != null && (n = tab.length) > 0 &&
            (first = tab[(n - 1) & hash]) != null) {
            if (first.hash == hash && // always check first node
                ((k = first.key) == key || (key != null && key.equals(k))))
                return first;
            if ((e = first.next) != null) {
                if (first instanceof TreeNode)
                    return ((TreeNode<K,V>)first).getTreeNode(hash, key);
                do {
                    if (e.hash == hash &&
                        ((k = e.key) == key || (key != null && key.equals(k))))
                        return e;
                } while ((e = e.next) != null);
            }
        }
        return null;
    }
pseudo hazel
mortal hare
#

in terms, this is what get called when you use map.get()

#

its a big ass algorithm right?

#

what about if you can skip that, just by iterating 10 entries each by each by using list

pseudo hazel
#

so how does the code iterate over a hasmap

mortal hare
#

hashmaps take more space on memory and inefficient for small data

#

but for moderate data amounts its faster

hazy parrot
#

Microoptimizing Java lesgo

mortal hare
#

1000 checks < vs one hashing function and couple iterations internally

hushed spindle
#

so you'd basically have to do some benchmarking to figure out at which point in map size it's more efficient to iterate than the typical method

pseudo hazel
#

but why does the hasmap itself just not switch to iteration if the data is small enough

#

that sounds like a design flaw

mortal hare
#

because that map is not a list

#

data is not stored linearly

#

its scattered due to hashing

#

you'd have to iterate all of the indexes available in the internal array to find values

hazy parrot
calm crow
#

Looking to hire an experienced enough plugin dev to teach others from the ground up, message me for more info!

hushed spindle
#

yeah i was about to say the difference in performance is negligible lol

quiet ice
#

it depends on the context

mortal hare
#

well it depends on what data you use, sometimes it could have a big impact

hushed spindle
alpine crypt
#

Hi, I have a question, is it possible to make a plugin that, after the player performs an action, I will enter the command for him using his nickname

hushed spindle
#

sure

pseudo hazel
#

I just default to using whatever structure works best for the readability and logic of the code, and then trust that the implementation works with me

hushed spindle
#

sounds simple

quiet ice
#

There are times where using HashMap can be a serious performance detriment simply due to GC overhead

mortal hare
quiet ice
#

In that case you'd want to use Int2ObjectMap or similar.
It only really gets funky once you want concurrency.

pseudo hazel
#

yeah

#

but noone wants that so we're good 🤷

quiet ice
#

Not always

sinful kiln
#

Isn't there Collections.synchronizedMap which could do the job

quiet ice
#

For claim protection plugins concurrency is useful to some degree

sinful kiln
#

It is?

quiet ice
#

Yes.

sinful kiln
#

Well then manual lock work I guess

quiet ice
#

Yeah, but CHM is faster there - but GC overhead strikes again

quiet ice
#

So in one of my plugins I wrote my own concurrency map algorithm that is like 20 times faster than CHM (10638525.246 ± 72978.176 ops/s vs 226600144.895 ± 5339520.216 ops/s)

pseudo hazel
#

so, just pr it into java then

quiet ice
#

It was a very specialised algorithm, outside of minecraft it has little use

thorn crypt
#

Hey, is there a way to open a book to a player without using NMS but ProtocoLib ? I can't find out how to do it

pseudo hazel
#

yeah makes sense

quiet ice
#

It basically allows to store an object at a 2D coordinate value. Memory would explode if you store values at coordinates that aren't close to each other

dry yacht
thorn crypt
dry yacht
#

Yeah, that's it then

thorn crypt
#

Ok thanks, i'll try when I can

untold jewel
frank kettle
#

im trying to get skin from a uuid gotten using the URL request on mojang's api

#

but the uuid is returning differently without the "-"

#

is there a way to fix this?

untold jewel
#

just use UUID.fromString method

frank kettle
#

well

#

then u didnt see the image

#

im using that

#

the uuid is null if the UUID has no "-" in it it seems

smoky oak
#

call me an idiot but isnt the - part of the uuid

frank kettle
#

for some reason mojang api doesnt have the -

untold jewel
#
public String getSkinURL(String uuid) {

String uuidWithDashes = uuid.substring(0, 8) + "-" + uuid.substring(8, 12) + "-" + uuid.substring(12, 16) + "-" + uuid.substring(16, 20) + "-" + uuid.substring(20);

    try {
        
        URL url = new URL("https://sessionserver.mojang.com/session/minecraft/profile/" + uuidWithDashes);
        BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
        String response = reader.readLine();
        reader.close();

        
        JSONParser parser = new JSONParser();
        JSONObject jsonObject = (JSONObject) parser.parse(response);
        JSONArray propertiesArray = (JSONArray) jsonObject.get("properties");
        JSONObject propertiesObject = (JSONObject) propertiesArray.get(0);
        String skinURL = (String) propertiesObject.get("value");

        return skinURL;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return null;
}
#

found this online if it helps

frank kettle
#

so the dashes are always in the same places?

untold jewel
#

seems so

frank kettle
#

8-4-4-4-12

lost matrix
untold jewel
#

^

frank kettle
#

ty

#

String uuidWithDashes = uuid.substring(0, 8) + "-" + uuid.substring(8, 12) + "-" + uuid.substring(12, 16) + "-" + uuid.substring(16, 20) + "-" + uuid.substring(20);

untold jewel
#

no problem

#

happy to help

frank kettle
#

now worked

#

finally

thorn crypt
# dry yacht Yeah, that's it then
ItemStack bookItem = new ItemStack(Material.WRITTEN_BOOK);
        BookMeta bookMeta = (BookMeta) bookItem.getItemMeta();
        bookMeta.setTitle("§cGrade Custom");
        bookMeta.setAuthor("Antasia Network");
        bookMeta.addPage("§fBravo ! Si tu lis ce message, tu peux maintenant obtenir un grade §ac§bu§cs§dt§eo§3m §fpendant §e30 Jours §f!\n" +
                "§fPour choisir ton grade customisé, il te faut cliquer sur le bouton juste en dessous de ce message et écrire dans le chat le grade " +
                "§fque tu souhaite.\n\n" + mainComponent + "\n\n" + component);
        bookItem.setItemMeta(bookMeta);
        player.openBook(bookItem);

So I tried but got an error, above their is my code but I got this error :

java.lang.IllegalArgumentException: Book must be Material.WRITTEN_BOOK
lost matrix
#

If it still happens pls show the whole stack trace

thorn crypt
#

Ok, I'm sure it's compiled but i'll try

#

and if the whole stack trace is too big for discord with what can I send it ?

visual laurel
#

Heya, how can I save a players uuid and a score to yaml, I’m quite new to Java and am not sure how I would go about doing this.

frank kettle
#

?paste

undone axleBOT
thorn crypt
#

Ok thanks

lost matrix
#

?config

lost matrix
frank kettle
thorn crypt
frank kettle
#

true

sinful kiln
lost matrix
#

Show the code around PlayerJoin.java line 112 and make sure its line 112

thorn crypt
#

line 112 is the open book

lost matrix
#

Try opening an empty book without changing the meta first

thorn crypt
#

Ok

#

like just doing

ItemStack bookItem = new ItemStack(Material.WRITTEN_BOOK);
player.openBook(bookItem);```
?
lost matrix
#

player.openBook(new ItemStack(Material.WRITTEN_BOOK));

#

Yeah pretty much

thorn crypt
#

Okk

#

Nope, same error

#

Must be Material.WRITTEN_BOOK but it is one 🄲

lost matrix
#
  @EventHandler
  public void onJoin(PlayerJoinEvent event) {
    ItemStack bookItem = new ItemStack(Material.WRITTEN_BOOK);
    BookMeta bookMeta = (BookMeta) bookItem.getItemMeta();
    bookMeta.setTitle("§cGrade Custom");
    bookMeta.setAuthor("Antasia Network");
    bookMeta.addPage("§fBravo !");
    bookItem.setItemMeta(bookMeta);
    Bukkit.getScheduler().runTaskLater(this, () -> {
      event.getPlayer().openBook(bookItem);
    }, 20);
  }
#

Works for me no problem

thorn crypt
#

🄲

lost matrix
#

Update your server

thorn crypt
#

It is updated

opaque latch
#

Can someone help me fix this? Whenever the correct ingredients are in the "ingredient" and "fuel" slot, no output items are produced and the "No recipe found for ingredients: X, X" is produced in console, which means that the "outputs" List is null. Why is it null?

mortal hare
#

lmao i havent got any better error

#

than this

lost matrix
icy beacon
untold jewel
tardy delta
#

looks like me when using nano

mortal hare
#

apparently for some reason std::string with shared_ptr arent very good friends

lost matrix
#

Word after inserting an image

tardy delta
#

:(

frank kettle
#

im using api.mojang

#

is there a different?

mortal hare
#

it uses rest api provided by mojang

#

from the website

#

to gather data

#

basically it asks data from mojang servers directly from the web

#

api.mojang does the same

#

but in the encapsulated form

#

if we're talking about premium accounts

#

its just a way to get data without relying on minecraft's codebase much

frank kettle
#

cause im getting error cause of "too many requests" on api.mojang

#

and wanted to know if there was a different way to do such thing without those limitations

mortal hare
#

there's a request threshold

#

requests are rated by mojang servers in order to prevent Ddos attacks

frank kettle
#

was just curious, there's always work arounds such things.

mortal hare
#

there's no workaround apart from caching the data locally

tawny remnant
#

Can i somehow make lightning not set things on fire?

mortal hare
#

after retrieving it

frank kettle
#

is there a prefered option or both work the same way?

mortal hare
#

you cant bypass rate limit of mojang web api

frank kettle
mortal hare
#

unless your dad is bill gates lol

frank kettle
#

if both are the same then i will just use api.mojang

mortal hare
#

here's a good topic for you to read

#

all public apis are rated

#

as this website tells

frank kettle
#

i did read that

#

thats why im using api.mojang

wet breach
frank kettle
#

i checked it for the "username to uuid" thing

mortal hare
wet breach
#

the rate limit exists to evenly spread out the bandwidth usage, basically it doesn't allow one server to consume more and prevent others from being able to access

frank kettle
#

also it says there sessionserver is red(service unavailable)

mortal hare
#

you can just lag the shit out of those servers

frank kettle
#

but the other dude sent code using it, so was wondering

mortal hare
#

with couple lines of code

#

if rate wasnt introduced

wet breach
#

that is false

#

you obviously have no clue how switches work, the rate limit is there for QoS, not anti-ddos nor would it stop one

mortal hare
#

it doesn't allow one server to consume more that is what i initially meant.

wet breach
#

yes what I meant by that is for the servers that behave

#

it spreads out the bandwidth to more behaving servers

mortal hare
#

if servers would send a lot of requests it would be too hard access that api without any interruptions

wet breach
#

the bad servers are going to ignore the rate limit and shove packets its way regardless

mortal hare
#

well yeah, you're right

#

but the main idea — bandwidth costs.

wet breach
#

fortunately

#

there is more behaving servers then there is bad ones šŸ™‚

mortal hare
#

tru

hazy parrot
#

Omg

#

I like discord not scrolling

#

Nvm

tardy delta
#

discord scrolling on linux is awful

quiet ice
#

I don't see any issues with it

mortal hare
quiet ice
#

But I am also using discord within firefox, so that could cause it

mortal hare
tardy delta
#

but ye i stopped dualbooting cuz windows found it funny to erase my linux os

#

oh is it that simple

river oracle
tardy delta
#

windows dumb

#

i can always buy a sata ssd but sata slow

sand vector
#

Going through some of my test code I made a few months ago and tried to implement sql databases. I have found that runTaskAsynchronously is depreciated. Is there a way to do the same thing as it seems to stop the plugin from being activated

tardy delta
#

use a lambda

#

(Runnable) oh actually use the Consumer<BukkitTask>

chrome beacon
#

?scheduling

undone axleBOT
chrome beacon
#

or just read the javadocs

tardy delta
#

it shouldnt stop the plugin from being activated unless youre using a newer server version

chrome beacon
#

Also are they creating fake reviews

#

?

icy beacon
#

the dude who spammed ultfoods?

chrome beacon
#

Just got three 5 stars from brand new accounts

icy beacon
#

yeah

#

3 reviews in 15 minutes

#

that's very legit

chrome beacon
#

Yeah I'm looking at ult foods