#help-development

1 messages · Page 952 of 1

young knoll
#

Interaction entity has a modifiable size

#

Also doesn’t block projectiles

inner mulch
storm crystal
#

that would be pretty okay I guess

#

since I could just link all the necessary information to an ID in json file

#

do I want to make separate class and method for creating inventory GUI as a template?

young knoll
#

Silverfish block projectiles tho so

storm crystal
#

such as parameters as dimensions and what blocks are supposed to be what

inner mulch
young knoll
#

Have fun making an entirely packet side entity

inner mulch
#

i alr made that, i wanted to switch to the api and it doesnt work i guess

echo basalt
#

woeisme getting weird jetty errors

inner mulch
#

so it seems like it even does that even tho the entity know each other, just the viewer (player) doesnt know 1 of them

young knoll
#

?

inner mulch
#

i set a different enttiy as the silverfish passenger

#

and then hide the silverfish

#

and same behaviour

halcyon gate
#

I want to ban someone specific from saying the word "slay"

#

Not a world

inner mulch
#

or r u looking for a plugin taht does that for you?

young knoll
#

Aww man how am I gonna slay mobs then

flint coyote
#

Gotta annihilate mobs instead

halcyon gate
#

Not wanting to put a lot of effort in I just want duct tape solution

maiden olive
#

😐

halcyon gate
#

I have cmi and griefprevention on the server already but it doesn’t look like I can do what I want with those

maiden olive
#

So u want a plugin that will ban a specific player when they say a specific word

flint coyote
#

I think he wants to prevent some players from typing that word

#

Basically a permission based word blacklist

#

Unless he doesn't have a permission plugin

hasty hamlet
#

Can I turn off the Q button? Throwing out so that there is no animation

ivory sleet
#

Listen to the drop item event probably, then cancel it and remove the item

hasty hamlet
#

There remains an animation that he wants to throw away

river oracle
#

It's client sided

halcyon gate
#

how do i do that

worthy yarrow
#

Oh if you want a permission to bypass, just do so with a simple if p.hasPermission and dont cancel the event

river oracle
#

Might be best to use a Trie or HashSet and use string tokenization

worthy yarrow
#

Probably so, but that’s the simplest way

#

You might also want to consider alternative spellings etc for your blacklisted words

halcyon gate
#

its just to prevent one person from saying slay and i want it to be perpetual

worthy yarrow
#

A single person?

halcyon gate
#

yes

worthy yarrow
#

Then don’t check against a permission

halcyon gate
#

what do you mean?

worthy yarrow
#

If !p.hasPermission(xyz) return;
If event.getMessage.contains(blacklistedWord) or something like that

#

Then if the only person you want to block said word for, just give them that permission

#

So now anytime they chat and their message contains the blacklisted word, that chat event will be cancelled

halcyon gate
#

ohhh okay

worthy yarrow
# halcyon gate ohhh okay

It’s also a good note that anyone with that permission will have their message blocked given it contains the blacklisted word, ie: server operators

#

(Ops) for short

#

So it might actually be better to see if they don’t have the permission, but that means everyone whom you don’t want to be blocked will need that permission

halcyon gate
#

Is it possible to link a blacklisted word to a luckperms group and just give it to him?

worthy yarrow
#

Yeah probably, I haven't really messed with lp's api tho

tranquil badger
#

I'm trying to make a sign editor pop up on the player's screen. I was wondering if my approach is correct, or what I should change to improve my approach

  • use buildtools to get a remapped jar and find the name of the packet
  • use NBT API and get that packet and give it the position of the sign i need to edit.
  • as I don't want an actual sign, I can instead send a block update packet (?) and make that "block" my editable sign
  • get the player handler, to get the player connection (i can find out the name of this as well using the mapped jar)
  • send the packet to the player (idk if I need to delete that placed block packet)
  • use an event to check the sign's content when the done button is pressed.

Never done this before so, again, hoping someone can correct me if my approach is wrong.

analog mantle
#

How does Bukkit.getScheduler().runTaskLater(() -> {}, 69L) work?

#

How does it wait time

echo basalt
#

Ticks

#

Basically there's the "main loop"

#

That loop basically says "A perfect tick lasts, at most, 50ms" (1s / 20 ticks per second)

#

So it starts processing the tick, gets how long it took

#

Let's say it took 15ms to process

#

And waits the 50 - 15ms

#

So 35

#

Then it ticks everything again

#

And waits again

#

The scheduler keeps track of what tick it's on and has a task queue to process

#

"In 5 ticks I have to run task 123 once"

#

Once the 5 ticks are up it just runs it

lost matrix
# analog mantle How does `Bukkit.getScheduler().runTaskLater(() -> {}, 69L)` work?

I just looked into the source for you. They set a fixed timestamp on the CraftTask and put it in a PriorityQueue.
Eg the current tick is 5000 and you scheduled it for 40 ticks in the future, then it gets a timestamp of 5040.
They then poll from the top of the priority queue until all tasks for the current tick are executed.
So if we currently have the time of 5005 and the queue contains:

  • 5005
  • 5005
  • 5007
  • 5010
  • 5020
    Then it will poll the first two tasks and stop looking at the rest because the tasks inside the Queue are ordered ascending by their execution time.
    Meaning if you hit one task that is not due, then you dont need to check any more tasks, as they are all scheduled for the future.
#

This is another reason why you shouldnt constantly start/stop tasks but have a single task and add elements to it.
Adding/Removing tasks is O(log(n)) at best (without collisions).

lilac dagger
#

but a thing still has me questioning

#

if you poll a repeating task, don't you have to reschedule it?

#

putting it back to log n?

lost matrix
#

Unless it is scheduled every tick, in which case you can just put it on top of the queue

#

But true, rescheduling takes O(log(n)) at best again

lilac dagger
#

oh mine is every tick

lost matrix
#

Hm. Shouldnt we have access to this? Looks to me like a decent alternative to System.currentTimeMillis() if we can just measure a time
in terms of ticks.

lilac dagger
#

wait, so how many ticks till the server dies?

#

unless it just wraps around

lost matrix
#

It counts up every tick. This is essentially how long the server has been running in ticks.

lilac dagger
#

for some reason int seemed much smaller in my mind

#

it'll take a long time to wrap around

tired star
#

So I have this problem: I'm doing a pvp plugin that has healing based on damage done to a killed player. My Problem is that I have this custom ability that casts lightning to a player. I need to somehow get the caster's UUID to my plugin's main to add it to calculations. I cant seem to get out but only the target's UUID and the CraftLightningStrike's UUID. Any ideas?

lost matrix
#

*And then get it back when the lightning damages someone

#

Alternatively you can also just use a Map<UUID, UUID> to map lightning IDs to their caster IDs

lilac dagger
#

i see this

lost matrix
#

setCausingPlayer might mess with some game logic

#

But also an option

lilac dagger
#

i don't see how a lightning strike is an entity

#

it should be instant

smoky anchor
#

well.. you want to see it for a bit, no ?

lilac dagger
#

or did they change how it works?

#

but it seems to me like a client thing

smoky anchor
#

It has always been an entity as far as I know

#

It interacts with the world tho
changes entities into different entities

tired star
#

I think my problem is accessing the data between main class and the LightningStrikeAbility class :D I always mess up the basic things after coding too much in a row

amber socket
#

so setting a display entity, it seems to rotate around the point from where its original point is instead of the y-offset point. is there a way to make it rotate around its y-offset point instead of its original point

lilac dagger
#

this is why it's weird to me

#

you just create an explosion is bukkit

smoky anchor
#

But if not entity, then particle ?

lilac dagger
#

it's not like it matters, i just find it weird that's all

fallen lily
#

They live in the world, for a certain amount of time

#

It only makes sense to make them an entity

grave laurel
lilac dagger
#

you'll have to use Team from scoreboard

grave laurel
#

What do you mean by that?

#

As my scoreboard I have private static Scoreboard scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();

lilac dagger
#

scoreboard createNewTeam

#

Team#setprefix

grave laurel
lilac dagger
#

yes

grave laurel
#

that doesn't seem to exist...

lilac dagger
#

it's register

grave laurel
#

well that I had, but with no success

#

team = scoreboard.registerNewTeam("team");

lilac dagger
#

use player setscoreboard scoreboard

nova quail
#

Hello! I want to create a plugin that, on command, starts dropping yellow concrete blocks every 10 ticks. I have made dropitemnaturally, and I need to drop blocks exactly from the player's legs, but they drop somewhere left from the player.
final Item item = player.getWorld().dropItemNaturally(player.getLocation(), new ItemStack(Material.YELLOW_CONCRETE));
item.setVelocity(player.getLocation().getDirection());
item.setGravity(true);
item.setPickupDelay(1000);

lilac dagger
#

this should work

#

maybe finalprefix is wrong?

grave laurel
#

Well it is something like this: &6[&3Hey&6]

lost matrix
grave laurel
lilac dagger
#

i think it's another plugin conflicting with your scoreboard

#

maybe a tab plugin?

grave laurel
#

Yeah I have made another plugin to manage the Tablist

lilac dagger
#

disable it for a bit

#

restart the server

grave laurel
#

alright, I'll try that!

native gale
#

If I want to contribute to Spigot, which of these do I fork?

lost matrix
fallen lily
#

And then you can easily make changes from there

fallen lily
#

I see now it just gives you a jar with the gui version

#

:/

lost matrix
#

Usually for PRs your would fork Bukkit and CraftBukkit and reference the correlating changes in each other.

#

I shouldnt dox myself...

outer tendon
#

Hey @lost matrix, you recommended using Timestamps for timing functionality. Were you referring to java.sql.Timestamp or something else?

lost matrix
#

Just a long ususally

outer tendon
#

Ah okay

#

Thank you

native gale
#

So I assumed it is not a root project

fallen lily
#

did you run it in git bash

native gale
#

Sure?

lost matrix
native gale
#

It tries to do something in ../Bukkit which doesnt exist in my working enviroment

fallen lily
#

What is the actual error message you get

#

Oh

lost matrix
fallen lily
#

You didnt reccursively clone the submodules

lost matrix
#

One moment

fallen lily
#

Lol

native gale
#

Or

fallen lily
#

Wait nvm why is it one level lower

native gale
fallen lily
#

It used to be all in the same directory…

lost matrix
native gale
#

Does it want my to fork all of these repos?

fallen lily
#

Spigot progressively becoming more aids to contribute to speedrun

native gale
#

But

#

How do I push it to my fork and then do PR?

#

If I understand correctly, the cloned repo which BuildTools creates is connected to the main repo

#

aka https://hub.spigotmc.org/stash/scm/spigot/*.git

sullen marlin
#

Yeah just add/update remote

native gale
#

Oh, like that?

#

Hm, alright

valid basin
#

Non flickering darkness effect? Does someone know if it's possible?

smoky anchor
#

Either tell the user to change an Accessibility setting, or force a RP that edits a shader.
Those are the two things that come to my mind

grave laurel
#

How do I change the Name-Tag of a player?

#

Like the name above the skin?

native gale
#

I may be wrong, but I think you need to modify protocol packages for that

valid basin
#

I'm trying to make a horror game. It pisses me off this game isn't giving dev much space to work with

#

For example roblox does

native gale
#

Oh, no

grave laurel
native gale
#

No need for packages

#

Just use scoreboard api

#

You can change the dislpay name

grave laurel
#

oh, so just use the scoreboard api and with that, modify the name tag?

smoky anchor
# valid basin So it's impossible with packets?

don't see how packets could help in any way
You could try to see if the flickering is somehow tied to the remaining time, then just set the effect time to a specific value every tick
Would be wonky tho
And again, you can probably use RP to change it, this game is customizable as fuck.
And it's only getting better week by week

native gale
#

Okay, so now I just fork these repos in the stash and change these local repos remotes to my

#

Hm, okay, easier than I though, but I cannot imagine how people figure that out on their own

ivory sleet
#

Yea its a bit non trivial, i think there is a wiki page on it tho ^^

hybrid turret
#

If I use an advanced loop, can I start at a different index instead of 0?

Basically: i want to paginate my onlinePlayersGUI.
The first page is supposed to have player 0-35, the second 36-71 and so on. I could somehow do it with a simple loop but Idk how I'll get from Collection<? extends Player to a Player[]-Array

drowsy helm
#

Not that hard to convert it

hybrid turret
#

I know, but I tried and failed

drowsy helm
#

Cast to list and just get by index

hybrid turret
#
Player[] players = onlinePlayers.toArray(new Player[onlinePlayers.size()]);

Would that be a way as well?

drowsy helm
#

Give it a try it might complain about casting

#

So what exactly are you having troublr with pagination?

#

Should be pretty straight forward

hybrid turret
#

It contains about Call to 'toArray()' with pre-sized array argument 'new Player[onlinePlayers.size()]'

#

complains*

#

LOL

hybrid turret
#

and for looping through the online players I need to change the starting index somehow

drowsy helm
#

Index = n * 35 + i

#

N is page number, starting from 0

#

i is offset

hybrid turret
#

yeah, the problem is/was getting an index

#

i had an advanced loop

drowsy helm
#

Tf is an advanced loop lol

hybrid turret
#

for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {}

drowsy helm
#

A foreach loop?

hybrid turret
#

yeah call it want you want, lol

drowsy helm
#

You can easily convert that to use index

hybrid turret
#

nvm not advanced. it's called enhanced for loop

hybrid turret
peak depot
#

List<Player> players = new ArrayList<>();
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
players.add(onlinePlayer);
} isnt that basicly what youre looking for?

drowsy helm
#

List<player> blah blah blah
for(int i = n * 35; i < (n+1)*35; i ++)

hybrid turret
#
List<? extends Player> onlinePlayers = Bukkit.getOnlinePlayers().stream().toList();
nova quail
#

Hello! I have created a plugin that on command /spit, make from player's head llama spit but It damage other players. How can I cancel damage on spit?

hybrid turret
#

EntityDamageEvent iirc

#

and some ifs

drowsy helm
hybrid turret
#

*and comes from a player

#

otherwise llamas won't work as intended anymore

glass breach
#

Hey fellas! How do you make it so that you can Right click globally. I've used PIE up until this point, but that doesnt work when in close proximity to entities. Could anyone help me pls?

glass breach
#

Welp, when rightclicking air, blocks and/or entities

#

basically merging PIE and PIEE into one

drowsy helm
#

PlayerInteractEvent doesnt fire close to entities?

#

It should

hybrid turret
#

PlayerInteractEvent is the parent event, yes.

#

tbh i also needed some time until i got that

glass breach
drowsy helm
#

It should, yeah

glass breach
#

ItemsAdder entities

#

that was the issue

#

thanks! now gotta figure out how will that work

drowsy helm
#

Idk exactly how itemsadder works but pretry sure it’s clientside entities, if thats the case youll need a packet listener

nova quail
hybrid turret
#

I took a quick look and it seems that the ProjectileHitEvent is the correct event

young knoll
#

You can use either

trail estuary
#

anyone knows a plugin for commpressed items
1.20

trail estuary
#

sry

hybrid turret
#

okay tbh i have no idea rn how you check exactly for the llama spit, i can't find it, lol

nova quail
young knoll
#

instanceof LlamaSpit

#

Use the damage event to cancel damage

sleek estuary
#

Can anyone tell me if I need to execute this line? I believe that bukkit saves all schedulers and I believe that I need to execute this line so that the list has fewer objects and frees up memory

hybrid turret
#

mhhhhhhh paragraph symbols (idk sadly, sorry)

zealous osprey
#

Heyo, I would love some feedback for this:

I want to implement a custom weapons system using an entity component system to have a versatile and customisable system.
It would have two parts:
Abilities/Data: This is the data it will display when a component is applied. Something like lore or a display name.

Effect: The actual effect that will be triggered via an event.

Following issue(s) arise:
How do I handle events?
Do I have a listener in every effect which checks for events?
Do I have an external system that parses events to effects (sounds annoying)?
Other options?

young knoll
#

Or some other exception about it already being canceled

blazing ocean
#

^^

late sonnet
#

the most of methods in a task throw a exception if is not started

sleek estuary
hybrid turret
#

NullPointerException

blazing ocean
#

nullpointerexception

#

ah

sleek estuary
#

task != null

blazing ocean
#

well, the task id might be come null once it's cancelled

#

i'm not sure since i don't have a copy of the bukkit src atm

sleek estuary
#

integer not can be null

blazing ocean
#

can still be null

sleek estuary
outer tendon
#

I want to schedule some tasks. Is it a better idea to use the Bukkit scheduler or a java.util.Timer? Im guessing that Bukkit is based off of ticks rather than actual time, so I think using a Timer is probably a better bet. Is that right?

sleek estuary
#

is a int

blazing ocean
#

bukkit

sleek estuary
#

not Integer

#

a int not can be null bro

icy beacon
outer tendon
#

Would you mind elaborating as to why?

blazing ocean
#

use bukkit then

icy beacon
#

You probably want to use bukkit then

outer tendon
#

i like your profile picture lol

sleek estuary
#

Can anyone tell me if I need to execute this line? I believe that bukkit saves all schedulers and I believe that I need to execute this line so that the list has fewer objects and frees up memory

blazing ocean
#

we literally told you

#

you don't need to as it will throw an exception

hybrid turret
#

LOL

sleek estuary
blazing ocean
#

probably throw an exception*

sleek estuary
#

you know java bro?

#

int not can be null

blazing ocean
#

i do, in fact, know java

late sonnet
icy beacon
#

If the server lags and performs for example at 9 tps, but your task is running with java timer and is bosically at 20 tps, it's going to outrun the server. Not the best example i could provide but basically for smoother gameplay you want to sync your plugin with server time quote unquote

icy beacon
outer tendon
#

Ah okay

#

Thank you

echo basalt
#

what the fuck is this convo

outer tendon
#

I appreciate the response :D.

echo basalt
#

Don't use java timers in the context of bukkit

sleek estuary
icy beacon
echo basalt
#

You can use executor services if you're doing your own thing outside

blazing ocean
#

i literally said it might be a possibility

#

i don't have the implementation in front of me atm

outer tendon
#

Im making a Timer class that will begin scheduling checks upon creation so I can make one for anything tha tneeds to schedule, like a Game object

echo basalt
#

"Frees up memory" is not the perfect term but it's still good practice to cancel stale tasks in order to not cause weird exponential issues

outer tendon
#

Is that a good idea?

echo basalt
outer tendon
#

uh

sleek estuary
outer tendon
#

I suppose

#

but

echo basalt
#

Or is it just tracking scheduled tasks so you can cancel them all at once?

sleek estuary
echo basalt
blazing ocean
#

no need to say the same thing twice

echo basalt
#

task.cancel and Scheduler#cancelTask do the same thing

blazing ocean
#

which is actually wrong lol

sleek estuary
outer tendon
#

You know what? I just realized I might not need to.

I'm scheduling multiple tasks like countdowns for starting games.

blazing ocean
#

yes

late sonnet
outer tendon
#

Oh thank you

sleek estuary
#

I didn't see that part, forget it

outer tendon
#

Thisll take a bit for me to wrap my head around

echo basalt
#

noob

late sonnet
echo basalt
blazing ocean
#

no need to get rude though

echo basalt
#

Figured it might help your case

outer tendon
#

Thank you

#

Im slowly building up my understanding of different topics as I go along building this

#

The first time I built it, it was a mess

#

So would you say you made your own scheduler?

echo basalt
#

Not really, no

outer tendon
#

Oh

echo basalt
#

The GameTask interface just wraps "a task"

outer tendon
#

oh right

echo basalt
#

Then I have a bunch of impls that delegate to the bukkit scheduler

blazing ocean
#

i'm guessing they're just extending a bukkittask/bukkitrunnable

echo basalt
#

I do keep references of every task that's ever been scheduled

#

So that when the game / phase disposes so do the tasks

young knoll
#

You could theoretically just have a single async and sync task running all the time that you subscribe/unsubscribe stuff to

outer tendon
#

It was recommended to me to build a priority queue to schedule tasks, but Im realizing I dont need to do that

echo basalt
#

sounds like something smile would say

outer tendon
#

It is what he said

#

I dont think that was necessary at all

#

I guess I should look more into how the Bukkit Scheduler works first

echo basalt
#

voodoo

outer tendon
#

at least based on how I understood it

outer tendon
echo basalt
nova quail
#

Can't understand what's wrong here. I have created a plugin that on command /spit, make from player's head llama spit but it damage other people. And I need to cancel damage.
public class OnSpitHurt implements Listener {
public void OnHurt(ProjectileHitEvent e) {
if (e.getEntity()instanceof LlamaSpit) {
if (e.getEntity().getShooter() instanceof Player) {
LivingEntity entity = (LivingEntity)e.getHitEntity();
entity.damage(0.0D);

echo basalt
#

You can just cancel the event

#

?paste next time

undone axleBOT
outer tendon
echo basalt
#

Is the projectile source defined as the player?

nova quail
outer tendon
#

oh wow, that's pretty cool, Illusion

echo basalt
#

pov: I got bored

outer tendon
#

XD

late sonnet
rapid vigil
echo basalt
#

I need to learn how to 3d model

#

so I can make some fancy shit

outer tendon
#

That'd be cool

echo basalt
#

I figured out how to make uh

#

custom chest models

outer tendon
#

I need to rework my timer idea

young knoll
#

I do want to get better at modelling

#

My towers look cool being made with just block displays, but custom models would be even cooler

nova quail
#

thanks now all works

echo basalt
#

should I make a tower defense game

#

hm

outer tendon
#

yes

echo basalt
#

just ripoff cubecraft's old TD game and do my own shiz

outer tendon
#

bro

echo basalt
#

I do want to work on my own minigame network

outer tendon
#

remake MoneyWars

#

I loved that game

outer tendon
young knoll
#

Tf was money wars

outer tendon
#

bro

#

Money Wars was so much fun

echo basalt
#

Still figuring out color schemes and stuff

blazing ocean
young knoll
#

Everyone is working on the next hypixel

outer tendon
#

EggWars but the gens were in areas that mobs would attack you in and it was a wither skeleton instead of eggs

young knoll
#

But strangely we don’t see many new hypixel’s

blazing ocean
#

rather server instead of network but yeah

young knoll
#

🤔

outer tendon
#

high barrier of entry

blazing ocean
outer tendon
#

low motivation

#

Illusion, let me shadow you

young knoll
#

Mcci isn’t even that popular

#

It has like 300 players

blazing ocean
#

coming to a minecraft in your area, soonTM

outer tendon
#

ive never even heard of mcci

blazing ocean
#

lol

blazing ocean
echo basalt
#

Let's see there are only 2 things I need to figure out in order to make a really good network

young knoll
#

Yeah it does look quite nice

echo basalt
#

One of them is the whole vibe and identity of the server

young knoll
#

But idk it just isn’t hitting the mark I guess

echo basalt
#

The other thing is the live deployment infra

outer tendon
#

I have a great name for a mini-game server

echo basalt
#

I already have a name for it too

outer tendon
#

and youll never get it from me

drowsy helm
echo basalt
#

Just need the color scheme, whole vibe of it

#

Pacing and stuff

outer tendon
#

Illusion, may I shadow you?

echo basalt
outer tendon
#

you seem like a good dev

echo basalt
blazing ocean
#

my vibe is kinda like

echo basalt
#

tf is that about

outer tendon
#

i can do it in my sleep

blazing ocean
#

resource pack magic fuckery

outer tendon
#

what do you mean?

blazing ocean
#

:)

river oracle
#

You can shadow me I'm basically illusion if he had 10 less years of experience and American

outer tendon
#

bro you know what is impressive?

#

WynnCraft

blazing ocean
#

yeah

drowsy helm
#

Pretty sure hypixel still manually provisions servers

echo basalt
hybrid turret
#

tf is shadowing

echo basalt
drowsy helm
#

They mentioned it in a dev blog a while ago

river oracle
young knoll
#

They manually provision new machines

echo basalt
#

like 13 years of coding exp :)

young knoll
#

But not the actual server instances

outer tendon
echo basalt
#

They manually provision new machines with the help of some scripts

outer tendon
#

Ironically, I started in Java, but I have very little experience with it

echo basalt
#

but the instances themselves yeet into existence automagically

drowsy helm
#

Gotcha

echo basalt
#

And I've got like 4 different versions of that

#

But it's complex as it involves minecraft plugins + 2 services

young knoll
#

And yeah coming up with a general vibe for a server is hard

echo basalt
#

At least

outer tendon
#

yeah fr

echo basalt
drowsy helm
#

Who needs auto provisioning when you have cheap child labour in a third world country

river oracle
echo basalt
#

But I'm also thinking of the style

young knoll
#

Hypixel’s vibe was basically just

#

“Hypixel”

echo basalt
#

I know I want something night related

#

But is it a city night or just a fantasy night

drowsy helm
#

Minigame network?

echo basalt
young knoll
#

It worked for them because they already had an established name

outer tendon
#

use a color scheme picker

echo basalt
#

And what games will I have

echo basalt
outer tendon
#

bro

young knoll
#

Pp wars

outer tendon
#

please bring back MicroBattles

outer tendon
#

alright

#

back to scheduling

young knoll
#

I like the space/galaxy vibe

#

But idk

echo basalt
#

I'm not going full cosmic

outer tendon
#

Cosmic PvP XD

echo basalt
#

But I do feel like my lobby would be in the end dimension

outer tendon
#

Id love to help you brainstorm, but Id rather use my ideas myself XD

young knoll
#

Hey cosmic is dead so it's fine

#

lul

outer tendon
#

oh lol

#

I did like the idea behind Cosmic

#

their lobby was fun

#

low gravity

river oracle
#

Guys this is the signal of UART transfer

hybrid turret
#

oh oh my god, i thought cosmic was a dev or sum

#

omg

#

wtf

outer tendon
#

lol

echo basalt
#

There is a dev named cosmic

hybrid turret
#

and he fucking died?

blazing ocean
#

i feel like there's not enough servers with resource pack magic fuckery
there's like

  • mcci
  • mcbrawls
  • cubecraft
  • cytooxien
    but that's about it
outer tendon
#

no

river oracle
outer tendon
#

we were talking about the server

river oracle
outer tendon
blazing ocean
echo basalt
#

I've worked for servers doing way more resourcepack fuckery than you can think of

outer tendon
#

WynnCraft is probably the most impressive server Ive been on

drowsy helm
#

Theres a few, they are just super hard to implement well with a small team

outer tendon
#

Ik another programmer called Illusion

echo basalt
#

he sucks

drowsy helm
#

Origin Realms is impressive, but boring

outer tendon
#

lol

#

nah

blazing ocean
outer tendon
#

he's pretty good

rapid vigil
#

out of curiosity Y2K is your pfp solo leveling?

drowsy helm
#

definitely the innovators or resource pack stuff

rapid vigil
echo basalt
river oracle
rapid vigil
drowsy helm
blazing ocean
drowsy helm
#

Jinx

blazing ocean
drowsy helm
river oracle
drowsy helm
#

They were called minecraft realms before mojang sent a cease and desist

blazing ocean
drowsy helm
#

Theres also that rabbit server

#

I forget the name

rapid vigil
young knoll
#

They were not

#

They were called realms: origins

drowsy helm
#

Ah

#

My memory is patchy

#

Anyways, incredible server

river oracle
drowsy helm
#

Would be cool if they went for a more rpg approach

outer tendon
#

So if I make a BukkitRunnable class that acts as a countdown timer, would it make sense to decrement the time left every time it's ran?

rapid vigil
river oracle
rapid vigil
# river oracle Read the manhwa the art is crazy

its true that i have no patience to wait 3 years for the full episodes to come out but i still want to see the anime without knowing whats gonna happen plus i dont really read manhwas or mangas so i might just end up ruining the fun of the upcoming seasons

river oracle
#

2024 release

rapid vigil
#

yeah i thought we'd have to wait 1-2 years lol

outer tendon
#

bruh

rapid vigil
#

u read the manhwa didnt u

outer tendon
#

May I politely ask that you guys take this to general?

river oracle
#

Nah no one's asking for help atm

#

If you got a question post it

river oracle
outer tendon
#

I did

#

It disappeared XD

#

Ill post it again

#

So if I make a BukkitRunnable class that acts as a countdown timer, would it make sense to decrement the time left every time it's ran?

river oracle
#

Then link it

river oracle
#

Otherwise you can't track your timer

outer tendon
#

Okay, thank you

#

Right

rapid vigil
river oracle
#

My favorite anime tbh

rapid vigil
#

oh i havent heard of it before

river oracle
#

Tho I'll say that the light novels def aren't as funny and engaging as a manga

river oracle
rapid vigil
#

did u read mashle

river oracle
rapid vigil
#

damn u know whats gonna happen in all the animes im waiting for lol

river oracle
#

I've watched a bit of anime

#

Ironically I've only ever read Mashle, and Solo Leveling

#

Still reading konosuba

rapid vigil
#

you should probably watch season 2 of mashle and solo leveling theyre good

river oracle
#

I love to see stuff animated plus anime changes thinfs

rapid vigil
#

the Igris fight ended too quick and didnt end in such a good way but i heard it was made better in the manhwa

#

so i could read the parts i already watched

eternal oxide
#

I liked Konosuba, but not the spin offs

river oracle
river oracle
#

A well drawn beating

rapid vigil
#

in the manhwa?

river oracle
#

Yeah

rapid vigil
#

how did it end then

#

did it end well

river oracle
#

Same way pretty much

rapid vigil
#

if u watched the episode youd see that even the mc himself knows that he won non-sensely lmao

river oracle
#

Yeah season 2 is where it gets good

#

Get excited

rapid vigil
#

im getting hyped up for it all the time, cant believe i gotta wait like 7 months FOR the first episode and then weekly episodes

river oracle
eternal oxide
#

Yeah I'm moving more to reading the Manga than watching Anime now.

#

takes too long for new episodes

rapid vigil
river oracle
eternal oxide
#

Getting it translated and for sale is not easy for most

rapid vigil
river oracle
peak jetty
#

how do i implement protocollib in my plugin?

eternal oxide
#

it tells you on its wiki/github

arctic pelican
#

can anyone help me im having map issues, im trying to create a map but its generated on a void map and i want it on a standard vanilla infinite terrain how can i do that
ive been strugging for 2 days trying to figure that o ut

nova quail
#

I have made message sender for player when he use /spit which makes him to spit like llama. And after he spit at other player plugin sends message of player's nickname in which he spat. How can I do the same for second player. "The player: nickname spat at you"

             if (e.getEntity().getShooter() instanceof Player) {
                    Player shooter = (Player) e.getEntity().getShooter();
                    String shootername = shooter.getName();
                    entity.sendMessage("Player " + shootername);
drowsy helm
peak jetty
drowsy helm
#

Youve just given an xy problem

arctic pelican
#

so like i have my custome area but the rest i want natural generation

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
drowsy helm
#

ask on #help-server this channel is for coding.
Either way it’s not really spigot related does worldpainter have a discord

outer tendon
#

If I wanted to run a callback when the timer is ran out, what would be the best way to go about this?

drowsy helm
arctic pelican
#

ok

peak jetty
#

how do i do this:

To use this library, first add ProtocolLib.jar to your Java build path

outer tendon
#

Alright, thank you

drowsy helm
undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
peak jetty
modern plank
#

in the set equipment packet, where would i set the saddle/armor for a horse? the EntityEquipment bukkit class does not cover these

drowsy helm
#

Add that to ur pom

nova quail
# rapid vigil ?codeblock
public class SpitHitEvent implements Listener {
    @EventHandler
    public void onProjectileHit(ProjectileHitEvent e) {
        if (e.getEntity()instanceof LlamaSpit) {
                LivingEntity entity = (LivingEntity)e.getHitEntity();
                if (entity != null) {
                    if (e.getEntity().getShooter() instanceof Player) {
                        Player shooter = (Player) e.getEntity().getShooter();
                        String shootername = shooter.getName();
                        entity.sendMessage("Player " + shootername);
                } else {
                        e.setCancelled(true);
                    }
            }
        }
    }
}
outer tendon
#

you forgot "java"

rapid vigil
peak jetty
# drowsy helm

thats what i did but it still says Cannot resolve symbol 'comphenix'

peak jetty
#

how?

nova quail
modern plank
nova quail
#

and his nickname

peak jetty
drowsy helm
#

Invalidate cache then reload

rapid vigil
drowsy helm
#

Just a shot in the dark though

modern plank
#

i dont care to test it

#

i just need to know

#

it came with this note

#

so it might contain more entries than the usual

nova quail
# rapid vigil can you elaborate more i got a little confused

I have created plugin with command /spit. When player uses /spit the llama spit comes from his head, so he spits like llama. And when he spat on player in chat writes. "You spat on and player's nickname". And I need to do the same but for another player so: "You got spat by player's nickname".

drowsy helm
#

Testing is ur only option rn

modern plank
drowsy helm
rapid vigil
peak jetty
#

how do i create a fake player that shows up in tab and everything using protocollib?

drowsy helm
#

You have to make a dummy GameProfile

#

Then just send the player join packet with the profile

hybrid turret
#

?nms

drowsy helm
#

Plenty of tab plugins you can reverse engineer

hybrid turret
#

wait wrong command

#

i want the tutorial for nms again lmao

#

nvm found it

muted dirge
peak jetty
hybrid turret
#

(fake players)

muted dirge
#

is this code good enough to be used?

nova quail
#

who spat on another

rapid vigil
#

Nickname? you mean Player.getName?

nova quail
#

yeah

rapid vigil
#

yeah you already have the shootername stored in a variable?

nova quail
#

something like this

                    if (e.getHitEntity() instanceof Player) {
                        Player shooted = (Player) e.getHitEntity();
                        String shootedname = shooted.getName();
                        entity.sendMessage("1" + shootedname);
peak jetty
nova quail
rapid vigil
#

?conventions

rapid vigil
muted dirge
#

String shootedname = shooted.getName();

#

??

rapid vigil
#

thats the shooted not shooter

nova quail
muted dirge
#

oh

rapid vigil
muted dirge
#

get it from the command handler

rapid vigil
#

Here try this

public class SpitHitEvent implements Listener {

    @EventHandler
    public void onProjectileHit(ProjectileHitEvent e) {
        if (e.getEntityType() != EntityType.LLAMA_SPIT) return;

        ProjectileSource shooter = e.getEntity().getShooter();

        if (shooter instanceof Player playerShooter) {

            Entity hitEntity = e.getHitEntity();

            if (hitEntity == null) return;
            if (hitEntity.getType() != EntityType.PLAYER) return;

            Player hitPlayer = (Player) hitEntity;

            hitPlayer.sendMessage("You got hit by " + playerShooter.getName());
            playerShooter.sendMessage("You hit " + hitPlayer.getName());
        }
    }
}```
modern plank
hybrid turret
#

do i understand it correctly that it is mandatory to use protocollib when trying to spawn npcs?

civic sluice
worldly ingot
#

Would have revealed slots 0 for the saddle and 1 for the armour

nova quail
rapid vigil
# nova quail java: pattern matching in instanceof is not supported in -source 8 (use -sourc...

lol i assumed you were using a modern java version, then use this

    @EventHandler
    public void onProjectileHit(ProjectileHitEvent e) {
        if (e.getEntityType() != EntityType.LLAMA_SPIT) return;

        ProjectileSource shooter = e.getEntity().getShooter();

        if (shooter instanceof Player) {

            Entity hitEntity = e.getHitEntity();

            if (hitEntity == null) return;
            if (hitEntity.getType() != EntityType.PLAYER) return;

            Player hitPlayer = (Player) hitEntity;
            Player playerShooter = (Player) shooter;

            hitPlayer.sendMessage("You got hit by " + playerShooter.getName());
            playerShooter.sendMessage("You hit " + hitPlayer.getName());
        }
    }```
worldly ingot
#

If you're using anything prior to Minecraft 1.17, you probably shouldn't. If after the fact, depends on your build system

peak jetty
#

how do i make a fake player using protocollib?

peak jetty
#

does this create a fakeplayer which I can join to my server? java WrappedGameProfile gameProfile = new WrappedGameProfile("621b1c38-75bf-47e2-97e5-04362248e9bb", "PlutoCraftNet");

river oracle
worldly ingot
#

CraftBukkit will. Bukkit probably will never need to for any reason because the features just aren't at all necessary

#

These are the only features of note added between J17 - J21

  • UTF-8 by default
  • Code snippets in Javadocs ({@snippet}), actually handy but we can just generate Javadocs with a J21 JDK
  • Sequenced Collection interfaces
  • Record pattern matching (if (someRecord instanceof Point(int x, int y)))
  • switch pattern matching (case Integer i ->)
civic sluice
worldly ingot
#

Bukkit will likely use none of those

river oracle
#

:P

river oracle
worldly ingot
#

You would have to try really hard to use these features in Bukkit given its comprised almost exclusively of interfaces

civic sluice
worldly ingot
#

It's often not at all worth it

worldly ingot
#

And prone to breaking things

#

Remember the commit we did last year replacing all instances of Validate and if (x == null) with Preconditions which is now CraftBukkit's standard? And the like 10 commits that came after it having to fix all the inconsistencies and bugs?

river oracle
#

The only thing really worth it is string templating which is a God send

eager yacht
#

hey guys, i fall in the problem is when i use itemmeta#addAttributeModifiers, the default of minecraft attribute got disapear like Attack Speed and Attack Damage, and when i enchant sharpness, it doesn't work can someone tell me how to set custom Attack Attribute without remove the minecraft default one?

worldly ingot
#

String templates are still in preview

#

You can't use them

river oracle
#

Awhh wtf

#

I thought they were in 21

worldly ingot
river oracle
#

Lameeee

worldly ingot
#

They are in 21, they're just behind the preview flag lol

native gale
#

Huee my first PR to Spigot

civic sluice
#

My P-Fork uses Java 21 features already. Otherwise code would be little less readable. 😄

river oracle
#

CabernetMC will exclusively use Java 6

civic sluice
river oracle
#

I'll be building from an old Linux kernel and create my own from selected old and trusted software

astral pilot
#
java.lang.IllegalStateException: Duplicate recipe ignored with ID
#

am i not allowed to have 2 different items with 2 different recipes but same namespacekey?

river oracle
#

No

astral pilot
#

bruh

river oracle
#

Xy problem moment

astral pilot
#

what

river oracle
#

That doesn't even make any sense

astral pilot
#

its not xy problem

river oracle
#

Why would you be allowed to have 2 recipes under the same unique key

astral pilot
#

but same key

river oracle
#

A key is A unique identifier

#

So that still makes 0 sense the items aren't the identifier

river oracle
astral pilot
native gale
worldly ingot
#

It's not an issue unless you're drafting commits that get directly merged into the master branch, which seldom happens, especially for first time contributors

#

md tends to squash and rebase commits anyways so it's signed under his key

native gale
#

For a future and general knowledge, how to I enable signing? Github yells at me all the time for the same exact reason

worldly ingot
#

You would have to either have a GPG key or SSH key which you can then add its private key to the Stash

eternal night
#

always a good idea to sign your commits

worldly ingot
#

Obviously they're explaining how to upload it to GitHub, but the process is largely the same up until you have to upload it to BitBucket instead, which is just a different page under the settings

fallen lily
#

If on windows; Im pretty sure the git credential manager handles that for you

eternal night
#

don't want someone else to pretend to be you

peak jetty
#

how can i add a new player to the tablist and online count?

inner mulch
#

can i disable collision on entities?

inner mulch
#

thanks

grim hound
#

I'm currently sending a lot of netty ByteBufs, which are just Particle packets but flushed directly before the compression channel handler. I was wondering whether I could somehow just send them in just one big ByteBuf, since the compression seems to be Gzip, and according to netty it's possible to do so

lost matrix
stoic cosmos
#

Anyone know how to do the worledit //replace block with another block. Ive done the select region but cant figure out how to do the rest

eager yacht
stoic cosmos
lost matrix
lost matrix
peak jetty
#

how do i importal nms?

lost matrix
#

?nms

lost matrix
slender elbow
eternal night
graceful oak
#

Im using multiverse core to have seperate world and I was going to have a timer to reset the world I have that all working but I need a way to safly teleport the players out before it resets the api doesnt seem to have a way to get all the players in a world is there something in spigot to get a list of players in a specific world to teleport them out?

stoic cosmos
lost matrix
peak jetty
lost matrix
peak jetty
#

so just these 2?

#

@lost matrix ?

lost matrix
lost matrix
grim hound
#

Or PacketEvents

lost matrix
#

Im thinking about adding a constructor here which lets you pass a List<Entry> directly.
This way you dont need a pesky custom ServerPlayer implementation with a spoofed connection.
That always bothered me.

#

Which would allow us to add more API where you can actually send fake entries in the tablist by using spigots PlayerProfile class

zealous osprey
#

anyone know how to close this huge cap between the file selector and the editor?

civic sluice
zealous osprey
undone axleBOT
civic sluice
lost matrix
#

Ah i see

#

Ill write a PR and we'll see

civic sluice
trail estuary
#

can anyone tell why this is not workingoptions:

lost matrix
trail estuary
#

options:
prefix: &2Auto&aCompress
timeorpickup: 1
time: 1 second
autopermission: autocomp.use
permissionmessage: &fUnknown command. Type "/help" for help.
getautopermission: staff.getautocomp
## timeorpickup: Set to 1 for the check to occur every {@time}, and set to 2 to check on every pickup (may not work with auto pickup)

command /autocompress [<text>]:
permission: {@autopermission}
permission message: {@permissionmessage}
trigger:
if arg-1 is set:
if arg-1 is "on":
set {autopickup::%player's uuid%} to true
send "{@prefix} &aSet automatic compressions to &etrue&a."
else:
if arg-1 is "off":
set {autopickup::%player's uuid%} to false
send "{@prefix} &aSet automatic compressions to &efalse&a."
else:
if arg-1 is "check":
if {autopickup::%player's uuid%} is not true:
send "{@prefix} &aYou currently have automatic compressions set to &efalse&a."
else:
send "{@prefix} &aYou currently have automatic compressions set to &etrue&a."
else:
if arg-1 is "toggle":
if {autopickup::%player's uuid%} is true:
set {autopickup::%player's uuid%} to false
send "{@prefix} &aSet automatic compressions to &efalse&a."
if {autopickup::%player's uuid%} is not true:
set {autopickup::%player's uuid%} to true
send "{@prefix} &aSet automatic compressions to &etrue&a."
else:
send "&cInvalid usage. Correct usage:

river oracle
#

Go to scripts discord

#

99% of people use Java here

trail estuary
#

what

river oracle
#

Ask in Skripts discord

trail estuary
#

this is the script i got from a spigot skript

river oracle
#

99.99% of people here use Java for plugins you will not get adequate help here

trail estuary
#

alr

river oracle
#

The other 0.01% use kotlin

glad prawn
#

bruh

river oracle
glad prawn
#

nothing

trail estuary
#

?

blazing ocean
#

0.01% is a bit unrealistic don't you think

icy beacon
#

Eh we have no way to accurately check

glass breach
#

Hey guys!
(I don't really want to be spoonfed) but what would be the best way to make the equivelent of a JavaScript's SetInterval? Basically something that runs every X ticks and can be stopped when the objectives are met... Here's as far as I got...

boolean running = true;
while (running) {
  Bukkit.getScheduler().runTaskLater(this, () -> {
    // code
    if(Stop Condition) {
      running = false;
    }
  }, 20L);
}
#

(obviously that doesnt work)

blazing ocean
lost matrix
# glass breach Hey guys! (I don't really want to be spoonfed) but what would be the best way to...

Use a BukkitRunnable which has a cancel() method and schedule it as a repeating task.

new BukkitRunnable() {
  @Override
  public void run() {
    if(condition) {
      this.cancel();
      return;
    }
    // Do something
  }  

}.runTaskTimer(plugin, 20, 20);

But i would honestly just start a single task when the server starts, which never stops and keeps a collection of elements in it.
You then tick the elements inside your task and remove them when they should no longer be ticked.

blazing ocean
#

But i would honestly just start a single task when the server starts, which never stops and keeps a collection of elements in it.
💀

lost matrix
blazing ocean
#

cue the 500 line bukkittask

glass breach
#

Also, yeah the second option would be better, tho I'm crunching and the tasks wont occupate a lot of time/resources sooo I will proceed on being negligent :p

lost matrix
lost matrix
glass breach
#

Also how would I go on to pass variables onto the runnable? Imagining that it is running inside of an if with local variables and I needed to pass those onto the runnable... Could it be possible or do I have to go through mutually accessible variables?

lost matrix
glass breach
#

I'm guessing adding elements to a single task

lost matrix
#

Either way i would not pass variables through lambdas of scheduled resources.
Create a concrete class implementation and pass them through the constructor.
Ideally those variables should be kept in a manager if they have semantic meaning.

glass breach
#

Like this for example

var foo; //Defined here
new BukkitRunnable() {
  @Override
  public void run() {
    if(foo == bar) { //Access it here
      this.cancel();
      return;
    }
  }  

}.runTaskTimer(plugin, 20, 20);
lost matrix
#

Whats the actual use case?

glass breach
#

A... weapon where theres a Location and a Vector, and each iteration adds Vector to the Location

lost matrix
#

How can a weapon have a Location?

#

Do you mean a projectile?

glass breach
#

Yes, a weapon that send a Projectile sorry

peak jetty
lost matrix
# glass breach Yes, a weapon that send a Projectile sorry

In that case i would write a ProjectileTask which keeps track of all fired projectiles.
So create an abstract representation of your Projectile (the implementation doesnt matter, can be whatever you want)

public interface Projectile {
  void tick();
  boolean isDone();
  void onHit(Block block);
  void onHit(Entity entity);
  void onTimeout();
}

And a Task that starts with the server:

public class ProjectileTask implements Runnable {

  private final List<Projectile> projectiles;

  public ProjectileTask() {
    this.projectiles = new LinkedList<>();
  }

  @Override
  public void run() {
    this.projectiles.removeIf(projectile -> {
      projectile.tick();
      return projectile.isDone();
    });
  }
}

Every tick, all projectiles get ticked, and if isDone() returns true, then they are removed from the tick list.

This way all you need to do is add your Projectile implementations (Like FireBallProjectile, CanonBall, etc) to this ProjectileTask, and
write a robust implementation. Add and forget.

glass breach
#

Thats amazing! I kinda feel bad to have to get to the point of spoonfeeding, but hey, free code :)

Thanks a lot for explaining and being awesome overall!

peak jetty
#

i have a gameprofile, how do i send the pack to all players so they see it as another player in tab?

lost matrix
peak jetty
#

oh ok, i have protocollib do you know how i can do it with that?

icy beacon
granite owl
#

does java CommandMap.register(String fallbackPrefix, Command command) already call something like this ```java
for (Player player : Bukkit.getOnlinePlayers())
{
player.updateCommands();
}

granite owl
#

lol

#

then why is it considered updated to the clients

#

on reload

river oracle
#

Which is precisely why

blazing ocean
granite owl
#

so to be clear, when i inject commands at runtime, its best to update all clients command list?

#

xD

granite owl
#

aight🙏

lost matrix
# peak jetty i have a gameprofile, how do i send the pack to all players so they see it as an...
  public PacketContainer createFakeTablistPacket(String displayName, UUID fakeUid) {
    PacketContainer packet = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
    WrappedGameProfile profile = new WrappedGameProfile(fakeUid, "FakePlayer");
    int ping = 0;
    EnumWrappers.NativeGameMode gameMode = EnumWrappers.NativeGameMode.SURVIVAL;
    WrappedChatComponent wrappedName = WrappedChatComponent.fromText(displayName);
    PlayerInfoData playerInfoData = new PlayerInfoData(profile, ping, gameMode, wrappedName, null);
    Set<EnumWrappers.PlayerInfoAction> actions = Set.of(
        EnumWrappers.PlayerInfoAction.ADD_PLAYER, 
        EnumWrappers.PlayerInfoAction.UPDATE_LISTED
    );
    packet.getPlayerInfoActions().write(0, actions);
    packet.getPlayerInfoDataLists().write(0, List.of(playerInfoData));
    return packet;
  }
peak jetty
#

soz for needing to spoonfeed, Set.of and List.of gives this error: Usage of API documented as @since 9+

lost matrix
#

Sounds like you are using java 8. Which you shouldnt.

peak jetty
#

oh, doesnt this mean i use java 17 tho?

lost matrix
peak jetty
#

oh ok i got it thanks

peak jetty
lost matrix
peak jetty
lost matrix
peak jetty
lost matrix
#

Hm

#

Show your code

#

Did you change any of it?

nova quail
#

Can I shoots effects as projectiles. Like do a llama spit with hearts or llama spit with fire?

peak jetty
# lost matrix Show your code

this:

public PacketContainer createFakeTablistPacket(String name, String displayName, UUID fakeUid) {
        PacketContainer packet = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
        WrappedGameProfile profile = new WrappedGameProfile(fakeUid, name);
        int ping = 20;
        EnumWrappers.NativeGameMode gameMode = EnumWrappers.NativeGameMode.SURVIVAL;
        WrappedChatComponent wrappedName = WrappedChatComponent.fromText(displayName);
        PlayerInfoData playerInfoData = new PlayerInfoData(profile, ping, gameMode, wrappedName, null);
        Set<EnumWrappers.PlayerInfoAction> actions = Set.of(
                EnumWrappers.PlayerInfoAction.ADD_PLAYER,
                EnumWrappers.PlayerInfoAction.UPDATE_LISTED
        );
        packet.getPlayerInfoActions().write(0, actions);
        packet.getPlayerInfoDataLists().write(0, List.of(playerInfoData));
        return packet;
    }```

and then this in onEnable:
```java
createFakeTablistPacket("PlutoCraftDev", ChatColor.GREEN + "" + ChatColor.BOLD + "DEV " + ChatColor.RESET + "PlutoCraftDev", UUID.fromString("14aec651-52d7-422f-a218-1543f611a0ee"));```
lost matrix
lost matrix
peak jetty
lost matrix
#

🤷

#

Look online. Im currently fighting with craftbukkit

nova quail
glass breach
#

Is there any way of creating an explosion that only damages hostile entites and not players? Maybe using teams or something, the most reasonable idea right now is to create a fake explosion with particles and going through all nearby entities 💀

peak jetty
lost matrix
lost matrix
glass breach
#

Yes, I forgot to mention that I also thought of using an Damage event for the player and to cancel any explosion related ones, but I might need explosions that also damage the player in the future, so thats out of the question... Ok thanks!

peak jetty
peak jetty
civic sluice
#

What's your current code?

lost matrix
#

No exception means something went right

peak jetty
#

well the player didnt get added to the tablist

lost matrix
#

When did you send the packet to players?

peak jetty
#

onEnable

lost matrix
#

What

#

During your onEnable there is literally nobody on the server.
So you didnt send the packet to anyone

vital sandal
#

could anyone explain for me

lost matrix
civic sluice
vital sandal
lost matrix
peak jetty
lost matrix
#

*But close

tranquil badger
#

?nbt

lost matrix
#

Do you mean

#

?pdc

peak jetty
blazing ocean
#

you can't send a craftplayer a packetcontainer

#

but i believe there's methods on the packetcontainer

civic sluice
tranquil badger
# lost matrix ?pdc

It was another one I saw yesterday that showed the arg I needed for remapped build tools jar

lost matrix
#

?nms

tranquil badger
#

Ah oops ty

peak jetty
#

like this?

protocolManager.sendServerPacket(player, createFakeTablistPacket("PlutoCraftDev", ChatColor.GREEN + "" + ChatColor.BOLD + "DEV " + ChatColor.RESET + "PlutoCraftDev", UUID.fromString("14aec651-52d7-422f-a218-1543f611a0ee")));```
civic sluice
#

Looks more promising.

lost matrix
peak jetty
#

alright

#

the display name doesnt show in the tablist it just shows the name

civic sluice
lost matrix
#

@young knoll When adding new files for changing the server impl, do i add remapped ones to craftbukkit for building patches or the obfuscated ones?

young knoll
#

remapped

lost matrix
#

k

polar forge
#

Guys

#

Can anyone help me making a plugin? I’m blocked rn

#

I would love to make a hover plugin, when a player hovers with his mouse on a player who sent a message, he could see which role that player has

wet breach
#

not sure what being blocked has to do with coding

flint coyote
#

Banned from IJIdea

wet breach
#

well its not the only IDE

polar forge
flint coyote
#

I suppose it means he hasn't got time

polar forge
#

Cul*

lost matrix
flint coyote
#

I think he means to hover the name in chat

polar forge
#

Yea

flint coyote
#

not the actual entity

polar forge
#

Wait

lost matrix
#

Ah

polar forge
#

I should probably send an example-image

#

Something like that

worthy star
#

im using CommandAPI

lost matrix
# polar forge

Makes sense. Then replace the name with a hoverable component i guess

worthy star
#

why CommandAPI doesn't work on 1.20 D:

worthy star
#

i downloaded the latest version

lost matrix
lost matrix
worthy star
#

ok wtf

#

istg i downloaded 1.20.4

polar forge
#

Ribble

peak jetty
blazing ocean
peak jetty
#

is it possible to give my fake player a rank with a weight and stuff just like with luckperms/vault?

peak jetty
blazing ocean
#

soooo... npcs?

peak jetty
#

fake players in tab like this:

public PacketContainer createFakeTablistPacket(String name, String displayName, UUID uuid) {
        PacketContainer packet = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
        WrappedGameProfile profile = new WrappedGameProfile(uuid, name);
        int ping = 20;
        EnumWrappers.NativeGameMode gameMode = EnumWrappers.NativeGameMode.SURVIVAL;
        WrappedChatComponent wrappedName = WrappedChatComponent.fromText(displayName);
        PlayerInfoData playerInfoData = new PlayerInfoData(profile, ping, gameMode, wrappedName, null);
        Set<EnumWrappers.PlayerInfoAction> actions = EnumSet.of(
                EnumWrappers.PlayerInfoAction.ADD_PLAYER,
                EnumWrappers.PlayerInfoAction.UPDATE_LISTED
        );
        packet.getPlayerInfoActions().write(0, actions);
        packet.getPlayerInfoDataLists().write(1, List.of(playerInfoData));
        return packet;
    }```
blazing ocean
#

try adding UPDATE_DISPLAYNAME or whatever that was

#

that's worked for me

modern plank
#

is it true that the entity id assigned to entities is just a counter?

#

doesnt it reach a limit at some point?

#

or at least reset?

civic sluice
peak jetty
modern plank
#

it just seems so insecure

blazing ocean
civic sluice
modern plank
#

for int

civic sluice
modern plank
blazing ocean
#

they depend on the world AFAIK

civic sluice
worthy star
#

how can i put usage message for CommandAPI, because withUsage("usage") doesn't seem to be working

#

it does nothing

peak jetty
lost matrix
#

Iterate over online players and send or use plib broadcast

peak jetty
#

ok, how do i remove the player now?

lost matrix
#

Send the remove packet