#help-development

1 messages ยท Page 732 of 1

worldly ingot
#

The ones that accept a BaseComponent are under the Spigot subclass

young knoll
#

Could we move them? yes

#

Will we? idk

hybrid turret
#

ahhhhh

#

i see, thanks

young knoll
#

Sadly when we have getters for components those will have to be under the spigot subclass

worldly ingot
#

Fuck. Remind me to test that

#

It's done I just need to test lol

young knoll
#

getName(Type.COMPONENT)

#

100% not ugly

worldly ingot
hybrid turret
#

not important logically but there's a semicolon in front of .create ^^'

worldly ingot
#

oop

#

I uh... I was just testing you

young knoll
#

Why can't java just handle identical methods with different return types smh

quaint mantle
#

just a quick question is there anything in bukkit.yml or spigot.yml that could not allow to interaction between blocks or placement of them?

#

also hi choco

hybrid turret
lilac dagger
#

getNameComponent is also an idea, but def still ugly

worldly ingot
#

Already went through different options and nesting under spigot() just made the most sense

young knoll
#

blahhh

junior geyser
#

Is it true new 1.20.2 builds use Mojang mappings for fields and stuff???

#

Instead of the obfuscated ones

worldly ingot
#

No

#

Was a bug

eternal oxide
#

no its a bug

junior geyser
#

Ah okay

#

Cause TAB added support for them, and I thought I would have too ๐Ÿ˜‚

#

Guess they did not realize it was a bug

worldly ingot
#

Yeah they're going to realize pretty quick that it was a mistake. Things will start breaking

lilac dagger
#

All good things things come to an end ๐Ÿ˜ฆ

junior geyser
#

Yeah I was excited for a min

grim hound
#

Yo. So, I need a map that stores my custom user class with the UUID of a bukkit's Player. However I iterate through it asynchronously, so HashMap cannot be used. I've used ConcurrentHashMap so far, but I think I could make it work with the IdentityHashMap. The only problem: it does not support async iteration. So I came up with a class of my own. I need someone to evaluate it's efficiency for me. Please https://paste.md-5.net/aferomacoj.java

#

pay no mind to the forEach methods, as they're only used on disable

#

And I don't necessarily mean computer evaluation

young knoll
#

When you look into an old PR

#

And some links are dead :c

river oracle
#

:( feelz

prime reef
lilac dagger
#

Uuids shouldn't be used as keys in identity maps

prime reef
#

are UUIDs mutable or something?

lilac dagger
#

No

#

The uuid of the player wouldn't match the one you pulled from a db

#

They'll be different objects

#

Only .equals can prove their equality

prime reef
#

i think i'm missing something here

#

what db?

lilac dagger
#

It was an example

#

player.getUniqueId() == UUID.fromName would not work

prime reef
#

ah, that

#

that's not usually a use case I run across tbh

kind hatch
# prime reef i think i'm missing something here

IdentityHashMap uses reference equality instead of object equality. Meaning, IdentityHashMap#equals() is actually using == instead of a proper implementation.
Hence, you shouldn't use UUIDs as the keys.

This is intentional btw.

lilac dagger
#

If you hold a cache of uuid as key in a identity map over player rejoining, the same bug would surface

grim hound
#

I know that

#

I should've speficied: it only holds uuids of online players and only checks it by Player#getUniqueId

#

No other uuid is in play

lilac dagger
#

Then it should be fine

grim hound
#

For sync modifications and async iteration (only value read)

lilac dagger
#

I don't think so

grim hound
#

Fair Ig

lilac dagger
#

If you look into the equals of uuid, it's pretty simple

grim hound
#

Identity equality is still faster

#

And with greater number of comparisons it can become visible

lilac dagger
#

Yes, but i don't think by much

#

Pretty sure some other part of the code will show problems sooner than this one

grim hound
#

Wdym?

hybrid turret
#

Can I check in an enhanced for loop (i hope that's the right term) if i'm at the last position of the Set i'm going through?

grim hound
#

Maybe not ideal

#

But very much possible

lilac dagger
# grim hound Wdym?

I mean the lag will show in other parts sooner than performance from checking

grim hound
#

Hmm I see

#

This can become like a quote

smoky oak
#

if i want to check if a player's velocity is not null and nothing else, am i required to use the length() method? Doesn't vector have a lengthSquared method for faster math?

#

nevermind it has

#

im blind

hybrid turret
#

For reference: I want to list the operators. So I iterrate through Bukkit.getOperators() and append , between each. I just don't want a comma at the end.

grim hound
#

I see

#

Get the Set#size

#

Add to "int index = 0" 1 After each iteration

lilac dagger
#

StringJoiner is pretty cool

grim hound
#

And check index == size - 1

opaque hawk
grim hound
hybrid turret
#

-1?? huh?

#

How can the size be negative?

#

oh

#

lmao

#

i'm dumb as hell

#

HAHAHAHA

lilac dagger
#

It starts from 0

grim hound
#

Happens

hybrid turret
#

it's late for me lol

lilac dagger
#

Size at 0 means empty

grim hound
hybrid turret
#

yea i know

hybrid turret
grim hound
#

I never really used StringJoiner, but it's probably like array toString formatting class

hybrid turret
#

Okay the regular for-loop was already a thing i tried, but i gave up bc i was to stupid to get the player using an index lol

#

idek why i don't know stuff like that. i've been coding for years lmao

#

If I have a UUID as a String, can I convert that to UUID? (fromString tells me the String is too large)

ivory sleet
#

since it calls JLA under the hood

#

Which does some cool stuff

covert yacht
#

Hi ! For some reason the skin is not applied, it is applied when i set my uuid in there but not when i use any other uuid. I check the method getSkinFromUUID and it returns the correct data

I am sure that the uuid from the config file is correct

Yes i know 1.8.8 is old ๐Ÿ˜…

https://paste.md-5.net/dayilonali.js

grim hound
#

It must be an invalid uuid string then

smoky oak
#

why doesnt this work?

grim hound
#

Cuz

#

Syntax

kind hatch
#

-- is used for decrementing

smoky oak
#

yea exactly

#

i want a backwards running timer that resets to full

covert yacht
# grim hound Like a refresh

Yeah, i saw that on some forums, i tried some things to apply the skin on my npc but none of the solutions worked for me, maybe i'm not searching in the right spot ๐Ÿค”

grim hound
#

And back

ivory sleet
grim hound
#

For the respawn packet to be sent

smoky oak
#

i put that cuz it works there

#

i thought assignments support pre/post increments

covert yacht
spare prism
ivory sleet
#

?jd-bcc

smoky oak
#

?jd-s

undone axleBOT
covert yacht
#

Also tried to delay the tp back in place but still

grim hound
#

Hmm

covert yacht
#

Do i need to do it before or after sending the packets, after i suppose

grim hound
#

After

covert yacht
#

Weird ๐Ÿค”

grim hound
#

Also why is there

#

REMOVE_PLAYER

#

PacketInfo

covert yacht
#

To remove the player from the tab list

#

Maybe thats the issue ๐Ÿค”

grim hound
#

Probably not

covert yacht
#

Maybe tping before removing the player will do the work ?

grim hound
#

Nuh

covert yacht
#

Supositions ๐Ÿ˜…

grim hound
#

My setSkin method for players

valid burrow
#

is there a way i can edit the preset for this

grim hound
#

Removed set added back and tgen teleported

grim hound
novel pendant
#

is there an easy way to remove a player's name from tab list without NMS or am I going to have a fun day figuring NMS out? Im looking to make a custom tab menu but player names and their ping need to go away

covert yacht
novel pendant
#

that removes them from the world altogether for other players

#

I mean specifically tab bar

grim hound
#

It sends a packet

#

That controls others tab visibility

valid burrow
covert yacht
valid burrow
#

for command methods

#

cause im tired of changing it every single time

novel pendant
grim hound
fossil lily
#

Is there a way to prevent an ItemStack object being replaced by a new on during some inventory adding? I'm trying to instanceof and it seems like it's a different object?

valid burrow
#

this thing.

novel pendant
valid burrow
#

the "implement methods" automatically adds this

prime reef
#

that's

#

what it's supposed to do.

#

also, your class naming scheme is weird.

#

would suggest you avoid naming classes with lowercase

grim hound
prime reef
#

but yeah I don't really know what you were expecting from "implement methods", what did you want it to do?

grim hound
novel pendant
grim hound
#

Maybe some new changes then?

valid burrow
prime reef
#

but

valid burrow
#

well thx anyways

prime reef
#

nobody makes you do that

#

you can just do it by hand

valid burrow
prime reef
#

for future reference that's a "quick fix" or whatever IntelliJ calls it

prime reef
#

it's just auto-named based off of the arg types

kind hatch
#

There's a way to do it, I just don't remember how it's done in IJ atm.

valid burrow
#

arlight

prime reef
#

would recommend renaming that to CommandHelp or something btw

kind hatch
#

I think the last time I added a replacement like that was in Eclipse and it was easier than it was in IJ.

prime reef
#

as much as I like IntelliJ, it's really bad about certain things

#

this is one of them

#

straight up running projects is another

cinder abyss
#

Hello, how can I get the nms Player from bukkit Player class?

prime reef
#

or like exporting a .jar file normally without maven/etc.

slate tinsel
#

Hello! How does "org.bukkit.generator.BiomeProvider" work? Therefore I chose "forest" to avoid water and yet the whole world is kind of water. Does this have to do with the "Tempraturer"

prime reef
#

do you still need a CraftPlayer for that?

prime reef
#

you might have just done something wrong

cinder abyss
#

but CraftPlayer isn't net.minecraft.world.entity.Player?

prime reef
#

keep in mind if the chunk has already been generated, changing its biome won't do anything

prime reef
valid burrow
#

has anyone ever disigned a website to auto generate inventorys? cause if not i think ill do it

cinder abyss
prime reef
#

wym "auto generate"

valid burrow
#

like you just choose the items u want in there in like a dropdown menu or something and it writes the code for you

kind hatch
#

?paste

undone axleBOT
prime reef
#

i don't see that code actually changing generation though

cinder abyss
#

I don't want to pass through CraftPlayer, or maybe automatically

#

not importing this

#

I don't want to make a version for every version of Minecraft

#

but idk how to cast to a CraftPlayer without importing the class

#

I don't know how to cast the player to a CraftPlayer.class and then getting handle

kind hatch
#

Isn't that the ole ((CraftPlayer) player.getHandle())?

cinder abyss
#

okay thanks

eternal oxide
#

?paste

undone axleBOT
kind hatch
#

Hope it doesn't break. :kek:

eternal oxide
cinder abyss
#

okay thanks ๐Ÿ˜„

#

another thing

#

how can I cast it please?

kind hatch
cinder abyss
#

let's use reflection x)

void goblet
#

Hi im trying to save in an yml file the uuid and the bal (its an economy plugin) but it doesnt works

#

public static String getFolderPath(UUID p) { return Bukkit.getPluginsFolder(). }

#

IntellyJ cant find the Bukkit

wraith apex
#

plugin folder is not a thing

#

I think you're looking for the data folder for your plugin in /plugins/

void goblet
#

ye

wraith apex
#

That method can be found in your main plugin class

void goblet
#

How can i create the folder from onEnable and then access it aswell?

wraith apex
#

whatever is extending JavaPlugin

#

getDataFolder()

#

the folder is created automatically

#

if it doesn't already exist

void goblet
#

wait cant understand .-.

severe folio
wraith apex
#
public class MyPlugin extends JavaPlugin
{
        @Override
    public void onEnable()
    {
        // This is your plugin folder
        File pluginDirectory = this.getDataFolder();
    }
}
void goblet
#

oh ok

#

wait lemme try

wraith apex
#

you don't have to manually create it

#

(If you attempt to write something to the directory)

void goblet
#

im creating a class wicht returns the plugin path

#

like: path + /player/ + UUID

#

how can i do this

severe folio
wraith apex
#

I've never had to

void goblet
severe folio
#

Returns the folder that the plugin data's files are located in. The folder may not yet exist.

wraith apex
wraith apex
void goblet
#

lemme reformulate the question

eternal oxide
wraith apex
wraith apex
eternal oxide
#

I did

#

it only creates it on saving teh config, not on saving anything

void goblet
#

Want to create a class wicht gives me the path of a yml file allocated on (pluginfolder + player + UUID)

#

But how can firstly get the plugin folder path if it might not exist

wraith apex
eternal oxide
#

Plugin#getDataFolder()

void goblet
void goblet
wraith apex
#

you said (pluginfolder + player + UUID)

#

I'm not sure what you want

eternal oxide
#

you can do new File(plugin.getDatafolser(), "player")

void goblet
kind hatch
#

No wonder it doesn't work.

void goblet
#

uhm

kind hatch
#

You can't append extra strings to a file path unless that path exists.

void goblet
#

min: 5:20

eternal oxide
#

or evenjava File players = new File(plugin.getDatafolser(), "players"); players.mkdirs(); File id = new Folder(players, uuid.toString() + ".yml");

kind hatch
#

File file = new File(plugin.getDataFolder(), "path/to/your/file.extension")

eternal oxide
#

id will be the handle to your new file, if you create it

void goblet
#

wait, how can i save a hashmap<UUID , double> in a yml

#

its easier

eternal oxide
#
FileConfiguration yourConfig = new FileConfiguration();
yourConfig.set("MAP", yourHashMap);```
#

or YAMLConfiguration, I forget which it is

severe folio
#

Since when can you call new FileConfiguration and not YamlConfiguration.loadConfiguration(file)

eternal oxide
#

then using the code above you can yourConfig.save(id);

void goblet
#

for check on join event if the player has his own line?

#

How can i check if a UUID is already in there

kind hatch
wraith apex
eternal oxide
wraith apex
#

literally writing an empty txt file

void goblet
#

i`ll just go to sleep .-. im getting crazy... Thanks for the help bye

eternal oxide
#

using what code?

severe folio
wraith apex
#
@Override
public void onEnable()
{
    String s = this.getDataFolder().getAbsolutePath() + File.separator + "doc.txt";
    Files.createFile(Path.of(s));
}
eternal oxide
#

folders are only created by Bukkit when using the Config

wraith apex
#

apparently not

#

ยฏ_(ใƒ„)_/ยฏ

#

I am curious if someone can replicate this result

eternal oxide
#

testign now

warm mica
wraith apex
#

Oh fuck

#

I've made a mistake

eternal oxide
#

my bet you are also saving a config

eternal oxide
#

๐Ÿ™‚

wraith apex
warm mica
wraith apex
#

You are correct though

#

I am wrong

#

my bad

#

I have other infrastructure that auto-creates folders and files

eternal oxide
#

yeah I just checked it here. no folder created ๐Ÿ™‚

wraith apex
#

Yeah yeah my bad

#

I guess I've just expected it because of my infrastructure

#

honestly kind of nuts spigot doesn't do this for ya

eternal oxide
#

its kinda not upto Spigot at that point as you are not using its API

wraith apex
#

I meant more as a QOL thing

warm mica
#

yup and it's not really a huge effort

wraith apex
#

just to create the plugin folder if it doesn't exist

#

i'm being a tad lazy but eh

warm mica
wraith apex
#

if you don't write to it nothing should happen

warm mica
wraith apex
#

seems only if you mess with config saving or have infrastructure in place to auto-create folders on the fly does it appear

wraith apex
opaque scarab
#

Is there a way to copy and simulate an instance of a chunk, without affecting the original?

prime reef
#

this is why i wrote a config library lmao

quiet ice
prime reef
#

I could probably help, breaking shit is my specialty

small current
wraith apex
#

o k

wraith apex
quiet ice
prime reef
#

it's the simulate part I'm concerned about

wraith apex
#

this doesn't sound like a backup system

quiet ice
#

Most likely referrs to a virtual dimension

#

Why that is needed - god knows

prime reef
#

I don't think it goes that far tbh

#

but let's see what the op has to say LMAO

quiet ice
#

Could also be a simple computation on the chunk (grow all trees, remove ores, whatever) but without them responding it is anyone's guess

echo basalt
#

Did you run buildtools?

#

And also the remapped variant?

#

?nms

prime reef
#

oh shit

#

I didn't know what nms mappings actually were until I figured I'd check just now

#

that's cool

echo basalt
#

yeah lets you read nms

#

which means it's not fun anymore

#

good ol' 1.12 days where I memorized all the nitty gritty a() methods and what they did

#

and I could just guess based on the order of operations

young knoll
#

You sound like the boomers that complain kids have it too easy these days

kind hatch
#

Back in my day, we didn't have these fancy mappings or persistent data containers.

wraith apex
#

Back in my day we had to reverse engineer everything

young knoll
#

Back in my day we didnโ€™t have integers!

wraith apex
#

Back in my day we didn't have letters!

echo basalt
kind hatch
#

Age check

ivory sleet
#

Actually lol

echo basalt
#

mm no conclube has always been lurking

wraith apex
#

Age pls

#

A/S/L

ivory sleet
thin iris
echo basalt
#

judging by the pfp I lost the argument

orchid gazelle
young knoll
#

Discord admins watching with interest:

thin iris
wraith apex
#

you 12?

young knoll
#

His about me says 25/9/23

#

So he is 3 days old

thin iris
#

thats the day my best friend died

hazy parrot
#

Why would you have that in discord bio

thin iris
#

why not ?

glad prawn
#

never forget ๐Ÿค‘

quiet ice
#

You alrighty, spigot?

quaint mantle
#

Why does 1.20.2 doesn't contain CraftWorld anymore?

#

I'm using <artifactId>spigot</artifactId>

#

After compiling with BuildTools

quiet ice
#

Are you using the mojmapped jar?

quaint mantle
#

I think so

#

I used the GUI you guys are working on

quiet ice
#

Eh that was a dum question anyways since that is CB

#

?stash

undone axleBOT
quaint mantle
#

I turned on the remapped option through the options window

quiet ice
#

Are you using the right import?

quaint mantle
#

You are right

#

v1_20_R1 -> v1_20_R2

quiet ice
#

Otherwise - invalidate sources and restart your IDE

upper hazel
#

There is such a tedious thing in creating a plugin as loading data from configs. You have to do everything manually (it can take 200 lines in ONE class ) and still worry about these names. Does anyone have a specific system for loading configs + error protection?

#

class or something else for check errors

#

i have but it is intended for certain configs in a certain plugin and not for all

#

cuse confortable in this setuation

#

do you not like this?

#

i too but in this moment

#

yes

#

enums?

#

you can just see "new"

#

end next class

#

but yes this not so confortable

#

you use enums for check error type?

upper hazel
#

i dont remember were find antivirus for plugins

#

one persone say it

#

he use it

severe folio
upper hazel
#

lol no this is in github

#

a wait

#

yes

#

haahah

#

i dont was think this exists in SpigotMC

severe folio
#

Fair enough

lost matrix
#

Here is something that only generates plains:

public class CustomBiomeProvider extends BiomeProvider {

  @Override
  public Biome getBiome(WorldInfo worldInfo, int x, int y, int z) {
    return Biome.PLAINS;
  }

  @Override
  public List<Biome> getBiomes(WorldInfo worldInfo) {
    return List.of(Biome.PLAINS);
  }

}
  private void generateNoOceanWorld() {
    WorldCreator creator = new WorldCreator(NO_OCEAN_WORLD);
    CustomBiomeProvider customBiomeProvider = new CustomBiomeProvider();
    creator.biomeProvider(customBiomeProvider);
    creator.createWorld();
  }
#

@slate tinsel

grim hound
#

How could I hook myself to be able to intercept even the handshake packet?

nova jasper
#

Does anyone know what aternos plugin add effect to item and that effect still working when put item in inventory help me pls

grim hound
#

No fucking shit

cinder abyss
#

Hello how can I get the amount of durability the mending enchantment will repair, on average, per point of experience?

wraith apex
#

Read wiki

pseudo hazel
#

aka 2

cinder abyss
young knoll
#

A player?

hushed scaffold
#

Resource packs

#

Dont think so

#

๐Ÿคท

#

Just use resource packs at that point

young knoll
#

Honestly I think the closest is just the default pose

quaint mantle
#

hello everyone does anyyonee know how to fix this ?

young knoll
#

Are you already connected to the proxy

quaint mantle
#

na

#

cracked also

echo basalt
#

oh fuck no

young knoll
slate tinsel
young knoll
#

Biomes no longer determine the terrain

#

Terrain determines the biome

void mason
young knoll
#

Even if you force the only biome to be plains, areas below sea level will still be filled with water

quaint mantle
void mason
quaint mantle
#

sorry for bad english

void mason
quaint mantle
#

we cant play mine

#

we dont have xbox live here

#

its filterd

void mason
#

use a vpn to log-in

#

can't you do that?

young knoll
#

Rewrite the terrain generation

quaint mantle
#

cant

echo basalt
#

cap

void mason
#

is iran part of north korea?

slate tinsel
lost matrix
quaint mantle
#

that cap

#

wait

young knoll
#

You can probably use a datapack to remove dips below sea level

#

Idk a ton about the datapack worldgen

echo basalt
#

bros literally got an xbox account linked to his profile

quaint mantle
#

so

#

thats from 2016

#

thats when it was not filterd

echo basalt
#

looks like piracy to me

void mason
#

๐Ÿดโ€โ˜ ๏ธ

slate tinsel
void mason
#

@echo basalt i think he is not the only pirate

#

the entire nation pirates the game

quaint mantle
#

Yeah

#

XD

#

ok i have TL

void mason
#

so no one can create an online-mode server there and get players

slate tinsel
lost matrix
quaint mantle
#

play it

#

its an iranian server

#

with cracked

lost matrix
#

Let me guess. 1.8

void mason
echo basalt
#

1gb ram

void mason
#

and it got 1.5k players currently

#

woah

quaint mantle
#

yeah

#

cracked servers here are popin

quaint mantle
void mason
#

its .com actually and not .ir

quaint mantle
#

:|

#

messed up the op

#

ip

void mason
#

this server looks good ngl

#

no way

quaint mantle
#

thats not the point

#

so how to fix my server

void mason
#

what was the issue again?

#

i kinda get your situation

quaint mantle
#

wait

void mason
quaint mantle
#

what ????????????????????????????????????

quaint mantle
void mason
quaint mantle
#

k

void mason
#

and send me the output

quaint mantle
#

bungee or server s?

void mason
#

lets continue it here

#

on your proxy

quaint mantle
#

bungee console

#

?

lost matrix
pastel juniper
#

I want to make custom elytra is there a way to change it's entity model or texture???

pastel juniper
#

Thanks

young knoll
#

you can retexture the item easily

#

The model less so

#

Maybe with core shader magic

lost matrix
#

Sadly armor models can still not be changed using the modelid

chrome beacon
#

Yeah shaders would be your best option

#

You can do some cool stuff with it

young knoll
#

I know shaders can handle armor

#

So they can probably handle elytra

chrome beacon
#

probably

burnt sand
lost matrix
wraith apex
#

lol

burnt sand
#

Double.parseDouble(null) works

wraith apex
#

what's the entire stack trace?

eternal oxide
#

you use rs when you test rs12

#

you are quierying an earlier result set

lost matrix
wraith apex
#

Not enough code and no stack trace to be able to figure out why

eternal oxide
#

Use the correct ResultSet

lost matrix
#

Its already figured out

burnt sand
#

Thankyou haha

wraith apex
#

rs is not declared anywhere

#

ยฏ_(ใƒ„)_/ยฏ

#

only making the assumption it's another resultset

eternal oxide
#

his error says he quieried beyond the last entry so it is defined earlier

wraith apex
#

exception could of occured on executeQuery()

eternal oxide
#

it would also not compile if rs was not defined

#

thats not his error

wraith apex
wet breach
#

know your exceptions and what throws what ๐Ÿ˜‰

wraith apex
wet breach
#

it does not for you, big difference here

eternal oxide
#

^

wraith apex
#

Point to me in the code where 'rs' is defined

eternal oxide
#

I didn;t "guess", the error and the code he provided gave all the info to diagnose.

wet breach
#

the exception points out the incorrect result set being used as ElgarL pointed out

wraith apex
#

You're missing my point

#

ยฏ_(ใƒ„)_/ยฏ

wet breach
#

probably, but mine was that while you don't see anything, doesn't mean others don't or can't know

shadow night
#

So, I thought of making an api for my plugin that would work with typescript/javascript, but idk how I could

  1. Execute the script
  2. Share info between the server/plugin and the script
    Anybody got suggestions?
wraith apex
wet breach
echo basalt
#

I've done that before

#

I don't remember shading js tho

#

but the jar was like 14mb

#

lemme decompile

shadow night
wet breach
young knoll
#

Oh boy another scripting Lang

echo basalt
young knoll
#

Tbf Iโ€™m sure a JavaScript spigot bridge already exists

wet breach
#

bride?

#

I didn't know there was a suitor for spigot

echo basalt
#

now kiss

young knoll
#

Itโ€™s about time spigot got married

#

Itโ€™s like 12 or something

shadow night
#

Well, that's young

worldly ingot
#

It was private and proprietary, but they exist for sure

#

Do not recommend

young knoll
#

Thereโ€™s a public python one

#

There must be a public js one

echo basalt
#

think we used it at work to like run scripts on dungeons

shadow night
#

Python is awful imo

worldly ingot
#

Yeah but that uses the plugin loader API which is sensical

wraith apex
#

python is garbage

echo basalt
#

we'd just slap a @script@ one

#

and it'd run one.js

worldly ingot
#

Anyways if you want to expose some API via JavaScript you can do that, you'll just need a JavaScript engine. Probably Graal

#

PAPI already does this

shadow night
#

I'll see if I am able to understand anything

worldly ingot
#

So you could use them as an example

young knoll
#

You could probably expose the api to any language if youโ€™re brave enough

worldly ingot
shadow night
echo basalt
#

ASM interpreter in java

#

because fuck you

young knoll
#

Idk if any languages would really be useful

#

But you could do it

shadow night
#

Imagine if we could show html to clients

young knoll
#

Js and python kinda work because they are fairly common scripting languages

#

Anything else probably has no real use

river oracle
shadow night
young knoll
#

Uhh

#

Less than JavaScript

echo basalt
#

ppl angry at typescript now

#

so

#

ยฏ_(ใƒ„)_/ยฏ

young knoll
#

Oh okay time for a new one

shadow night
young knoll
#

TypedScript

#

Probably a packet

wet breach
#

its just not as publicly visible as something like javascript

golden turret
#

I am getting the Velocity#length() each tick and I found out that even if I am stopped the returned value is 0.08. Where is this located in the nms?

wet breach
#

its just like F#

#

its not as publicly visible as say C#

#

but F# is indeed used a lot

#

F# incidently is another programming language from MS

golden turret
young knoll
#

Gravity

#

Basically

wet breach
#

there is gravity and drag

#

as well as weight

golden turret
#

yes, but where is this coded?

wet breach
#

need to look into the non-used NMS stuff

#

so you are going to have to find in the buildtools directory the decompiled stuff

#

and then toss those classes into an IDE

#

spigot doesn't make use of everything or modify everything in the MC code

#

so there is plenty of classes that are not decompiled/used at all

eternal oxide
#

animation packet

young knoll
sterile token
#

But the wiki is a Mess yo use

young knoll
#

It would be cool if the wiki had the mapping names of packets

#

Other than that I donโ€™t see how itโ€™s a mess

eternal oxide
#

wiki is basic data is all

young knoll
#

Still mapping names would be nice

#

Since sometimes itโ€™s difficult to figure out what the wiki name actually matches with

pseudo hazel
#

is it hard to write a worldgenerator where the biomes are just smaller?

#

or like what kinda classes /api would I use for that stuff

young knoll
#

Uhh

ivory sleet
#

nms... perhaps? :o

#

:x

young knoll
#

You can do it with BiomeProvider in the api

#

But you'd have to handle the math and stuff yourself

#

Alternativly you can do a datapack

pseudo hazel
#

what math

#

you mean make like a custom biome noise map or something?

#

nvm ill just look at BiomeProvider, thanks

young knoll
#

pretty much

#

You have an x, y, z and a ton of noise values

#

And you pick the right biome based on that

pseudo hazel
#

I see

#

a lot of headaches then

#

thanks for pointing me in the right direction though

glass mauve
#

I am responsible of closing the InputStream of Plugin#getResource right?

ivory sleet
#

yea

worldly ingot
#

Yes but it might get automatically closed depending on where you use it. If you're calling YamlConfiguration#loadConfiguration() then it will close automatically

glass mauve
#

ok thanks

upper hazel
#

is it bad if I create many Model objects to store data for each section of the config?

#

the sections are just too diverse

#

this all specific buttons

#

in gui

echo basalt
#

Give an example

#

Also objects don't use nowhere near the amount of RAM you think they do

#

You'd need millions to use a few mb of ram

#

yikes non-standard item format

upper hazel
#

DATA for buttons

uncut folio
#

i'm trying to spawn lightning on a player upon sending a specific message but i keep getting this error when trying to send the message: "Caused by: java.lang.IllegalStateException: LightningStrikeEvent cannot be triggered asynchronously from another thread."
how do i fix it?
code:

public class ChatEvent implements Listener {
    public static HashMap<String, Boolean> wizards = new HashMap<>();
    @EventHandler
    public static void onPlayerChat(AsyncPlayerChatEvent event) {

        if (!isCustomItem(event.getPlayer().getInventory().getItemInMainHand())) return;
        if (event.getMessage().equalsIgnoreCase("i cast thunder")) {
            Player player = event.getPlayer();
            Location location = player.getLocation();
            World world = player.getWorld();
            ItemStack item = player.getInventory().getItemInMainHand();

            if (getItemId(item).equals("thunderstaff")) {
                world.strikeLightning(location);
                player.sendMessage("YOUR STAFF HAS BEEN GRANTED WITH POWER");
                wizards.put(player.getName(), true);
            }
        }
    }

}
echo basalt
#

mm that config is awful

echo basalt
#

Which means it's in another thread

upper hazel
echo basalt
#

You want to go back to the main thread

echo basalt
#

In another note, that's some hardcore static abuse

uncut folio
#

gotcha

echo basalt
#

And a Map<Whatever, Boolean> can be replaced with a Set<Whatever> and just use contains check

wraith apex
#

Bukkit has a rule about calling Bukkit api methods from a thread that is not the main thread

#

You can however use Bukkit scheduler to sync a call to the main thread

echo basalt
#

that's not what synchronized is for

#

you fool

quiet ice
echo basalt
#

tristate you mean

uncut folio
#

i honestly have no idea how threads work
i started like 4 days ago

#

i'll look it up

echo basalt
#

uhh

#

I have a very shitty guide

quiet ice
echo basalt
#

here

upper hazel
#

what better use map<item,slot> or object for save this

uncut folio
#

perfect

#

thanks!

wraith apex
#

there is the 'main' thread and then other worker threads

echo basalt
wraith apex
#

Async means asynchronous or in otherwords out-of-sync

quiet ice
wraith apex
#

useful for having 1 thread deal with something that's expensive or needs rapid polling while the main thread can handle other stuff

#

Chat is one event that's Async

#

because people can send messages at anytime

echo basalt
#

And has no need to pollute the main thread

#

It also works when the main thread is dying thumbsup

young knoll
#

Which is funny

echo basalt
#

yes

upper hazel
echo basalt
#

especially when idiots say "ooh don't talk in chat it makes the lag worse" skullWazowski

wraith apex
#

Async chat allows people to complain about lag while the server is lagging

#

:P

echo basalt
#

Pretty much

#

Like are you going to be messing with entities while processing a chat msg?

wraith apex
echo basalt
#

uhh

#

no

#
Bukkit.getScheduler().runTask(plugin, () -> {
  ...
});
wraith apex
#

I mean yeah does the same thing

#

ยฏ_(ใƒ„)_/ยฏ

echo basalt
#

but sometimes you want to use completablefutures and it's a pain

#

So there are like two ways of doing it

#

One's just making a sync(Runnable runnable) method

wraith apex
#

There are too many ways

#

lol

echo basalt
#

The other is just making a custom executor

echo basalt
wraith apex
#

been here a while, love and hate it

echo basalt
#

been here for like a decade

eternal oxide
#

or callSyncMethod. so many ways

uncut folio
upper hazel
#

or

young knoll
#

callSyncMethod is the new(ish) fancy one

wraith apex
echo basalt
#

ffs

#

premature optimization enthusiast

echo basalt
#

Like there's no need to worry about this

upper hazel
#

i mean this is same?

#

just i dont undestand why this exists if bukkit has same task metod

#

i was think this has better speed

#

but ok

young knoll
#

scheduleBlahBlah all return an int

wraith apex
#

the new method?

#

eh

young knoll
#

Where as runTaskblahblah return BukkitTask

echo basalt
#

I like the ones with a BukkitTask consumer

#

but return a void :(

eternal oxide
#

also runTask was added due to the confusing naming of sync/async

wraith apex
#

oh it returns a Future

young knoll
#

And then there is callSyncMethod witch returns a future

echo basalt
#

idk why I did this

wraith apex
#

BukkitClocks :p

ivory sleet
wraith apex
#

I think it is tbh

echo basalt
#

throwback to when I had a schedulebuilder class

wraith apex
#

The sync part confuses me though

young knoll
wraith apex
#

You call a sync method and wait for a response?

echo basalt
#
new ScheduleBuilder(plugin)
  .every(10).ticks()
  .run(() -> { ... });
  .async()
  .during(15).minutes()
  .start();
young knoll
#

Ah wait

#

Future is not CompletableFuture

wraith apex
#

yeah

#

you have to poll future

#

until you get the complete

young knoll
#

Still makes more sense at least

#

isDone vs isCancelled

wraith apex
#

But are you not just holding up the main thread?

#

waiting for the completed future

young knoll
#

Not if you call it from another thread?

wraith apex
#

I guess but why is it called callSync then

#

lol

#

doc says it will call a method on main thread

young knoll
#

sync basically means main thread in this case

#

Which isn't really how sync works but yeah

wraith apex
#

yeah that's why it's confusing me

young knoll
#

callMethodOnMainThread isn't as nice

#

:p

wraith apex
#

lol look at Note 1

#

can't even call Future.get() on main

young knoll
#

Wonder what happens if you do

#

Probably world war 3

lost matrix
#

Yeah if you try to call get on a tick before this method call is scheduled, then you got a clean deadlock

wraith apex
#

awesome

#

going to make a deadlock command

wraith apex
#

bro can't even make it past the first part ๐Ÿ’€

icy beacon
#

I wonder how far I can get if I do 5 attempts blindfolded

#

Not further than the fast wave def

wraith apex
icy beacon
#

That thing yes

#

A good fps gif??

wraith apex
#

ikr wtf

#

s m o o t h

echo basalt
#

1.5 seconds 2gb

lilac dagger
icy beacon
wraith apex
#

my mans never seen blood bath ๐Ÿ’€

#

deadlocked is easy in comparison to some of the user created demons

#

frame perfect movements :c

icy beacon
#

I don't know how this turned into a gd conversation but since this is happening I'll throw in the fact that I'm trying to jump from a medium demon to Acu and so far I've got 12k attempts + 0-30, 26-64, 63-100 + 45-84 + 41-81

#

Please wish me luck because the predrop is less consistent than my grades

#

I'll need it

wraith apex
#

godspeed lol

lilac dagger
#

I'm stuck here

wraith apex
#

oh boy

icy beacon
#

Everyone starts somewhere

echo basalt
#

think the last one I did was jumper

wraith apex
#

you have a long road ahead of you soldier

static notch
#

does any of you know how to make a spigot server?

ivory sleet
static notch
#

no one in it

#

nvm

lost matrix
icy beacon
lilac dagger
lilac dagger
#

What am i looking at?

icy beacon
#

Ok this is a perfect loop it's not that long actually

icy beacon
lilac dagger
#

Oof

lilac dagger
#

My brain can't do this

icy beacon
#

And well this is the hardest level verified so far (the gif above)

#

(should be the hardest when it's placed on the list)

echo basalt
#

think the only demon I beat was like masterquest or whatever the name was

icy beacon
#

Mastergame?

echo basalt
#

ye

small current
icy beacon
wraith apex
wraith apex
#

something like 27k attempts

icy beacon
#

Did you jump to it?

wraith apex
#

I mean some parts you can, some parts doesn't make sense to

icy beacon
#

I mean like what was your prev hardest?

small current
#

i feel like you get a mental issue playing geometry dash

icy beacon
#

Playing since 2015-2016, I can confirm

wraith apex
#

I got it around 2013/2014 i believe

#

when the game was pretty new

icy beacon
#

Damn you were early haha

#

I was 6 years old

wraith apex
#

yeah

icy beacon
#

When you got the game

wraith apex
#

college

small current
#

i played it since 1975

#

y'all kids

#

๐Ÿ”ฅ

wraith apex
small current
#

i was 84 at 1975 when i started playing it

wraith apex
#

You're either fake or your dead

wraith apex
#

there are some later gauntlets with only demons

valid burrow
#

Since when?!?!??!

wraith apex
#

since always

#

just cast to player

valid burrow
#

wtf is a humanentity anways

icy beacon
#

It's an interface actually but idgaf

#

But for some abstraction reason they are 2 different things

valid burrow
#

damn

remote swallow
#

its been like that since 14th of april 2013

wraith apex
#

HumanEntity is a Player or NPC

icy beacon
#

he did his research ๐Ÿ––

wraith apex
#

I guess by NPC they're referring to fake players?

remote swallow
#

yup

wraith apex
#

not sure why it can't just be player then

young knoll
#

It can be

valid burrow
young knoll
#

But internally it's a HumanEntity

wraith apex
#

fake player opening a gui?

young knoll
#

NMS provides us with HumanEntity so that is what we forward

#

However, these days we normally just convert it to player

remote swallow
#

ill forward you in a minute

wraith apex
#

Player p;

valid burrow
#

welp ig that all makes sense and stuff

#

still weird that ive apprently never used it in newer versions

young knoll
#

I think this is basically the only place it appears

valid burrow
#

yh im normally to lazy to make guis

wraith apex
#

ye

#

I've not seen it much anywhere else

#

I also don't get the use case for it

#

since it's very niche

#

and even making a npc requires NMS calls but they have support for it opening a GUI? you wouldn't even see the GUI though... ?

young knoll
#

It isn't useful

wraith apex
#

nope

young knoll
#

It's just how Mojang did it

wraith apex
#

to be fair I could just make my own InventoryInteractEvent that casts HumanEntity to player and pass it on

young knoll
#

I don't think spigot can change it sadly

#

Pretty sure that would break plugins?

remote swallow
#

its been like it is for too long

remote swallow
#

method sig would change

#

all we could do is deprecate and make new method

young knoll
#

Idk exactly how ABI works

remote swallow
#

why not

young knoll
#

Do you

remote swallow
#

i know changing the return type changes sig

#

more than you

wraith apex
#

Nah I just meant locally in my own plugins

#

not force spigot to change it (แต‡แต‰แถœแตƒแต˜หขแต‰ แต—สฐแต‰สธ สทแต’โฟแต—)

uncut folio
#

i got it working :D
now i have one last question

valid burrow
#

using a list inside of a list is possibly the most confusing thing i did this week

uncut folio
#

i'm trying to send a message to the player but it sends before the player's message is sent
is there a way to prevent that or do i manually have to delay that line?

remote swallow
#

delay it like 6 ticks

#

?scheduling

undone axleBOT
wraith apex
#

List<List<Map<List<ItemStack>,Set<KeK>>>> mess;

uncut folio
#

got it

wraith apex
#

tick is 50ms or 1/20th of a second

remote swallow
#

ye

#

it could be 1, but theres a chance it will send before

#

so 4 is good, 6 is better as it can account for some lag

wraith apex
#

why would lag cause a scheduled message to be sent earlier or later?

remote swallow
#

i saw it a few times with 1 tick delay, i could get like 200ping and then message sends before mine has

wraith apex
#

I meant on the server side

remote swallow
#

the lag i meant was users ping

wraith apex
#

but if your waiting for a players message, you could just wait for the message and then fire off something?

remote swallow
#

the event would early fire or something like that

#

i dont actually know why it would happen but it did

wraith apex
#

correct me if I'm wrong but it was my understanding that if the player sends a message and the server recieves it, the AsyncChatEvent fires regardless of how garbage or good your ping is?

remote swallow
#

the event fires before clients see the message

#

so if client ping lag or something is bad, the message you could send would fire before it sends even with a tick delay

wraith apex
#

I'm very confused, Player sends a message? I imagine talking in chat, Server recieves message and then sends a message back to the player

#

How does a server that's physically further away than the players client, manage to have a message arrive from it on the client before the client can print its own message?

echo basalt
#

Because the client doesn't print its own message?

wraith apex
#

oh fuck

#

yeah

#

my brain died

echo basalt
#

Client -> Server (Message: Joe Mama!)
Server fires event
Server -> All clients (Client1 said Joe Mama!)

wraith apex
#

and I'm guessing the AsyncChatEvent is the first stop it makes

#

before sending it to everyone else

echo basalt
#

Yep

wraith apex
#

aight makes more sense

#

I'd just delay by 1 tick

#

works for most things

remote swallow
#

not enough sometimes

#

theres the change it will send before the message

valid burrow
#

is there an event for stepping on a pressure plate?

eternal night
#

Interact event

remote swallow
#

action physical

#

Ass Pressure

wraith apex
#

It's time to get physical

torn shuttle
#

hey someone please sanity check me and tell me that the mc version for 1.20.2 is not, in fact, showing up as 1_20_R2 which was what 1.20.1 was showing up as

#

am I tripping here?

young knoll
#

Wasn't 1.20.1 R1

torn shuttle
#

uh

#

I remember it was a mess because 1.20 and 1.20.1 are the same but not using the same name but at the same time you can't download the mappings for 1.20 specifically

#

(because they're the same afaik between 1.20 and 1.20.1)

#

so I guess maybe I was wrong? Was it using R1 this whole time for 1.20.1?

young knoll
#

Maybe?

valid burrow
#

its prolly something stupid but when i enter a command that is registered in the main and in the plugin yml it just returns false

#

any idea why that might happen?

#

i dont.

#

it doesnt even execute the command executor

#

thats the thing

#

it just returns false

#

instantly

lost matrix
#

How do you check if it returns false and doesnt get called?

valid burrow
#

it sends in the usage from the plugin yml

#

wich usally happens when it returns false

#

which

young knoll
#

?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.