#help-development

1 messages · Page 1061 of 1

sterile breach
#

Connection is an abstraction, in In the network, everything works by packet I think, it's netty that calls it a conexion . Our physical machine receives packets, it's netty that sees it as a conexion, gathers the packets and creates channels that are abstractions.
I'm not sure of everything I'm saying, but this is what seems correct to me.

#

I don't know whether it's netty or nms that creates the channels per client. If it's nms, that means there must be a global channel where all incoming packets pass through, so surely we can inject our handler?

hazy parrot
#

why not ?

grim hound
#

netty is networking

#

nms uses netty

quaint mantle
#

How could I make signs execute commands?

pseudo hazel
#

I dont think they can by default

#

probably just player interact

quaint mantle
#

I see an event for signs when clicked PlayerSignCommandPreprocessEvent

sterile breach
#

You can add command in sign nbt I think

quaint mantle
quaint mantle
drowsy helm
#

Indeed

grim hound
#

to the text

pseudo hazel
#

oh it seems like you can just have a click event on the sign lines?

grim hound
#

it works with commands

#

so it should work with bukkit

grim hound
pseudo hazel
#

yeah

quaint mantle
pseudo hazel
#

you should be able to put a "click_event":(" or whatever on the signs line

#

like each line of a sign is a text component

#

you should be able to add click events to that

drowsy helm
grim hound
#

/setblock ~ ~1 ~ minecraft:oak_sign{Text1:"{\"text\":\"siema\",\"color\":\"white\",\"bold\":\"true\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/teleport @p -202 118 -8\"}}"} replace is how I did it like 3 years ago

drowsy helm
#

In bed rn so cant send any code examples

last pulsar
#

Can someone explain to me why creating a ClientboundPlayerInfoUpdatePacket instance results in this error:
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.server.network.PlayerConnection.k()" because "var0.c" is null

I wrote this plugin with Mojang Mappings (with Special Source) for the version 1.21

Here is my code:

package me.loadthecode.npcs.commands;

import com.mojang.authlib.GameProfile;
import net.minecraft.network.protocol.game.ClientboundAddEntityPacket;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ClientInformation;
import net.minecraft.server.level.ServerEntity;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.v1_21_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;

import java.util.Set;
import java.util.UUID;

public class CreateNPCCommand implements CommandExecutor {
  @Override
  public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

    if (sender instanceof Player p) {
      CraftPlayer cp = (CraftPlayer) p;
      ServerPlayer sp = cp.getHandle();

      MinecraftServer minecraftServer = sp.getServer();
      ServerLevel serverLevel = sp.serverLevel();

      ServerPlayer npc = new ServerPlayer(minecraftServer, serverLevel, new GameProfile(UUID.randomUUID(), "Bob"), ClientInformation.createDefault());

      sp.connection.sendPacket(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, npc));
      sp.connection.sendPacket(new ClientboundAddEntityPacket(npc, new ServerEntity(serverLevel, npc, 0, false, packet -> {}, Set.of())));

    }

    return true;
  }
}
chrome beacon
#

You need to make a fake connection for the npc

#

The server is trying to send packets to it

#

And you need to void them

sterile breach
#

serverConnection is global server connection? You can get channels from it?

last pulsar
chrome beacon
#

Just use Citizens there's no need to reinvent the wheel

last pulsar
#

Ok

wet breach
shadow night
grim hound
#

so for example the handshake handler

#

timeout handler

#

ping handler

#

etc

#

the server's handler assigns the user's Channel some channel handler that are unique to that very player

#

but the server's channel handlers are shared and they determine what handlers each player should have

sterile breach
grim hound
#

you get the pipeline with Channel#pipeline

#

and place your handler

#

I placed mine first

#

cuz it's a wannabe firewall

blazing ocean
grim hound
sterile flicker
#
java.lang.NoSuchMethodError: 'java.lang.Object net.kyori.adventure.platform.facet.FacetAudience.getOrDefault(net.kyori.adventure.pointer.Pointer, java.lang.Object)'
        at net.kyori.adventure.platform.facet.FacetAudienceProvider.addViewer(FacetAudienceProvider.java:114) ~[?:?]
        at net.kyori.adventure.platform.bukkit.BukkitAudiencesImpl.<init>(BukkitAudiencesImpl.java:100) ~[?:?]
        at net.kyori.adventure.platform.bukkit.BukkitAudiencesImpl$Builder.lambda$build$1(BukkitAudiencesImpl.java:174) ~[?:?]
        at java.util.HashMap.computeIfAbsent(HashMap.java:1224) ~[?:?]
        at java.util.Collections$SynchronizedMap.computeIfAbsent(Collections.java:2722) ~[?:?]
        at net.kyori.adventure.platform.bukkit.BukkitAudiencesImpl$Builder.build(BukkitAudiencesImpl.java:174) ~[?:?]
        at net.kyori.adventure.platform.bukkit.BukkitAudiencesImpl.instanceFor(BukkitAudiencesImpl.java:89) ~[?:?]
        at net.kyori.adventure.platform.bukkit.BukkitAudiences.create(BukkitAudiences.java:53) ~[?:?]
        at com.sumeru.mobwars.MobWars.onEnable(MobWars.kt:35) ~[?:?] ``` plugin.yml: ```libraries:
  - 'net.kyori:adventure-platform-bukkit:4.3.3' ```  build.gradle: ``` implementation("net.kyori:adventure-platform-bukkit:4.3.3") ``` MobWars.kt  ```var adventure = BukkitAudiences.create(this); ```
#

why?

umbral ridge
#

what line of code causes this? [org.bukkit.craftbukkit.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!

#

how can you initialize legacy material support?

eternal oxide
#

set your api version to 1.13

hard socket
#

Material#getMaterial

#

then bunch of if checks

eternal oxide
umbral ridge
#

its not my plugin

#

but i set it

#

now works

#

also this warning from multiversecore is starting to piss me off

#

and fail with colors &a

#

as if some 15yo made it

#

its just spamming the console

eternal oxide
#

what event?

umbral ridge
#

I dont know

#

im using the latest version

eternal oxide
#

console should be telling you

umbral ridge
eternal oxide
#

in that case there should be another error somewher when using MV

umbral ridge
#

and they still havent fixed that

#

last update was on september 2023

eternal oxide
#

Seems like its org.bukkit.event.entity.EntityCreatePortalEvent

umbral ridge
#

can entities create portals? other than players

eternal oxide
#

the new event is CreatePortalEvent. Looks identical to teh Deprecated one. Seems just a name/package change

#

is better as teh new event gives a reason

umbral ridge
#

if anyone reports this as bug they just ignore it

#

or if someone just tells them about the warning

#

Its spamming the console

#

and uses dumb colors that dont event apply

quaint mantle
#

what is the alternative to Java Consumer in kotlin? contracts?

slender elbow
#

just T -> Unit ?

tardy delta
#

^

quaint mantle
tardy delta
#

or just use Consumer if you really want

quaint mantle
tardy delta
#

lambda?

tardy delta
#

people doing size == 0 instead of isempty, cringe

quaint mantle
grim hound
#

to invoke PlayerInteractEvent, which packets does the server use?

sterile breach
grim hound
#

so in other words

#

there's a first channel handler

#

which is the first to process any data

#

and the last one

#

wait no

#

the first channel handler is the last one to process outgoing data

#

had to ask friend

#

last process first outgoing

#

first process first incoming

#

you should also know

#

that there are Inbound and Outbound handlers

sterile breach
#

Ah pipeline contain handlers who handle incoming ans outgoing packets, all packets pass in the pipeline?

grim hound
#

when reading (incoming) inbound handlers get to process

#

all of which are in the same pipeline

#

in the same linear array

blazing ocean
sterile breach
grim hound
#

it listens to packets by modifying mojang's code

#

and they need to add handlers

sterile breach
#

Ah nms instead?

grim hound
#

yeah

sterile breach
# grim hound yeah

In the code you showed me (AlixSystem) you add an handler in the pipeline at the same "level" that NMS?

grim hound
#

this might help

#

there are many more handlers but this is a simplified version

grim hound
sterile breach
# grim hound this might help

It's a complex fear for me if I summarize, in the pipeline we have 2 parties, the "out" and "in" there are inside handlers and the packet is sent once each handler has finished with this event right?

grim hound
#

but inbound handlers don't handle write, and vice verse outbound handlers don't handle channelRead

grim hound
#

(for whatever reason)

sterile breach
grim hound
#

but for you it'll be best to use ChannelDuplexHandler

sterile breach
#

Okay okay

sterile breach
grim hound
#

np

#

👍

grim hound
grim hound
#

it's both inbound and outbound

sterile breach
#

So I provid my inBound handler and outBound handler

grim hound
sterile breach
#

Can we set "priority handle"? (For example if I want to handle before nms)

grim hound
#

like this

sterile breach
#

Ah okay is .addbefore

#

Packet_handler is nms packet handler ?

grim hound
#

it's the name of it, ye

sand spire
#

Hey, so I just finished coding one ability and it works but it's 733 lines long.

I googled how I can give myself less of a headache when I look at it and what I found is that I should have only one responsibility per class. Which makes sense because I notice most opensource plugins do the same and it's easily understandable (although I have no idea why people make 10 classes with basically nothing it usually interfaces).

But my question is how do figure out the different responsibilities from my class, like is there a general rule to know what is a different responsibility and how niche should you go when sorting a giant class in multiple smaller classes?

Right now I only create different classes for objects used in my ability class. I think I could split my class in a Listener, PacketListener, Runnable and a class that connects everything but then it would still be messy just split in different classes.

Any advice is appreciated (my room, and this message probably are also a mess pls help)

grim hound
#

seperate different statements

#

for example add a class for utilities

#

and group together in the same package classes with something in common

grim hound
# sand spire Hey, so I just finished coding one ability and it works but it's 733 lines long....

Support us on Patreon: https://www.patreon.com/Geekific
GitHub Repository: https://github.com/geekific-official/geekific-youtube/
Stay updated on our videos by subscribing to the channel and hitting the like button!

Clean and quality code isn’t only a code that works, a code that provides us with the desired output or result. A high-quality c...

▶ Play video
#

I watched a bit and for now agree with everything

sterile breach
grim hound
#

it's created the very moment the connection is accepted

grim hound
# grim hound

the very first thing that is done is the channel being created after the socket is accepted

sterile breach
grim hound
grim hound
#

the Channel object is instantiated by netty

sterile breach
# grim hound I'm not sure what you mean by "concept"?

i'm not quite sure but from what i know, in the network itself there are no channels just "tram" or "frames" (i don't know if it's said like that in english but it's the packets that are sent basically) the concept of channel is more or less to group the packets arriving according to the ip of the client that is coming from

#

but yes, it must be netty

pliant topaz
#

To gen the jar with mojang maps it's just 'Generate Remapped Jars' right? i never worked with the gui version and I'm not sure haha (buildtools)

sterile breach
grim hound
sterile breach
undone axleBOT
sterile breach
grim hound
#

oh yeah

pliant topaz
#

thats teh thing, it's for the cmd version I'm just dumb xd sorry

sand spire
# grim hound https://www.youtube.com/watch?v=HoA6aZPR5K0 dunno try this

Thank you, and I also watched that video but I'm having difficulty deciding how niched down I should order different classes to follow the single responsibility principle, because I would argue my entire class has one responsibility which is to add an ability but that logic is obviously flawed

grim hound
#

one probably being the cooldown

#

the other one displaying particles

#

and the other maybe moving some mobs

sand spire
#

I guess, my ability is basically making the player invisible and using packets to replay everything the player did a few ticks later. I already have the invisible part somewhere else it just takes a lot of checks and listeners to copy everything the player does

grim hound
#

hmm I do that myself

#

then no idea

grim hound
sand spire
#

xd

grim hound
#

anyhow check this out

#

hand

#

in mc

#

3d

sand spire
# grim hound

oh that's sick you also showed this in packetevents discord haha

grim hound
#

didn't know you were there

grim hound
#

maybe I should just make the armor stands never touch each other?

sand spire
grim hound
#

rotate them randomly

#

and use some stolen adapated code to show it in 3d space

#

all while filtering any white pixels

earnest path
sand spire
grim hound
#

basically generate this but without any extra random lines

grim hound
#

I download a 3d object

#

roughen it up in blender (cuz they're too detailed)

#

and then use other stolen adapted code to show it in 3d space

sand spire
#

cool, to solve the captcha you gotta type 👆

tardy delta
#

omtfk ig

grim hound
#

by just making them more distant to each other

grim hound
# grim hound

and here I planned to have it point where you click it to point

sand spire
#

ah

nova notch
# grim hound

Ok but what's the captcha word supposed to be because it's kinda open to interpretation

#

Hand? Finger? Point?

grim hound
#

the action bar is just from the former code

#

the new challange will have 12 (or maybe more) different points

#

and you can click on them and the hand will change rotations

#

and one of them will be red instead of white

#

and it'll say click on the red point

#

and then you confirm

#

that's how I envisioned it

torn shuttle
#

also you didn't have to roughen it up in blender, there's a way to solve that volumetrically but whatever

grim hound
grim hound
grim hound
#

uhh

#

I like your funny words magic man

torn shuttle
#

it's a voxel game

#

you just need to pick a scale and fill in the volume

#

it doesn't matter if you hand has 3 vertices or 3 million

wet breach
torn shuttle
#

if you think about it I'd be way more interested in seeing the 3 vertex hand

wet breach
#

oh that is true too 🤔

torn shuttle
#

a triangle with a hand texture drawn on it

wet breach
#

would have that 90's feel to it

torn shuttle
#

also it's not that rare to get 1mil tri hyperrealistic models, I'm sure there's hands with that level of detail available for download

#

especially when you're doing it from detailed scans

grim hound
#

he doesn't know what an 8 is

nova notch
#

ima be honest i dont even know what thats supposed to say

nova notch
#

it looks like a wacky W

#

fix ur captcha

torn shuttle
#

unironically this is what amazon does

grim hound
#

yeah that was a test

grim hound
shadow night
#

it looks fine imo

nova notch
#

i guess im just a fuckin robot then but that doesnt look like Uu

torn shuttle
#

I'm 99% sure amazon's capcha is not meant to be solvable on the first one they show

sullen canyon
grim hound
#

or rather

torn shuttle
#

the first one they show is almost always entirely unreadable, and the second one is always basically just fine

grim hound
#

enlarge the distance in-between them to avoid that

gilded granite
#

how can I update a chat message?

#

I want to make a progress bar

#

that doesnt flood the chat

grim hound
#

make the bots only solve the 2nd one

#

with OCR

shadow night
#

Lol

torn shuttle
pseudo hazel
#

just use a checkbox 😉

torn shuttle
#

if someone just told me what I just said I wouldn't believe them, but I at the same time I refuse to believe that it is a coincidence that amazon has failed to present me a single 1st try solvable capcha in the last 2 years on their first try

quaint mantle
gilded granite
torn shuttle
nova notch
torn shuttle
#

some plugins pretend to do this by re-sending most of chat in a single go but editing one message in there, but effectively that's just spamming the client with brand new messages

grim hound
#

tf is this then

gilded granite
torn shuttle
#

as far as I know

#

maybe that changed

gilded granite
#

even with server modification?

torn shuttle
#

that's beyond the scope of what we do support for here

gilded granite
#

ok

worldly ingot
#

That delete chat packet can only be used to delete a signed message

#

You have to have chat signatures enabled. Which is fine. You should. But not a lot of servers support it because chat management is difficult

#

We don't expose it in the API either because we don't expose message signatures anywhere

grim hound
#

bruh wtf is that last method

#

netty, u good?

worldly ingot
#

Fast check using bitwise operators

grim hound
grim hound
worldly ingot
#

If any of those result in a negative number, it's out of capacity

#

Kind of a neat way to write that

grim hound
#

addition is done before bitwise

worldly ingot
#

Yes, and if they overflow into a negative 👀

grim hound
#

would need to be pretty bing for that

slender elbow
#

I severely doubt it's much faster than just a regular if bounds chdck

worldly ingot
#

I mean probably

grim hound
#

how are you adding these?

slender elbow
#

especially after c2, lol

worldly ingot
#

Could be curious to have it benchmarked

#

I'm sure they didn't write it using bitwise operations just because they could

slender elbow
#

"it looks smart tho"

worldly ingot
#

me when I use a bodyless for loop

tardy delta
#

for {}

torn shuttle
#

while (1)

shadow night
blazing ocean
#

loop {}

torn shuttle
#

loop(){loop();}

slender elbow
# tardy delta for {}

Unfortunately, neither the basic for statement (JLS § 14.14.1) nor the enhanced for statement (JLS § 14.14.2) allow for for statements without parentheses. Your program is ill-formed, not syntactically correct, and will raise a compilation error

halcyon hemlock
#
loop {
            
}
torn shuttle
# worldly ingot
int i = 0;
int max = 10;
for (;;){
  i++;
  if (i >=10) break;
}

I'm not a part of your system, man

shadow night
quaint mantle
#

Thread.sleep(Long.MAX_VALUE)

blazing ocean
clever spear
#

hey @worldly ingot

#

Could you message me for a second

blazing ocean
#

?ask

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!

clever spear
#

It's a personal question

blazing ocean
#

raised eyebrow emoji

shadow night
#

I thought choco is already in a relationship

clever spear
#

I'm trying to hire him ...

eternal oxide
#

then thats not personal

shadow night
#

He's already hired by hypixel

blazing ocean
#

?services

undone axleBOT
clever spear
#

I am good at hiring people, I did hire him before 😄

clever spear
#

This time its a better server, with a better management and a better pay

#

So he might be interested

clever spear
#

Hard skill to prove

#

Anyone else is interested? As long as you are good at java I might have a job for you

eternal oxide
#

?services

undone axleBOT
clever spear
#

actual talented people do not use forum recruitment for some reason

blazing ocean
#

because they alreaxy have an occupation

eternal oxide
#

They do, IF the offer is good

blazing ocean
#

(which they often aren't)

blazing ocean
#

need to be logged in

eternal oxide
#

link is fine

clever spear
#

nvm I need twostep thingy

#

guess its new

blazing ocean
#

it's not

clever spear
#

maybe I'm old

eternal oxide
#

well it is recent for a year or so

clever spear
#

are you a dev @eternal oxide

worthy yarrow
#

No

#

He just reads books

eternal oxide
#

Nope, whats a Dev?

clever spear
#

Devoted member of the Minecraft Community

eternal oxide
#

definitely not 🙂

worthy yarrow
#

He’s actually the author of an upcoming spigot api book

#

(I wish kek)

clever spear
#

Books are overrated

eternal oxide
#

Actually I draw Minecraft Anime porn

clever spear
#

Explaining a line in 2000 pages

clever spear
worthy yarrow
#

If you need 2000 pages to understand a line you shouldn’t be programming

clever spear
#

That's what I'm saying

eternal oxide
#

can't draw to save my life in reality

clever spear
#

Art is overrated

#

Midjourney proved it

worthy yarrow
#

That got proven to me when someone sold a banana taped to the wall

clever spear
#

Can you guys help me with my Hiring post & title

eternal oxide
#

I thought you were good at hiring 🙂

clever spear
#

Yes I am

#

This is not hiring, this is some AI stuff

eternal oxide
#

Need Dev. No pay but offering "Exposure". Only devs with 10 years experience need apply.

clever spear
#

You just enter some lines and wait for a response

#

The server I'm hiring is actually good, like top 10

#

So people would work for free

eternal oxide
#

lol

shadow night
#

I will not believe a single word

worthy yarrow
#

Top 10 sounds quite uh

clever spear
#

That used to happen like 10 years ago

nova notch
#

what server

worthy yarrow
#

fake

eternal night
#

Required: 20 years of spigot-api experience

clever spear
#

I'm the secret guy so can not reveal it

#

I mean you learn everything in 3 months anyway

blazing ocean
#

@worthy yarrow is md's brother

clever spear
#

and 9 more months for experience

blazing ocean
#

he knows

clever spear
#

1 is good enough

worthy yarrow
worthy yarrow
clever spear
#

Choco was a good dev tho, very nice guy

worthy yarrow
#

was?

#

He died?

eternal night
#

Choco is no more

blazing ocean
#

rip

worthy yarrow
#

Choco is dead???

eternal oxide
#

Did he die in teh past few hours?

clever spear
#

He went after clout

shadow night
eternal night
#

No component pr I guess

clever spear
#

He doesn't care much about money

eternal oxide
#

poor Choco

eternal night
#

Depressing

blazing ocean
clever spear
#

purple guy are you a dev

worthy yarrow
#

Ah sigh hes moving to heaven

blazing ocean
#

purple guy?

#

nah

clever spear
blazing ocean
#

he doesn't know whta a java is

shadow night
eternal night
worthy yarrow
#

Lead dev with no pay kek

eternal oxide
#

lynx is a noob here. He doesn;t know Java

blazing ocean
#

yea

clever spear
#

java overrated

blazing ocean
#

i'm a lead dev (for two servers)

clever spear
#

1 year experience enough

blazing ocean
eternal night
#

Nah I can't xode much sadly

#

Barely have 4 weeks of experience

blazing ocean
#

xcode 💀

worthy yarrow
#

Lynx has about 15 minutes of java/kotlin experience, he's just a fun guy to chat too

blazing ocean
#

oh

#

me blind

clever spear
#

Idk how much devs get paid tbh, I'm just trying to find a really good guy, money is handled by owners

blazing ocean
eternal night
#

Yea I'm just here to meme, my only answer is "ask chatgpt"

worthy yarrow
#

No one here knows how to code dawg

blazing ocean
#

they're just promoting people with zero clue whaz they're doing

#

paper moment

worthy yarrow
#

Well this is why AI

eternal night
worthy yarrow
#

Imagine if people asked their "not working" questions to chatgpt

blazing ocean
blazing ocean
#

cannot stop thinking about him

#

what was his name again

clever spear
#

rad are you really a good dev

blazing ocean
#

what is coding

worthy yarrow
eternal oxide
#

rad nests if then

blazing ocean
worthy yarrow
#

I actually like to only use recursion

blazing ocean
#

then be it

worthy yarrow
#

No method I write isn't recursive

#

God fuck double negatives in english

#

this shits stoopid

blazing ocean
#

skull

worthy yarrow
#

Rad did I tell you I got a job

blazing ocean
#

you did not

#

good job

#

wait

#

congrats

#

yea that's better

worthy yarrow
#

kek

#

Thank you thank you

worthy yarrow
# blazing ocean whatever the fuck this is
public void displayStructureOverlay(Player player, Location targetLocation, int width, int height, int depth) {
        Location[] corners = new Location[]{
                targetLocation.clone().add(0, 0, 0),
                targetLocation.clone().add(width, 0, 0),
                targetLocation.clone().add(0, height, 0),
                targetLocation.clone().add(0, 0, depth),
                targetLocation.clone().add(width, height, 0),
                targetLocation.clone().add(width, 0, depth),
                targetLocation.clone().add(0, height, depth),
                targetLocation.clone().add(width, height, depth)
        };

        drawLine(player, corners[0], corners[1]);
        drawLine(player, corners[0], corners[2]);
        drawLine(player, corners[0], corners[3]);
        drawLine(player, corners[1], corners[4]);
        drawLine(player, corners[1], corners[5]);
        drawLine(player, corners[2], corners[4]);
        drawLine(player, corners[2], corners[6]);
        drawLine(player, corners[3], corners[5]);
        drawLine(player, corners[3], corners[6]);
        drawLine(player, corners[4], corners[7]);
        drawLine(player, corners[5], corners[7]);
        drawLine(player, corners[6], corners[7]);
    }

    private void drawLine(Player player, Location start, Location end) {
        double distance = start.distance(end);
        Vector vector = end.toVector().subtract(start.toVector()).normalize().multiply(0.1);
        Location current = start.clone();

        for (double i = 0; i < distance; i += 0.1) {
            player.spawnParticle(Particle.HAPPY_VILLAGER, current, 1);
            current.add(vector);
        }
    }
}```

Just be happy you're not doing this absolute fuckery with particles
blazing ocean
#

what the fuck

#

i want to jump off a bridge after seeing this

worthy yarrow
#

if it aint broke man

#

I mean

#

it's still kinda broken...

blazing ocean
#

okay yeah that is kinda cool

#

i do need something like that for my structure lib too

worthy yarrow
#

So it's based off players current view, the issue is that I need to align the display with the actual dimensions of blocks to relay a better placement grid as it were

blazing ocean
worthy yarrow
#

Right now the offset makes it look like it can be pasted in half way of block

worthy yarrow
sleek estuary
#

supports ipv6?

blazing ocean
#

tcpshield should support it

#

but their docs kinda suck at that stuff

worthy yarrow
blazing ocean
#

i updated some stuff btw

worthy yarrow
#

The same but with redstone particles, and it only works with the //wand region you make. So my plugin is prebuilt structures with item placeholders, schem file names are stored with the items pdc which I then use to grab the correlated schem and determine dimensions for the visual overlay this way

@blazing ocean

blazing ocean
#

epic mention fail

worthy yarrow
#

Idk if you were still here or not kek and I forgot to reply

blazing ocean
#

i have this open on my second monitor

worthy yarrow
#

Idk why I always forget people have multiple monitors, I've been on my laptop for so long

blazing ocean
#

i want a third one

worthy yarrow
#

I have a second monitor though I think the hdmi hardware is busted on the laptop

#

For some reason it detects the monitor but won't shoot over the display or inputs

blazing ocean
#

windows moment

eternal oxide
#

usually a CTRL+Fn key to switch monitors

worthy yarrow
#

It's one sided though

#

the laptop tells me it knows a monitor is detected but I cannot do jack shit with it kek

velvet plaza
#

does anybody have any spigot plugin/api/library/anything that needs PRs. im tryna do more open source stuff

onyx fjord
#

is there a tool that calculates the amount of chunks that will render with specific view distance?

worldly ingot
#

I mean it's just (radius * 2)^2 isn't it?

#

The fog is circular in modern versions though so they're not "rendered" but they're loaded

worthy yarrow
#

Did gpt make this formula up

#

I love gpt'ing peoples questions lol

ornate patio
#

is threre a scoreboard update event

worldly ingot
#

No that looks right and close to what I said, only it +1’s which makes sense

clever spear
#

hey choco you here?

#

add me for a minute

sleek estuary
#

Is it better to have 200 schedulers that each set a block after 15 minutes scheduled at different times or 1 global scheduler that sets the 200 blocks at once every 15 minutes?

tardy delta
#

global

#

just think about it

sleek estuary
rough drift
#

d^2

tardy delta
#

200 isnt

rough drift
#

I once saw like what

sleek estuary
rough drift
#

48k schedulers at once?

#

It was running perfectly fine

tardy delta
#

there was some article on the speed of some methods to set blocks

#

i hope you mean tasks instead of schedulers

sleek estuary
sleek estuary
tardy delta
#

yes

sleek estuary
#

set the blocks not all at once but gradually set them

tardy delta
#

not even that

sleek estuary
#

should i do this for 200 blocks?

tardy delta
#

no

sleek estuary
earnest girder
#

I need to add 5 custom crops to my server. They will be already existing blocks, but I want them to have a name tag with their custom plant name above. How should I go about doing this?

sleek estuary
earnest girder
tardy delta
earnest girder
#

above the block

inner vigil
#

can someone send me via dm a example of how i change the full displayname of a Player i dont get it

tardy delta
#

i forgot if a crop has a persistent data container but if it doesnt you can probably save it in the chunks one; which crops exactly are one of your "custom" ones, depending on that, in the block break event, you can give a custom item or something
wanted to send this initially

#

should the broken crop drop something custom too, or just the vanilla item?

tardy delta
tardy delta
#

you can detect crop trample with the interact event

shadow night
#

?blockpdc

undone axleBOT
tardy delta
#

you can just map those locations to armor stands or something

clear elm
#

how can i change players displayname

tardy delta
#

that question is vague mate

#

theres Player::setDisplayName or you can change the name above their head

clear elm
#

ok

shadow night
tardy delta
#

no

#

last time i did that was ages ago so ig it still happens with scoreboards/packets

#

correct me if im wrong

blazing ocean
#

you can only set a prefix, colour and suffix

#

for other stuff you need a text display

tardy delta
#

packets 🤡

blazing ocean
#

no not really

blazing ocean
gilded granite
#

any1 got a tutorial for local database?

tardy delta
#

what you need the tutorial for?

#

just google spigot working with databses

torn shuttle
#

god I love this little bot I made

#

this must've been the most time efficient project I've ever made

tardy delta
#

bot be like ⏳ 🤔 ⏳

#

worst nightmare would be when it starts telling nonsense

torn shuttle
#

yeah it can take up to a minute to answer

#

it does some times hallucinate things but it has been getting better as we chip away at it, plus I'm usually around to correct it when it goes off the rails

tardy delta
#

great

#

i should make a bot for javadocs

torn shuttle
#

I did suggest something like this for spigot

#

genuinely think for 90% of beginner questions, if it was set up correctly it would do a better job at answering them than any of us could be bothered to do

tardy delta
#

elgarl would loose his job

torn shuttle
#

mark my words this kind of assistant will be widespread in 10 years

#

it's more convenient to query it than find the links myself and I both made the bots and wrote the docs it is basing the info off of

#

and even I just ask it to give me info and links when I'm not sure about something

#

honestly if I get into game dev I might make a bot like this for whatever game engine I end up really using because it would be a game changer

torn shuttle
#

feels good to be among the first, I still haven't really seen other people do this

eternal oxide
#

I did a bot for Towny IRC years ago but it eventually went mad

acoustic mantle
#

Good evening,

I am in the process of writing an MC plugin and have little experience... now I'm facing a few problems and can't get any further....

In the end I have uploaded my plugin to my server but it is not installed or displayed, maybe someone can find the problem quickly or has suggestions for solutions

Would someone be willing to take a look at this and help me ... ?
I come from Germany, but can also write/speak English.... hit me up

torn shuttle
#

see that's the kind of query bots do really well with

tardy delta
tall dragon
acoustic mantle
torn shuttle
#

don't forget the plugin.yml info is not optional

tardy delta
#

it is if you use the annotations kekw

#

anyways it generates it

acoustic mantle
tardy delta
#

cant even access the console?

tall dragon
#

well, cant you startup your server and see?

acoustic mantle
tall dragon
#

thats... interesting

#

why not run it locally?

#

without seeing an error.. it could be a number of different issues

torn shuttle
#

logs and console are not the same thing

#

logs are stored in the logs folder

acoustic mantle
#

i´ll do that...gonna come back after i´ve set up the exact same

acoustic mantle
torn shuttle
#

console is just a screen that shows a live feed of what ultimately gets dumped

tall dragon
#

which he cant access

acoustic mantle
#

gimme a sec

tall dragon
#

aperantly

acoustic mantle
#

i can, you got me wrong there

tall dragon
#

ah alright

acoustic mantle
#

wait a asec

torn shuttle
#

you guys have not been doing support for long enough

#

do another 10,000 support tickets and you'll know these fun tricks

tardy delta
torn shuttle
#

speaking of, I am soooo close to the magic number

#

I'll be upset if I'm not there for it

acoustic mantle
#

The last saved logs are from before the plugin was rolled out... how can I trigger logs manually or something ? are logs logged at every restart ?

tall dragon
#

they are logged live

acoustic mantle
#

got the newest ones... wait a asec

#

i guess this is the part we need :

[22:59:29] [Server thread/ERROR]: Could not load 'plugins/original-gg_plugin-1.1.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `org.quemix.gg_plugin.Gg_plugin'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:69) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?]

tall dragon
#

yea so the path to your main class is invalid

torn shuttle
#

underscore in the package name, bad move

tardy delta
#

Gg_plugin is your class name?

torn shuttle
#

underscore in the class name, also bad move

acoustic mantle
torn shuttle
#

goes against the recommended code style

#

package names are all lower case and all letters, class names capitalize the first letter of each word, no space no underscore

acoustic mantle
tall dragon
#

in your plugin.yml

#

it should point correctly to whichever class extends JavaPlugin

torn shuttle
#

am I nostradamus

acoustic mantle
#

oups, in my plugin.yml there is no path at all xd

#

can i private chat to someone ?
I guess i need some futher help here bc im very new into coding and especially in MC context...

tall dragon
#

u can if u want but there's more people here so it should go quicker

acoustic mantle
#

i get it

#

cant upload screen here :/

tall dragon
#

yeeaaa u need to verify ur spigot ac for that

acoustic mantle
#

wait a sec

tall dragon
#

if its text u can paste it

#

?paste

undone axleBOT
acoustic mantle
#

its not unfortunately

#

where do i get the verification at ?

#

i didnt receive a private message or mail so far

tall dragon
#

?verify

#

ah

#

i dont even remember tbh

acoustic mantle
#

xd

tall dragon
#

i thought it was a cmd

acoustic mantle
#

ill figure it out

#

*!verify

blazing ocean
#

?img has a link to the channel

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

blazing ocean
#

nvm

#

i thought it did

tall dragon
#

well it does tell u what to do

acoustic mantle
#

"A private message has been sent to your SpigotMC.org account for verification!"

#

but i dont know where to look at that message xd nvm

pseudo hazel
#

probably some kind of ray cast

earnest girder
#

What does this mean?
org.bukkit.plugin.IllegalPluginAccessException: Unable to find handler list for event org.bukkit.event.block.BlockEvent. Static getHandlerList method required!
I'm trying to register a BlockPistonEvent

#

Seems like for some reason you just cant use this event

#

I'm confused

worthy yarrow
#
 @Override
    public HandlerList getHandlers() {
        return HANDLERS;
    }

    public static HandlerList getHandlerList(){
        return HANDLERS;
    }

For any custom events you need a static getHandlerList method iirc

earnest girder
#

is it custom?

#

org.bukkit.event.block.BlockPistonEvent

worthy yarrow
#

Are you just passing an event to an @EventHandler method?

earnest girder
#
import org.bukkit.Bukkit;
import org.bukkit.block.Block;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPistonEvent;

import java.util.Collection;

public class Piston implements Listener {

    public Piston(Main plugin) {
        Bukkit.getPluginManager().registerEvents(this, plugin);
    }

    @EventHandler
    public void onPiston(BlockPistonEvent event) {

        System.out.println("event called");

        Block block = event.getBlock().getRelative(event.getDirection());

        Collection<Entity> entities = block.getWorld().getNearbyEntities(block.getLocation(), 0.5, 1, 0.5);

        for(Entity e: entities) {
            System.out.println(e.getType());

            if(e.getType().equals(EntityType.ARMOR_STAND)) {
                ArmorStand stand = (ArmorStand) e;
                if(stand.isSmall()) {
                    event.setCancelled(true);
                    break;
                }
            }
        }
    }
}

worthy yarrow
#
@EventHandler
    public void onTemperatureChange(PlayerTemperatureChangeEvent event){
        Player player = event.getPlayer();
        double newTemperature = event.getTemperature();
        handleTemperatureUpdate(player, newTemperature);
    }```

The example I gave is from impl of a custom event
#

I think you're using the wrong event

worthy yarrow
#

Try extend/retract events

#

I don't think BlockPistonEvent has a getHandlers method

earnest girder
#

ok

restive mango
#

Anyone know how to get LevelChunk for ClientboundLevelChunkWithLightPacket? For a given bukkit chunk.

earnest girder
#

do I need to make a getHandlers method?

worthy yarrow
earnest girder
#

ohh

#

I see thanks

worthy yarrow
#

Yeah BlockPistonEvent has no handler method by default so you'd have to implement that yourself

restive mango
#

i hope nuclearkat is about to elucidate me too 😄

#

oh

#

no

#

darn

worthy yarrow
#

Hold on

#

Is this plib or packet events?

#

Or nms

restive mango
#

nms

worthy yarrow
#

eek

#

Not my game use a lib kek

#

Wrappers make it so much easier

restive mango
#

im updating someone else's plugin who has since left the dev team so im just trying to update some of these old methods for 1.20.6

earnest girder
worthy yarrow
restive mango
#

wub

#

ClientboundLevelChunkWithLightPacket IS the 1.20.6 packet

#

it's just

#

the method to get LevelChunk has changed

#

it used to be you could getHandle from a craftworld chunk

worthy yarrow
#

This is why I recommend just using a lib for packet work haha, you get proper docs rather than hunting through nms code

gilded granite
#

What is the diff between playerHarvestBlockEvent and BlockBreakEvent

worthy yarrow
# gilded granite What is the diff between playerHarvestBlockEvent and BlockBreakEvent
- PlayerHarvestBlockEvent


This event is called whenever a player harvests a block.
A 'harvest' is when a block drops an item (usually some sort of crop) and changes state, but is not broken in order to drop the item.
This event is not called for when a block is broken, to handle that, listen for BlockBreakEvent and BlockDropItemEvent.

...


- BlockBreakEvent


Called when a block is broken by a player.
If you wish to have the block drop experience, you must set the experience value above 0. By default, experience will be set in the event if:

The player is not in creative or adventure mode
The player can loot the block (ie: does not destroy it completely, by using the correct tool)
The player does not have silk touch
The block drops experience in vanilla Minecraft
Note: Plugins wanting to simulate a traditional block drop should set the block to air and utilize their own methods for determining what the default drop for the block being broken is and what to do about it, if anything.

If a Block Break event is cancelled, the block will not break and experience will not drop.```
gilded granite
#

Ok thx

gilded granite
#

Is the BlockBreakEvent only for player or with creeper and stuff?

worthy yarrow
#

BlockBreakEvent is called any time a block is broken by a player

gilded granite
#

ty

#

**Random random = new Random();
int randomNumber = random.nextInt(100);
if(randomNumber <= 0.1){
e.getPlayer().getInventory().addItem(new ItemStack(Material.DIAMOND));
}
**

#

Is this great way for probability?

pseudo hazel
#

no

#

what does nextInt(100) do

gilded granite
#

its the bound

pseudo hazel
#

right

#

so a number between like 0 and 100

#

and you want it to be below or equal to 0.1?

#

i.e. when its 0

worthy yarrow
#

Less than a 1% chance btw

gilded granite
#

yes its 1 in 1000 chance

pseudo hazel
#

I mean if thats the chance you are going for sure, but it looks weird

#

well no

grim hound
pseudo hazel
#

its an int

hard socket
#

its 0 1 2

grim hound
#

It's 1 in 100

hard socket
#

not .1 .2

gilded granite
#

so i just do Random random = new Random();
double randomNumber = random.nextDouble(100);

grim hound
#

Why the fuck are you comparing an int to a double

grim hound
#

A fuckin

#

Next double

pseudo hazel
#

just do a random double between 0 and 1 and check if its <= 0.01

#

or whatever

hard socket
#

just make the bound 1000

pseudo hazel
#

yeah or that

gilded granite
hard socket
#
        int randomNumber = random.nextInt(1000);
if(randomNumber <= 1){
                e.getPlayer().getInventory().addItem(new ItemStack(Material.DIAMOND));
            }```
grim hound
gilded granite
grim hound
#

Or whatever argument

gilded granite
#

work fine

grim hound
pseudo hazel
#

yeha its just implicit cast

grim hound
#

What java version

gilded granite
#

last one

pseudo hazel
#

22?

worthy yarrow
#

22?

grim hound
#

That explains it

#

23

worthy yarrow
#

oh 23 came out finally?

gilded granite
#

21

pseudo hazel
#

ah right

grim hound
pseudo hazel
#

yes, if you are using them for double arguments

grim hound
#

That's not the point

worthy yarrow
#

Well considering that 100 is defined as a double in random.nextDouble, that implies it's actually 100. ...

#

Right?

grim hound
#

Bruh there'll be Java 25 in 2026

worthy yarrow
#

Or so they say

grim hound
#

23 in september this year

gilded granite
#

is this better way? double randomNumber = random.nextDouble();
if (randomNumber <= 0.1) { // 10% chance
e.getPlayer().getInventory().addItem(new ItemStack(Material.DIAMOND));
}

pseudo hazel
#

also use codeblocks for code, not bold markdown xD

grim hound
#

But I'd do random.nextInt(10) == 0

gilded granite
pseudo hazel
#

triple backticks

#

`

gilded granite
#

ok thanks

worthy yarrow
#

(not for small little functions like that but rather larger ones) ?paste

#

?paste

undone axleBOT
gilded granite
#

made this function is this better public boolean probabily(int chance, int totalProbability) { Random random = new Random(); int randomNumber = random.nextInt(totalProbability); return randomNumber < chance; }

worthy yarrow
#

This looks nice for reusability, also a stateless function so you could make that static

gilded granite
#

I don't quite understand Im new to java

worthy yarrow
#

basically a stateless object is something that doesn't hold/store data

#

That function you have is stateless because it just returns you a calculated result, theres no storing of data here

gilded granite
#

I've made it static but I can't use it outside of the class

#

Got it working sory

rose frigate
#

i have a question how can i use getConfig here to get the String List "unsafeBlocks"


public class rtp /*extends JavaPlugin*/ implements CommandExecutor, Listener {

    private final HashMap<UUID, Long> combatLog = new HashMap<>();
    private static final long COMBAT_COOLDOWN = 10 * 1000; // 10 seconds

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {
            Player player = (Player) sender;

            Bukkit.getLogger().info(ChatColor.GREEN + "Hugo rtped");

            World world = player.getWorld();
            Random random = new Random();

            int x = random.nextInt(10000) - 5000;
            int z = random.nextInt(10000) - 5000;
            int y = world.getHighestBlockYAt(x, z);

            Location randomLocation = new Location(world, x + .5, y + 1, z + .5);

            player.teleport(randomLocation);


            List<String> unsafeMaterials = plugin.getConfig().getStringList("unsafeBlocks");
            Block generatedBlock = world.getHighestBlockAt(x, z);
            Block higherBlock = world.getBlockAt(x, generatedBlock.getY() + 2, z);
            if (unsafeMaterials.contains(generatedBlock.getBlockData().getMaterial().name()) || unsafeMaterials.contains(higherBlock.getBlockData().getMaterial().name()))
                ;
        }
        return true;
    }

}```
nimble bear
#

Hello! If anyones here im having trouble with trying to Run a command in my Code if anyone could help me please let me know so i can give more information!!!

gilded granite
#

I can help if not too hard

nimble bear
#

Thank you!

#

Can i private message you or do i leave it here?

gilded granite
#

here is good

nimble bear
#

so im writing a Hide and seek plugin

gilded granite
#

yeah

nimble bear
#

and im trying to make it so when you are a seeker and when the seeker is tagged a command is ran

#

and i cant figure out how to run the command ill send what i have

#

how do i send it in the code format like above?

gilded granite
#

use triple `

nimble bear
#
        if (players.contains(player)) {
            players.remove(player);
            if (seeker == null) {
                seeker = player;
                player.sendMessage(ChatColor.RED + "You've been tagged! You are now a seeker!");

                // Run command to morph player into Freddy
                Bukkit.dispatchCommand(seeker, "/mpm1");

                // Run command to morph player into Freddy
                Bukkit.dispatchCommand(seeker, "/mpm1");

                // Remove blindness and slowness effects from tagged player
                player.removePotionEffect(PotionEffectType.BLINDNESS);
                player.removePotionEffect(PotionEffectType.SLOW);
                player.setWalkSpeed(0); // Prevent movement
            } else {
                seekers.add(player);
                player.sendMessage(ChatColor.RED + "You've been tagged! You are now a seeker!");

                // Remove blindness and slowness effects from tagged player
                player.removePotionEffect(PotionEffectType.BLINDNESS);
                player.removePotionEffect(PotionEffectType.SLOW);
                player.setWalkSpeed(0); // Prevent movement
            }

            // Spawn red firework explosion
            spawnRedFirework(player.getLocation());

            // Transform the player into a different skin
            transformPlayerSkin(player);
        }

        if (players.isEmpty()) {
            endRound();
        }
    }
#

uhh

#

oops

gilded granite
#

so what is the problem

nimble bear
#

the command is not working

#

everything else is but the command execution

gilded granite
#

send the command code

nimble bear
#

being this part

     // Run command to morph player into Freddy
                Bukkit.dispatchCommand(seeker, "/mpm1");

                // Run command to morph player into Freddy
                Bukkit.dispatchCommand(seeker, "/mpm1");
gilded granite
#

is this your command code?

nimble bear
#

Yeah

#

im trying to get a regular like command to play

#

like from the minecraft game itself

gilded granite
#

did u implements CommandExecutor in the class

nimble bear
#

yes i believe so

#
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
#

??

eternal oxide
#

Why are you using dispatchCommand? Is it not your plugin?

gilded granite
#

no its like public class HideAndSeekCommand implements CommandExecutor {

nimble bear
#

i was looking up how to execute commands in the plugin i only know VERY basics

eternal oxide
#

why are you using dispatchCommand? its yoru own plugin so just call the method

eternal oxide
#

teh same as calling any method

gilded granite
#

just use the method onCommand with CommandExecutor

nimble bear
#

Alright let me try this

rose frigate
nimble bear
#

nope

#

it didnt work

gilded granite
#

show me your folder tree

nimble bear
#

Wait so

#

Now its saying in the console /help

#

after i tag someone

gilded granite
#

send me the command code

nimble bear
#

Its a modded command but i shortened it with a plugin

gilded granite
#

show me the code of it

eternal oxide
#

modded?

nimble bear
#

The command is /mpm1
which makes this command run
/morph Skiylix blockbuster.fred_3d {Hitbox:{Eye:0.9f,Sneak:1.65f,Enabled:1b,Height:1.7f},Skin:"b.a:fred/skins/AaronBase.png",Scale:0.97f,Settings:{Hands:1b}}

#

it used to be like @p & @s

eternal oxide
#

morph is not your command/plugin?

nimble bear
#

the MORPH command is from the BlockBuster mod, HOWEVER im trying to get the command to run everytime a player is tagged

gilded granite
#

a mod?

#

like fabric?

#

forge?

eternal oxide
#

dispatchCommand will not trrigger a mod

nimble bear
#

forge

gilded granite
#

show me where you shorten it

nimble bear
#

I shortened it with another plugin called MyCommand

#

so it says this

#

command: /mpm1
type:

  • RUN_COMMAND
    runcmd:
  • /morph Skiylix blockbuster.fred_3d {Hitbox:{Eye:0.9f,Sneak:1.65f,Enabled:1b,Height:1.7f},Skin:"b.a:fred/skins/AaronBase.png",Scale:0.97f,Settings:{Hands:1b}}
#

but when i run the command ingame it works perfectly fine

young knoll
#

I smell cursed hybrid

nimble bear
#

Im sorry! can i not ask for help if im using mods? (this is a serious question)

eternal oxide
#

you can

#

but dispatchCommand will nto trigger a mod as it never leaves teh spigot command system

nimble bear
#

is there another way i can get the command to be used?

gilded granite
#

when you use the command in game you do only /mpm1 or /mpm1 playername?

nimble bear
#

just /mpm1

#

but thats to run the shortcut

#

so this command

/morph Skiylix blockbuster.fred_3d {Hitbox:{Eye:0.9f,Sneak:1.65f,Enabled:1b,Height:1.7f},Skin:"b.a:fred/skins/AaronBase.png",Scale:0.97f,Settings:{Hands:1b}}```
i need to clarify the player which would be the seeker
gilded granite
#

when you shorten it does it do /morph @s ?

nimble bear
#

Yeah i can do
/morph @s blockbuster.fred_3d {Hitbox:{Eye:0.9f,Sneak:1.65f,Enabled:1b,Height:1.7f},Skin:"b.a:fred/skins/AaronBase.png",Scale:0.97f,Settings:{Hands:1b}}

gilded granite
#

ok breh then simply do Bukkit.dispatchCommand(seeker, "mpm1"); instead of Bukkit.dispatchCommand(seeker, "/mpm1");

nimble bear
#

kk

gilded granite
#

remove the /

earnest girder
#

is there any way to prevent wheat from growing? is there a crop grow event or something?

nimble bear
#

hmmm it doesnt seem to be working

gilded granite
#

where do you call your tagPlayer?

nimble bear
#

This?

#
public void onPlayerTag(EntityDamageByEntityEvent event) {
        if (event.getDamager() instanceof Player && event.getEntity() instanceof Player) {
            Player damager = (Player) event.getDamager();
            Player damaged = (Player) event.getEntity();
gilded granite
#

yes but show the full eventHandler

nimble bear
#
public class PlayerTagListener implements Listener {

    private final HideAndSeek plugin;
    private final StartGameCommand startGameCommand;

    public PlayerTagListener(HideAndSeek plugin, StartGameCommand startGameCommand) {
        this.plugin = plugin;
        this.startGameCommand = startGameCommand;
    }

    @EventHandler
    public void onPlayerTag(EntityDamageByEntityEvent event) {
        if (event.getDamager() instanceof Player && event.getEntity() instanceof Player) {
            Player damager = (Player) event.getDamager();
            Player damaged = (Player) event.getEntity();

            if (startGameCommand.isGameRunning() && startGameCommand.isSeeker(damager) && startGameCommand.isHider(damaged)) {
                startGameCommand.tagPlayer(damaged);
            }
        }
    }
}
gilded granite
#

show me the full startGameCommand class

nimble bear
#

the entire thing?

gilded granite
#

?paste

undone axleBOT
nimble bear
#

kk

#

Done

earnest girder
nimble bear
#

Theres some things in the code that have stopped working that im going to try to figure out after, but my main problem right now is trying to get the skins to change/ the command to run after the seeker tags a hider 🤦‍♂️

gilded granite
#

private void transformPlayerSkin(Player player) {
// Example command to morph player into a custom skin using /morph command
String command = "/mpm1";

    // Dispatch the command
    Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command);
}
#

same remove the /

nimble bear
#

kk

gilded granite
#

and what is your command to start the game?

nimble bear
#

./startgame

#

no period lol

gilded granite
#

have you registered it in the main class?

nimble bear
#

the command?

gilded granite
#

yes

nimble bear
#

Yeah

gilded granite
#

what happens when you do /stratgame then?

nimble bear
#

it starts

#

everything works perfect

#

when i tag them they wont change skins

#

or the command wont work basically

gilded granite
#

any console errors?

nimble bear
#

its been saying only the ./help recently

#

so i just removed the last / so im gonna try it again now

gilded granite
#

ok

nimble bear
#

still doesnt work

#

but im getting this everytime i tag someone

#

[20:15:33 INFO]: Unknown command. Type "/help" for help.

gilded granite
#

what does it says befor that like [02:16:23 INFO]: Player issued server command idk?

nimble bear
#

Nope

#

[20:15:21 INFO]: Skiylix issued server command: /startgame
[20:15:21 INFO]: Skiylix is the seeker!
[20:15:31 INFO]: The hiding phase has ended. Seeker is now seeking!
[20:15:33 INFO]: Unknown command. Type "/help" for help.
[20:15:38 INFO]: TestingA is the seeker!

#

it starts a new round after i tag someone cause its just me and testinga lol

gilded granite
#

u sure its the right command

nimble bear
#

i can try the specific one

#

the longer one and see if it works?

#

because its going thru the plugin then using the command

#

maybe if i just try the command now

gilded granite
#

in here```private void transformPlayerSkin(Player player) {
// Example command to morph player into a custom skin using /morph command
String command = "mpm1";

    // Dispatch the command
    Bukkit.dispatchCommand(player, command);
}```
#

try that

nimble bear
#

Put it there?

gilded granite
#

replace it

nimble bear
#

@s doesnt work

#
[20:21:28 INFO]: The hiding phase has ended. Seeker is now seeking!
[20:21:29 INFO]: Entity '@s' cannot be found
[20:21:34 INFO]: Skiylix is the seeker!
gilded granite
#

send me back the long command

nimble bear
#

/morph @s blockbuster.fred_3d {Hitbox:{Eye:0.9f,Sneak:1.65f,Enabled:1b,Height:1.7f},Skin:"b.a:fred/skins/AaronBase.png",Scale:0.97f,Settings:{Hands:1b}}

remote swallow
#

Bukkit.select something replaces the @s

#

Idk what the exact method is called

worthy yarrow
#

Am I looking at a command block rn?

nimble bear
#

???

#

yes

gilded granite
#

try that
Bukkit.dispatchCommand( "morph " + player +" blockbuster.fred_3d {Hitbox:{Eye:0.9f,Sneak:1.65f,Enabled:1b,Height:1.7f},Skin:"b.a:fred/skins/AaronBase.png",Scale:0.97f,Settings:{Hands:1b}}");

nimble bear
#

kk

nimble bear
gilded granite
#

or Bukkit.dispatchCommand( "morph " + sender +" blockbuster.fred_3d {Hitbox:{Eye:0.9f,Sneak:1.65f,Enabled:1b,Height:1.7f},Skin:\"b.a:fred/skins/AaronBase.png\",Scale:0.97f,Settings:{Hands:1b}}");

#

do both

young knoll
#

You’ll want to use getName

nimble bear
#

kk

gilded granite
#

yeah so use sender instead

nimble bear
#

kk

#

Theres no variable for sender

gilded granite
#

use player then

#

player.getName()

nimble bear
#

uhhhh

#

theres an error

#

I cant change the second one

nimble bear
#

OMG

#

IT WORKED!!!

gilded granite
#

nice

nimble bear
#

THANK YOU SO MUCH

#

ill send u a video of what iw as trying to do

eternal oxide
#

congrats. I didn;t expect dispatchCommand to work, the same as it won;t work on a Bungee server

gilded granite
#

the dispatchCOmmand only runs any command as a player

eternal oxide
#

yeah but it never leaves the server, which is why it won;t trigger Bungee plugin.

gilded granite
#

bungee server no

eternal oxide
#

its not coming from teh client so Bungee never sees it

gilded granite
#

but its a forge mod

eternal oxide
#

mods seem ok

#

I've been wrong twice in two days 😛

nimble bear
#

you cant see the skin bc im on a diff acount testing it

#

buttt

gilded granite
#

nice

nimble bear
#

thank you sooooo much!

gilded granite
#

btw dont use gpt next time

nimble bear
#

LMFAOOO ik it messed up some of my stuff i did

gilded granite
#

Yeah its kinda ass

nimble bear
#

facts

subtle folio
#

what’s the best way to do custom items? is it PDC? serializing and storing in a config file? mainly just checking what item is what ya feel me?

worthy yarrow
#

pdc

torn shuttle
#

pdc

subtle folio
#

pdc it is, thanks a lot

subtle folio
#

i heard pdc was for the weak

remote swallow
#

Im as sure as you are keeping up with roblox streams

torn shuttle
#

@vagrant stratus question about resource posting rules, I'm making a free plugin that among other things autohosts resource packs on my dedicated server, I assume this doesn't run afoul of any resource rules and I should be fine even if I eventually paywall this specific feature behind a subscription if I run out of server capacity to do this? (I don't want to paywall it, but might not have a choice beyond some point)

pseudo hazel
#

why not host of github or smth like it

torn shuttle
#

I wouldn't know how to do it, nor do I particularly think that would be an allowable use case of their servers

pseudo hazel
#

wdym

#

its just putting a file that you can get to with an url

torn shuttle
#

no

#

it's putting potentially thousands of zipped resource packs the then distribute to tens of thousands of people

pseudo hazel
#

oh

#

well I didnt knowyou had thousands of zipped packs

torn shuttle
#

I don't today but I don't plan for failure

pseudo hazel
#

unless the plugin is about hosting resource packs I guess

torn shuttle
#

it is, it's a resource pack manager

pseudo hazel
#

okay

torn shuttle
#

it automerges and autohosts

pseudo hazel
#

I thought you just had a resource pack for your plugin haha

#

that kinda changes my answer lol

#

but then yeah

#

I think it should be acceptable to do what you said initially

#

I guess the best answer is gonna come support

#

?support

undone axleBOT
young knoll
#

Just host internally

#

* open port required