#help-archived

1 messages ยท Page 129 of 1

frigid ember
#

cant find retard channe

#

l

#

๐Ÿคทโ€โ™‚๏ธ

fossil shoal
#

@sturdy oar looking at the last picture you sent, this isn't how my multi module projects are set up, what I have is just MYPLUGIN-CORE and MYPLUGIN-SPIGOT in the root not under MYPLUGIN

sturdy oar
#

I just followed someone's else project structure because it's my first time using Maven modules

#

he was doing the same way as I

#

like a pom.xml in the main directory, and various modules where each has its own pom.xml

#

i do the same

fossil shoal
#

Yeah, that's what my structure ends up looking in git too, however in IDEA, the modules are at the root

sturdy oar
#

oh i know why

#

i usually use "Project" view

#

so i see the main folder as well

fossil shoal
#

Pretty sure I also use this, haven't ever touched it

sturdy oar
#

weird, i have no idea why this is not working btw, I had correctly setup an identical project with Gradle and was working

fossil shoal
#

Is the packaging in the parent pom set to "pom"?

sturdy oar
#

yes

gleaming helm
#

What the fuck is retrooper on about

fossil shoal
#

Probably high or smth

sturdy oar
#

๐Ÿคทโ€โ™‚๏ธ he always acts like a mentally damaged individual

gleaming helm
#

Yes I know

#

He's been hammering my DMs for like more than 3 months

sturdy oar
#

block

#

anyway i appreciate your effort to help

#

but i realize this is an issue of mine

#

and i should fix it myself since it's not entirely related to spigot

fossil shoal
#

No problem ๐Ÿ˜€

frigid ember
#

sk id der

sturdy oar
#

...

frigid ember
#

holy shit fendi ily

sturdy oar
#

what does "ily" mean

frigid ember
#

i love you

fossil shoal
#

Retrooper are you okay?

tiny dagger
#

what did he do now? ๐Ÿค”

fossil shoal
#

Sent weird messages

frigid ember
#

seems normal for retrooper

hardy cedar
#

guys

#

i need hewp

#

i have a .xml file

#

which doesn;t work in eclipse

#

so i wanted to add every jar

#

so i cant find alot

#

of those

#

i could add 1.8.8

#

idk about bungeecord api

#

or vaultapi

brave osprey
#

Hi i opened a new server and used eggwars new ownership plugin but idk how to create an arena

hardy cedar
#

can anybody help

#

?

brave osprey
#

Does someone know

frigid ember
#

Retrooper are you okay?
@fossil shoal no

hardy cedar
#

do /ew and test

frigid ember
#

dep ressed

hardy cedar
#

,_,

#

@frigid ember ur annoying lol

fossil shoal
#

dep ressed
@frigid ember talk to someone (irl obviously)

hoary parcel
#

@subtle blade, man, you so missing out on this

drowsy bronze
#

Do you guys know a way to get png of Banner from game item?

barren abyss
#

Hi, can't I just move a whitelist from a server to another?, isn't working

gleaming helm
#

Copy the whitelist.json file over

#

Or if you're using another whitelist plugin you'll need to copy that plugin's whitelist data over

kind berry
#

I need some help, so I'm trying to code a custom creeper that will attack a chicken but idk the pathfinder goal to make a creeper attack, like this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, 2.0D, true)); . So how would I do that?

hardy cedar
#

i cant import a xml file as maven bc idk how :{ {in eclipse}

sturdy oar
#

Are non-deterministic RegEx(es) prone to the use of more computing resources?

#

expecially with the introduction of lookaheads

gleaming helm
#

Yes

#

A lot of tasks don't actually require regex.

#

So try to use regex sparingly

#

And regex really doesn't have much of a performance impact on smaller text, so if you're just processing a chat message or something like that you'll be fine

tiny dagger
#

i don't think regex would be the best choice in a lot of cases imo

sturdy oar
#

Yeah i'm processing chat messages, so it will always be processing inputs of small size , although technically the chats packet allow for a maximum string length of 32767 characters

gleaming helm
#

You don't need regex for chat filtering

sturdy oar
#

Although this is not the "correct" way to measure resources usage, i've tried to print the nanoTime() at beginning and end of operation

#

it was basically insignificant

#

You don't need regex for chat filtering
@gleaming helm Well I wouldn't know how to do it properly otherwise

#

Looping through each character of the message doesn't seem like a simpler idea

gleaming helm
#

Regex is the simplest (decent) solution

#

But there's a good chance the regex you're using can be easily bypassed:

#

FU(K

sturdy oar
#

i'm aware

tiny dagger
#

there was a cool wait i remember to prevent those

#

F+U+C+K ๐Ÿ‘€

sturdy oar
#

but trying to over engineer regexes to "stop" bypasses

#

it's probably not worth it in my opinion

frigid ember
#

b> @frigid ember talk to someone (irl obviously)
@fossil shoal nobody itl

#

irl

sturdy oar
frigid ember
#

cor ona

sturdy oar
tiny dagger
#

das pretty good if it works ๐Ÿ‘€

#

i don't do regex myself to know what it means

gleaming helm
#

My chat filter is a little overengineered but that should work alright

#

Try making substitutions

sturdy oar
#

of course, stuff like commas bypass sadly

gleaming helm
#

There's a lot of stuff that bypasses mine

#

For example, fu ck will bypass it

#

But my strategy kinda allows for that, as my goal is not to aggressively filter everything, possibly filtering out real words, and rather just serve as a warning to players

sturdy oar
#

Do you do the "fake message" thing?

gleaming helm
#

Shadow filtering?

#

I can neither confirm nor deny

sturdy oar
#

no, the process where you make the user believe that they sent the message

#

but in reality, only they see it

gleaming helm
#

Yeah that's shadow filtering

sturdy oar
#

I never figured out how it's done lol

gleaming helm
#

You just format the chat message, substitute in the name and message, and then send it to the player

sturdy oar
#

probably cancelling event and sending a "fake" message to the user

#

oh ok

gleaming helm
#

Very simple, can be done in 2 lines

#
            e.getPlayer().sendMessage(formattedMessage);

            e.setCancelled(true);```
sturdy oar
#

ye i guess you gotta hook in into stuff like Vault

#

or EssentialsX for the chat format

gleaming helm
#

Oh lol I don't gotta hook anything

sturdy oar
#

what happens if other plugins handle the formatting?

gleaming helm
#

The benefits of running 40k lines of your own code

bold anchor
#

Depends on the plugin

#

Some just completely override setFormat

gleaming helm
#

I know, in my use case, the only code that's running on the server is spigot-related code and my code

knotty surge
#

we used a chat filter on my old server for a while, and eventually just thought "eh, who really cares" and threw it out

gleaming helm
#

We're targeting a younger audience so we kinda need a chat filter

knotty surge
#

aggressively filtering just takes way too much tweaking

gleaming helm
#

The best strategy is not to aggressively filter

sturdy oar
#

Yeah i don't think I'm doing it

#

thank you anyways for info

gleaming helm
#

np

knotty surge
#

If you want an alternative filtering method, look into filtering based on phonetics

#

it can actually work better than simple word for word filtering

sturdy oar
#

actually i was surprised when i read on Wiki.vg that a message can technically be 32767 chars long

#

like how is that even going to happen?

#

i don't think client even allows you to write that long

knotty surge
#

pretty sure the chat packet has a hard requirement on 255

gleaming helm
#

Nope

#

Not in new versions

knotty surge
#

for client -> server?

sturdy oar
gleaming helm
#

Oh you're right

#

256 serverbound

sturdy oar
#

oh

knotty surge
#

but yea server can spam the client

#

just not the other way around

gleaming helm
#

Clientbound it's way longer but the max message the client can send is 256 chars

sturdy oar
#

time to crash the clients with giant messages

gleaming helm
#

They just disconnect

frigid ember
#

server can write so damn fast

sturdy oar
#

yeah i've experienced that with particle packets flood

frigid ember
#

netty has a channel.isWritable() method

sturdy oar
#

??'

frigid ember
#

that servers can use on a client

gleaming helm
#

I had a few mishaps with my particle cosmetics module

#

lol

knotty surge
#

you can disconnect clients with a tiny message

#

just put a null component in a hover event

frigid ember
#

channel.disconnect();

sturdy oar
#

I was surprised that my client was handling correctly 50'000k particle packets being sent concurrently from server

frigid ember
#

with netty

gleaming helm
#

@frigid ember Or just kick them like a normal person

bold anchor
#

You can crash clients by sending incorrect packets, it is not hard, but is against the rules.

frigid ember
#

just call disconnect method on the client

knotty surge
#

the rules of what

frigid ember
#

im generalizing

sturdy oar
#

Spigot

frigid ember
#

not only about mc

sturdy oar
#

you'll get banned

#

if you make plugins that crash clients

gleaming helm
#

Retrooper what you're saying has no relevance to the conversation

frigid ember
#

ok

sturdy oar
#

Retrooper what you're saying has no relevance to the conversation
@gleaming helm like always

knotty surge
#

I mean anyone that uploads malware to spigot resources is just stupid

sturdy oar
#

Imagine uploading opensource malware

gleaming helm
#

LOL

knotty surge
#

though obf premium plugins are basically malware

sturdy oar
#

yeah i never obf my stuff

#

i like to be open source so everyone can see my stuff

frigid ember
#

open src premium

#

lmao

sturdy oar
#

i feel like everything that is not anticheats or highly security related software should be open source

tiny dagger
#

๐Ÿค”

gleaming helm
#

@knotty surge How do you explain obfuscated anticheats that are obf'd for the purpose of preventing bypasses

#

Or

#

Well

knotty surge
#

security by obscurity is not security at all

gleaming helm
#

I'm not saying it is

#

If you don't obfuscate your premium plugin it will get cracked and leaked in minutes

subtle blade
#

๐Ÿ‘ Obfuscation ๐Ÿ‘ does ๐Ÿ‘ not ๐Ÿ‘ prevent ๐Ÿ‘ code ๐Ÿ‘ readability ๐Ÿ‘

sturdy oar
#

choco...

tiny dagger
#

intel did it from 80' with their architecture ๐Ÿ‘€

knotty surge
#

that's why you just be a good boi and already have your source code available

gleaming helm
#

I think after seeing what my obfuscator does you'd disagree

knotty surge
#

and charge for support instead

subtle blade
#

If your obfuscator is good enough, we won't let you use it

#

lol

gleaming helm
#

I know

sturdy oar
#

now tell me

gleaming helm
#

That's not allowed on spigot

sturdy oar
#

this is on spigot...

#

i just downloaded it Kevin_

gleaming helm
#

What plugin IS that lol

knotty surge
#

wouldn't be that hard honestly

sturdy oar
#

Iris

#

anticheat

subtle blade
#

That is allowed. It's name obfuscation

gleaming helm
#

Also

#

It changes packages tho

#

??

subtle blade
#

Obnoxious? Yeah. Allowed though

tiny dagger
sturdy oar
#

and you haven't seen this

bold anchor
#

Only the main package/class is needed to be non obfuscated as far as i read.

knotty surge
#

though luckily where I review plugins we don't allow obfuscation except for minecraft internals

sturdy oar
#

crashing decompiler ๐Ÿคทโ€โ™‚๏ธ

subtle blade
#

That on the other hand, isn't allowed

#

lol

bold anchor
#

Your decompiler might just be trash smh.

sturdy oar
#

no

knotty surge
#

only using 1 decompiler

sturdy oar
#

luyten is not

#

JD-Gui doesnt even open it so whatever

knotty surge
#

fernflower?

#

procyon?

gleaming helm
#

CFR?

subtle blade
#

That's good because JD-Gui isn't good anyways

sturdy oar
#

let me try with a disassembler

subtle blade
knotty surge
#

yea JD is trash

bold anchor
#

I see, well go ahead and report it then.

gleaming helm
#

JD is trash

sturdy oar
#

I don't think i have to report it

#

i don't really care

gleaming helm
#

And yeah with some renaming that would be totally readable

sturdy oar
#

funkemunky and Fozzie always go strong on obfuscation

knotty surge
#

who

gleaming helm
#

That obf isn't even THAT crazy

#

I wrote a way nastier obf in 2 days

sturdy oar
#

is bytecode obf allowed?

#

there were some methods showing in bytecode

gleaming helm
#

Some decompilers do that even without obfuscation

sturdy oar
#

yeah it happened to my own opensource plugin lol

knotty surge
gleaming helm
#

Yeah lol

sturdy oar
#

what's that?

knotty surge
#

it would allow you to take a hash of their uploaded file and compare it with a hash of the one you build from source

#

if they're the same then you can just review source

sturdy oar
#

oh.. i don't do that either

knotty surge
#

nobody does

floral isle
#

Hi guys there's a method for create client side npc

gleaming helm
#

You have to send a spawn entity packet

sturdy oar
#

yes

#

you have to use NMS ๐Ÿคทโ€โ™‚๏ธ

#

Spawning? pretty easy

#

moving it around? glhf

gleaming helm
#

^ lol

sturdy oar
#

let me find a snippet for how i did spawn

floral isle
#

Yes but there's a n example of npc

sturdy oar
#

it's Kotlin but whatever

tiny dagger
#

kotlinn

hoary parcel
#

@gleaming helm, since you talked about server authoritative movement too, islandscout did a nice write up, I just passed that on to helen, she will make sure that reaches the java dev team. she also mentioned, that bedrock is moving towards such a model for movement in betas

gleaming helm
#

Wait so bedrock getting authoritative server?

sturdy oar
#

woah

floral isle
#

Ok THX Is for a very big project

gleaming helm
#

aw MAN I want bedrock

hoary parcel
#

apparently?

gleaming helm
#

That's awesome

hoary parcel
#

she doesnt know for sure, she just said she know that somebody at the bedrock team is working on something that sounds similar to this

gleaming helm
#

ah

#

Well if that happens

#

That definitely bodes very well for Java edition

hoary parcel
#

told ya they care ๐Ÿ™‚

gleaming helm
#

Well I knew they cared but I didn't know they cared THAT much

#

That's awesome

#

Very excited to see if this actually ends up happening on java edition

hoary parcel
#

well, stuff like this will take time

#

I would be surprised if that hits 1.17, since I know what else will be part of 1.17

gleaming helm
#

Yeah I'd be surprised if it hits 1.17 too, but with any luck it's in at 1.19

steady cedar
#

@hoary parcel I mean I'd take promises from Mojang with a grain of salt, didn't dinnerbone talk about a modding api like many many years ago too?

hoary parcel
#

who made a promise?

#

lol

steady cedar
#

misread haha sorry

hoary parcel
#

this isnt more than an idea I passed on

steady cedar
#

yup, re-read it

hoary parcel
#

and modding api is happening, with every release we get better apis

steady cedar
#

wait fr?

hoary parcel
#

its just that you dont see them

#

because spigots mappings are meh

steady cedar
#

oh right didn't they say starting with 1.15 they'd publish mappings?

hoary parcel
#

*1.14.4

#

ye

steady cedar
#

pog

hoary parcel
#

but those have a big scary legal disclaimer

#

which he currently working with mojang to get rid of

#

or get fixed

pastel fox
#

When should I be saving config?

#

Every time it's changed?

#

When the server does /save-all?

#

What's the best practice?

bold anchor
#

Depends

frigid ember
#

depends
depends
preferably not
minemen (except dewgs is stupid)

bold anchor
#

Like, a save on change will be fine with smaller changes

cerulean musk
#

guys who can help me tags are moving

pastel fox
#

Is the FileConfiguration returned by JavaPlugin#getConfig guaranteed to be the same instance between reloads? How about ConfigurationSection?

subtle blade
#

No

#

Every time JavaPlugin#reloadConfig() is called, a new FileConfiguration is created

#

You should not hold reference to a FileConfiguration and expect its values to update post-reload

pastel fox
#

Ty

rapid yacht
#

Hey, I'm looking to recode a discontinued plugin on spigot, how would I transfer the code from github to my IntelliJ?

subtle blade
#

Fork the project so you have your own repository with an upstream and clone your fork

#

Once cloned, import using your IDE depending on the project build system. If it's maven, import with maven, etc.

rapid yacht
#

ty

#

ok and lemme get this straight, in order to change the version of a plugin, you just change the pom.xml?

#

or is there anything else

arctic parcel
#

change the .jar file

#

to the latest version

rapid yacht
#

ohh right

subtle blade
#

The version of a plugin is dictated by the plugin.yml

summer terrace
#

also remember to use semantic versioning :) big help to everyone

subtle blade
#

If the resource uses Maven and filters through the resources directory (including the plugin.yml), it's possible that the version is dictated by the pom.xml already

rapid yacht
#

am I allowed to recode someones plugin without the original authors consent?

#

It's a free plugin

frigid ember
#

Anyone know whats going on here? I have a Villager entity that I want to be invulnerable ( cannot be damaged/killed ). I do that with this:

gateKeeperVillager.setInvulnerable(true);

Yet, the villager can still be killed.

#

There are no exceptions in the logs

subtle blade
#

Depends entirely on the license, Blitz

#

Though if it's open sourced, it's very likely they're using GPLv3 or MIT. I advise reading the LICENSE file

sturdy oar
#

Usually yes

frigid ember
#

@subtle blade Sorry to single you out, you know whats going on with the above?

#

Any bugs you're aware of?

subtle blade
#

(not word by word, but at least know what license it is lol - GitHub tells you if it's a common one)

#

You're certain that line is being called?

frigid ember
#

Yes I am certain

rapid yacht
#

Alright, so what does forking a project do exactly?

#

just give me the code?

frigid ember
#

@rapid yacht Makes it so other devs can work independently of the main branch

subtle blade
#

Lets you commit to the repository without modifying the original one

#

It's basically a copy

frigid ember
#

^

rapid yacht
#

ok good to know

frigid ember
#

Don

sturdy oar
#

Some licenses require you to document all changes

frigid ember
#

@subtle blade The following code is run together. Everything else on the entity works fine:

        gateKeeperVillager = (Villager) Bukkit.getWorld(Statics.worldName).spawnEntity(location, EntityType.VILLAGER);
        gateKeeperVillager.setCustomName(ChatColor.BOLD.toString() + ChatColor.DARK_AQUA.toString()
                + Utilities.capitalizeFirstLetter(capturable.getCapturableName()) + " GateKeeper");
        gateKeeperVillager.setCustomNameVisible(true);
        gateKeeperVillager.setInvulnerable(true);
        gateKeeperVillager.setAdult();
        gateKeeperVillager.setAI(false);
        gateKeeperVillager.setBreed(false);
        gateKeeperVillager.setCollidable(true);
        gateKeeperVillager.setSilent(true);
        gateKeeperVillager.setProfession(Profession.WEAPONSMITH);
        gateKeeperVillager.setVillagerType(Type.PLAINS);
        
        if (capturable.getClass() == Nation.class) {
            Nation nation = (Nation) capturable;
            gateKeeperVillager.setCustomName(nation.getChatColor().toString() + "GateKeeper");
            return;
        }
        
        gateKeeperVillager.setCustomName("GateKeeper");```
rapid yacht
#

That might be a little annoying...

subtle blade
#

Often times GitHub commit history will suffice, Fendi

rapid yacht
#

hopefully he dosen't care who does what

subtle blade
#

Changes are public and explorable on demand

sturdy oar
#

๐Ÿคทโ€โ™‚๏ธ I don't know I've just read AGPL

#

It's the only license I've actually read

#

I think it's probably the best out there

rapid yacht
#

I guess we'll just have to see

#

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

#

choco u said clone ur fork

#

do I put it in a zip or what

#

it's giving me a bunch of options

#

nvm

frigid ember
#

@rapid yacht Just clone it to your local repo

sturdy oar
#

Is it on GitHub ?

#

I wouldn't really call it "forking" if the author didn't put open source code anywhere

rapid yacht
#

Maklegend I got it

#

I ended up with a zip file of the plugin

#

so far so good (I think)

subtle blade
#

Clone using git preferably

#

You should pull the repository to your local system

edgy sail
#

Choco I fork your premium plugin and make my own version. No worries I renaming everything

bold anchor
#

If he has it public i think you would be just fine forking it?

frigid ember
#

Is there any plugin for when someone reports a play for cheating/exploits it will send to my discord Server and do it come with the bot link

#

Rephrase?

tiny pebble
#

is there any sort of way to make a world wait a specific amount of ticks before doing something

#

word .wait() work and is that in seconds or ticks? i just came across it with world, meaning i have world.wait().

gleaming helm
#

wait is a function defined by the Object class.

#

Used in concurrency

#

Don't touch unless you absolutely know what the fuck you're doing

#

(And if you're asking in game ticks, you don't)

subtle blade
#

what is it you're trying to do with making the world wait before processing anything?

#

That just sounds like a seriously bad idea

gleaming helm
#

You can also touch .wait() if you want to see your console do some fireworks

#

I don't recommend it though

frigid ember
#

Is there any plugin for when someone reports a play for cheating/exploits it will send to my discord Server and do it come with the bot link

tiny pebble
#

so the verdict is: i most likely worded it wrong

i basically want...

do something
wait x amount of seconds
do it again
wait x amount of seconds
etc...

probably some basic java stuff but idk, was thinking bout doing it through ticks but that was probably just a brainfart ig

subtle blade
#

Then you'll want to look into Bukkit's scheduler and task timers

tiny pebble
#

thank you

subtle blade
#

(or use one of the Consumer<BukkitTask> overloads in the scheduler)

#

Bukkit#getScheduler() btw

tiny pebble
#

alright, thank you so much!

subtle blade
#

o/

gleaming helm
#

you're quick on the jd links lol

subtle blade
#

I usually have them pre-typed into my browser's search bar so writing, for instance, "scheduler spigot" prompts me with the javadocs. Right arrow, Ctrl + A and Ctrl + C

pastel fox
#

Should event handlers always be public?

gleaming helm
#

Yeah

subtle blade
#

I don't think they can be private

#

Honestly think they should be, but last I recall, Bukkit was not designed around the privatization of listeners for some reason

#

It's not like they should be called by a plugin for any reason

gleaming helm
#

They can't

#

After reading the source code (trying to fix a bug with some events randomly not being fired when cancelled, even though ignorecancelled is false... weird.)

#

I can confirm that it only works with public access

#

@subtle blade Otherwise it would have to make a call to reflection to allow access to a private method, which imo is kinda dumb for something that, by all programming best practices, should be public anyways.

subtle blade
#

They're reflectively accessed anyways

#

๐Ÿ˜›

#

It was likely not done for the sake of performance though

#

There's the possibility that an event listener can be called upwards of 20 times every second so I can't imagine that's all too great setting it accessible each time

bright forge
#

Will this work for older servers?

subtle blade
#

Deprecated and out of date. See the deprecation notice

#

That one was present in 1.13, was replaced in 1.14

bright forge
#

Oh im looking for a solution for a 1.8 server

#

Crates plugin for 1.8-1.15

subtle blade
#

Gotta work with NMS and NBT on your own

bright forge
#

ok thx

gleaming helm
#

Or you just become a normal person and cache your NMS methods

subtle blade
#

Or, rather, become and even MORE normal person and use the latest and greatest APIs

#

The persistent data api is awesome

#

Made use of it last night and today, had a few custom data types. Feels great being able to just say "Yeah, get my custom object from this item stack ktnx" in just 1 method call

brave vector
gleaming helm
#

@subtle blade I built a lib for my project probably about 3-4K lines or so to manage custom items on top of the persistent data api. That thing rocks.

velvet halo
#

I am using it right now!

#
NamespacedKey namespacedKey = new NamespacedKey(archaeology, "Artifact");
PersistentDataContainer container = itemMeta.getPersistentDataContainer();

if (container.has(namespacedKey, PersistentDataType.DOUBLE)) {
  Double aDouble = container.get(namespacedKey, PersistentDataType.DOUBLE);
}
``` Working on an archaeology plugin atm.
gleaming helm
#

I'd send an ss of mine but NDAs are a thing lol

velvet halo
#

Yeah don't send it xD

gleaming helm
#

Not tryna get sued lmfao

tawdry blaze
#

bruh

#

yea

#

same lmao

frigid ember
#

wow nda bad

tawdry blaze
#

api is amazing

#

for implementing

#

custom items

velvet halo
#

Wait is the api publicly available?

gleaming helm
#

Oh yeah yeah

#

Just

#

PersistentDataContainer

#

Check it out in the javadocs

#

It's awesome

velvet halo
#

Oh I thought you were talking about your library

tawdry blaze
#

ye u can do ItemMeta#getPersistentDataContainer()

#

and its on blocks

#

like furnace and chests

velvet halo
#

Yeah I am coding with persistent data containers right as we speak

gleaming helm
#

Oh I'm still using the tile entity NMS for my custom blocks but

velvet halo
#

Ah okei

gleaming helm
#

That's also because I'm doing the big fancy on custom blocks

velvet halo
#

Makes sense

#

Also I remember having to do multithreading while creating mandelbrots

gleaming helm
#

Mine are... more... complicated than most.

#

haha

velvet halo
#

For one of my papers

#

It was in c++ also

gleaming helm
#

C++ threading sucks lol

velvet halo
#

It isn't too bad tbh

gleaming helm
#

GPU or bust

velvet halo
#

bust

gleaming helm
#

GPU acceleration works really really well on fractals

velvet halo
#

I want todo compute chaders

#

Yeah I know

tawdry blaze
#

haha

velvet halo
#

We didn't get taught it tho

tawdry blaze
#

try implementing a Vulkan engine

#

in c++

#

headaches for days

velvet halo
#

We did OpenGL unfortunately

#

Still a headache tho

tawdry blaze
#

yea i was working in unity for a bit

#

but I hate unity's structure

#

so i was like let me write my own engine

#

and then I was like fuck OpenGL

velvet halo
#

hehe

tawdry blaze
#

it took like 1400 lines

#

just to get a triangle rendered

#

without any textures

velvet halo
#

How far did you get into writing your own engine?

gleaming helm
#

Once you render a triangle though you can do anything

tawdry blaze
#

ye

#

eh I do it in my free time

#

which lately I dont have a lot of

velvet halo
#

Honestly if you don't like unity try unreal or godot.

tawdry blaze
#

I mean unity is fine it just forces you into a certain workflow

gleaming helm
#

My favorite free time project is working on an active-controlled TVC model rocket

tawdry blaze
#

and it just wasn't optimal

gleaming helm
#

That shit is cool

tawdry blaze
#

WAIT HAHA

gleaming helm
#

And also ITAR

frigid ember
#

whats the best way to get someones distance from a player? (which wont go above 3 unless you know)

tawdry blaze
#

Location#distance(Location)

#

returns a double

gleaming helm
#

If you're trying to make a reach check

velvet halo
#

Well Unity is trying for a more data driven design approach. The Entity Component System is becoming very powerful.

gleaming helm
#

Don't think that location.distance is going to work

frigid ember
#

yea no lol

#

because it counts x + z

velvet halo
#

I did a research paper on it.

frigid ember
#

so like i can get up to 5

tawdry blaze
#

yea i need to look into the new ecs

gleaming helm
#

That's not how the math works either but

#

ok

tawdry blaze
#

writing your own ecs is kind of annoying

frigid ember
#

math works?

#

lmfao my bad x - z

gleaming helm
#

For reach

#

No

#

lol

tawdry blaze
#

what

frigid ember
#

ok then teach me math

gleaming helm
#

Uhhh well

velvet halo
#

Unity's ECS has a large overhead which is annoying. Also the rendering hasn't really been optimized. "Apparently" it will get updated in the 2020 version

gleaming helm
#

The client does a raytrace from the head position to the edge of the hitbox where you're looking

#

And will only attack if that distance is less than 3

velvet halo
#

raycast?

gleaming helm
#

Yeah whatever you wanna call it

velvet halo
#

๐Ÿ˜›

tawdry blaze
#

I mean you gotta adjust for tps as well

gleaming helm
#

Not TPS, but you have to adjust for latency

tawdry blaze
#

^^

frigid ember
#

yea lol

tawdry blaze
#

what uwanna know then?

frigid ember
#

just more on how to get the distance the best...

gleaming helm
#

If you want the distance between the center of the hitbox of entity a and the center of the hitbox of entity b (or any corresponding point), then the only math to do it is the math performed by location.distance

#

There's only one distance.

#

Pick 2 points, then pythagorean theorem

frigid ember
#

but that would give a higher result then 3

pastel fox
#

Unity's ECS has a large overhead which is annoying. Also the rendering hasn't really been optimized. "Apparently" it will get updated in the 2020 version
@velvet halo Oh yeah, Unity is only good for certain types of games Imo

gleaming helm
#

@frigid ember Are you trying to make a reach check for an anticheat?

pastel fox
#

You could never make Minecraft in Unity for example

velvet halo
#

Yeah I wouldn't recommend.

frigid ember
#

yea lol i have made a couple which will false because i cant just get the right distance.

gleaming helm
#

Yeah you can't do it like that

velvet halo
#

I have been working on a RTS in Unity and it is a pain in the ass.

gleaming helm
#

I'm not going to tell you how to do it accurately but

#

There are some tricks you need

#

Don't start with a super high accuracy 3.1 reach check

#

My 3.1 reach check is 300 lines of code (not including the libs it shares from other checks)

tawdry blaze
#

or just be lazy

#

and build an ML model

frigid ember
#

yea, but i dont really understand combat checks

#

i got like all Speed checks

gleaming helm
#

๐Ÿ˜ I swear to fucking god if one more person says "ML model"

frigid ember
#

tested noting really bypasses

tawdry blaze
#

:^)))))))

gleaming helm
#

I bet I can bypass

frigid ember
#

yea ok

#

dm me

#

lets see

tawdry blaze
#

oh boy

gleaming helm
#

nah because you'll just patch it lmfao

frigid ember
#

no lol, because you wouldnt be able to

#

i have tested it with most clients, and noting tends to bypass

gleaming helm
#

Which clients

frigid ember
#

mostly all the paid ones

kind berry
#

Hi I have been asking for help with this for sometime now, but to no avail, anyway so I'm trying to make a custom creeper mob that blows up chickens (lol) but idk the pathfinder goal to make creepers attack something I tried melee attack but that didn't work so idk (if it even is a pathfinder goal)

frigid ember
#

For some reason, I can't get data from my HashMap (line 25) after adding it to the HashMap. It just returns null. I've already confirmed that the HashMap put (on line 141) is working, but during the unload method, I'm unable to get the data from the HashMap without it returning null (lines 151-154).
Code: https://hastebin.com/hojalikoqa.java
PlayerData class: https://hastebin.com/ayequsavut.java

gleaming helm
#

Just to confirm here

#

Are you getting a NPE on line 151?

#

Also, your get for the all case always returns airMask

frigid ember
#

Yeah, getting an NPE on line 151

#

The key does exist though

gleaming helm
#

well... no it doesnt

rotund orbit
#

Is it possible to track when individual food items are crafted, harvested, caught or cooked? I'm thinking of making a plugin that makes food go bad.

gleaming helm
#

If you're getting an NPE on 151, it's because the entry is no longer in the map

#

Make sure you're not creating a second data manager object or something like that

rotund orbit
#

I did that with chunks for the concept of claimed chunks by factions. Is that bad to do? :P make a wrapper class for minecraft objects?

gleaming helm
#

It is possible. What I would consider doing is putting an NBT tag on the food items when they're first created to set the expiry time

rotund orbit
#

What's an NBT tag?

gleaming helm
#

An NBT tag is how you would store custom data inside of itemstacks

#

It's the base unit of persistent storage across the entire minecraft game

rotund orbit
#

Interesting

gleaming helm
#

If your plugin is only targeting 1.15 (and maybe 1.14, not sure) you can use PersistentDataContainer

#

Otherwise you'll need to use NMS

frigid ember
#

Looks like that was it! I was doing DataHandler data = new DataHandler(); and that was the problem

#

Thanks for the help!

gleaming helm
#

np

pastel fox
#

This isn't Spigot- but best place I can think to ask

#

I'm trying to do this in Java
curl -H "Content-Type: text/html; charset=UTF-8" -X POST --data "Some test data" https://api.cl1p.net/uqzskrriefufr

#

My code is

private void webPOST(String address, String body) throws IOException {
        String encodedData = URLEncoder.encode( body, "UTF-8" );
        URL u = new URL(address);
        HttpURLConnection conn = (HttpURLConnection) u.openConnection();
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        conn.setRequestProperty( "Content-Type", "text/html; charset=UTF-8" );
        conn.setRequestProperty( "Content-Length", String.valueOf(encodedData.length()));
        OutputStream os = conn.getOutputStream();
        os.write(encodedData.getBytes());
    }```
#

No exceptions are thrown but the upload fails

keen compass
#

page loaded fine for me o.O

#

or at least appears to have done so

pastel fox
#

Yeah but there's no text there ;-;

#

The string I pass is definitely not ""

gleaming helm
#

Print your HTTP request. Does the curl command work?

pastel fox
#

Curl command works

#

Do you mean print it in Java?

gleaming helm
#

Yeah

#

Print out the request youโ€™re making and make sure it matches what you see with curlโ€™s -v flag

#

Also.... close your goddamn connections, youโ€™re going to leak like mad

pastel fox
#

Oh will close it ty

#

I copied it off SO smh

gleaming helm
#

Also... look at their api spec.

All posted cl1ps are destroyed as soon as they are viewed. Either via api, or the webapp
If a cl1p is already in use it can't be written to.

#

Specifically that last part

pastel fox
#

Yeah I did

#

With the curl I can view it once after

#

So unless Spigot visits the URL before me I don't think that's the issue :p

gleaming helm
#

And are you generating a new random sequence of characters for each request?

#

Also use hastebin, itโ€™s probably better for what youโ€™re trying to do

#

Has a much better designed API that generates the ID for you

keen compass
#

would also probably help in these scenarios if you used some additional network tools to catch more info

#

specifically so you can see what exactly is being sent and received like headers and content. Might not be what you are expecting it to be.

gleaming helm
#

Well thatโ€™s not always possible. Itโ€™s intentionally impossible to mitm my test network for example.

#

But thatโ€™s what I meant when I said to print out the request

pastel fox
#

Ah, I haven't done much raw network stuff with Java so I've never used any tools or anything

gleaming helm
#

Letโ€™s be clear here this really isnโ€™t โ€œraw network stuffโ€

#

But I see what you mean

#

Thereโ€™s a ton thatโ€™s abstracted away here

pastel fox
#

I mean true :p

#

It's not like I'm implementing tcp lol

gleaming helm
#

lol

#

And trust me, you donโ€™t want to implement TCP.

pastel fox
#

Agreed

gleaming helm
#

Definitely not in java

pastel fox
#

Agreed

gleaming helm
#

Iโ€™ll take my low level in C please

pastel fox
#

I'm happy to let other people do stuff in C

#

And I can just use their APIs :)

gleaming helm
#

Haha

pastel fox
#

Ngl

#

I wish MC server was written in JS or something nice

gleaming helm
#

(I do software development for a semiconductor company, so you can probably imagine I do a fair bit of C)

#

JS is NOT nice lol

pastel fox
#

Oh sweet

#

I just graduated and starting a grad scheme in like 2 months

#

m8 js is lovely

gleaming helm
#

Nahhhh

#

Nahhh nahhh bonobo

pastel fox
#

In Java you have to use libraries to print objects

#

or like, implement toString on everything

gleaming helm
#

In JavaScript, typeof [] isnโ€™t array.

#

๐Ÿ˜

pastel fox
#

True

#

I remember when I first started JS I hated it

#

And it made me rage

#

but now that I'm familiar with it, incl. some of the spec it's nice

gleaming helm
#

Js makes no fucking sense

pastel fox
#

Makes perfect sense if you understand it

gleaming helm
#

And all the attempts to add strict typing on top of it are laughable at best

pastel fox
#

Oh yeah

#

I wish there was actual static typing sometimes

keen compass
#

the only thing in your code that posted that I could see probably screwing it up, is the encoding part at the start. Otherwise if you still can't get it to work I would recommend what Kevin said and use hastebin. Best part with hastebin is you can also self host a personal hastebin as well.

pastel fox
#

but the trade-off is understandable

#

Ty will look at it

#

Also, the -v flag doesn't print the post body?

#
> Host: api.cl1p.net
> User-Agent: curl/7.58.0
> Accept: */*
> Content-Type: text/html; charset=UTF-8
> Content-Length: 14
> 
* upload completely sent off: 14 out of 14 bytes
< HTTP/1.1 201 
< Content-Type: text
< Date: Tue, 16 Jun 2020 04:21:44 GMT
< Server: Apache/2.4.43 (Amazon) OpenSSL/1.0.2k-fips
< Content-Length: 0
< Connection: keep-alive
gleaming helm
#

Content length 0

#

Sorry bud youโ€™ve got no post body

pastel fox
#

That's the response I think

gleaming helm
#

Oh oh youโ€™re right lol

pastel fox
#

That's from curl which works

#

:p

keen compass
#

I need to be faster it seems. Kevin is quick on this tonight ๐Ÿ˜›

#

well it says it created it

gleaming helm
#

Yeah so after that Iโ€™d expect to see a double new line followed by 14 bytes of data

keen compass
#

since it is replying with 201

gleaming helm
#

Which is what happens seeing as the creation works, and presumably the paste has 14 bytes in it

pastel fox
#

I'll try without any encoding lol

gleaming helm
#

Can you just print out the request headers and body?

pastel fox
#

Ngl I have no clue how

#

Search time I guess

gleaming helm
#

Also you call os.write but that does not necessarily guarantee that the stream is flushed.

#

Oh wait

#

Wait a minute

pastel fox
#

Oh I added .flush and .end after

gleaming helm
#

You never actually send the fucking request

pastel fox
#

wot wot

gleaming helm
#

LOL

pastel fox
#

Jesus how is this on SO still?!?!

gleaming helm
#

You initialize the whole thing but you never send it

#

Call getResponseCode

keen compass
#

Lol can't believe I missed that

pastel fox
#

Omg

#

Wow

gleaming helm
#

LOL

keen compass
#

also the other thing I was going to point out, that site uses an outdated version of openssl XD

pastel fox
#

Thanks :)

gleaming helm
#

Thatโ€™s the dumbest thing Iโ€™ve probably seen all day

#

And itโ€™s not your fault letโ€™s be clear

#

This happens daily for me

pastel fox
#

Also @zenith palm I just got a warning for typing omg twice, can you please remove the warning?

gleaming helm
#

I do some shit like this

#

I have like 10 I think youโ€™re fine

pastel fox
#

Oh yeah Ik, everyone gets stuff like this

#

Also it's 5:39 AM and I didn't sleep

#

so I'm surprised at how good the rest of my code is

keen compass
#

I always hate it when its the very slightest simple thing

#

that throws everything off

pastel fox
#

lol

gleaming helm
#

Iโ€™ve been pushing hard to get an initial release out for like a week now

#

Hopefully like 3 weeks maybe if Iโ€™m lucky? F in chat

pastel fox
#

Nice what you working on?

#

I'm making an adventure map server. Just made a whole interpreted scripting language for Bukkit

gleaming helm
#

A fully custom 1.15 server

pastel fox
#

Oh damn

#

What for?

gleaming helm
#

Up to 40k lines now

pastel fox
#

Language?

keen compass
#

Well, unfortunately. When it comes to needing performance etc, have to go with custom

gleaming helm
#

For a few friends of mine, itโ€™s a skyblock type of gamemode, with some very large differences

#

On the order of hypixel skyblock

pastel fox
#

Ah

#

I mean, unless you have some Hypixel sized server performance isn't that important Imo

#

Thanks for the help guys!

gleaming helm
#

Np

#

Actually the system is designed to scale to 2000 players without code changes

#

Havenโ€™t load tested to that amount but should work fine

#

โ€œShouldโ€

pastel fox
#

Ah very nice

gleaming helm
#

And if youโ€™re wondering how, the answer is magic

pastel fox
#

I wonder how much stuff people make that goes unreleased

#

I've made several things for sure

gleaming helm
#

A lot of stuff

#

Iโ€™ve got like 10 projects 70% done

pastel fox
#

Trying to make stuff that I can release atm so even if I don't use it someone else might

#

Yeah same

#

Out of motivation?

gleaming helm
#

Yeah partially that and partially other people involved

#

Good thing about this project is Iโ€™m a solo dev so I pretty much only have to rely on 1. Myself, and 2. The speed at which docs get written for features

pastel fox
#

Lmk if you want to work on something with someone

#

For me at least it helps with motivation

rapid yacht
#

I see some errors when looking into the code of an old 1.7 plugin, I see getName() but it shows an error (I'm updating to 1.12.2) Is there something I shoudl rename it?

gleaming helm
#

Paste the whole line

#

That works too

rapid yacht
#

lol

gleaming helm
#

What is econ?

#

Like how is it defined?

#

Is it a plugin?

velvet halo
#

He is trying to use the Vault API

gleaming helm
#

If itโ€™s a plugin, use getDescription().getName()

keen compass
#

looks like it depends on vault

rapid yacht
#

here

gleaming helm
#

Ok yโ€™all overrule me I know nothing about vault

rapid yacht
#

one sec

velvet halo
#

Just do "Hooked into vault"...

keen compass
#

Just look at the updated vault api stuff

rapid yacht
#

you can see the economy stuff

#

at the top area

gleaming helm
#

Nnnnope no idea, sorry

velvet halo
#

I don't see why you would need a getter

rapid yacht
#

dude

#

not my code

keen compass
#

Kevin is actually correct

rapid yacht
#

like I said I'm redoing it

gleaming helm
#

Oh shit I was right?

keen compass
#

not that I said anything otherwise

gleaming helm
#

Haha Iโ€™m a fucking genius

keen compass
rapid yacht
#

oh yeah I was just gonna ask that

#

wtf is milkbowl

keen compass
#

the Author

gleaming helm
#

Milk bowl is the author of vault

rapid yacht
#

weird name

velvet halo
#

What a genius

#

Kevin

rapid yacht
#

I guess I can't be talking though

velvet halo
#

ur right again

#

He is an Author

rapid yacht
#

ok so kevin

#

what did u say?

keen compass
#

If itโ€™s a plugin, use getDescription().getName()

velvet halo
#

Do you guys pour milk first or the cereal?

keen compass
#

the github page I linked also states how to set up Vault too

rapid yacht
keen compass
#

and basically says the same thing lol

rapid yacht
#

still red

#

also

velvet halo
#

That is because Economy isn't derived from plugin

#

Economy is it's own interface

gleaming helm
#

Oh hereโ€™s the issue

#

You donโ€™t have vault set up as a dependency

#

If youโ€™re using maven, paste the dependency from vaultโ€™s github

#

If youโ€™re using gradle do the same

#

If youโ€™re not using either then I have no idea how to do it, but either way, add the jar to your build path just as you added the bukkit api to your build path

rapid yacht
#

where do I check for mavin

#

usually theres a little box on my right when I use maven but I don't see it

keen compass
#

if the project has a pom.xml it is using maven

#

and that file is where you add the dependencies

rapid yacht
#

it's Houses.xml

gleaming helm
#

What.

rapid yacht
keen compass
#

If I were you I would just convert it to either a maven or gradle project

#

not that difficult to do

rapid yacht
#

oh

gleaming helm
#

Oh no no thatโ€™s iml

rapid yacht
#

that iml

#

LOL

#

I don't see an xml tho

gleaming helm
#

Yeah Iโ€™d convert the project to maven

rapid yacht
#

Keep in mind this was made in 1.7

gleaming helm
#

Maven existed a decade before 1.7 but ok

rapid yacht
#

seriously?

keen compass
#

doesn't matter when it was made, going to take some work regardless. But has no bearing on whether it can be a maven or not

gleaming helm
#

Eh idk the exact date but it definitely existed

rapid yacht
#

alright

keen compass
#

and yes Kevin again is correct on that.

rapid yacht
#

how do I convert?

keen compass
#

Minecraft just increased its popularity though I would have to say XD

gleaming helm
#

I canโ€™t share my pom.xml because I have an NDA, but there are plenty of examples Iโ€™ll try to find one

keen compass
#

where it brought it out to be more mainstream

velvet halo
#

I can send you my pom.xml

#

?paste

worldly heathBOT
velvet halo
keen compass
#

Just create a maven project, toss the source code and anything else into their relevant directories

rapid yacht
#

kevin

gleaming helm
#

Wait you donโ€™t have a build config @velvet halo

rapid yacht
#

what do I do with what u just pasted

velvet halo
#

nope

gleaming helm
#

Make a maven project

rapid yacht
#

???

gleaming helm
#

And paste that in to the pom.xml file

keen compass
#

don't need the build tags if you don't need to modify anything

rapid yacht
#

sounds like some spell

#

oh

#

project

gleaming helm
#

Project sorry phone and fat fingers

rapid yacht
#

lmao

#

ok so just make a brand new project?

velvet halo
#

That would be your best option tbh

rapid yacht
#

then what

velvet halo
#

Well the least annoying

gleaming helm
#

Yes, make a new maven project in your IDE, and just copy and paste all of the code files over

keen compass
#

by far the easiest way since the IDE generally sets up the structure and files for you. But you can do it manually too

gleaming helm
#

Iโ€™d not recommend a beginner to do it manually

keen compass
#

I agree

rapid yacht
#

welp

#

im a beginner

gleaming helm
#

Also you should probably use the other pom.xml file that was posted

#

It already has vault as a dependency all set up

rapid yacht
#

so do I have to copy everything word for word?

#

in the new project?

gleaming helm
#

Can just copy and paste the file structure of the src folder

velvet halo
#

No you just need the repositories and the dependencies from the pom.xml Kevin sent

rapid yacht
#

or can I change it to like me.remence.houses or something

#

ohhh

#

so I'm copying stuff from the new project

#

to this one?

gleaming helm
#

You can but do that with the refactor feature of your ide

#

Yes

rapid yacht
#

ok

gleaming helm
#

No

rapid yacht
#

oh

#

ok

gleaming helm
#

Youโ€™re copying stuff from the OLD one to the new one

#

Copy the contents of the src folder of the old one, to the src/main folder of the new one

rapid yacht
#

yes sorry that's what I meant

#

is it ok if I use the minecraft development extension

gleaming helm
#

Yeah thatโ€™s fine

#

I think that sets it up for you

rapid yacht
#

ok

#

and u want me to copy paste the pom.xml correct

#

then paste it into the milkbowl plugin

#

?

gleaming helm
#

What?

#

Ok weโ€™re going to try another solution

#

Remember how you set up your project and you added the bukkit jar to your build path?

#

Do the exact same thing with the vault api jar.

rapid yacht
#

o okay

#

where can I find that jar?

gleaming helm
#

Iโ€™m not sure, if you go to the vault github you may be able to get some info on where the jar is

#

I do believe you can also just use the vault plugin jar itself but you should really avoid doing this if at all possible

rapid yacht
#

that>

gleaming helm
#

Go to the releases section

#

I think the jar is probably there

#

rip it's not

#

I'll download it from the maven repository real quick for you

rapid yacht
#

oh ty โค๏ธ

gleaming helm
#

@rapid yacht

rapid yacht
#

tysm

gleaming helm
#

np

rapid yacht
#

I add it here right

gleaming helm
#

yep

rapid yacht
#

nice

gleaming helm
#

You don't need to specify sources for it though

rapid yacht
#

There we go!

#

now the milkbowl issue is fixed

#

ty for that help tho

gleaming helm
#

Yeah so

#

Just remove getDescription

#

Because that was not actually the problem

rapid yacht
#

Your right

gleaming helm
#

The problem was, we didn't have the dependency set right, so IntelliJ (correctly) was unable to find the getName method

rapid yacht
#

Makes sense

gleaming helm
#

In the future though, just use maven.

rapid yacht
#

that actually fixed a lot of errors

gleaming helm
#

Makes it soooo much easier to manage your dependencies

rapid yacht
#

I will for sure

#

it's just this isn't my source code

gleaming helm
#

Yeah that's why I kinda aborted on the maven idea

rapid yacht
#

I just imported straight into intellij

#

1 more thing tho

#

why's it red?

#

oh, and this

#

then, it's all clean

gleaming helm
#

The block data stuff has changed since 1.7

#

And the .iml file, you can ignore that, it's not an error

#

It's likely to do with revision control or something

rapid yacht
#

awesome

#

so do I remove the data?

#

or just change it to be updated

frigid ember
#

hi blitz nice pfp

rapid yacht
#

ty retrooper

frigid ember
#

lol

rapid yacht
#

lmao

#

Did you draw yours?

frigid ember
#

yes

rapid yacht
#

looks clean

frigid ember
#

it is aas

#

ass

rapid yacht
#

nah, for what it is, looks good

#

this is #general tho

frigid ember
#

oh

#

k

granite cedar
#

anyone looking for a job? i want to hire an assistant

forest patio
#

I am a Chinese user. . . I can't open spigotmc

quartz trench
#

Use VPN

forest patio
#

I can open spigotmc without VPN, but spigotmc cannot be opened in these two days

#

My machine (VPS) on my service provider can open spigotmc but it cannot be opened on my local computer

gleaming helm
#

That sounds like a problem you're having with your government, not spigot's problem

forest patio
gleaming helm
#

Yeah you can't use a vpn to access spigotmc

#

They block VPNs

forest patio
#

I am not using a VPN

#

I can go in if I use a VPN, not if I donโ€™t use it

crimson cairn
#

that sucks

gleaming helm
#

weird...

#

Cloudflare must think your IP is suspicious

#

Check blacklists

rotund orbit
#

Is there any way to assign a permission to the default group so that players will be able to use commands from my plugin without assigning permissions necessarily? Or is that bad practice?

frigid ember
#

Hello

#

Does bungeecord have an inbuilt method that finds offline players by their uuid

#

even if they never joined the server?

#

@gleaming helm do you know?

#

Hello?

#

Does bungee have a method to find offline players, even if they never joined the server by their uuid

#

;/

#

alright ima just do a http request to mojang api

pastel fox
#

@frigid ember request API if there is none and cache them in a file

frigid ember
#

i meant get player uuid by username

#

but if they offline,they can change username i cant cache it and it would not work

pastel fox
#

If you want to guarantee the correct username then you'll just have to request API each time

frigid ember
#

yea

pastel fox
#

But like, usually it's enough to just cache username -> uuid

frigid ember
#

what if people switch username

#

while offline

#

i cant mistaken their data

pastel fox
#

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

frigid ember
#

so id rather stay safe

#

whats api request limit

#

for mojang

pastel fox
#

No clue

frigid ember
#

600

#

according to google

#

every 10mins

pastel fox
frigid ember
#

?

pastel fox
#

I'm not sure how to store the event handlers though

frigid ember
#

what do you mean

#

are u making your own event api?

pastel fox
#

Well, in my script language yeah

#

A very limited one to the functions above

frigid ember
#

and how does this have to do with java?

#

though

#

is it made w java?

pastel fox
#

Each time one of them is called it has to register the handler

#

Yeah

frigid ember
#

idk how we can helpif its your language

#

hm

#

in java what we usually do its use reflection

#

im sure bukkit does this

pastel fox
#

Nono that's the Java side

frigid ember
#

it gets all the methods

#

finds if they have an annotation

pastel fox
#

No has nothing to do with reflection

frigid ember
#

and calls

#

its your language

#

how can we help?

#

lmao

#

??

pastel fox
#

My screenshot is Java

frigid ember
#

then use reflection

#

to find the methods annotated

pastel fox
#

That's not what I mean lol

frigid ember
#

what then lmao

pastel fox
#
    public void onEntityClick(Context cont, String entityName, FunctionExpression expr) {
    }```
For this for example
#

I need to access expr every time a certain entity is clicked in a certain world

#

And Idk how to store the data to do that