#help-development

1 messages · Page 713 of 1

dark jolt
#

How can I make this so when changes are made to the config it would fully delete all the old advancements and recreate them ith all the new stuff in the config, same for when plugin enables on startup

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

worldly ingot
#

Display entities

#

You can scale up text displays very easily

fossil flax
#

how can i add hex color?

fossil flax
#

and is there a way to keep their food level at max?

worldly ingot
#

You can cancel FoodLevelChangeEvent

quiet ice
#

My idea would be that it is some optical illusion caused by perspective BS. But that would be some huge effort for something small

hushed pawn
#

How can I change methods and apply changes without reloading plugins, is there any tutorials?

#

In my ide

quiet ice
#

It's called hotswapping

#

So try searching for that

upper hazel
unkempt chasm
#

hey

upper hazel
#

ok

unkempt chasm
#

does anybdoy use deluxehub

undone axleBOT
#

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

keen ferry
#

Hey, I'm making a minigame plugin. I have a GamePhase interface, which different game phases implement.
Is it generally better to have one event listener of each type in the "listeners" package, or have separate event listeners for every phase implementation?

quiet ice
#

Just do it monolithically like a true idiot

quaint mantle
#

just don't copy

ivory sleet
#

I’d say, I like to isolate listeners per functionality/module

keen ferry
#

Right, ty! Registering multiple event listeners for the same one doesn't matter performance wise right

pseudo hazel
#

nah

echo basalt
#

Each phase should track its own event handlers and tasks

#

And just make it an abstract class that contains some collections n stuff

keen ferry
hybrid spoke
#

no thats the way to go

echo basalt
#

I call mine PhaseChain

unkempt chasm
#

which plugins should i download on my bungee lobby?

hybrid spoke
#

both aren't good suffixes

echo basalt
#

fuck off

echo basalt
keen ferry
#

And how do you handle conditions for switching phases? For example, when a player gets a kill, I want it to switch to phase foo, and when the tick value is over 40 (2 seconds have passed), I want it to switch to phase bar
Should I do all this logic in the onTick method of the gamestate class?

echo basalt
#

The way I have it is that phases are linear

hybrid spoke
#

no, the gamephases dont know each other

echo basalt
#

So there's only 1 active phase

hybrid spoke
#

they should be independent from each other

echo basalt
#

Yeah

hybrid spoke
#

you could give it a state

#

or use a predicate to give them a condition

#

and in your manager you check if that condition has been met

#

or the wanted state has been reached

#

then go next

keen ferry
#

👍

hybrid spoke
#

you could also do some kind of linking and give it a parent

echo basalt
#

The way I have it is just an End method that the state calls itself

#

That just yeets to the next

hybrid spoke
#

yeah exactly, symbolize a state

echo basalt
#

If you're clever you can make a MultiState class that starts multiple states at once and once they're all done it advances

echo basalt
#

The whole state system is really neat in lots of places, not just minigames

#

I grabbed the whole state system and made a story/quests plugin out of it

#

So I can do stuff like this

#

You can make a MultiState class that only proceeds to the next state

#

if all sub-states are done

#

lets you paralellize a bit

candid galleon
#

should have a HaveItemsObjective

#

and have it accept a Material...

echo basalt
#

Ehh

candid galleon
#

or refactor the HaveItemObjective to support multiple

echo basalt
#

Sure that would render this MultiObjective useless

#

But I'd rather just stick to simple checks

drowsy helm
#

how does it check

#

is it on a scheduler or just listens to any of the potential events

livid dove
livid dove
#

?

#

Do I have a blind spot?

echo basalt
#

yes

livid dove
#

Never heard of var args

echo basalt
#

It's the

#

Objective... thing

#

that gets converted to an array

#

You can pass as many args as you want and it makes an array

#

You can also just pass nothing and it makes an empty array

livid dove
#

Got a link to documentation of that practice? How have I never heard of this type of param? Lmqo

echo basalt
#
public void doWhatever(String... lines) {
  for(String line : lines) {
    System.out.println(line);
  }
}
#

doWhatever() is valid
doWhatever("one", "two", "three") is also valid

drowsy helm
#

most languages have varargs

livid dove
#

Oh shit its that ... that does it?

drowsy helm
#

super useful

echo basalt
#

yeah

livid dove
#

Huh neat.

echo basalt
#

It allows for stuff like List.of to work

#

infinitely

#

And if you want to avoid the first case

#

You add a mandatory first param

#

Like this

#

public void doWhatever(String first, String... lines)

livid dove
#

Hmmm, think i feel more conftorble with a constructor imo, as you can pull the collection from elsewhere and loop the right method from the builder

drowsy helm
#

problem with that is you cant pass an array anymore

echo basalt
#

That's fine

#

What you can do if you want a collection too

#

Is just like

drowsy helm
#

yeah just collect it to one thing

#

i wish java had list comprehension like pyhthon

#

would be nice

echo basalt
#
public Whatever(String... lines) {
  this(List.of(lines));
}

public Whatever(List<String> lines) {
  ...
}
livid dove
#

Yeah I dunno gonna have to look up pros and cons of both before I dive in and use it

echo basalt
#

Varargs literally converts the result into an array

drowsy helm
#

theres no downsides to varargs if used in the right usecase

echo basalt
#

All it does

#

Only limitation

drowsy helm
#

its just a quality of life thing

echo basalt
#

Is that it must be the last param

#

And there can only be 1 varargs param

#

whatever

livid dove
#

Ahhhh no there is. Can't have more than one var args in a method

#

Builder gives the same functionality to class constructors but for anything that needs to be initialised via a param

drowsy helm
#

yeah wouldnt adhere semantically if oyu could

livid dove
#

I can see the appeal of varargs and where to use it.

Construction methods ain't it for me tho imo

echo basalt
#

this doesn't run anything on the constructor ¯_(ツ)_/¯

#

But I'm not going to make an objective builder

#

The same way I'm not making a phase builder for my minigame stuff

#

It just doesn't make sense

livid dove
#

Each to their own haha.

I try to do builders on stuff that has multi fields where I can so I can just have a factory and forget lol

#

Makes multi arg commands thar have an end product a piece of piss haha

echo basalt
#

I do have a command builder

livid dove
#

Ayeee

echo basalt
#

Used to be a class for each subcommand before

livid dove
#

Currently rewriting my SQL wrapping library and think I'd die if I didn't have a credentials constructor lol

echo basalt
#

but I wrote the builder like last week

#

But yeah here's context

#

I could write a parser

#

but I'm not being paid enough for that

livid dove
#

That objective method hurts my soul lol)

#

But I get it

echo basalt
#

blud doesn't like orange

livid dove
#

Lmao

#

I just prefer the whole 'write once and forget' approach. If u needed to change objectives for say story step, or allow for custom user made objectives , gonna be a bitch to do

#

Just imo ofc

echo basalt
#

Well

#

The customer's paying me per story

livid dove
#

Lmao genius

#

Big brain

echo basalt
#

And we're starting small with like 3-4 but we'll increase to like 30+ in the future

#

20$ each that's 600 bucks

#

Making an objective takes a couple minutes

livid dove
#

My man I'd set it up to be as easy as hell to make a new one.

Multi objective stories i forsee becoming a pain in ur ass in the future 😭

echo basalt
#

Customer wants it to be linear

livid dove
#

Keeping track that is

echo basalt
#

It's surprisingly robust

livid dove
#

Hey fair cop man

echo basalt
#

Objectives can have release dates

#

I can add objectives later and it'll reattach

livid dove
#

God I wish my customers were so chill 😭

echo basalt
#

To be fair that customer likes to bargain a lot

#

Spent 5 hours forking their world gen yesterday

#

Adding some BS structure from another plugin

livid dove
#

Ew

echo basalt
#

It's like a waystone thing

livid dove
#

Tbh I need to get my team out there more lol

echo basalt
#

Had to write checks to not spawn it in trees n stuff

#

I get these projects because I put the work in, and do it right

#

Wrote like 9 projects in 2 months or whatever

livid dove
#

Fair cop

lost matrix
#

Probably

echo basalt
#

that's what I got

#

LinearObjective, MultiObjective

livid dove
#

shrugs what works for you lad legit.

echo basalt
#

WaitForeverObjective that must be manually overriden with commands

#

For stuff like tutorials or integrating with other plugins

livid dove
#

Huh neat.

#

I'm just hype to get my new database wrapper done so I can finish my portals plugin project :L

echo basalt
#

:L

#

Still testing and fixing my Command Engine V3™️ so I can uhh

#

do my skyblock stuff

#

Lot of work this week

#

bit sad that I couldn't buy the office equipment that I wanted today woeisme

livid dove
#

Yeah I rewrote it so it could easily be implemented to other databases without rewrite. More interface based like

ivory sleet
livid dove
lost matrix
echo basalt
ivory sleet
#

Lmao

livid dove
#

The one I'm excited for the most is I took smiles modern inventory menu idea and set it up so the same base can be used for custom inventories too :L

echo basalt
#

Mans flexing

livid dove
#

Always flexing 😭

echo basalt
#

One thing I still need to do is getting tab completion to work on minestom

#

I pray I don't have to use packets

#

Their command thing is weird

livid dove
#

Ewwww why minestom?

echo basalt
#

We're using it at work and it's a platform I'd like to support on my skyblock stuff

livid dove
#

But like.. why?

echo basalt
#

speaking of work it's time to clean up whatever mess the team made

livid dove
#

This is why we branch and PR

#

Lmao

echo basalt
#

looking at you in particular, chat commands

livid dove
#

🎵Put that shit code back where it came from or so help me 🎵

livid dove
echo basalt
#

uhh

#

we ported our codebase to minestom because we were tired of all the shitty hacks we had to do

#

Straight-up not worth it

#

And the dude that did most of the work just uses chat messages for commands instead of the command system

ivory sleet
#

Yeah minestom is probably nicer if you actually care about shit

echo basalt
#

It's not a survival server and there are no vanilla stuff

#

just a RP thing

ivory sleet
#

Mye

livid dove
#

Huh fair

peak jetty
#

can someone help me update my minecraft plugin please?

#

i changed the version to 1.20.1 but it doesnt work in the server

#

the code doesn't show any errors

lost matrix
quaint mantle
#
        ItemStack ironHelmet = new ItemStack(Material.IRON_HELMET);
        ItemStack ironChestplate = new ItemStack(Material.IRON_CHESTPLATE);
        ItemStack ironLeggings = new ItemStack(Material.IRON_LEGGINGS);
        ItemStack scoutDiamondBoots = new ItemStack(Material.DIAMOND_BOOTS);
        scoutDiamondBoots.addEnchantment(Enchantment.PROTECTION_FALL, 1);

        ItemStack stackOfPotions = new ItemStack(Material.POTION);
        PotionMeta potionMeta = (PotionMeta) stackOfPotions.getItemMeta();
        potionMeta.addCustomEffect(new PotionEffect(PotionEffectType.SPEED, 30 * 20, 1), true);
        stackOfPotions.setItemMeta(potionMeta);
        stackOfPotions.setAmount(3);

        // Equip the armor
        player.getInventory().setHelmet(ironHelmet);
        player.getInventory().setChestplate(ironChestplate);
        player.getInventory().setLeggings(ironLeggings);
        player.getInventory().setBoots(scoutDiamondBoots);

        // Give the items to the player
        player.getInventory().addItem(
                diamondAxe,
                diamondPickaxe,
                stackOfPotions
        );```
yo , line that says "new ItemStack(Material.POTION)" , any ideas how to make that a splash potion? replacing it with Material.SPLASH_POTION just crashes me (error [plugin] generated an exception
java.lang.NoSuchFieldError: SPLASH_POTION)
#

1.8.9 , couldnmt find anything online

sullen marlin
#

You need to compile against 1.8.8

quaint mantle
#

LOL I FORGOT TO DO THAT

#

CUS I MADE A NEW PROJECT

#

BAHAHHAHAHHAHA

quasi flint
#

death himself

trim creek
#

nah he summoned me

#

lmao

normal spire
quaint mantle
#

ily

#

<3

dense geyser
#

Hi! I'm trying to work out how colours on note particles work. When I set:
offsetx to 0.5
offsety to 0.3
offsetz to 0.5
speed to 0
count to 2
it spawned only green notes, but when I set speed to 1, it went multicoloured? what's the significance of speed and what does it do in respect to note particles?

young knoll
#

Well there must be an error somewhere

#

Or the plugin isn’t even on the server

echo basalt
peak jetty
#

it just said "Failed To load PlutoAddon-2.0 from plugins"

echo basalt
#

Just make a simple command

young knoll
#

There should be more than that

#

Like a full stack trace

echo basalt
#

Yeah these are random

dense geyser
#

hmm

#

I wonder if there's a way to spawn them of a specific colour, and if so, what the range is

echo basalt
dense geyser
#

oh interesting

#

ig ill have to sacrifice offsets and do it manually then, thanks

#

thatll be it

earnest socket
#

Is there any way to send a packet to change the player's current biome? I am trying to add a custom biome to a custom world but the BiomeProvider class doesn't allow custom biomes. If there is any other easier way to do this please let me know

smoky anchor
earnest socket
#

but I use java for the world generation

#

Actually I got another idea

#

are there packets for changing the Sky and fog color in 1.20?

#

basically what biomes do

#

or is that client-sided?

smoky anchor
#

That I believe is client-sided based on the biome, weather or bosses
I do not believe the API has a way to set custom biomes
But you could dispatch a fillbiome command, but only if you're really desparate :D

earnest socket
#

well rip I guess. Thankfully it's not too bad. What I am doing works well without different sky and fog colors. It just looks a little out of place

valid burrow
#

im pretty sure ive seen a plugin for this before

#

about 78,4% sure

remote swallow
#

?paste the scoreboard section

undone axleBOT
young knoll
#

You can change biome with packets, yes

#

I don’t remember if it’s still part of the chunk packet or if there is a new packet for it

livid dove
paper lichen
#

Does anyone know how to change the numPlayers in the ServerListPingEvent?

earnest socket
valid burrow
#

making the functions depricated

#

but most of the time theres an alternative

earnest socket
#

also datapack biomes changed a lot of the sky color code

#

so it makes sense that it would stop working

#

as far as I know currently the only way to have custom sky color is with custom biomes

abstract iron
#

Hey newbie question here
Why do people tend to use armor stands alot when making custom mobs and such?

valid burrow
#

first of all they dont do shit on their own and dont have an ai

supple elk
#

Hey guys, for some reason this is compiling in java 19 and it needs to be java 17. Does anyone know how ican change that?

#

nvm

#

I just needed to do a clean and reload

dusk cipher
#

Hi, i am currently kicking players that dont accept my server ressource pack, but when a player try to reconnect and dont have accepted, he is instantly kicked.
How to ask again to players to accept texture pack ?

supple elk
kindred sentinel
#

how to send clickable message to player?

young knoll
#

Player.spigot.sendMessage

#

Using the component api

trim creek
#

TextComponent

young knoll
#

?componts

quaint mantle
#
String message = "Click me to visit our website!";
String command = "/your-command-here"; // Replace with the actual command or link

// Send the clickable message
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "tellraw @a [\"\",{\"text\":\"" + message + "\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"" + command + "\"}}]");

@kindred sentinel

remote swallow
#

@worldly ingot add now

young knoll
#

?components

#

sadge

young knoll
#

Oh god no please use the api

#

Don't manually execute a tellraw command

quaint mantle
#

dude player.spigot is ancient

worldly ingot
#

What am I adding?

worldly ingot
remote swallow
worldly ingot
#

It's current API, wat

quaint mantle
#

😉

remote swallow
kindred sentinel
#

oh

remote swallow
#

its the wrong way to do it

kindred sentinel
#

yeah

#

i got

remote swallow
#

use the component api

kindred sentinel
#

i know

young knoll
#

player.spigot is ancient and using strings to make a tellraw command isn't?

#

wat

kindred sentinel
#

it's tellraw command

quaint mantle
#

TextComponent is also ancient

young knoll
#

And?

worldly ingot
#

It... it isn't ancient...

young knoll
#

So is player, but we use that just fine

remote swallow
#

you talking about the fact its 1.14 bungee api?

quaint mantle
#

Deprecated = bad practice

worldly ingot
#

It's not deprecated

remote swallow
#

you are literally using paper api

#

not spigot

worldly ingot
#

You're probably using Paper

remote swallow
#

you shouldnt be using tellraw in paper either anyway

quaint mantle
#
Yes, the class TextComponent in Bukkit has been deprecated. According to the deprecated list for Paper-API 1.18.2-R0.1-SNAPSHOT

I think your right EpicEbic

#

My bad

remote swallow
worldly ingot
#

I believe there is

#

At least I feel like I remember seeing it PES_Think

kindred sentinel
#

and how to do like two hover clicks in one message? like

[Yes] [No]
quaint mantle
#
'sendMessage(net.md_5.bungee.api.chat.@org.jetbrains.annotations.NotNull BaseComponent...)' is deprecated 

Do not use player.spigot

worldly ingot
#

Paper deprecates anything Spigot component related

#

They have Adventure

#

If you're using Spigot then you can use the component API

worldly ingot
#

Seems we don't have API for it. Paper does, but I could have sworn we did too

#

Maybe in 1.20.2 when those client settings are sent in the configuration phase I can expose API for it

remote swallow
worldly ingot
#

They have a config change event

#

PlayerClientOptionsChangeEvent

#

Then you get getSkinParts()

young knoll
#

Choco prepares to write a PR

remote swallow
#

on his gfs computer

worldly ingot
#

I don't actually like the way they did it tbh

remote swallow
#

how could you look at paper impl

#

banned

worldly ingot
#

It isn't. Only way you'll get it is via event then store it somewhere

young knoll
worldly ingot
#

Until Sunday, yeah

remote swallow
#

not even a candian female

kindred sentinel
remote swallow
#

call create() on it

worldly ingot
#

Looking forward to .build() 🤞

kindred sentinel
trim creek
#

I don't think .create() exists.

#

huh

kindred sentinel
#

thanks

worldly ingot
#

For a ComponentBuilder it does

trim creek
#

It does??

young knoll
#

mhm

worldly ingot
trim creek
#

I thought everyone always used .build()

#

huh

worldly ingot
#

After that PR gets merged it will be the preferred way to do things

kindred sentinel
#

it works good

#

2 text components in one send message

remote swallow
#

but it uses create atm

worldly ingot
#

Less than on Bukkit 😄

remote swallow
#

doesnt github stuff also include issues though

worldly ingot
#

Nah they're separate

remote swallow
#

wat

#

i feel like it might include issue on the number

worldly ingot
#

Just gotta remove the is: filter

remote swallow
#

yeah, what i meant was github prs had total issues and prs, not justprs

#

while stash uses just prs for the number

nocturne root
#

does someone know how to get the nms version of bukkit itemstack?

eternal night
#

do you mean t he data version ?

lilac dagger
#

CraftItemStack.asNmscopy

nocturne root
#

i don't have craftitemstack

remote swallow
#

cast it

#

or is that static

#

CraftItemStack.asNmsCopy(stack) mayb

worldly ingot
#

It's a static method, but if you don't have it then you're not depending on the server, you're depending on the API

#

Why do you need an internal item stack?

nocturne root
nocturne root
worldly ingot
#

That didn't really answer my question lol

thin iris
#

does anyone know mc's gravitational pull

#

is it just -9.81 ish

nocturne root
deep juniper
#

I need dev for my network, somebody ?

#

Simple plugin

#

I paid

onyx fjord
#

can custom durability be hacked or it needs workarounds (like tracking it myself)?

lost matrix
#

You need to make a custom system. Durabilitiy values are hard coded.

onyx fjord
#

🥲

lost matrix
onyx fjord
#

is PlayerItemDamageEvent enough to track?

remote swallow
undone axleBOT
lost matrix
onyx fjord
#

im worried that plugins modifying the durability can break the item too early

deep juniper
#

Does any dev want to help me with a project? I pay

#

Is simple plugin

remote swallow
#

go onto the services forum

#

?services

undone axleBOT
deep juniper
#

ok

chilly hearth
#

?learn java!

#

?learnjava!

undone axleBOT
pallid escarp
#

If I have to kill a group of players when server stops, is it alright to do that inside onDisable method?

lost matrix
#

Nope, clients are kicked before plugins are disabled.

pallid escarp
#

So it would be better to store these players in a file and kill them on their join?

#

After restart

lost matrix
#

Depends on what you are doing

onyx fjord
#

can i destroy an item without knowing what inventory has it?

lost matrix
pallid escarp
#

I have a minigame plugin. When players join this minigame, they are teleported to the special location (they should not be allowed to get there in any other way). I want to kill them in case of sudden stop of the server

#

And this location is not always the same

lost matrix
#

Then as soon as you throw them there, just add a pdc tag to them and check it when they join again.
Not sure if you really want to kill them or simply set use the spawn location event to put them back.

valid burrow
#

^

thin iris
#

this is code i made to be like a rope physic. it works but when i get near it it slows down, i can see why but is it possible to make it like just swing back and forth ?

Vector cableAnchorPos = new Vector(loc.getX(), loc.getY(), loc.getZ());
            Vector playerPosition = player.getLocation().toVector();

            Vector pendulumToPlayer = playerPosition.clone().subtract(cableAnchorPos);
            double pendulumLength = pendulumToPlayer.length();

            // gravislay
            Vector gravityForce = new Vector(0, -9.81, 0);
            // multiply by pendulum length to make it more realistic
            gravityForce.multiply(pendulumLength);
            // normalize to make it a unit vector
            gravityForce.normalize();

            // tension force is here because the pendulum is not a rigid body
            Vector tensionForce = pendulumToPlayer.clone();
            tensionForce.normalize();
            tensionForce.multiply(-1);
            tensionForce.multiply(gravityForce.length());

            Vector total = gravityForce.clone().add(tensionForce);
            player.sendMessage(Prismatica.prefix() + " Pendulum force: " + total.toString());
            player.sendMessage(Prismatica.prefix() + " Pendulum length: " + pendulumLength);
            player.sendMessage(Prismatica.prefix() + " Pendulum force length: " + gravityForce.length());
            player.sendMessage(Prismatica.prefix() + " Pendulum tension force length: " + tensionForce.length());



            player.setVelocity(total);```
echo basalt
#

You'll need to run that on a scheduler

thin iris
#

its looping every tick already

lost matrix
#

This cant be the whole method. Rope physics are pretty complex. Make it a rigid pendulum.

thin iris
#

can i send a video lol

#

im verified on my other account but not here

#

and my other one was d1sabled

#

can i dm you the video @lost matrix

smoky oak
#

can you call event.isCancelled to true, then to false, and it will still happen?

#

yes im doing some dumb logic sue me

lost matrix
lost matrix
#

You can un-cancel events. You can even use a completely different listener with a higher priority to do taht

smoky oak
#

eh

#
if(!(event.getRecipe() instanceof ShapedRecipe recipe)) return;
if(!(recipe.getKey().getNamespace().equals(Echo.namespace))) return;
if(!(event.getWhoClicked() instanceof Player player)) return;
event.setCancelled(true);
#

its not about priority

#

its cuz the event here converts the recipes from a 'you cannot' architecture into a 'you can' architecture

echo basalt
#

let him cook

thin iris
#

the particles are verlet integration

lost matrix
#

Increase the length of the vector which is normal to the rope

echo basalt
#

p much

#

basically your gravity is too strong

thin iris
#

really?

echo basalt
#

I'd divide it by 20 because vel is measured in ticks

echo basalt
#

might screw with your tension force

lost matrix
#

Negating the gravity is also a great idea

echo basalt
#

Or yeah you div gravity by 20 on your total = ...

#

just mess around you'll get there

thin iris
#

like Vector gravityForce = new Vector(0, -9.81 / 20, 0); ?

echo basalt
#

just try stuff

smoky oak
#

uh

#

is there any way to identify a recipe that doesnt involve caching the original

#

cuz if no i've have some fun mapping to do

young knoll
#

Recipes have a namespace key

smoky oak
#

yea on declaration

thin iris
#

@echo basalt well yeah, dividing grav by 20 makes it look smoother but it doesnt fix th way that it stops halfway and doesnt continue the swing

smoky oak
#

OH WAIT

#

yea

#

ShapedRecipe has a key

#

recipe doesnt

thin iris
#

huh?

echo basalt
#

Apply a vector on a task

smoky oak
#

why cant i declare a class abstract final if all i want from it is a place to store a static method

thin iris
ember estuary
#

How can i get this to load?
I successfully ran BuildTools (--remapped) and got not error when doing so.
But now this is still red, idk what to do?

remote swallow
#

?nms follow this guide

trim creek
#

That's why I hate both Maven and Gradle 👍🏼

#

They sometimes don't even work as I intend

remote swallow
#

they do if you use them right

ember estuary
# remote swallow ?nms follow this guide

thats what i did

this is the plugin in maven

<plugin>
                <groupId>net.md-5</groupId>
                <artifactId>specialsource-maven-plugin</artifactId>
                <version>1.2.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>remap</goal>
                        </goals>
                        <id>remap-obf</id>
                        <configuration>
                            <srgIn>org.spigotmc:minecraft-server:1.20.1-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
                            <reverse>true</reverse>
                            <remappedDependencies>org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
                            <remappedArtifactAttached>true</remappedArtifactAttached>
                            <remappedClassifierName>remapped-obf</remappedClassifierName>
                        </configuration>
                    </execution>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>remap</goal>
                        </goals>
                        <id>remap-spigot</id>
                        <configuration>
                            <inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
                            <srgIn>org.spigotmc:minecraft-server:1.20.1-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
                            <remappedDependencies>org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
remote swallow
#

?paste ur pom

undone axleBOT
ember estuary
remote swallow
#

you using intellij?

ember estuary
#

Nope, works fine in IntelliJ, tried porting it to Fleet and there it's red, even after running BuildTools

remote swallow
#

does fleet have a way to load maven stuff in the first placE?

#

might be that

ember estuary
#

just via command

#

i did mvn clean install -U

remote swallow
#

or its just not checking maven local

#

if it works in ij, probably better to just use ij

sterile token
#

hi, i was wondering to get a simple explanation about player nametags. Those below player name

trim creek
#

By default, you can only have a number, then a short text. Like 1. LvL. The number will always be white, the text can be coloured.

#

And it is managed by scoreboard objectives.

#

If you mean the ones that do not contain numbers before any texts, those are made by TAB, which is a plugin.

bitter rune
#

cant seem to find these, is there a potion effect or what effect is used when someone falls through snow?

remote swallow
worldly ingot
#

Yeah I think at like 80 ticks they start taking damage

#

It will also decrease every tick so keep that in mind

#

Oh, well, getMaxFreezeTicks() lol

bitter rune
#

it resets before it gets to 80 ticks i am having another method control the damage, i just wanted the overlay creating a sleet storm

thorn orbit
#

Does Spigot have some sort of API to connect to their plugin database? Im working on a addon for pterodactyl panel

sullen marlin
remote swallow
#

hmmmmm

#

we need a java api for that

#

well

#

wrapper

worldly ingot
#

I think someone wrote a wrapper already

#

Don't remember who or what it was called

narrow sphinx
#

Anybody know how I can get the coords of a map cursor from the map item?

worldly ingot
valid burrow
#

has anyone of yall ever used ProtocolLib

ivory sleet
#

yeap

thorn orbit
#

in php

#

or am i sstupid

remote swallow
#

im pretty sure you cant download with that

valid burrow
#

how do i Initialize ProtocolLib's ProtocolManager

#

everything i find seems to be outdated

sullen marlin
#

I doubt it's changed

valid burrow
#

well then i might just be stupid

#

or all the things i find never did work

#

how complicated is it to send an actionbar in 1.8 without using a library

worldly ingot
#

Does player.spigot().sendMessage() not have a MessageType enum in 1.8?

#

Was that a 1.9 addition?

valid burrow
#

well if i have done my research correctly no

#

thats why i wanted to use protocol lib

#

or something similar

worldly ingot
#

Well. Perks of 8 year old software ¯_(ツ)_/¯

valid burrow
#

x)

#

i dont like coding for 1.8 either

#

but sometimes its not my decision

remote swallow
#

technically it is

#

if its a comission you have the option to say no

worldly ingot
#

Anyways, you'll want to look at the chat packet

#

It's the chat position 2

valid burrow
remote swallow
#

public plugins help and just random github projects

worldly ingot
#

Just do it onEnable(), not on class init

valid burrow
worldly ingot
#

Will be null in a field

valid burrow
thorn orbit
remote swallow
#

iirc you can download normally with just the id and version number, choco confirm that for me

river oracle
#

I don't think you can download with spigot's official api don't you have to use spiget for that

thorn orbit
river oracle
remote swallow
sullen marlin
remote swallow
#

and it works id only, https://www.spigotmc.org/resources/108655/download?version=496667

#

just tested that lol

river oracle
#

mmm you'd need to bypass cloudflare for that not ideal if your botting

remote swallow
#

true

#

forgot about cloudflare

river oracle
#

if you're just using some normal downloads though should work fine

sullen marlin
#

cloudflare is only there because people bot/abuse it lol

remote swallow
#

who wants to abuse spigot downloads kek

worldly ingot
#

You'd be surprised

river oracle
#

people like to abuse everything

#

don't as dumb questions

remote swallow
#

especially chocos

#

?components

undone axleBOT
thorn orbit
wet breach
#

In php you would use something like curl

#

But since there is cloudflare you are going to have to mess with some headers

naive loom
#

has anyone ran into issues with not being able to pull the changed result out of an anvil?
I'm making it so you can enchant an item that isn't normally enchantable and it sets the result but it just won't let me take the item out.

echo basalt
#

Uhh

#

Great question

#

I know that's a thing with recipes

narrow sphinx
#

Does anybody know how to get a MapCursor from a map item/MapMeta? Trying to detect treasure coords from a buried treasure map, if there's a smarter way to do that let me know

echo basalt
#

Uhh

#

Let's see

worldly ingot
#

I don't think you can. Those cursors are only accessible from the map renderers iirc

narrow sphinx
#

Yeah, that's what it looked like from the time I spent reading the docs, figured I'd ask just in case anyone knew better

echo basalt
#

oh god nms core is awful

#

their command code is literally awful

narrow sphinx
#

Any better way to get the coords of a buried treasure you know of? I'd like to have something for players to be able to find the treasures without having to dig around but I don't want to just make a chest detecter because it'd be way too OP

echo basalt
#

I mean

#

World#locateNearestStructure is a thing

remote swallow
narrow sphinx
#

So I'd have to do something like check if the nearest structure is buried treasure, then get the coords if it is?

echo basalt
#

go away epic

young knoll
#

I think you can specify the type to that method

echo basalt
#

You locate the nearest buried treasure

narrow sphinx
#

Alright, is the provided location the exact chest location or does the game do some randomization stuff

echo basalt
#

Probably where it pasted

#

So like

#

Not really

#

Let's test

#

Y level is fucked

#

but this is where the chest is

#

yeah it matches the chest

young knoll
#

The y level is always 0

echo basalt
#

ye

young knoll
#

If you use the locate command in game it just shows ? Instead

echo basalt
#

yup

#

prob just stores XZ data

#

Like block populators do :p

narrow sphinx
#

Yeah just tested it myself as well

#

That works well enough for what I need I guess

#

Thanks for the suggestion

young knoll
#

Should be possible to find the chest if you just lord the chunk and then iterate down from the surface

#

They are only a few blocks down

narrow sphinx
#

Yeah but I'll just leave it to the player at that point, the X and Z are enough to find it

fossil flax
#

how can i print out a big message on plugin enabling?
like this

orchid gazelle
#

You print multiple lines

fossil flax
#
                "--------------------------------------------" +
                "" +
                "             TestPlugin v1.0" +
                "               by ImYuvi" +
                "" +
                "--------------------------------------------" +
                "");```
#

like this?

orchid gazelle
#

Discord formats this horribly, but notice that you gotta add \n to every line

#

\n means "begin a new line"

fossil flax
#

ok ill try

orchid gazelle
#

No problem^^ Glad I could help

dark jolt
#

How can I delete advancements when my plugin starts and reload and then have them create

#

I got the creation feature down but can't figure out deletion

fervent robin
#

This is the correct code to check if a player is going to die in a Entity damage event? if(victim.getHealth() - e.getFinalDamage() < 1.0)

young knoll
#

Should be <= 0.0

#

Otherwise yes

small current
#

why is my gradle doing this

smoky anchor
#

try hovering over the lines, it should tell you what is "wrong"

keen ferry
#

Hey, I want to determine whether a player is pressing A or D. I have the player's velocity vector and the direction they're facing in, how can I determine what button the player's pressing?

sullen marlin
#

Get the angle between the two and go from there

keen ferry
#

Well, the angle will always be 90deg if the player is pressing only A/D. How do I determine which button the player's pressing?

bitter rune
#

Get the Player's Direction Vector, Calculate the Rightward Unit Vector, Compare Velocity with Rightward Vector,

quaint mantle
#

im making a chest refill system and i am having trouble with potions (spigot 1.8.8), potions appear in the list as stone blocks (x1)and nothing after a few hours has been able to fix, any ideas ?

 public static List<ItemStack> loadLootTable(String tableName) {
        List<ItemStack> lootTable = new ArrayList<>();
        FileConfiguration config = plugin.getConfig();

        if (config.isConfigurationSection("loot-tables." + tableName + ".mandatory")) {
            ConfigurationSection mandatorySection = config.getConfigurationSection("loot-tables." + tableName + ".mandatory");

            for (String key : mandatorySection.getKeys(false)) {
                ConfigurationSection itemSection = mandatorySection.getConfigurationSection(key);

                String materialName = itemSection.getString("material", "STONE");
                int amount = itemSection.getInt("amount", 1);

                Material material = Material.matchMaterial(materialName);
                if (material == null) {
                    System.out.println("Invalid material specified in loot table: " + materialName);
                    continue;
                }

                ItemStack itemStack = new ItemStack(material, amount);

                // check for potions
                if (itemSection.isConfigurationSection("potion")) {
                    ConfigurationSection potionSection = itemSection.getConfigurationSection("potion");

                    String name = potionSection.getKeys(false).iterator().next(); // scuffed as shit but whaetever

                    switch(name) {
                        case "speed":
                            itemStack = Potions.speed();
                            break;
                        case "shortRegen":
                            itemStack = Potions.shortRegen();
                            break;
                        case "longRegen":
                            itemStack = Potions.longRegen();
                            break;
                        case "fire":
                            itemStack = Potions.fire();
                            break;
                        default:
                            break;
                    }

                    System.out.println("created potion: " + name);

                }
... 
lootTable.add(itemStack);

code continues but irrelevant```
undone axleBOT
quaint mantle
#

!?

young knoll
#

1.8 old af

quaint mantle
#

1.8.9 plugins :/

young knoll
#

Anyway

#

Add debug lines to see what is getting called

#

Also check your Potions.whatever constants

quaint mantle
# young knoll Also check your Potions.whatever constants
    public static ItemStack speed() {
        Potion potion = new Potion(PotionType.SPEED, 1);
        potion.setSplash(true);

        ItemStack potionItemStack = potion.toItemStack(1);

        PotionMeta potionMeta = (PotionMeta) potionItemStack.getItemMeta();
        potionMeta.addCustomEffect(new PotionEffect(PotionEffectType.SPEED, 30 * 20, 1), true); // Speed II for 30 seconds
        potionItemStack.setItemMeta(potionMeta);

        return potionItemStack;
    }```
tender shard
#

you aren't even checking the value

quaint mantle
#

potion:
speed

tender shard
#

that's not a configurationsection

#

that's just a string with key "potion" and value "speed"

quaint mantle
#

oh that's on me

#

ive changed this code so many times

tender shard
#

should it be possible to declare more than one potion?

quaint mantle
#

predetermined potions , just speed regen and fire res

young knoll
#

It still annoys me how all potions are the same item type

#

Mojang should have changed that in the flattening

#

Or at least made water bottle a seperate item

tender shard
#

yes

quaint mantle
#

brutal

tender shard
#

dr brutus

abstract spindle
#

How do I convert a hex number into a minecraft unicode
If I use Chars Character.toChars(0xD0000) it dose not give the expected result which should be \uDB00\uDC00

sullen marlin
#

Why is that expected

abstract spindle
#

I Asked on his Discord and got this response but still it dosen't work so I thought maybe ask here

sage patio
#

what is this lol

quaint mantle
#

btw

#

thanks again

#

i was so tunnelvisioned

sage patio
#

hmm

young knoll
#

Seems you answered your own question

sage patio
#

still i have no idea what is that

#

but it seems blocks have temperature

young knoll
#

Yes

#

It's really only used to determine at what height it will snow

gentle kraken
#

similar to sending a title to the player, is there a way to send an actionbar? I mean I am sure there is, since mccmo for example displays "you ready your fists" above the hotbar, but I am not entirely sure how they achieve that??

chrome beacon
gentle kraken
#

ChatMessageType.ACTION_BAR?

tribal quarry
undone axleBOT
chrome beacon
gentle kraken
#
                player.sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("test") );
#

so this should work ja?

small current
smoky anchor
gentle kraken
small current
#

Errors which never happened

#

Wait

eternal night
small current
#

'id' in 'org.gradle.plugin.use.PluginDependenciesSpec' cannot be applied to '(java.lang.String)'

#

what is this

#
plugins {
    id 'java'
}
#

im not doing anything wrong here

tender shard
#

is that kotlin or grovy

chrome beacon
#

Gradle Intellisense loves to give random errors

#

Try and see if it works

small current
#

it compiles

chrome beacon
#

Then just ignore ig

tender shard
#

i'd still use the kotlin-compatible syntax

small current
tender shard
#

id("java")

#

that works in both groovy and kotlin

eternal night
#

or just use kotlin, superiour anyway

small current
tender shard
#

what if you just do it like this

plugins {
  java
}
chrome beacon
#

I prefer Groovy Gradle

eternal night
#

😱

chrome beacon
#

Kotlin is pain

small current
#

this never happened

tender shard
#

well if it works, then it's an IJ issue so report it to them

small current
#

or i might just update IJ

#

if its not blocked by my ISP

valid burrow
#

anyone got an alternative to bossbar api since the maven import does not seem to work anymore

echo basalt
#

don't use 1.8 thumbsup

tender shard
#

maven import?

valid burrow
valid burrow
#

the thing you put in the pom

#

the repo and dependency

tender shard
#

which dependency and which repo

valid burrow
#

from the bossbarapi: <repository> <id>inventive-repo</id> <url>https://repo.inventivetalent.org/content/groups/public/</url> </repository> <dependency> <groupId>org.inventivetalent</groupId> <artifactId>bossbarapi</artifactId> <version>2.4.1</version> <scope>provided</scope> </dependency>

echo basalt
#

2.4.3-SNAPSHOT

#

2.4.1 not there

tender shard
valid burrow
#

oh thx okay

gentle kraken
#

is there a way to make a block completely immutable? I have a block, currently Iam grabbing events like fire events, explosions, and player breaking, and checking if the subject is the block. is there a better way? to get all cases?

tender shard
#

no

#

well you can listen to all subclasses of BlockEvent, check if it's a cancellable event, and if yes cancel it

gentle kraken
# tender shard no

lol so what, I gotta catch every event that could physically destory a block?

tender shard
#

but you cannot directly register a listener for BlockEvent, you need reflection to get all subclasses

tender shard
#

as said, you can easily do it through reflection

gentle kraken
tender shard
#

the hopper uses InventoryMoveItem

gentle kraken
gentle kraken
# tender shard the hopper uses InventoryMoveItem

well, i tried this:

    @EventHandler
    public void onInventoryMoveItem(InventoryMoveItemEvent event) {
        InventoryHolder sourceHolder = event.getSource().getHolder();
        InventoryHolder destHolder = event.getDestination().getHolder();

        Location sourceLocation = null;
        Location destLocation = null;

        if (sourceHolder instanceof BlockState) {
            sourceLocation = ((BlockState) sourceHolder).getLocation();
        }

        if (destHolder instanceof BlockState) {
            destLocation = ((BlockState) destHolder).getLocation();
        }

        if ((sourceLocation != null && protectedChests.contains(sourceLocation)) ||
                (destLocation != null && protectedChests.contains(destLocation))) {

            event.setCancelled(true);

            if (event.getInitiator().getHolder() instanceof Player) {
                Player player = (Player) event.getInitiator().getHolder();

                // Give back the hopper
                player.getInventory().addItem(new ItemStack(Material.HOPPER, 1));
                player.sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("test") );
                player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_LAND, 0.5f, 1f);
            }

            // Destroy the hopper block
            if (event.getDestination().getType() == InventoryType.HOPPER && destHolder instanceof Hopper) {
                Hopper hopper = (Hopper) destHolder;
                hopper.getBlock().setType(Material.AIR);
            }
        }
    }

It looks right to me? except event.getInitiator().getHolder() instanceof Player doesn't work

tender shard
#

the initiater will be a hopper

gentle kraken
#

oh not the player?

tender shard
#

if a player takes out an item through the GUI, it's a normal InventoryClickEvent

#

InventoryMoveItem event is when a hopper moves items itself

gentle kraken
#

right...

#

so that case doesn't matter at all?

#

the if statement I mean

valid burrow
#

anyone here used bossbarapi before?

chrome beacon
#

Years ago

valid burrow
#

im struggeling with finding a version working for 1.8

#

the version mfnalex send in seems to be 1.12+

wary remnant
#

1.8 is legacy

undone axleBOT
valid burrow
#

i am aware of that.

livid dove
#

It's time to let go son

valid burrow
#

its not my desiscion

#

client wants it for 1.8

#

i prefer newer version too

#

and dont tell me to decline offers

#

as if i could afford that

#

😭

hasty prawn
#

You're looking for BossBarAPI that supports 1.8?

valid burrow
#

yes

#

but i keep getting a load of console erros that i cant even read

hasty prawn
#

?paste one of them

undone axleBOT
hasty prawn
#

Because that surely should work

livid dove
#

What ckient in their right mind wants 1.8

valid burrow
livid dove
#

Ur better than their daft standards fr fr

hasty prawn
#

What version specifically are you on?

valid burrow
hasty prawn
#

Minecraft version

valid burrow
#

1.8.8

hasty prawn
valid burrow
#

ive tried all kinds of repositorys, installing it manually without maven etc etc

#

nothing works

#

all the same error

livid dove
#

It's the biggest challenge with older apis mate.

#

I'd be honest with your client and tell them the issues and, with em in mind, tk consider upgrading

#

Clients like that only tend to get with the times once how make it clear the issues the approach causes

valid burrow
#

yh

#

ill tell him that

#

thx for trying though

livid dove
#

Hey bud imo a client that doesn't care for the issues of their dev arnt a client worth having imo

#

It's a 2 way street

#

If "the majority of thw spigot community knows nothing about 1.8.8 anymore" isn't enough, then I dunno what to say

valid burrow
#

i wish i could see it from that pov but rn im just a poor highschool student trying to make some extra money xd

#

well alright thx for the pep talk

livid dove
#

Nw

hasty prawn
valid burrow
hasty prawn
#

hey man

valid burrow
#

lmao what

#

its a screenshot of my chat

#

ai will take over the world

#

ai:

#

i wish i could just send normal screenshots in here again but i aint verified yet

kindred sentinel
#

how to get HEX code from org.bukkit.Color

valid burrow
#

i mean

worldly ingot
#

net.md-5 ChatColor class should have an of() method

valid burrow
#

.asRGB()

worldly ingot
#

You can use it interchangeably with Bukkit's ChatColor enum

valid burrow
#

is a thingh

#

i dont think theres i direct hex code but you can convert rgb to hexcode

kindred sentinel
#

oh

#

thx

torn shuttle
#

I want to double check something, what could cause this issue

#

only happening to some people

hasty prawn
worldly ingot
#

Could possibly be a paper bug?

valid burrow
kindred sentinel
#

So then is there a way to get ChatColor.of() using org.bukkit.Color?

kindred sentinel
#

oh

valid burrow
#

.asRGB sorry

torn shuttle
kindred sentinel
#

yeah, and?

valid burrow
#

well once you get that use a normal java command to convert that to hex

worldly ingot
#

I think it's a Paper plugin loader bug. Looks like it's enabling your plugin, then disabling it for some reason or another

valid burrow
#

i dont know it from the top of my head

torn shuttle
valid burrow
#

String hex = String.format("#%02x%02x%02x", r, g, b);

torn shuttle
#

last time they said it 🤷‍♂️

eternal night
#

I mean, it dies because it errors onEnable ?

kindred sentinel
#

thanks

eternal oxide
eternal night
#

and yea, javaassist is fucking sus

valid burrow
worldly ingot
hasty prawn
valid burrow
hasty prawn
#

what KEKW

valid burrow
#

Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

hasty prawn
#

wat

valid burrow
#

well this is concerning

#

now i cant use any version of java xd

hasty prawn
#

That's because it's -version not --version

#

oh wait both work nvm

#

What'd you set your JAVA_HOME to

valid burrow
#

oh but --version worked when i tested wich one i had installed before

valid burrow
#

and then back to 17

#

but that doesnt work either anymore

hasty prawn
#

Send what you actually put

valid burrow
#

C:\Program Files\Java\jdk-17\bin

#

oh wait what

#

im convused

#

i do have 1.8 now

#

i think

#

but

#

thats the only version i dont have defined in my env variables

#

welp

hasty prawn
#

I have a feeling you defined it wrong then KEKW

valid burrow
#

lots of problems today

#

but apperatly i only have 247mb of ram?

#

on a 64 gig machine

hasty prawn
#

??

#

You should just restart your computer LOL

valid burrow
#

na i found a different way

#

if i just define the amount of ram in the command it works just fine

#

never had that error before though

#

makes me wonder were it came from

valid burrow
#

import org.bukkit.craftbukkit.libs.jline.internal.Nullable; tf is that

lilac dagger
#

something internal

#

do not use

#

and i suspect jline is not something you need to use

valid burrow
grand saffron
#

Quick question, can I publish a plugin on spigot with it using paper api?

worldly ingot
#

You can use Paper API but it still has to work on Spigot

#

If it doesn't work on Spigot then no, you'll have to post it elsewhere

grim hound
#

Can a Netty channel be added/removed async?

ivory sleet
#

i think so yes

#

tho idk how supportive netty is regarding concurrent adds/removals

chrome beacon
#

Pro tip use Javadocs

grim hound
#

if a player quits, are all of his netty channels removed?

valid burrow
#

?paste

undone axleBOT
valid burrow
grim hound
#

also

#

you can use it after the "}" symbol

valid burrow
grim hound
#

show config

valid burrow
#

ActionBar:

  • "Hello world 1"
  • "Hello world 2"
  • "Hello world 4"

ActionBarInterval: 10

BossBar:

  • "Hello world"
  • "Hello world23"
  • "Hello world187"

BossBarInterval: 10 #In sec

DenyWorld:

  • "End"
#

wait

#

ActionBar:
  - "Hello world 1"
  - "Hello world 2"
  - "Hello world 4"

ActionBarInterval: 10

BossBar:
  - "Hello world"
  - "Hello world23"
  - "Hello world187"

BossBarInterval: 10 #In sec

DenyWorld:
  - "End"```
grim hound
#

Uh

#

but-

valid burrow
#

oh

#

i might be an idiot

#

lmfao

#

wtf

grim hound
#

nice

valid burrow
#

how did i not catch that

grim hound
#

happens

valid burrow
#

thx

#

xd

grim hound
#

np

sage patio
#

why this method removes all of items of the specified material?

grim hound
sage patio
#

to remove the given count of the item

slender elbow
grim hound
#

channel handlers

grim hound
#

that's how Inventory#remove(ItemStack) works

valid burrow
#

OMG OMG OMG I FINALLY GOT IT FINALLY AFTER SO MANY HOURS OF MY LIFE WASTED

sage patio
grim hound
#

so don't use it

sage patio
#

you got it wrong

grim hound
#

ah wait

sage patio
#

yea

grim hound
#

please just use -=

sage patio
#

it was -=, i thought that is the reason

#

no idea why it removes ALL of items instead of the given count?

lilac dagger
#

remove item removes all items of that type

sage patio
#

ONLY when itemAmount <= remainingCount

slender elbow
sage patio
#

ow

#

i got it

#

nvm, thanks

grim hound
slender elbow
#

it's a completely new different Channel object with its own pipeline, so yes

grim hound
#

much appreciated

#

also how the fuq does ForkJoinPool work

#

like it just kinda

#

I dunno

#

Kinda reminds me of HashMaps

river oracle
#

Looks fun

grim hound
#

men why do they use ThreadLocalRandom for task execution

#

and work stealing

river oracle
#

This only looks so bad because of the decompiled local variable names

grim hound
river oracle
#

I hope so

grim hound
#

like usually decompilation removes empty lines

river oracle
#

And comment

#

Nvm ig I'm dumb

#

Just bad variable names then ig

grim hound
#

it's not just the variables, this whole code looks like shit from matrix

pseudo hazel
#

it was written by someone like 30 years ago and never touched since

#

probably by some mathematician

#

they love their single character variable names

grim hound
#

but yeah, the system seems pretty old

shadow night
grim hound
#

cuz ArrayDeque makes an array even tho it's a deque

#

probably for some other usages

pseudo hazel
#

this has more overhead I think using a normal array is faster probably

#

but it doesnt matter unless it very big

#

the only downside to an array being a deque is the removing things from the front part

#

also your method names seem like just a getter, instead of actually popping them from the list, which is what is actually happening

#

and right now you have written it like a normal queue, since there are no methods for taking the last item or pushing to the front

grim hound
pseudo hazel
#

how very big

grim hound
#

uh

#

Bukkit.maxPlayers big

#

times like 1.1

pseudo hazel
#

okay so like not more than 10k

grim hound
#

much probably, yes

pseudo hazel
#

or like most servers , probably not more than 100

grim hound
#

some servers use like 2k despite having 10 players

slender elbow
#

bro invented the LinkedList

grim hound
pseudo hazel
#

but without the insertion in the middle

grim hound
pseudo hazel
#

okay, less than 300, an array or this linked list doesnt matter performance wise

#

and if it would , its a very much micro optimization

grim hound
#

I see

#

thanks

pseudo hazel
#

it will start to matter when you are in upwards of 100k elements, in which case using an array is faster most likely

twin venture
#

hi , which event should i use to prevent drop item using Q or hold in curser and drop out of the opned inventory

pseudo hazel
#

I think both might be the drop item event

#

or for the inventory you may need to cancel drag event

twin venture
#

alright

#

yes both drop item event

quaint mantle
#

Looking for someone with intermediate-slightly advanced knowledge of Java. Bukkit or Paper api experience would be nice but not required. I am making a plugin that makes dynamic npcs in minecraft. These NPC's will have there own schedules, lines, quest-lines, etc. Similiar to skyrim. Profits split 50/50, i need one person, 18+ preferred.

eternal night
#

?services

undone axleBOT
muted dirge
#

i have these two classes and im using nms. i want to somehow make a instance for these two for assigning the field for managing things and multi version

#

but i have no idea how

#

(sorry for my bad english, i hope you understand what did i said)

lilac dagger
#

i recommend you to have just a single hologram

#

and outside nms have a multiline one