#help-development

1 messages ¡ Page 848 of 1

timid hedge
#

but wont it send &f insted of white color in-game?

hazy parrot
#

That is what translateAlternateColorCodes is used for

#

And save it in config with & char, that way it won't look ugly

timid hedge
#

Oh okay, so i just need to do i manual

hazy parrot
#

What

river oracle
#

I mean you'd have to be sweedish I suppose, but that's a small demographic

hazy parrot
#

I mean reason it's saving like this is probably wrong encoding

#

But whatever, no one is really using that symbol for configuration

#

Or I hope so 😨

grim hound
#

10 block radius from the placed block?

#

Why do you need a BukkitTask then?

#

Just save the location on each block place

#

Ah okay

#

Then on block break make sure to cancel and remove the task

river oracle
#

🤷‍♂️

#

sweedish keyboard is the only one I've ever seen with the symbol

#

even taking that away its not as common as having &

grim hound
#

Don't do player.getNearbyEntitities

#

Save the location and do Location#getWorld#getNearbyEntities

river oracle
#

Player#getNearbyEntities is a perfectly fine method unless you want to dip into NMS for that for some reason

grim hound
#

Save them into a map

grim hound
#

Uhh

#

Yeah I guess

#

Should work

#

It'll work.

gusty bough
#

Hey, I'm having some troubles to set custom names for certain of my players.
I successfully set global names by changing name field of GameProfile but I struggle making per-player display, for example :
(Player1 sees Player2 as "Martin" but Player3 sees Player2 as "Kevin")

What I did is : I change name field of Player1 gameprofile, send ClientboundPlayerInfoRemovePacket to Player2, send ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER to Player2, reset the old name of Player1 gameprofile (to let the server know the real name); then do the same for Player3 with different name etc...

How can I achieve that?

grim hound
#

Just save em into a file if you wanna have it take effect on server restart

grim hound
#

Modifying GameProfile's name var

#

For a nickname change is too overused

#

And it introducess some issues

#

But let's ignore that for now

grim hound
gusty bough
#

There is no real way to do it otherwise, so...

grim hound
#

For the name to update

gusty bough
#

UPDATE_LIST only update display name

grim hound
#

Ye

gusty bough
#

Which is not name on top of player

#

It is the name of the player for the plugins

grim hound
#

Ah, you want on top?

gusty bough
#

Yes on top and on the tab

grim hound
#

Then you also need to send the respawn packets

#

Easiest is to teleport the players into another world and back

#

Or you could spoof em

gusty bough
#

Do I need to send the respawn packet to the affected player only or all the other players

grim hound
grim hound
#

Try both

#

Men.

#

What did I tell you?

grim hound
#

Well it's probably the same

#

An instance invocation

#

Not a static one

#

So lile

#

new World().sup(); is
World#sup

grim hound
#

Well it seems that you're using an old bukkit ver

#

you need to add the location, 10

#

There's an explanation below that

#

Yes

#

Np 👍

young knoll
#

How can you read the keys

#

Or how can you convert them to materials

#

getConfigurationSection(“items”).getKeys(false)

#

The Boolean controls if you want to get subkeys as well

#

getKeys will return a set that you can use contains on

#

You’ll have to toString the material

sterile token
#

Cant you just do: Material#getMaterial("type")

#

That wil return the material object for type

#

what you want to do?I want to begin from there

#

you want to do something when a player obtain an item from the floot which is in a list right?

young knoll
#

You do have material…

#

ItemType is literally declared as a material

sterile token
quaint mantle
#

Yoo

#

How to make tnt explosion with packet?

#

Notch: “It needs a bigger explosion”

inner mulch
quaint mantle
inner mulch
#

why do you want to do this with packets?

#

player.getWorld().createExplosion()

#

no need for packets

#

Does somebody know how i can stop maven from creating to versions of a plugin? (how can i tell him to either only create the original jar or only the shaded one?)

quaint mantle
inner mulch
#

so you want an explosion that destroys blocks, but it should only be able to be seen by one player?

inner mulch
#

that's not gonna be fun

pseudo hazel
#

how it that gonna work

inner mulch
#

imagine a player walking in the air

#

because the other one doesnt see the blocks anymore

quaint mantle
#

Its for the end of a match why do u care just help me lol

inner mulch
#

there is no way to help you

#

as this is complicated

pseudo hazel
#

does not sound very easy to do

young knoll
#

Replace the blocks with barriers client side and manually spawn the particles

quaint mantle
#

Dont waste my time.

young knoll
#

Then the server won’t freak out when they start going inside blocks

quaint mantle
#

I despise gate keepers like you @inner mulch

pseudo hazel
#

and you are asking for help so please have some patience

tepid turret
#

Hey

#

what do you think is causing lag

quaint mantle
#

LOL

pseudo hazel
#

sorry what do you mean?

quaint mantle
pseudo hazel
#

I read everything so far so im confused why you would say that

#

anyways im not dying on this hill and neither should you

young knoll
#

Spark report looks fine to me

#

server is basically spending half its time waiting

#

Are you experience lag spikes?

pseudo hazel
#

tps is good

#

are you sure its not client side?

rain cypress
#

Anyone know what event(s) trigger when a player puts an item into a decorated pot? Just PlayerInteractEvent?

tepid turret
pseudo hazel
#

are you generating a lot of terrain?

tepid turret
young knoll
#

You give it ram

tepid turret
#

Its all been pre generated

young knoll
#

It’ll use it

tepid turret
pseudo hazel
#

so what changed? xD

tepid turret
young knoll
#

Probably nothing, you may just not notice it going up

tepid turret
young knoll
#

Then capture a spark report of the spikes

#

There a flag to only capture ticks over a certain length

#

Don’t quite remember what it is tho

fleet kraken
#

Any plugin/api to run code in runtime? (eval)

young knoll
#

What

#

Like scripting?

fleet kraken
#

Yes

#

fast development

young knoll
#

There is skript

#

And there is also the possibility to run js or python code

fleet kraken
#

hmm, i will look at skript

young knoll
#

No

#

It’s client side

#

Best you can do is predict it with the block damage event and time

fleet kraken
#

@blissful crow if you really want this, try get the delay to break the block(block durabillity + tool(or hand)) then when player start breaking it you can do the progressbar

young knoll
#

There’s a method to get the progress the player should be doing each tick

#

I think it’s getBreakSpeed or something

astral scroll
#

Hey

#

when there's an explosion and i get the affected blocks, with #getBlocks(), that should include the bedrock?

worldly ingot
#

It will only return destroyed blocks

#

So no, bedrock is never included (in vanilla)

astral scroll
#

i know theres getRadius()

#

and if i loop on every block in that radius it will be a square

#

not a normal explosion

young knoll
#

You could loop it and use math to only get a sphere

#

But that’s still not how explosions work

echo basalt
#

TIL that List.of doesn't support null values

#

but Arrays.asList does

astral scroll
#

it will be just a circle

young knoll
#

They use rays

inner mulch
#

how do i disable /help, do i just override them or is there a setting?

young knoll
#

There’s a perm

#

I think it’s bukkit.command.help

inner mulch
#

okay

astral scroll
echo basalt
#

damn I wrote a whole leaderboard plugin in half an hour

#

is this what it's like to be a good dev

inner mulch
#

yes

wet breach
echo basalt
#

I think I used bukkit once in this project

#

well more like twice

#

there's a general scheduler that fetches a snapshot from the database and a listener that ensures that player names are up to date on teh db

young knoll
#

How is it displayed

echo basalt
#

placeholders n citizens npcs

young knoll
#

Fair

manic crown
#

Hey, how can I spawn fake players using nms, I looked in the internet, but all these tutorials didn`t work

young knoll
#

You need to create a player entity and then send the appropriate packets to clients

#

But I would advise using an existing api like citizens

manic crown
#

can I make the player lay down there?

quaint mantle
#

Is it possible to make player lay down in 1.8.8?

echo basalt
#

Yes and Yes

#

For 1.8 you prob have to make a fake bed

#

Look at how corpse plugins work

tender shard
#

I think you can send the „is in bed“ packet with any location

boreal sparrow
#

Is it possible to make a text file a player can download in chat?

#

I have a massive amount of text and I don't think they want to be reading through it in minecraft chat

tender shard
#

open a webserver from within the plugin on some random port and send a link to that?

boreal sparrow
#

Will it be local? (sorry I have no web experience)

tender shard
#

that depends on whether you listen on 0.0.0.0 (public) or 127.0.0.1 (only local)

boreal sparrow
#

Well I guess 127 is better here, since I only want them to see it

tender shard
#
HttpServer server = HttpServer.create(new InetSocketAddress("localhost", 8001), 0);
```that'd eg start a webserver on localhost 8001
tender shard
boreal sparrow
#

Great, should I use 8001 each time?

boreal sparrow
tender shard
#

I'd either make the port configurable, or at least check if the port you wanna use is free

boreal sparrow
#

That's tricky, but 0.0.0.0, surely they can't just click on 0.0.0.0, on some random port, without any config, and be taken to my webserver

tender shard
#

you could ofc alternatively just send them a pastebin link or sth

boreal sparrow
tender shard
tender shard
boreal sparrow
#

Could work

boreal sparrow
tender shard
#

you'd have to rely on a "what's my IP"-api like ifconfig.me

#

e.g. make a request to ifconfig.me/ip and it'll return just the IP address

#

there is no reliable way to determine the server IP without making a request to an outside service

boreal sparrow
#

Honestly pastebin api seems the best here, but do you know if it posts the bin as an account or just a guest?

tender shard
#

tbh pastebin api would be the easiest. you need an API key for that

remote swallow
#

hastebin allows for annonymous downloads plus you can self host so you dont get any people upeset about a load of data

upper hazel
#

I ran into a problem when creating custom craft. Is it possible to create a craft using itemStack instead of Material?

earnest socket
#

Has anyone ever had an issue when using mojang mappings for NMS where only the remapped-obf.jar file is being generated but not the remapped.jar file?

#

I am not even getting any errors which really confuses me

chrome beacon
#

by buildtools or when you're building your jar?

earnest socket
#

I did use buildtools and it generated all the files correctly

chrome beacon
#

Use the jar without a prefix and suffix

#

(as always when working with maven)

earnest socket
#

the normal one?

chrome beacon
#

yes

earnest socket
#

ok but kinda weird

#

is this a new change?

chrome beacon
#

That's always been the case

earnest socket
#

huh

chrome beacon
#

Same goes for the shade plugin

earnest socket
#

it's always generated a -remapped.jar file for me

#

I just moved the project to a new PC and rerun build tools and now it changed

chrome beacon
#

It can do that, but you shouldn't use it

earnest socket
chrome beacon
#

Jars with prefixes and suffixes are intermediary steps

earnest socket
#

oh alright

#

thanks for the help

chrome beacon
#

the final jar will be named like normal

upper hazel
#

hm this not work. I not have error but craft just not exists

boreal sparrow
#

Hey, maven noobie here, how can I add this to my pom.xml file? (That is the equivalent to the build.gradle right?)
I need to add this to my project, but I'm not sure how to convert gradle to maven

repositories {
    maven { url 'https://maven.pkg.github.com/caseyscarborough/pastebin-api-java' }
}

dependencies {
    implementation 'com.pastebin.api:pastebin-api:0.1.3'
}
boreal sparrow
chrome beacon
boreal sparrow
#

Oh ok, I did:

<repository>
            <id>pastebin-repo</id>
            <url>https://maven.pkg.github.com/caseyscarborough/pastebin-api-java</url>
        </repository>
#

But I get:
authentication failed for https://maven.pkg.github.com/caseyscarborough/pastebin-api-java/com/pastebin/api/pastebin-api/0.1.3/pastebin-api-0.1.3.pom, status: 401 Unauthorized

chrome beacon
#

Use jitpack or add your github auth information to your settings.xml

boreal sparrow
#

Jitpack didn't do anything

#

You mean:

#
<repository>
            <id>pastebin-repo</id>
            <url>https://jitpack.io</url>
 </repository>
chrome beacon
#

yeah

boreal sparrow
#

That just gives Unresolved dependency: 'com.pastebin.api:pastebin-api:jar:0.1.3'

chrome beacon
#

Jitpack uses different dependecy information

boreal sparrow
#

yeah I'm using that^

#

So where would I put com.github.caseyscarborough:pastebin-api-java:0.1.3 in my dependency?

#

using jitpack

chrome beacon
#

convert that to maven dependency info

#

and use that

boreal sparrow
#

Oh ok

#
<dependency>
            <groupId>com.github.caseyscarborough</groupId>
            <artifactId>pastebin-api-java</artifactId>
            <version>0.1.3</version>
        </dependency>

?

#

Seems to be loading longer... Maybe it's working

#

Yay it works

#

Thanks so much!

#

But it somehow broke the @NotNull annotation

#

Tho everything still seems to work

chrome beacon
#

broke how?

hushed spindle
#

so on tools its often recommended to use materialchoice

boreal sparrow
chrome beacon
#

Which NotNull annotation are you using

#

Jetbrains?

boreal sparrow
#

JetBrains @NotNull,

import org.jetbrains.annotations.NotNull;
chrome beacon
#

Add it to your dependencies

boreal sparrow
#

ah yay

#

works again

#

thanks again!

ocean hollow
#

why when I click on the result slot - event.getCurrentItem() == null?

hushed spindle
ocean hollow
#

I can't cast inventory in Anvil Inventory

hushed spindle
#

why not

ocean hollow
#

ClassCastException

hushed spindle
#

so inventory instanceof AnvilInventory returns false?

ocean hollow
#

I thought I could check it using instanceOf, but it always returns false

hushed spindle
#

huh

#

wack

chrome beacon
#

?paste

undone axleBOT
hushed spindle
#

check inventory.getClass().getSimpleName()

chrome beacon
#

^^ that will show up in the error

#

which is why I wanted it

hushed spindle
#

ye ye

ocean hollow
hushed spindle
#

its a custom anvil inventory?

ocean hollow
#

Inventory inventory = Bukkit.createInventory(null, InventoryType.ANVIL, Component.text("sosi penis")); thats how i show it

#

I found a post on the forum from Choco, he wrote about it

#

so I abandoned it and started doing it as usual

ocean hollow
boreal sparrow
#

Where can I save text online to prevent tampering?

chrome beacon
#

?

#

You can just use pastebin

#

or if you want a directly writable socket you can host your own

boreal sparrow
#

Yea but I just realised, i don't think there is a way to edit them in java once pasted, and even so, i still have to store the pastebin locally right?

chrome beacon
#

You can edit them if you have an account

echo basalt
#

so..

#

google docs

#

but for code

ocean hollow
boreal sparrow
chrome beacon
#

Might have to make your own wrapper for it

#

but yes ofc if you can in the browser you can in Java

boreal sparrow
#

Oh ok, but do you know what this is?

Caused by: java.lang.NoClassDefFoundError: com/pastebin/api/PastebinClient
        at com.sindn.adminstop.Commands.pastebinLog(Commands.java:33) ~[AdminStop.jar:?]
        at com.sindn.adminstop.Commands.onCommand(Commands.java:127) ~[AdminStop.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        ... 29 more
Caused by: java.lang.ClassNotFoundException: com.pastebin.api.PastebinClient
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:197) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
        at com.sindn.adminstop.Commands.pastebinLog(Commands.java:33) ~[AdminStop.jar:?]
        at com.sindn.adminstop.Commands.onCommand(Commands.java:127) ~[AdminStop.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        ... 29 more
#

I only have

public static String pastebinLog(String str){ //Returns url (disabled for testing)
        final PastebinClient client = PastebinClient
                .builder()
                .developerKey("my-developer-key")
                .userKey("my-user-key")
                .build();

        client.login("Sindn", "Sindenmil#123");

        return ("Some text");
    }
chrome beacon
#

Code that doesn't exist cannot be run

#

Shade the pastebin api

boreal sparrow
#

You mean share?

echo basalt
#

shade

boreal sparrow
#

shade?

echo basalt
#

basically bundle it with your jar

boreal sparrow
#

oh

#

oh lol

echo basalt
#

you imported it as a dependency, you need to build your jar to include the dependency as well so the jre knows what to run

boreal sparrow
#

ok I'll try

#

um how do you do that

#

is it an IDE thing or....

chrome beacon
#

maven shade plugin

boreal sparrow
#

Hm, maven says version 3.5.1 is not found

#

But anyway I have the entire plugin thing in my pom.xml, can I just build?

#

Is there some other stuff I need to do?

warm mica
boreal sparrow
#

Thanks, I figured it out, it seems to be working, but I need a dev api key? Does anyone know how to get one from pastebin?

chrome beacon
boreal sparrow
#

Damn I really appreciate your help, thanks once again

tender shard
boreal sparrow
#

Oh yea sorry 😅

quaint mantle
#

Goldfish memory kicks in

boreal sparrow
#

However I'm getting:
invalid api_user_key
The key the login returns is just my-user-key, which can't be correct can it?
I'm 100% sure both my username and password are correct

#
final PastebinClient client = PastebinClient
                .builder()
                .developerKey("9jnYvqHwIzcScrSX0Q0eABPdIPMHjDA3")
                .userKey("my-user-key")
                .build();

        final String userKey = client.login();
        print(ChatColor.YELLOW + "----------------------------------- " + userKey);

        final PasteRequest request = PasteRequest
        //Requesting stuff
        return client.paste(request);

I'm pretty sure that's what the documentation on the library said to do^?

tender shard
#

the userkey is optional

#

just remove it

boreal sparrow
#

isn't it required for login?

tender shard
#

yes but do you need that? i thought you just wanted to paste something

#

logging in is to connect the paste to your pastebin account (e.g. so you can edit it later)

boreal sparrow
#

Yea I need to edit the bin later

tender shard
#

if you want to login, you need to get the user key through client.login

#

and then throw that into the builder's userKey(...)

#

ofc then everyone with the source code can see the credentials though

boreal sparrow
#

What? I just removed that entirely and it works?

boreal sparrow
tender shard
#

well ok

boreal sparrow
#

I just never set the userkey to a defualt value

#

Ig that works

tender shard
#

This will automatically assign the user key to the client for reuse in later calls.

boreal sparrow
#

oh yea

storm scaffold
#

Is there some event I can use for tracking a conduit and whenever it tries (like in the game's code), to give nearby players an event? Like when it does the 'check for nearby players' thing to give effects to them? I want to make it have an effect on players on land and that would probably be the best option

boreal sparrow
#

but still, why can't I use a default value?

tender shard
boreal sparrow
#

oh sorry, well I though the .userKey("my-user-key") just sets a default value, and client.login(); would override it

#

but anyway, that doesn't really matter

proud badge
#

Whats the best way to make a mob go to a specific direction/change its AI?

tender shard
#

clear the pathfinder goals, and add a custom one, or simply get their MoveController and set the wanted position

#

(NMS)

#

hover over it and you'll see

rotund ravine
#

@fierce cave hold over it

tender shard
#

you don't need to pass a plugin instance into createHologram

#

it only takes in a Location or Position

#

no that will not work

chrome beacon
#

I can see why I have you blocked

#

probably someone who ignored learnjava too many times

tender shard
#

either pass in one location, or pass in one position

rotund ravine
#

.

tender shard
#

why are you using outdated plugins/api in the first place

hushed spindle
#

decentholograms is the proper replacement for holographicdisplays right

boreal sparrow
tender shard
hushed spindle
#

that's 1.20+ stuff though right

twin venture
#

hi , uhh anyone used ormlite before?

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

twin venture
#

i have 2 tables :

  • players (uuid,name,nickanme,maybe other data in the feature)
  • players_stats (kills .. wins .. etc..)
boreal sparrow
twin venture
#

in players table , the playersStats_id will always be null how i can fix that?

#

my setup is simple for now ..

chrome beacon
#

might just not be documented

twin venture
#

its one to one relationship

User entity -> UserStats entity

tender shard
#

like any other entity too

#
        world.spawn(someLocation, TextDisplay.class, display -> {
            display.setText("asd");
            display.setWhatEver(...);
        });
#

an example

boreal sparrow
#

Hey, paste_client.paste(request); returns a url, but I need the id https://pastebin.com/identifier, it seems a bit weird to just strip away the pastebin.com/, is it correct? I see no other way to get the key

tender shard
#

Set the billboard

chrome beacon
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

tender shard
chrome beacon
#

You're not verified anymore

tender shard
#

by setting it back to the default value

#

like you remove any other entity too

chrome beacon
#

?conventions

twin venture
tender shard
#

i think id=true on the field would set it as primary key

twin venture
#

in player_stats table it works just fine

#

my problem is acctully here in players table

tender shard
#

how do you create the tables

twin venture
#

@DatabaseTable(tableName = "player_stats")
public class SWUserStats {
@DatabaseField(generatedId = true)
private int id;
@DatabaseField(foreign = true,unique = true)
private SkuUser player;
}

#

it create them without any problem

#

@DatabaseTable(tableName = "players")
public class SkuUser {
@DatabaseField(id = true)
private String uuid;
@DatabaseField(canBeNull = false)
private String name;
@DatabaseField(canBeNull = true)
private String nickname;

@DatabaseField(foreign = true, foreignColumnName = "player_id")
private SWUserStats playerStats;

}

#

is that wrong?

tender shard
twin venture
#

alr

#

like this?

#

correct?

minor junco
#

ye

twin venture
#

now the id is null xd

#

hhhhhh

minor junco
# twin venture like this?

I think you have to define your column name for player tho in your first screenshot, since you reference it as a foreign column im the second

tender shard
minor junco
#

You have to set it manually and then push it to the DB

#

You can have an ID auto generated with "autoGenerated = true"

tender shard
#

it's pretty pointless to auto generate an ID if one could just use the UUID though

minor junco
#

yeah

twin venture
#

what's the way to handle it ?

minor junco
#

Only reason could be speed, since a unique index is created for ID, but since you reference it "foreignly" it's fine

#

If I understood it correctly

twin venture
#

players table :

  • uuid
  • name
  • nickname

players_stats table:

  • uuid
  • kills ..
    etc
minor junco
#

yeah that's fine

twin venture
#

with ormlite

minor junco
#

I'm not @ home rn so I don't have to capacity to write the solution down. What you can do tho is reference your player in player_stats and omit the uuid and replace it with an int autogenrated Identifier so you can reference and delete it quickly in the future

#

so basically

#

players table stays the same

#

player stats table has

  • int (id, autoGenerated)
  • player (foreign lookup)
  • and then your stats
twin venture
#

my problem now is it set the entire class thinggy into the player_id

#

org.skywars.skyimpldata.entites.SkuUser@64286e1e

#

weird hah

ivory sleet
#

looks like u just use toString()

#

w/o overriding it

twin venture
#

this is how iam creating the user :

ivory sleet
#

Has nothing to do with how u create it

dry hazel
#

where are you persisting it to the database?

twin venture
#

this is the DataBase class i have :

pseudo hazel
#

what tableUtils

twin venture
#

its from ormlite

pseudo hazel
#

where does it save the data to the database

#

could be possible that the database saves a toString version of the object

#

in which case just try overriding it

#

should be on the database documentation though

twin venture
#

now its not setting anything :L

#

do i need to set the player id myself? i set it to auto generate

zealous osprey
#

Why do you have a player id of there already exists a uuid?

quaint mantle
#

is it possible that for the same player, different sessions sometimes generate different uuids ?

#

these uuids are both me, i used this.playerUUID = String.valueOf(player.getUniqueId());

#

they are mongodb collections

#

also, when i join the server console says :

UUID of player Rxlism is d06c48d0-4145-36f0-8dfc-deebbf195684

tender shard
#

wdym "it starts going up"?

#

well you add 1 to the y location everytime

#

also why do you remove the display and create a new one everytime?!

#

why don't you just change the text?

zealous osprey
quaint mantle
tender shard
#

offline mode generates a random UUID from the name

#

so in offline mode you have a different uuid than in online mode

ivory sleet
#

in a recent code review someone had swapped to that method accidentally

#

so just a heads up ^^

quaint mantle
ivory sleet
#

yes but the offline mode uuid still differs (using it will be an issue if u just want online mode)

tender shard
#

why are you still creating a new entity instead of reusing the existing one?

slender elbow
proud badge
#

Do mobs not count as HumanEntity? How could I check if an Entity is an instanceof any mob?

#

So I dont get things like area effect cloud or arrows minecarts etc

tender shard
#

by checking if your entity is instanceof Mob?

#

i dont get it

#

no, mobs are not HumanEntities

proud badge
#

ok nvm I can just do instanceof Mob

#

I didnt think it would be that simple

tender shard
#

you are still creating a new entity everytime

#

no, you spawn a new one

#

by calling setText on the existing entity

proud badge
#

any1 know how to resolve this?

#

does not work with sendMessage

zealous osprey
proud badge
#

depracated

chrome beacon
tender shard
proud badge
#

interesting

tender shard
#

?learnjava

undone axleBOT
twin venture
#

i got it semi working now , but i have a duplicate in 2 values :

slate crown
#

guys

#

The essence of the problem:

I have a world, when a player enters, this world is copied, and a folder with a new world is created for the player.
The copied world is placed there. The bottom line is that when a player logs on to the server, he must be teleported into the world. As long as I don't stop the server, everything is fine. The player can enter, etc. and the world is located.

After I turn off the server and then turn it back on, I get a message that the world has not been found... ... What could be the problem?

twin venture
#

the players table :

tender shard
rotund ravine
twin venture
rotund ravine
#

Offlineuuids are made via the string “OfflinePlayer:” +name

hollow oxide
#

not a need for help just wanna say Thank to all of you, this channel helped me a lot and i made the complex thing that i wanted to make thx to you.

rotund ravine
#

I’ll take all the credit

quiet ice
rotund ravine
quiet ice
#

get a credit credit card then

rotund ravine
#

I have one not from my bank tho

tender shard
rotund ravine
#

It’s hashed

#

Oh i guess

tender shard
#

obviously it's not random-random, otherwise it'd be different everytime

#

but I literally said it generates it FROM the username

rotund ravine
#

I read it as it was random random

tender shard
#

same username = same generated uuid

rotund ravine
#

Think emily did too

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.

rotund ravine
#

Don’t even wanna know what u did

tender shard
#

"random" as in "no connection between offline and online uuid"

rotund ravine
#

👌🏻

young knoll
#

Probably the encoding on your source file

#

This is why translateAlternateColorCodes exists

tender shard
#

Yeah we told you not to use section signs

#

why don't you just use the proper way

#

ChatColor class

#

the point is that minecraft itself doesnt even use § anymore

#

you should either use translateAlternateColorCodes or directly use the ChatColor constants

#

it's cringe to still use §

chrome beacon
#

both of the methods above still create §

tender shard
#

that's fine though because if it'd change, the methods would also change

#

a hardcoded § however wouldn't

chrome beacon
#

True

#

but at this point I don't think it will change

#

just get removed

tender shard
#

yeah probably. still there is literally no reason to keep using § especially if one has issues with them

#

I mean if it'd work, ok. but he literally has problems with those chars and still doesn't want to switch to the encouraged way lol

chrome beacon
#

just to be clear I'm not saying maco should keep the §

quiet ice
#

why would one use anything but UTF-8?

#

Learn to set up your OS, IDE, Compiler and whatnot correctly.

#

UTF-8 is the norm and everything else is heresy

eternal oxide
#

Use UTF8, not all code pages are supported in all areas

#

no it doesn;t

#

UTF8 is also teh same as ASCII when in teh lower pages

tender shard
#

lol

quiet ice
#

The UTF8 miracle is that for all codepoints below 128, a single byte is used. The entire ASCII table fits in there.

eternal oxide
#

printable is 128

quiet ice
#

Then it isn't ASCII

#

§ is \u00A7, yes. But § is not an ASCII character

twin venture
#

i found a fix for my problem but it didn't really suit me ..
it will be duplicate uuid bettwen :
players_stats:

id -> it will add the uuid of the player
player_id -> it will also add the uuid of the player .

but iwant a better fix :p

topaz cape
#

how often does bungeecord automatically ping the spigot servers

spiral ferry
#

d

wild nexus
#

Hi, someone know how to generate a void world. Mine keep void on the first start of my plugin but on restart my world generate normal chunk ?

twin venture
#

any idea how i can not use the player_id?
in players table?
i mean remove it completlty?

iam using ormlite [to make things easier, but endded up make it harder..]

i dont need the id , in players_Stats too cuz i have the uuid , but again i can't remove the id , or generateId from the player_stats ..

#

been trying for more than 2 hours now ..

quiet ice
#

idk - perhaps that id is required as the primary key?

twin venture
#

i guess so too , but its been set to 0 everytime i join , or create new user

#

in players table

icy beacon
#

What is the best way to store an authentication token for an android app so that it would persist between restarts? Surely I can't just save it to a file?

quiet ice
#

But if this is a 1:1 mapping, then why don't you merge the two tables?

twin venture
#

i did that , and i saw it not very tidy .. or nice looking

#

that's why i decided to split it

outer tendon
twin venture
icy beacon
icy beacon
#

You don't want your jwt tokens to be accessible to others do you

hazy parrot
#

nothing wrong with saving it in file, that is how its usually done

#

if someone have access to your device, you are already bricked

outer tendon
icy beacon
#

Ok, that's fair

native ruin
#

isn't a jwt token encoded?

icy beacon
#

Ty 🙂

native ruin
#

oh yea forgot about that

shadow night
#

why does my event not get called?

#

my listener is registered as other events do get called

boreal sparrow
#

What MOTD format can I use with serverListPingEvent's set MOTD

shadow night
quiet ice
#

Did you double-escape the u by accident?

boreal sparrow
#

Wdym?

#

oh yea i did

#

how did that happen

quiet ice
#

Like did you use \\u00A7 instead of \u00A7

shadow night
astral scroll
#

how do i get id?

#

of itemstack

waxen plinth
#

did you remember to add the static handler list

shadow night
#

don't worry, I already fixed it

waxen plinth
#
private static HandlerList handlers = new HandlerList();

public static HandlerList getHandlerList() {
  return handlers;
}

@Override
public HandlerList getHandlers() {
  return handlers;
}```
#

should look like this I believe

#

oh lol

shadow night
#

yeah, I forgot to make it static 💀

waxen plinth
#

well

astral scroll
#

get material by id?

#

like the integer one

shadow night
#

I thought integer ids were gone since 1.13

astral scroll
#

Material.values[id]?

astral scroll
#

im fucked then

shadow night
#

Why are you using integers when string ids exist

astral scroll
#

time to do a serializer for base64

shadow night
#

What ._.

umbral ridge
astral scroll
#

read

#

please

umbral ridge
#

ids are gone

astral scroll
#

but i'll just write my own base64 serializator

umbral ridge
#

goodluck with that

shadow night
#

Btw that'd be Material.values()[id] iirc

compact haven
#

anyone off the top of their head, does dispatchCommand throw exceptions thrown by command handlers?

delicate lynx
#

I don't see why it wouldn't

river oracle
#

is their an "upsert" type query in SQL. I want to only insert if the row doesn't exist otherwise update. Would I just be best off running 2 queries?
run a "contains" query to see if the given result exists if it does run an update query otherwise run the insertion query

remote swallow
#

isnt insert xyz on conflict update

eternal night
#

if you are using postgres they have nicer support for that too

river oracle
#

I'm using SQLite

#

🥲

eternal night
#

sqlite has upsert too

remote swallow
#

i just found that

eternal night
#

oh

#

emily speed running

river oracle
#

wow that is literally a thing

slender elbow
#

i run on speed yeah

remote swallow
#

y2k are you telling me you didnt try it first

river oracle
#

does upsert exist in other SQL dialects ideally would wanna support more DB's down the line

river oracle
eternal night
#

please abstract your DB interactions into specific dialect specific implementations xD

river oracle
dry hazel
#

abstract DN

remote swallow
#

oh it looks like this doesnt do what you want

shadow night
dry hazel
#

no comment

river oracle
#

I would totally use it for this

#

granted Raven won't work as well for this since its not relational

river oracle
#

that'd be wild if their are a ton of incompatabilities in the eco system

remote swallow
#

there is

#

mysql and sqlite have different on conflict update stuff

river oracle
#

INSERT OR REPLACE into "pending_contracts" (contract_uuid, player_uuid, current_kills, contract_id, reward_id) VALUES (?, ?, ?, ?, ?) hopefully this works 💪

remote swallow
#

im very sorry but

#

?tas

undone axleBOT
river oracle
#

so I'm rolling with it

remote swallow
#

smh

#

buut fair

river oracle
#

also my plugin doesn't even launch yet

quaint mantle
#

does anyone know how I can install sources for a local dependencty

#

im using maven and intellij

onyx fjord
#

can i make it so that player sees a potion effect on other player without the other player actually having it?

#

either with the api or packets?

#

invisibility to be specific

quaint mantle
#

Easiest

#

Without nms

sterile token
#

May i get helped with fndind the best and more appropiated structure for my plugin. Because my idea is to make it fully moduled but there wil be some utilities / features which will be just for Spigot and another for Bungee. But my goal is to each spigot and/or bungee feature be alone. So if i want to use a specific Bungee feature can just use it without loading the whole plugin

onyx fjord
#

so player is not visible

#

but can be interactedw ith

#

and has particles

quaint mantle
#

You can clear and give without particles

sterile token
onyx fjord
#

just potion effect without second party knowing

sterile token
#

tell me @quaint mantle ?

quaint mantle
#

well its a lot of arguments i gotta fill so chill for a sec

sterile token
#

oh haha, i haven runt commands with more than 20 arguments

#

So its not so much hhhaha

halcyon hemlock
#

lol

quaint mantle
#

yeah im looking for it rn

#

usually its at the top when i open a class

#

but it doesn't work

#

so i mustve installed it incorrectly

sterile token
quaint mantle
#

it's my own

#

lol

#

I got it to work

#

dw

sterile token
#

right, but you have installed it into your local maven repo?

quaint mantle
#

yeah idk why I had to manually set the sources

sterile token
#

At least when I build something the sources are not generated automatically if I don't use the maven sources plugin. Which is used to build the sources dynamically when the project is compiled.

shadow night
#

if I setAmount to 0, will it automatically remove the itemstack?

timid hedge
#

Im trying to make a chat command, and if you have a permission you can use /chat reload for reloading the config, but im trying to do so if you dont have that permission you can still write "reload" as a arg in the chat command but right now it dosent send anything

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (label.equals("chat")) {
            if (sender.hasPermission(Chat.plugin.getConfig().getString("Permission"))) {
                if (args.length >= 1) {
                    if (args[0].equalsIgnoreCase("reload")) {
                        if (sender.hasPermission(Chat.plugin.getConfig().getString("Reload-premission"))) {
                            if (Chat.plugin.configFile.exists()) {
                                try {
                                    Chat.plugin.reloadConfig();
                                } catch (Exception e) {
                                    e.printStackTrace();
                                }
                            }else{
                                Chat.plugin.saveConfig();
                                Chat.plugin.getConfig().options().copyDefaults(true);
                            }
                        }else{
                            //HERE IS THE PROBLEM
                            String coloredChatPrefix = Chat.getStringColored("Chat prefix");
                            String message = String.join("", args).substring(args[0].length()).trim();
                            sendChatMessage(coloredChatPrefix, sender, message);
                        }
                    }
                }
            }
        }
        return false;
    }
delicate lynx
#

wow that is hard to read

#

nested ifs

frail pilot
#

Chat.plugin.getConfig().getString("Permission")

timid hedge
#

It has, i have check many times and i cant still see what the error could be

delicate lynx
#

does the plugin actually get the permission from the config

#

did you print it?

#

what is this for if (label.equals("chat")) {

#

I would test each if one by one

sacred shard
#

Hey, I can't seem to figure out how to do this...
If I have 2 arrays like String[] one = new String[] { "one", "two", "three", "four" and Integer[] two = new Integer[] { 1, 1, 1 ,1 } and I want to loop through and change value of two based on position of value in one, how can I do that? I know that this seems simple but I'm a spoon.

quaint mantle
#

Google

sacred shard
#

Tried to, trust me, can you just please point me in the right direction?

timid hedge
quaint mantle
delicate lynx
#

as it will only execute your code when /chat is ran

timid hedge
#

Oh okay, ill just remove that then

timid hedge
delicate lynx
#

I would start with printing some stuff out

#

since some if statement isn't happening

quaint mantle
timid hedge
quaint mantle
#

I think permission should be in codebase

timid hedge
#

Yeah but i just want so i can change it in a config insted of updating the plugin for updating the permission

lean pumice
#

i cam modificate the position on the healt? (using NMS)

agile hollow
#

how can i make an action from a spigot server send a message to the bungeecord

quaint mantle
#

PluginMessaging spigot

#

That's what you have to google

quaint mantle
lean pumice
cinder abyss
#

Hello, how can I set a block hardness?

quaint mantle
lean pumice
river oracle
#

I wouldn't be surprised if you could using texture pack fuckery

#

idk exaclty how mojang displays those internally but you might beable to edit the height and width of the image to do shifting

#

otherwise maybe looking into shaders etc and looking at your options their may be helpful;

hasty oyster
#

Any easy way for me to allow placing of signs but without allowing them to set the sign text on place?

#

I want to allow them to place the sign, but when they place it, I want to disable the edit menu that automatically pops up, and additionally set the sign text on place

quaint mantle
#

closeInventory

#

But its client side

hasty oyster
#

By "client side", what do you mean, (I know what client side generally means, i.e. not server side), but what do you mean in this context?

tame wolf
#

Not in your control as a plugin dev

quaint mantle
#

Look on protocol lib wiki, definitely possible.

eternal oxide
#

Do you actually want the sign placed though? (for everyone)

#

I'd cancel the place event/click and manually place it

inner mulch
#

Is there any way to ensure that a message sent fits in one line, on all chat sizes that the player can choose?

eternal oxide
#

no

#

you can limit it to ensure its under

#

but fonts are a bitch

#

you can;t account for resource packs

inner mulch
#

okay

zealous scroll
#

Is there a way, without packets, to display a change to an entity to a single player?
In this case, I want to change the scale and glow color of an ItemDisplay for a single player

zealous scroll
#

Just wondering if there's API support for that before I dive into packets

grand flint
#

ye

#

packet api

zealous scroll
#

ah alright

eternal oxide
#

packet api? Thats not Spigot

grand flint
#

🤯

topaz cape
#

hello, the "connected" i assumed is a boolean. It always returns true whether the server is online or not

#

and all this code always gets executed

#

and i dont know how to stop it 😄

remote swallow
#

im guessing the error might contain something

topaz cape
remote swallow
#

im guessing if the error is not null

#

it didnt connect

topaz cape
#

then what's the boolean for

#

look at this

#

wth

minor garnet
#

I'm generating a payment qr code, but the image is size 200, and I use the spigot method MapPallete.resize, it distorts the qr code to some weird pixels, does anyone know a better way to do this?

200 PIXELS

topaz cape
#

I just started doing maps yesterday for qr cides

minor garnet
quaint mantle
#

i just scammed it

#

scanned it

#

and i thik i see an email

minor garnet
#

nah this not a problem

quaint mantle
#

well i donated 5$

sullen marlin
#

I think centre the QR code

minor garnet
#

i want like this

sullen marlin
#

They have to have certain dimensions I think

minor garnet
sullen marlin
#

Iirc that's what I did in Minesecure

#

Check the screenshots of that plugin

minor garnet
sullen marlin
minor garnet
#

yeah bu t the size is not the same

#

i want centered uyk

#

like that

#
    private static final int QR_CODE_SIZE = 100;
    private static final int QR_CODE_MARGIN = 1;
    private static final String QR_CODE_CHARACTER_SET = "UTF-8";
    
    
    
    public static BufferedImage generateQR(String data) throws UnsupportedEncodingException, WriterException {
        
        final Map<EncodeHintType, Object> hints = new HashMap<>();
        hints.put(EncodeHintType.MARGIN, QR_CODE_MARGIN ); 
        hints.put(EncodeHintType.CHARACTER_SET, QR_CODE_CHARACTER_SET);

        final BitMatrix matrix = new QRCodeWriter().encode(data, BarcodeFormat.QR_CODE, QR_CODE_SIZE, QR_CODE_SIZE, hints);

        BufferedImage image = MatrixToImageWriter.toBufferedImage(matrix);
        image = MapPalette.resizeImage(image);
        return image;
        
    }```
sullen marlin
#

Make the size bigger?

#

Don't try and resize it

minor garnet
sullen marlin
#

Why nah

minor garnet
young knoll
#

Isn’t a map 128 pixels

minor garnet
sullen marlin
#

Set size to 128 rather than 100?

minor garnet
sullen marlin
#

Try it

minor garnet
#

I dont want a lot of white border

#

i want like this,

#

Zxing Qr code LIB

sullen marlin
#

Reduce margin?

minor garnet
#

stranger

topaz cape
minor garnet
#

🤔

sullen marlin
sullen marlin
topaz cape
#

both ServerConnect & ServerConnected am i right?

wet breach
topaz cape
#

i do 128 by 128

#

for a full map

wet breach
#

This gives the minimum optimal size to distance ratio of 10:1

#

Which is approximately 3 ft for that size i gave

topaz cape
patent socket
#

I have a command which starts a taskTimer:

  VRTask task = new VRTask();
  task.runTaskTimer(plugin, delay, delay);
}```
I am trying to add a command like this to stop the timer:
```if (args[0] == "stop") {
  //stop taskTimer
}```
However, I don't know how to stop it. How can I do this?
eternal oxide
#

.equals when comparing strings

young knoll
#

Store the task as an instance variable

#

Then call cancel on that

hazy parrot
#

i swear this didn't exist before

tender shard
#

it's been there at least for a month or so

eternal oxide
#

what is it? I clicked it and it became a tick

tender shard
#

copy

hazy parrot
#

probably copy

hazy parrot
eternal oxide
#

oh no I have poor code on my clipboard, I've been tainted

wet breach
#

Oh no

#

We need to perform the cleansing ritual now

eternal oxide
#

If the FBI come for me, it wasn;t mine.

patent socket
tender shard
#

?learnjava

undone axleBOT
wet breach
#

Bukkittask task = task code here

#

Now task is a variable with the value of the task and can be stored or whatever or just grab the task id it generates when you schedule the task

#

Either or works

glad prawn
#

hope he can differentiate between instance and local

rare rover
#

what's the best way of making chances?

#

which seems meh

#

I mean Big O or JMH

#

i sometimes label my code with Big O xD

hazy parrot
#

big O isn't really performance wise

#

its just complexity of algorithm

rare rover
#

than JMH

rare rover
tender shard
#

i don't usually

hazy parrot
#

if dont lag => gud thumb

tender shard
#

yeah if you're not loading chunks or something or doing IO on the main thread, you must really fuck up to cause performance issues

#

how that lol

rare rover
#

lmao

#

}```
#

fr

tender shard
#

anyway, if I indeed have to measure performance, I don't worry about any big o notation or stuff, I just use JMH and throw a bunch of data in that's reasonable

rare rover
#

it looks alright but i feel like there's a better way imo

hazy parrot
#

you shouldn't worry about number of allocations, only thing you really need to worry about are memory leaks

#

which are imo easy to detect, you just see you never have gc spikes

rare rover
#

i usually use spark for that

hazy parrot
#

yeah really any monitoring software/thingy

agile hollow
#

how can i make a gui in bungeecord only for let the player move from a sever to another

#

or how can i do within a spigot plugin a gui for move in server of a bungeecord

#

like a sever selector

cinder abyss
#

Hello, is "internal use" okay for a librairy to create a custom NamespacedKey without using the plugin in argument?

tender shard
cinder abyss
tender shard
#

it's not marked as deprecated or internal

tender shard
#

np

cinder abyss
#

it's for block PDC 🙂

tender shard
#

was added in 1.16.5 btw

cinder abyss
#

Idk if I'll make my librairy usable for 1.8-1.20+

#

It's for custom blocks, and a lot of other things

tender shard
cinder abyss
cinder abyss
#

whaaaat ?

#

ArmorStand isn't really a LivingEntity?

#

it doesn't really have an AI or something like that

echo basalt
#

so

#

it isn't a Monster

tender shard
glad prawn
#

he also can pose xd

tender shard
#

Yeah Fancy armor stands

agile hollow
#

how from the interaction in a gui (spigot plugin) i can send a utf to the bungee?

tender shard
#

utf?

agile hollow
tender shard
agile hollow
tender shard
agile hollow
rustic junco
#

Hey I am currently using the latest spigot version 1.20.4/3 but I have no idea how I can now register my own enchantments because the methods are gone. Can anyone help me?

tender shard
#

Bukkit classes are not meant to be extended by plugins

rustic junco
#

okay thank you

young knoll
#

mwahaha we killed the enchantment registering

#

Imean what

quiet ice
#

Hah, enchantmentsplus remains unaffected

#

At least I think so, but I am not doing anything egregious in that plugin besides overwriting the bukkit unsafe (and even then the relevant code is safely wrapped around a try-catch catching everything)

young knoll
#

You did what to the unsafe

quiet ice
#

I basically just replaced the value. Nothing too exotic

#

The implementation class is generated via ASM, so new methods won't brick anything either

young knoll
#

Spooky

young knoll
#

When you don’t have mixins

wet breach
#

By using a profiler

#

Dont go by big o notation either

#

Because sometimes the one that is least performant is more performant by that standard

quiet ice
young knoll
#

I’ve written raw asm transformers

#

Still had to use bytebuddy to run them tho

#

Sadge

wet breach
#

Spark is decent but it wont show you everything

minor junco
#

you should know that biggie O is not performance measure, it is just a distinct way of saying how much your performance will scale with the amount of inputs, using a profiler is pro ably the best way to measure

#

Exactly

wet breach
#

Most of the time you wont encounter issues with your code or notice anything unless its blocking

quiet ice
#

If I was to ever rewrite the class I'd use cafedude instead of ASM but given that ASM is bundled with bukkit it might make more sense to not use cafedude

wet breach
#

Or you really are hitting some upper limit lol

#

But you need a really large server to do that

#

Just use offline mode and log more accounts in

#

This is one of the purposes of offline mode

minor junco
#

As long as you apply best practices for code efficiency and keep your data closely related in memory, not doing heavy blocking it should be fine most of the time. To test with multiple players you can use mineflawyer (or something) with which you can create bots using JS

quiet ice
wet breach
#

Lol

minor junco
#

quite frankly

quiet ice
#

That was how things were 3 years ago

#

No one heard about spark

minor junco
#

I mean I worked with larger server networks before a couple years back and it wasn't a thing there whatsoever

wet breach
#

Timings report was alright. It was more ideal to see if entities were causing problems and not so much plugings

quiet ice
#

Well I was still given the timings report so I knew which chain of events to optimize. But whyyy

minor junco
#

I mean that's fine I guess as long as they don't force anything and reject your project

quiet ice
#

A Spark report would have shown a lot quicker that my getItemMeta calls were the bottleneck

minor junco
#

... Unless there really is a huge bottleneck

#

Yeah

quiet ice
#

Or at least that is what I think it was because after that I never ever received a complaint

#

Truth be told I was optimizing blindly which is quite the sin to do

minor junco
#

yeah

silent tendon
#

Hello, I have a question, namely how can I use such a custom blockbench entity on Spigot? So that I can open something via it, for example?

young knoll
#

Display entities with custom model data

#

Or armorstands in older versions

silent tendon
#

Do you perhaps have a tutorial on how I do something like that?

echo basalt
#

it's basically just modelengine

silent tendon
#

Yes, my problem is, I don't know how to implement something like that because I can't find anything on how exactly to do something like that.

echo basalt
#

you can go the simple route and just hook into modelengine

#

or look at magmaguy's opensource plugin that does it

#

There's also AquaticModelEngine by larkyy

silent tendon
#

Okay, I'll take a look, I wanted to do something of my own

astral scroll
#

theres plugins that accept chat responses like cancel or stuff, how can i do that?

#

like it says you "to cancel this action type cancel"

#

and the plugin recognize it

#

how do i do that?

young knoll
#

Conversation api

astral scroll
#

:)

next plume
#

Anybody know why the latest dev build of ProtocolLib isn't triggering on KEEP_ALIVE packets with Spigot 1.20.4? It works with 1.20.1.

#

I created a ProtocolLib issue 4 days ago, but there's been no reply.

sullen marlin
#

What are you trying to do

next plume
#

Measure ping time. The code has been working for 5 years, going back to 1.12.

sullen marlin
#

Player#getPing

next plume
#

That returned a cursed value. It's not mathematically correct.

sullen marlin
#

Hmm? I thought it essentially returned the same as the packet, maybe averaged slightly

next plume
#

Averaged poorly.

#

In any case, it's not what I want.

#

So I assume Spigot didn't do anything to break ProtocolLib?

sullen marlin
#

I mean its NMS, who knows

brazen badge
#

Has anything changed for the scoreboards from 1.20.2 to 1.20.3?

In 1.20.2 I see the normal scoreboard, in 1.20.3 I see it in reverse

sullen marlin
#

this.latency = (this.latency * 3 + i) / 4; looks like a simple average of the last 4 keep alives

#

is there any reason that's not suitable?

brazen badge
#

1.20.3

sullen marlin
#

how come 1.20.2 doesnt have numbers

river oracle
#

mojang did update scoreboards a good bit iirc

sullen marlin
#
  • try 1.20.4
brazen badge
brazen badge
sullen marlin
#

I suspect there's a reason most custom scoreboards use 9,8,7,6,5,4,3,2,1 as the scores

#

I'd open a bug report, maybe we can reverse the order, but it could be a client side limitation