#help-development

1 messages Β· Page 64 of 1

young knoll
#

Find the original dev and smack em for a weird format

tender shard
#

@x=... is the x coordinate

#

etc

agile anvil
#

Split by ':', then split by ';', check the first without @ tocheck type and get the second for value

lost matrix
#

Looks like first a split at : and then each entry can be split by ; where left is key and right is value.
Kinda bad tbh.

echo basalt
#

wouldn't like
\@(.);(.+)\: be a pattern for that?

agile anvil
#

tbh it's kinda bad

echo basalt
#

except the last one

small current
#

so what should i do

echo basalt
#

the last param doesn't have a :

#

grr

#

I won't bother lol

lost matrix
echo basalt
#

parse(text + ":") would fix lol

agile anvil
echo basalt
#

convert what?

#

I just made that regex pattern on the moment

#

with my limited regex knowledge

ancient plank
#

why the plugin just done that

echo basalt
#

crappy location to string method

agile anvil
echo basalt
#

just use spaces

agile anvil
echo basalt
#

you blind

#

he not

#

on a side note, am I the only one who loves this logo?

#

man just made a gradient and drew on top

small current
#

im not that dumb

echo basalt
#

well you're asking us how to parse a string

small current
#

the string is just not a normal one

agile anvil
#

Yes it is, char after char

echo basalt
#

it's special

small current
#

no its serialized in the worst way

echo basalt
#

you can still use regex or substringing to parse it

agile anvil
#

imIllusion proposed a clean way actually

#

If we take apart the + ":" (that is kinda smart)

echo basalt
#

the regex I proposed captues 2 groups

small current
#

i don't know regex

echo basalt
#

🀦

small current
#

so i should removeAll the :

agile anvil
#

No

#

Do the way I proposed

echo basalt
#

split by :

agile anvil
#

Split : then ;

#

Do you know how to split?

ashen quest
#

ty for the idea

echo basalt
#

then you'll have
["@w;world", "@x;53.0", "@y;64.0", "@pi;0.0", "@ya;0.0"]

#

you can then apply some parsing

agile anvil
small current
tender shard
#

why not just steal the code from the original plugin?

small current
agile anvil
small current
tender shard
agile anvil
lost matrix
#

Just split your stuff at BiBaBuzzeMann
So a location with world "world" x "100" y "200" and z "300" pitch "1.0" yaw "2.0" would be
BiBaBuzzeMannworldBiBaBuzzeMann100BiBaBuzzeMann200BiBaBuzzeMann300BiBaBuzzeMann1.0BiBaBuzzeMann2.0

tender shard
small current
echo basalt
#
for(String content : text.split(":")) {
  int semicolonIndex = content.indexOf(";");
  String context = content.substring(1, semicolonIndex - 1);
  String value = content.substring(semicolonIndex);
}
#

you might need to mess with the indexes a lil

#

so you'll have

@w;world ->

context = w
value = world

--
@x;53.0

context = x
value = 53.0

gleaming grove
small current
#

i don't use windows

echo basalt
#

you don't use your brain either fml

agile anvil
echo basalt
#

not putting any more effort

small current
#

i can decompile the thing

gleaming grove
small current
#

jd gui

gleaming grove
#

Its made with java

echo basalt
#

we should make an integrated circuit that's specifically made to parse these strings

small current
#

oh wasnt it exe ?

agile anvil
echo basalt
#

🀑 me rn

small current
#

i know what to do now

#

thanks

echo basalt
#

if you say decompile

small current
#

i tried decompiling and the code was obfuscated

echo basalt
#

🀑

small current
#

guys im here to ask a question

#

not to get replied by 🀑 emojis

echo basalt
#

You're not putting much effort into the solutions we provide

agile anvil
small current
#

i understood the solution

#

yes and i know how to do it

echo basalt
#

I wrote 2 completely different solutions

#

pick your poison

small current
#

and then some random guy replied jd gui after i started coding

gleaming grove
#

Sorry i didn't expected you get confused

echo basalt
#

@lost matrix feature suggestion: Does your resourcepack maker project thing modify sounds in real time? πŸ‘€

#

I got like 20 sounds I gotta upload to my resource pack and I figured you might've faced similar pain

hybrid spoke
quiet ice
#

Ew, use Recaf

young knoll
#

Ew, use bytecode-viewer

gleaming grove
digital rain
#

hey guys can you quickly tell me which player event represents switching slots

digital rain
#

ty <3

outer river
#

Hello i'm searching for way to execute commandS that i put in a named category, and all this commands will be executed in consol when arg[0] of my command is call :
ex: category name: hello
Commands:

  • tell to %player% hello
  • heal %player%
  • give %player% ....

i though about cross hashmap with an arraylist but dispatchCommand doesnt approve arraylist
can you help me pls

agile anvil
#

Iterates through you're list, and Server#dispatchCommand each one of them

outer river
#

giev fou feedback soon

agile anvil
#

For sure gl

echo basalt
#

is it as painless as dragging onto a folder or do I have to mess with the sounds.json file?

lost matrix
#

I just drag them into a folder and add an enum entry

echo basalt
#

interesting

#

I gotta start working on my own project with some "inspiration"

lost matrix
#

The json files all get generated

echo basalt
#

fancy

#

I have a crappy tool that just assigns model ids to exported jsons and sorts pngs

#

but it doesn't go as far as making a whole pack

gleaming grove
echo basalt
gleaming grove
#

Becouse this resourcepack is included to plugin rescources?

echo basalt
#

I sometimes wonder like

lost matrix
#

It starts an http server to serve the resourcepack. It can also inject data from ModelEngine or ItemsAdder or whatever.

echo basalt
#

if we dedicated time into making a sound engine

#

how good would it be

#

Minecraft already has a somewhat spatial audio system

lost matrix
echo basalt
#

so what if we implemented things like echo

#

and reverb and such

#

then we integrate it with a map canvas plugin and make bootleg audacity

gleaming grove
#

it was trying to mess up with generating sounds, it is not that easy

lost matrix
#

Sounds like it would need client modifications

echo basalt
#

hm

#

or heavy server modifications hehehe

#

why limit ourselves at 20 tps?

#

what if we made a bitmask system to represent hz

#

and we sent waves at like 2k tps

#

that just play a different frequency

#

so we can replay any sound

#

on demand

#

and we fry the player's cpu with the amount of incoming packets

#

sometimes I just wonder like

#

how can we exploit the upper limits of a minecraft server

#

by ignoring tps and just doing stupid stuff

young knoll
#

Origin realms moment

echo basalt
#

true

#

sounds like something they'd do

#

what about using trilinear interpolation and making smooth camera cinematics and complex shots?

#

or making each color combination with heads to make a very shitty modelengine that doesn't rely on texture packs

#

that uses 2k armorstands

gleaming grove
echo basalt
#

or what if we play like 15 tracks at once to make a sort of audio DRM

#

which we can then use to play concerts in minecraft

gleaming grove
#

about 1k particles to make a 3d cube

echo basalt
#

of course you do that

#

was the trajectory pre-planned or did you do some circle motion?

lost matrix
#

lol i found a video of one of my first plugins XDD

echo basalt
#

you make me feel bad about my career :/

lost matrix
#

I laughed so hard at this

vital sandal
gleaming grove
#

why, particle are better for burning client CPU

vital sandal
#

U can turn that off :d

young knoll
#

There is also a limit

vital sandal
#

Is it possible to create a custom particle

digital rain
#

ugh, for some reason when i increase the attribute attack speed for an item, it deals 1 damage

young knoll
#

Gotta set attack damage too

digital rain
#

ok but its a sword

#

shouldnt it have a default attack damage?

young knoll
#

Nope

dense laurel
#

can someone explain me please how to make for example a command that can get the player's ip and then do something? Just like BanIP, but for example, muteIP

young knoll
#

As soon as you add a custom modifier the defaults go bye bye

digital rain
#

uhh

#

that weird

#

but thanks

quiet ice
undone axleBOT
crimson scarab
#
   
 private void setTarget() {
        List<Entity> nearbyEntities = arrow.getNearbyEntities(50, 50, 50);

        if (nearbyEntities.size() == 0)
            setTarget();


        Optional<Entity> optionalEntity = nearbyEntities.stream()
                .filter(entity -> entity instanceof LivingEntity && ((Projectile) arrow).getShooter() != entity)
                .filter(entity -> ((LivingEntity) entity).rayTraceBlocks(entity.getLocation().distance(arrow.getLocation().add(0, 1, 0))) == null)
                .min(Comparator.comparing(entity -> entity.getLocation().distanceSquared(arrow.getLocation())));


        target = optionalEntity.get();
    }

how can i prevent enemys behind blocks

lost matrix
gray merlin
#

How can I install the text component API?

crimson scarab
#

i meant to add a limit

#

so if it fails so many times

lost matrix
quiet ice
#

If it fails it always fails

quiet ice
gray merlin
quiet ice
#

Oh yes lol

gray merlin
#

I'll go to JSON messages then

quiet ice
#

components are a rather recent thing

lost matrix
hushed pawn
#

i want to create different bukkit runnables for every plyer and disale it when they leave?

#

but i dont knwow how

lost matrix
gray merlin
quiet ice
#

1.7.10 bukkit is a rather strange idea

hushed pawn
quiet ice
#

Might as well play modded 1.7.10

#

those were the times

lost matrix
hushed pawn
#

this thing is to count hit delay

lost matrix
lost matrix
agile anvil
crimson scarab
#

how come my arrow will target entites with blocks behind

#

if i ray trace

#

and check there are no blocks

gray merlin
#

As I had mentioned many times before, I'm not using 1.7.10 by preference, it's a client requirement.

young knoll
#

Get a new client

gray merlin
#

There are still many servers on 1.7.10, be it for mod limitations or anything else, and these still have needs.

digital rain
young knoll
#

You can set the players speed

charred blaze
#

what is this thing called?

#

i mean

#

how did they create GUI in website?

digital rain
#

custom gui in chest

charred blaze
young knoll
#

That’s just an image

charred blaze
#

no

#

its not

digital rain
#

wdym then

gleaming grove
#

i guess with css and html

charred blaze
#

i can click on items

young knoll
#

Probably JavaScript

digital rain
#

probably

charred blaze
charred blaze
#

like

#

can i get url of it and drop it somewhere

#

will it appear like that?

agile anvil
#

You can code it yourself pretty easily I guess

#

What do you exactly want to do?

#

Ahah very detailed πŸ˜‚ I mean, do whatever you want while you respect the licenses and the guidelines

hushed pawn
#

how to do ++ for every value on hashmap?

#

keys are UUIDs

agile anvil
#

And much more

lost matrix
crimson scarab
#

can i raytrace from above the entity

#

i would prefer to do that

#

or from the eye

hushed pawn
agile anvil
dim bronze
hushed pawn
#

i do my own knokcack system

echo basalt
#

those mfs really made their own lua parser for skyblock guis

agile anvil
echo basalt
#

I know that the admins were in charge of the wiki a bit

lost matrix
river oracle
crimson scarab
#

can you check if blocks lie between two points in the spigot api

tender shard
echo basalt
#

I mean

#

the devs didn't

dim bronze
echo basalt
#

I know because I spoke to half the team

hushed pawn
dim bronze
#

πŸ€·β€β™‚οΈ

charred blaze
#

i dont want to waste my time if its hard

echo basalt
#

It's either game designer's notes or admin/community made

dim bronze
#

looks all custom, so you'd have to start from scratch I'd imagine

dim bronze
#

Think Greened is looking for something a bit more complex than that, I also saw that

hushed pawn
dim bronze
#

if you wanted to do it, using javascript or some js framework would be a lot easier than making it in lua and using some templating library to convert to js

agile anvil
charred blaze
#

complex? look i want something like a web link and if i drop that link here it would appear like this

lost matrix
# hushed pawn to register hits once in 10ticks for every player
  @EventHandler
  public void onDamage(EntityDamageByEntityEvent event) {
    Bukkit.getScheduler().runTask(plugin, () -> event.getEntity().setVelocity(evaluateVelocity(event)));
  }

  private Vector evaluateVelocity(EntityDamageByEntityEvent event) {
    // Calculate your custom knockback here
  }

This is all you need for a custom knockback system

dim bronze
agile anvil
crimson scarab
#

how does one get mojang mappings

charred blaze
#

but is it possible on discord?

dim bronze
#

so you just want an image?

charred blaze
#

not image

#

2d GUI

agile anvil
agile anvil
dim bronze
#

there would be no may to make it interactive on discord

#

you'd have to link to a webpage

charred blaze
#

ahh

#

okay then

#

nvm

dim bronze
#

xyproblem moment

agile anvil
#

Ohhhhhh

frank kettle
#

Is there any way to make the hologram made by armorstands not be a "actually placed" on the world?

When moving my cursor on a block with a armorstand on it(hologram), u cant select the block if u target it right in the middle where the armorstand is.

any way to make the armorstand "a ghost"?

echo basalt
#

marker

#

maybe

hushed pawn
agile anvil
frank kettle
#

as a marker u can't target?

echo basalt
frank kettle
#

oh okay, ty

agile anvil
dim bronze
lost matrix
dim bronze
#

No idea they were even added

gleaming grove
#

How can I disaplay custom text over player slots?

dim bronze
#

interesting

echo basalt
#

sendActionBar

#

or in older versions

#

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.whatever)

#

fromLegacyText most likely

gleaming grove
#

thx

echo basalt
#

or pre-1.9

tardy delta
#

new Textcomponent

echo basalt
#

with packets and json

agile anvil
echo basalt
#

might be 1.10 not sure but around there

gleaming grove
#

Im working only on version 1.17-1.19

echo basalt
#

good

agile anvil
gleaming grove
#

java 16 is too good to use older versions

echo basalt
#

surprisingly most customers I have are asking for newer versions

#

I used to have a bunch of 1.8 or 1.12 commissions

azure hawk
#

Does anyone have a good NickAPI. I wanna code my own Nick Plugin with skin in 1.18.2 but i dont know how bc theres nearly 0 things i could find with nick in 1.18.2 exept own plugins. And the only API i could find is "closed". Please help

agile anvil
#

My metrics are also telling that people are going on average for last versions. Finally

dim bronze
worldly ingot
hushed pawn
gleaming grove
dim bronze
#

I was joking, people get triggered with the kotlin argument

#

but yes, record (data classes)

agile anvil
delicate lynx
lost matrix
gleaming grove
azure hawk
lost matrix
echo basalt
#

that sounds like a kotlin thing

#

just use lombok and annotate your class with @Data

gleaming grove
dim bronze
#

that person isn't going to be happy

#

WHY DID I GET GHOST PINGED

dim bronze
digital basin
#

Is it possible to implement tab completion outside of commands? I have an emoji system setup, but it'd be nice if I could have a symbol like : in chat trigger a completion list of the emoji phrases.

flint coyote
#

Am I doing something wrong when importing craftbukkit? I'm trying to use CraftWorld, CraftPlayer, EntityCow etc. but it's not getting resolved.
I wanna get into Custom Mobs (e.g. angry cows)

These are my dependencies

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.19.2-R0.1-SNAPSHOT</version>
            <classifier>remapped-mojang</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>craftbukkit</artifactId>
            <version>1.19.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
lost matrix
crimson scarab
#

can i somehow get the line of sight of a non living entity

lost matrix
#

spigot includes it

crimson scarab
#

i need to check if a arrow can see a entity / entity is not hiding behind blocks

flint coyote
#

hmm but I get normal spigot imports. Just not those

lost matrix
lost matrix
flint coyote
#

nah only with maven

lost matrix
#

Did you set up the special sources plugin for maven?

#

Did you run BuildTools with --rev 1.19.2 --remapped

gleaming grove
flint coyote
#

yes. This is my complete pom (removed craftbukkit now and made a variable for the version)
The build is successful but I can't resolve CraftPlayer

lost matrix
flint coyote
gleaming grove
#

of course there is more things that distinguish records from objects

lost matrix
dim bronze
#

when in doubt invalidate caches and restart

#

lol

flint coyote
#

aight

agile anvil
flint coyote
#

Yup that did it. Should have asked earlier D:
Spent like an hour figuring that out

#

Thanks

azure hawk
#

I dont need a plugin

#

I wanna code it myself

dim bronze
azure hawk
#

Isnt that a plugin?

#

I need an api oder smth like that

dim bronze
#

yes but it includes an API

#

so your plugin would depend on that plugin, and use its api

#

that was literally the first search result, can't attest to how good it is

azure hawk
#

i only found the closed one

quiet ice
crimson scarab
#

How is this?

dim bronze
quiet ice
#

As well as paper

agile anvil
lost matrix
#

You need to also check if the hit block is null

dim bronze
#

is there a way to disable pinging automatically on reply? not spigot related

gleaming grove
#

Do I need Lombok classes inside my plugin jar?

crimson scarab
quiet ice
#

donno. First step is to identify it's maven artifact

azure hawk
#

gg

quiet ice
#

Just migrate to https

#

(as in replace any mention of http with https)

worldly ingot
#

Lombok generates code at compile time. You do not need to shade it

grim ice
#

Hm so uh

#

anyone has an idea of how neural networks work?

worldly ingot
#

Yes and there are a good number of videos on them

#

3blue1brown has a fantastic series of videos on them on YouTube

lost matrix
#

input layer, a bunch of activation functions, output layer

grim ice
#

i know the terms but i dont understand how they actually work

azure hawk
grim ice
worldly ingot
#

I think sabastian lague also posted something the other day about neural networks

#

Both highly recommended

grim ice
#

i want an explanation that doesnt depend

#

on a single language

worldly ingot
#

Yeah they both delve into the theory and math behind them

grim ice
#

nice ill try that

worldly ingot
#

3blue1brown is more mathy, sebastian's uses code examples if I recall correctly

#

Can't remember which language. C# or something

#

Again, I recommend watching both lol

crimson scarab
#

does ray trace go through windows?

lost matrix
#

C# ?

#

Isnt all data science just done in Python?

sturdy frigate
#

How do I store player preferences that persists over resets?

worldly ingot
#

Sure, though you're not limited to just Python

#

You can write neural networks in any language you want

agile anvil
#

I'm doing data science in C, just imagine the pain

agile anvil
worldly ingot
#

TensorFlow's library is written in Python by default but they have ports for all sorts of languages like JavaScript, C#, Julia, R, Rust, and more

sturdy frigate
#

basically when you do stop

#

and then rerun it

agile anvil
#

So what's your version ?

sturdy frigate
#

1.192

agile anvil
#

So I advice you to have a look at PDC if you don't want to bother urself, or save it to a config/database

sturdy frigate
#

Ohh persistent data containers

sturdy frigate
agile anvil
#

Exactly

crimson scarab
#

i just write some godly code

#

in a good mood

agile anvil
#

Well I'm always using DataBase cause I do not have one server but multiple

#

But PDC is great for short data locally

sturdy frigate
#

Ah I see, so databases for scalability?

flint coyote
#

do I need another dependency for net.minecraft.server classes when I used the --remapped param for the buildtools or should it be bundled inside spigot?
Idk if my IDE is messing up again. I can get CraftPlayer now but something like EntityZombie is still missing.

#

For now I only have

        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>${mc.version}</version>
            <classifier>remapped-mojang</classifier>
            <scope>provided</scope>
        </dependency>
    </dependencies>
agile anvil
grim ice
#

yeah i lost him at minute 9

worldly ingot
#

lmao. Neural networks aren't an easy concept at first

grim ice
#

lol

sturdy frigate
grim ice
#

immma repeat the vid like 10 times or smth

agile anvil
#

So take the one you prefer

#

SQL is sometimes easier for some

agile anvil
#

Check the mathematical experession, if you're familiar with maths it makes way more sense

sturdy frigate
#

Is there a way to permanently make it day?

worldly ingot
#

Can do it with a gamerule. /gamerule doDaylightCycle false

sturdy frigate
#

Tysm

crimson scarab
#

how do you get the size of an optional

lost matrix
agile anvil
#

There is two possible cases: it's empty or not

#

so just Optional#isEmpty

crimson scarab
#

mhm

#

got that

lost matrix
#

You can use orElse(Object) to get the element or a replacement if the optional is empty

ivory sleet
#

also got orElseGet for lazy evaluation, and orElseThrow

lament sorrel
#

did someone already created a skywars plugin and can help me to create a skywars plugin

delicate lynx
#

?services

undone axleBOT
vocal cloud
#

Why does everyone want to make a skywars plugin as if they can somehow compete with the big boys

lament sorrel
#

did someone already created a skywars plugin??

stark wedge
#

I really want to start storing player data in my plugin with a database but I really dont want to program in SQL lmfao

#

or like

#

get set up with it

vocal cloud
quiet ice
#

but probably not one of us

vocal cloud
vocal cloud
cosmic fjord
#

Im trying to add some plugins via dependencies to my project and I get this error 'dependencies.dependency.systemPath' for us.myles:viaversion:jar should not point at files within the project directory. what can I do?

vocal cloud
#

Why are you adding local jars? Do they not have a repo?

cosmic fjord
#

I dont think so

vocal cloud
#

Install the jar into your local repo then access it via that

#

Don't point directly to jars

cosmic fjord
#

how can I do that?

opal sluice
#

Hello, how would you prevent a thread from closing the sql connection of an other thread?

cosmic fjord
#

thx

vocal cloud
tardy delta
#

ah fuck forgot primary key

twilit pulsar
cosmic fjord
chrome beacon
cosmic fjord
#

ok

chrome beacon
#

Choose something reasonable though

#

Such as the package name that the dev uses

cosmic fjord
#

and the artifactid?

chrome beacon
#

plugin name

crimson scarab
#

how can i check how central an entity is in the players line of sight

cosmic fjord
#

what about the dpackaging?

chrome beacon
#

jar

cosmic fjord
#

okay ty

tardy delta
twilit pulsar
chrome beacon
cosmic fjord
#

yes

chrome beacon
#

They have official dependency information

#

No need to install a jar directly

cosmic fjord
#

cool thanks

tardy delta
twilit pulsar
chrome beacon
#

You haven't set the plugin variable

#

It's null

twilit pulsar
chrome beacon
#

BedEnter

tardy delta
#

my hand wants to do ?learnjava

chrome beacon
#

Same

twilit pulsar
#

Dont you dare~

frosty tinsel
undone axleBOT
cosmic fjord
#

I added viaversion and got this error: 'dependencies.dependency.version' for com.viaversion:viaversion-api:jar is either LATEST or RELEASE (both of them are being deprecated)

#

got the same error for 3 other dependencies

dim bronze
#

specify the latest dependency version manually

#

for via version: 4.4.1

cosmic fjord
#

it works thanks

dim bronze
#

stray away from using LATEST versions as your code could break if you compile it later on because you're using the lastest version rather than the one it was developed with which may have changed things

stark wedge
#

Does anyone know what this error means:

java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariDataSource

Caused by: java.lang.ClassNotFoundException: com.zaxxer.hikari.HikariDataSource```
twilit pulsar
chrome beacon
#

Show your code

flint coyote
#

Is their any good documentation/guide regarding pathfinder goals? I always see those float values but I got no clue what they actually mean.

dim bronze
chrome beacon
#

^^

stark wedge
#

shade?

#

oh

dim bronze
#

You need to include its source code inside your plugin

stark wedge
#

a shaded depoency

ancient plank
#

shode

chrome beacon
#

What version of mc are you making your plugin for?

#

(Brady)

stark wedge
#

19.2

#

latest

dim bronze
chrome beacon
#

^^

twilit pulsar
dim bronze
#

BedEnter?

chrome beacon
#

^^

stark wedge
#

so call the depenency in the libraries in my plugin yml instead of my pom?

#

ok

#

ill try that

twilit pulsar
# dim bronze BedEnter?

import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.*;

public class BedEnter implements Listener {

    NetChat plugin;


    @EventHandler
    public void OnPlayerBedEnterEvent(PlayerBedEnterEvent e){

        Player p = e.getPlayer();
        p.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("sleep-message")));






    }

}```
dim bronze
#

you'll still need it in your pom, just not shaded (use scope provided if you are using the shade plugin)

hexed orbit
#

Hi guys, could anyone help me? I'm using Geyser/Floodgate to allow Minecraft Bedrock players to join the server, however every time they join the UUID changes right away and as I have some servers, there are servers that these players never joined and this ends up breaking some plugins as they never existed on that server. I can get the correct UUID when the player joins the first server and I can send that UUID to the other servers, but how can I create a playerdata based on that UUID on the other servers that the player never joined? GameProfile? EntityPlayer?

chrome beacon
twilit pulsar
#

is that the plugin = plugin thing?

dim bronze
#

that isn't in this file

#

if you declare a instance level variable in one class, you cannot use it in another by just using its name plugin

stark wedge
#

so this is all I need to do in my pom?

#
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>5.0.1</version>
        </dependency>
chrome beacon
#

Yes

stark wedge
#

that yes was for me right

#

just making sure lol

chrome beacon
#

You can add a <scope>provided<scope>

#

in that dependency

stark wedge
#

okay

#

can you explain what the scope is?

#

Im still quite dumb with Maven and pom files lmfao

#

I mean I can google it too

stark wedge
#

this is how I add libraries to my plugin yml right?

#
name: NewLife
version: '${project.version}'
main: me.projectbrady.newlife.Main
api-version: 1.19
authors: [ ProjectBrady ]
description: A New Life style to Minecraft! Economy, Custom Enchants/Items, New Recipes, New Dimensions & More!
libraries:
  -com.zaxxer:HikariCP:5.0.1

commands:
  balance:
    description: shows a players balance
  ping:
    description: a ping/pong command```
dim bronze
#

might need a space after the -

#

cant remember how strict yaml is

stark wedge
#

ohhh

#

yeah im getting an invalid plugin file error

#

so that must have been it

#

It worked!

#

Thanks @dim bronze

#

& @chrome beacon

cobalt thorn
#

Hi i want know if its possible to get the message the server is sending to the user for example a plugin and change them?

native gale
#

Can someone explain me how does spigot library loader works?

#

In particular, where should I look if I wanna add this feature to pre-1.16 version?

dim bronze
#

What would be the point if other plugins didn't use it?

agile anvil
rare flicker
#

is there a way to get the cursor item whenever a player closes an inventory?

cobalt thorn
slate mortar
#

if so, you could add a filter to the log4j root logger... idk tho if it works for ALL messages, or only spigot/bukkit-ones, but as minecraft itself uses log4j, i think it should work for all of them

quiet ice
#

Alternatively Hijack UnsafeValues#processClass to modify the Classes' Constant pool

sullen canyon
#
@EventHandler
  public void onEntityDamage(PlayerTeleportEvent event) {
    Player player = event.getPlayer();

    System.out.println(event.getCause() + " ");

    if (event.getCause().equals("ENDER_PEARL")) {
      event.setCancelled(true);
      //player.teleport(event.getTo());
      System.out.println("called ");
    }
  }```
#

it doesnt work (Spigot 1.8)

#
[22:57:48 INFO]: PLUGIN
[22:57:53 INFO]: ENDER_PEARL
[22:57:53 INFO]: PLUGIN```
#

this is what im getting in console

#

whats the problem?

quiet ice
#

Your IDE should be screaming the reason at you

slate mortar
#

lol

quiet ice
#

The event cause is an enum, not a string.

sullen canyon
#
if (event.getCause() == PlayerTeleportEvent.TeleportCause.ENDER_PEARL) {``` i was trying this
#

but im getting the same result

quiet ice
#

should work

slate mortar
#

^ spigot development in a nutshell

dim bronze
#

development in general

slate mortar
#

i mean

#

if your console says "PLUGIN"

#

you got teleported by Player#teleport

#

idk if its from you or another plugin

arctic moth
#

this instantly hard crashes the server, anyone got an optimized version?

for(int x = ((Player) sender).getLocation().getBlockX() - 100; x < ((Player) sender).getLocation().getBlockX() + 100; x++) {
                for(int y = ((Player) sender).getLocation().getBlockY() - 100; y < ((Player) sender).getLocation().getBlockY() + 100; y++) {
                    for(int z = ((Player) sender).getLocation().getBlockZ() - 100; z < ((Player) sender).getLocation().getBlockZ() + 100; z++) {
                        Block block = ((Player) sender).getWorld().getBlockAt(x, y, z);

                        if(block.getLocation().distance(((Player) sender).getLocation()) <= 100) {
                            ((Player) sender).getWorld().createExplosion(block.getLocation(), 4, true, true, ((Player) sender));
                        }
                    }
                }
            }
slate mortar
#

honestly i dont even know if you can modify these with filters... you can disable them at least

#

please

arctic moth
#

for what

slate mortar
#

for(int x = ((Player) sender).getLocation().getBlockX() - 100; x < ((Player) sender).getLocation().getBlockX() + 100; x++) {
this is way too long

arctic moth
#

fine

#

but still whats the actual solution

slate mortar
#

but yea, you're modifying hundreds, if not millions of blocks at the same time

#

i'm bad at math, so i cant tell

quiet ice
crisp steeple
slate mortar
#

of nvm

#

yea

arctic moth
slate mortar
#

that's.... fair

#

"only"

arctic moth
#

thats normal tnt sized

quiet ice
#

You are creating 200 * 200 * 200 * 2 + 200 * 200 * 2 + 200 * 2 location objects which is a HUGE number

arctic moth
#

fine

arctic moth
#

ill make a variable

slate mortar
quiet ice
slate mortar
#

which i dont know how much it is

#

but it has a +19 at the end

#

so it's much

quiet ice
#

16_080_400 actually something seems wrong on your end

slate mortar
#

calculator told me

buoyant viper
slate mortar
#

idk

buoyant viper
#

jk

slate mortar
#

honestly

quiet ice
slate mortar
#

just don't create millions or trillions of explosions AT THE SAME TIME

quiet ice
#

Also, use .distanceSquared

#

Math#sqrt is a very expensive call that should be avoided

buoyant viper
#

distanceSquared <= 10000 ezpz

slate mortar
#

gonna sqrt rq

#

what?

slate mortar
hasty prawn
slate mortar
#

okay

#

first of all

#

why in the fucking hell

#

do you want to create

#

so much

#

explosions

arctic moth
buoyant viper
#

u dont wanna blow up each block in a 100 block radius individually?

#

smh

slate mortar
#

what

hasty prawn
#

What the hell are you doing though KEKW

slate mortar
#

is your goal

hasty prawn
#

Blowing up the entire world?

arctic moth
#

making a random command

slate mortar
#

like random what

arctic moth
#

ooh i crashed log4j with too many thread dumps

hasty prawn
#

"Editing Nuke.java" PepeLaugh

buoyant viper
#

just create like 1 or 10 high power explosions idk

slate mortar
#

i'm not that much into how much tnt java can handle at the same time, but i'm pretty sure even 1k would be a pain in the ass for most modern servers

arctic moth
#

thats the entire world btw

slate mortar
#

i wonder actually

buoyant viper
#

actually

#

@ancient plank

#

dont u have a nuke

slate mortar
#

is minecraft-tnt replacing blocks that are already air?

#

or are they ignored

hasty prawn
#

It's Mojang so probably

slate mortar
#

uhhh

buoyant viper
#

isnt even checking if block is air smh

slate mortar
#

if it is replacing air blocks with air blocks

#

wouldn't that be like

#

the biggest performance patch?

sturdy frigate
#

How do i set default world spawn point?

hasty prawn
#

Since when did Mojang care about performance

buoyant viper
slate mortar
#

fuck

#

you

sturdy frigate
#

❀️

buoyant viper
#

lool

slate mortar
#

gonna get you banned

buoyant viper
#

WTF

slate mortar
#

son of your mother...

sturdy frigate
#

that's not too nice lol

river oracle
ancient plank
slate mortar
#

still getting 1.5k fps tho

buoyant viper
#

@ancient plank can u edit my nick again

slate mortar
#

oh wait

#

can adele change nicks in discord?

tender shard
#

oh no

#

celina is here

slate mortar
#

oh yes

arctic moth
#

what if i just summoned a ton of tnt entities at every point within like 700 block radius

quiet ice
# arctic moth this instantly hard crashes the server, anyone got an optimized version? ```java...
int px = (Player) sender).getLocation().getBlockX();
int py = ((Player) sender).getLocation().getBlockY();
int pz = ((Player) sender).getLocation().getBlockZ();
for (int x = -100; x < 100; x++) {
 for (int y = -100; y < 100; y++) {
  for (int z = -100; z < 100; z++) {
   if ((x * x + y * y + z * z) <= 100 * 100) {
     ((Player) sender).getWorld().createExplosion(new Location(((Player) sender).getWorld(), px + x, py + y, pz + z), 4, true, true, ((Player) sender));
   }
  }
 }
}
#

Fully optimized code

buoyant viper
slate mortar
#

my

#

holy

arctic moth
arctic moth
arctic moth
slate mortar
tender shard
#

go down

slate mortar
#

it'll be fiiiine

tender shard
#

idk

slate mortar
#

mojang has good coders

#

as we've seen in the last years

tender shard
ancient plank
#

it's not as bad as my sphere code

quiet ice
arctic moth
hasty prawn
#

Oh I know how to fix the hard crash, just set the timeout-time in the spigot.yml to the max integer value and then it can never crash 5Head

arctic moth
#

lol

tender shard
slate mortar
#

that works honeslty

#

looks like a good idea

arctic moth
hasty prawn
tender shard
#

lasting about 10 seconds? trying to supress another seks joke

slate mortar
#

yea most likely because the tnt is getting your ram run out?

#

idk

ancient plank
slate mortar
#

looks cute

torn shuttle
#

boom shakalaka

tender shard
#

your mom looks cute

slate mortar
#

ive seen a mod with tnt that literally deletes your world like

#

lmfao

arctic moth
#

nvm im stupid

arctic moth
#

ik one that bans you from singleplayer

hasty prawn
#

Adelemphii don't you play on like a TI-84

slate mortar
#

it straight up deletes the folder KEKW

sturdy frigate
#

How do i disable weather for eternity?

ancient plank
#

hwat

ancient plank
hasty prawn
#

Like your computer is a potato

ancient plank
#

no

hasty prawn
#

Can't code and play mc at the same time

slate mortar
#

thats mc's fault

ancient plank
#

I'm limited by ram, but everything else on my computer is middle tier gaming pc

slate mortar
#

mc can't handle the simplest shit in the background

tender shard
buoyant viper
# quiet ice ```java int px = (Player) sender).getLocation().getBlockX(); int py = ((Player) ...
Player player = (Player) sender;
int maxDistance = 100 * 100;
int px = player.getLocation().getBlockX();
int py = player.getLocation().getBlockY();
int pz = player.getLocation().getBlockZ();

for (int x = -100; x < 100; x++) {
    for (int y = -100; y < 100; y++) {
        for (int z = -100; z < 100; z++) {
            if ((x * x + y * y + z * z) > maxDistance) continue;
            
            player.getWorld().createExplosion(new Location(player.getWorld(), px + x, py + y, pz + z), 4, true, true, player);
        }
    }
}``` optimized even more ezpz
hasty prawn
#

So what you're saying is that your About me is a lie

buoyant viper
#

no need to calculate 100 * 100 each time

#

or recast Player to sender

slate mortar
buoyant viper
#

do i look like i asked

slate mortar
#

stop that

tender shard
slate mortar
#

imajin is weird

#

ask the simp smp

tender shard
#

!false

ancient plank
slate mortar
#

its motd literally says

#

that he's weird

hasty prawn
#

You have 8GB wtf

#

That's dreadful

slate mortar
#

or did you son of your mom change it again

arctic moth
quiet ice
# buoyant viper ```java Player player = (Player) sender; int maxDistance = 100 * 100; int px = p...
Player player = (Player) sender;
World world = player.getWorld();
int maxDistance = 100 * 100;
int px = player.getLocation().getBlockX();
int py = player.getLocation().getBlockY();
int pz = player.getLocation().getBlockZ();

for (int x = -100; x < 100; x++) {
    for (int y = -100; y < 100; y++) {
        for (int z = -100; z < 100; z++) {
            if ((x * x + y * y + z * z) > maxDistance) continue;
            
            world.createExplosion(new Location(world, px + x, py + y, pz + z), 4, true, true, player);
        }
    }
}

if we are at it

buoyant viper
#

we r reaching peak nuke performance

slate mortar
#

i wonder if his server will literally burn after that

buoyant viper
#

we can actually cache the Location too @quiet ice

#

instead of 3 player.getLocation calls

quiet ice
#

?jd-s

undone axleBOT
ancient plank
#

?paste

undone axleBOT
buoyant viper
#

?whereami

ancient plank
quiet ice
# quiet ice ```java Player player = (Player) sender; World world = player.getWorld(); int ma...
Player player = (Player) sender;
World world = player.getWorld();
int maxDistance = 100 * 100;
Location loc = player.getLocation();
int px = loc.getBlockX();
int py = loc.getBlockY();
int pz = loc.getBlockZ();

for (int x = -100; x < 100; x++) {
    for (int y = -100; y < 100; y++) {
        for (int z = -100; z < 100; z++) {
            if ((x * x + y * y + z * z) > maxDistance) continue;
            loc.setX(px + x);
            loc.setY(py + y);
            loc.setZ(pz + z);
            world.createExplosion(loc, 4, true, true, player);
        }
    }
}
buoyant viper
#

theres a word for that adele

#

its called diameter

quiet ice
#

All unnecessary allocations nuked

buoyant viper
#

wait

#

nvm

#

r * r ithought it was r + r

quiet ice
arctic moth
#

could there be a way of optimizing it further by making it async or smth

buoyant viper
#

u could make less explosions

#

idk

arctic moth
ancient plank
quiet ice
ancient plank
#

you can tell because I have this comment still
java // for every block in the list check if the block under the block isn't air, and if so, change the block to snow/ice at random

quiet ice
#

Plus it is NMS only pretty much

tender shard
#

why do people hate nms so much πŸ₯²

quiet ice
#

Because I never used it so have litterally no experience with it?

slate mortar
#

so you hate women basically?

#

sad

hasty prawn
ancient plank
#

everything I need in every project has an API in spigot

buoyant viper
#

forgot what javap did for a second, nice

quiet ice
#

And it is undocumented territory with what's basically vendor lock-in

#

One day I will create the superior NMS experience - one day

buoyant viper
#

just edit bukkit api to do everything nms can

ancient plank
buoyant viper
#

il be damned it does compute

tender shard
buoyant viper
#

❀️ u java

tender shard
#

I HATE THEM

buoyant viper
#

best language

quiet ice
buoyant viper
arctic moth
#

what if i did something stupid like delete the chukns and use a custom world generator to make new ones

buoyant viper
#

java best lang

quiet ice
#

From time to time javac also uses constant dynamics but I have no idea when exactly it does it

quiet ice
arctic moth
#

while the player is in the chunks >:D

buoyant viper
#

oh i know it is

quiet ice
#

The inlining that is

buoyant viper
#

oh

tender shard
buoyant viper
tender shard
#

I have to admit, it was a joke

buoyant viper
quiet ice
#

Makes decompiled code unreadable and you can't change the constant pool of a single class to change all references to a field

buoyant viper
#

just dont work with decompiled code ezpz

quiet ice
buoyant viper
#

r u updating defunct mods?

quiet ice
#

Nah, modding an obscure game

buoyant viper
#

F

arctic moth
#

so i did a thing, now the server is like crashed but entities are moving and stuff

#

idk wtf is happening

quiet ice
#

It's quite fun actually (especially being able to laugh at the failures/incompetence of newcompers), just gets a bit lonely

arctic moth
#

me?

quiet ice
#

nah, modding games

arctic moth
#

huh so whatever the fuck i did just kind of didn't happen at all

quiet ice
#

Not talking about mc there

arctic moth
#

still at 20 tps

tender shard
#

old Trinket();

arctic moth
#

i just made it spam runnables to do each tnt on a different tick

#

super inefficient but idc

final monolith
#

Hey guys im developing a custom ConfigurationSerializable class. How i can remove these lines?

tender shard
#

you canot

tender shard
#

they are there on purpose

#

they have to be there

final monolith
#

alr ok

#

ty

tender shard
#

np

quiet ice
#

the issue is that it will not know how to deserialize the objects afterwards more or less

arctic moth
#

omg i lagged it so badly that it takes about a second per line of thread dump

#

was this a bad idea

#

the lag hit after

#

lol

#

huh only 1 thread dump?

#

strange

#

unless my console crashed

#

oh no i crashed all the other plugins but the server is still running lol

#

its stealing all the ram from other plugins

ancient plank
tender shard
#

/de_nuke

ancient plank
#

cs nerd

tender shard
#

no u

arctic moth
#

cs nerd

#

tbh c++ better

#

more of a pain in the ass but more fun ig

ancient plank
#

CSGO more like

native nexus
#

You can't really say a language is better

#

smh

ancient plank
#

Csno

arctic moth
#

i think my plugin might actually be working

cold tartan
#

πŸ‘€

#

Nice

arctic moth
#

its crashing everything it touches but it hasnt killed the main thread yet

cold tartan
#

Lol

arctic moth
#

only 4 of the plugins on the server

#

make that 5

#

oh they are all differnet threads

#

why tf does worldedit get its own thread

ancient plank
#

new Thread();

tender shard
#

because it created one

arctic moth
#

why do they need one

#

i wonder if my server will actually recover

#

i spammed /nuke like 12 times before the lag hit

#

im slowly killing threads one by one

#

it must be trying to process the explosions rn

#

taking almost as much as chrome

#

only 4 gb of ram?

#

i allocated 8

#

i managed to crash bstats twice

#

ok according to math this will take about 111 hours to finish loading

#

if it even loads

#

ok ill see you guys in 111 hours ig

#

wait what if i did something like skip blocks

#

what is the radius of an explosion with 4 power

iron glade
#

Hey native speakers, which one is better?
The warp is currently disabled / deactivated ?

eternal oxide
#

disabled

arctic moth
#

disabled

iron glade
#

thank you!

arctic moth
#

a bit smaller than i expected tbh

ancient plank
#

not work

iron glade
#

Videos on discord are bugging like hell for me somehow

crisp steeple
#

images too

arctic moth
ancient plank
#

Fun fact 100 blocks isn't as big as you'd think

#

In length

arctic moth
#

for some reason it didnt destroy any blocks, rendering is working

#

probably a random plugin being a piece of shit

#

and cancelling BlockExplodeEvent

quiet ice
#

too near to spawn?

crisp steeple
#

i think there’s a boolean parameter in world.createexplosion that changes block breaking

arctic moth
cobalt thorn
ancient plank
#

?jd-s

undone axleBOT
tender shard
#

did you copy paste my msg from yersterday lmao

cobalt thorn
quiet ice
#

I prefer my UnsafeValues suggestion. Work brilliantly

cobalt thorn
#

She responded to one of my question

tender shard
#

she*

cobalt thorn
#

Fixed didn’t know

tender shard
#

I literally gave the exact same answer yesterday lol

cobalt thorn
#

What i asked im doing a translation plugin the thing is i want pick the message sended by server for example plugin and translate them for the users

tender shard
#

oh shit

#

hit return too early

#

do yo uwant to listen to messages sent by other plugins as well?

tender shard
#

oh okay then you have 2 choices:

cobalt thorn
#

And resend them i think probably protocol lib can help

tender shard
#
  1. inject your own logic into netty
  2. use protocollib to listen to outgoing "chat" packets
cobalt thorn
#

And easier

tender shard
#

this is one of the rare cases where I'd suggest you to use protocollib

quiet ice
#
  1. Use ASM and replace all strings in a plugin. Becaue nothing can go wrong
tender shard
#

geol go to sleep πŸ˜„

cobalt thorn
quiet ice
#

Hey, writing a maven resolver drives me insane

tender shard
#

werent you the person who made the PR for my jar-string-replacer?

quiet ice
#

yes

tender shard
#

thanks again, it works perfectly ❀️

coarse finch
#

on https://semver.org/, it says "Software using Semantic Versioning MUST declare a public API. This API could be declared in the code itself or exist strictly in documentation. However it is done, it SHOULD be precise and comprehensive." what exactly does this mean I need to do?

quiet ice
#

Basically you need to say what is public api and what is internal api

#

?jd-s

undone axleBOT
quiet ice
#

Bukkit for example has

 Note: While the Bukkit API makes every effort to ensure stability, this is not guaranteed, especially across major versions. In particular the following is a (incomplete) list of things that are not API.

    Implementing interfaces. The Bukkit API is designed to only be implemented by server software. Unless a class/interface is obviously designed for extension (eg BukkitRunnable), or explicitly marked as such, it should not be implemented by plugins. Although this can sometimes work, it is not guaranteed to do so and resulting bugs will be disregarded.
    Constructing inbuilt events. Although backwards compatibility is attempted where possible, it is sometimes not possible to add new fields to events without breaking existing constructors. To ensure that the API continues to evolve, event constructors are therefore not plugin API.
    Implementation classes. Concrete implementation classes packaged with Bukkit (eg those beginning with Simple) are not API. You should access them via their interfaces instead.

For this

tender shard
#

and they ask you to use a proper versioning scheme

coarse finch
#

so by default does a plugin have an external api

tender shard
#

no

coarse finch
#

ok

tender shard
#

it only has it if you decide to do so

quiet ice
#

To be fair I have always ignored that paragaph of semver

#

Or really I have never been too fond of following semver to the letter

tender shard
#

an API is basically just "there are the following method that everyone can use, and we wont change them randomly: A(), B(), etc

coarse finch
tender shard
#

"1.0-ThisFixesSomething" isn't

coarse finch
#

thats the whole point of semvar

#

major.minor.patch

tender shard
#

yeah kinda

coarse finch
#

well

#

im gonna be inplementing an api later, ill just wait till i do

quiet ice
#

I prefer my

Maven's versioning scheme uses the following standards:
   - MajorVersion
   - MinorVersion
   - IncrementalVersion
   - BuildNumber
   - Qualifier
For example:
   - MajorVersion: 1.2.1
   - MinorVersion: 2.0
   - IncrementalVersion: 1.2-SNAPSHOT
   - BuildNumber: 1.4.2-12
   - Qualifier: 1.2-beta-2
coarse finch
#

mavens kinda wierd

tender shard
#

hm no