#help-development

1 messages · Page 260 of 1

tender shard
#

val is like var with fixed type

tardy delta
#

in java?

sage patio
#

maybe a network issue?

remote swallow
#

change it to the correct type

tender shard
#

yes it's a java 15 thing IIRC

#

val is like a final local var

tardy delta
#

tf

tender shard
#

it's useless

#

noone will ever need it

tardy delta
echo basalt
#

ah, just like optionals

tender shard
#

looks like you're on java 8

sage patio
#

16

tardy delta
#

17

tender shard
echo basalt
#

nullability wraPPER

tender shard
#

yeah

remote swallow
tardy delta
echo basalt
#

or you can just... pass null values

tender shard
#

try to use "var" instead of "val", does that work?

echo basalt
#

optionals are just overhead and don't even look nice

tardy delta
#

looks like lombokhttps://projectlombok.org/features/val

echo basalt
#

it's just java tryna be even more verbose just because

tardy delta
#

var is a thing yes

tender shard
sage patio
#

@tender shard no difference xd

tender shard
#

how would you differentiate between having "null" because it's null, or "null" because it's the actual returned type

tardy delta
#

not

echo basalt
#

by throwing exceptions

tender shard
#

Optionals do make sense... SOME times

echo basalt
#

sounds like a data structure problem

tender shard
#

true

tender shard
tardy delta
#

i just create my own optional classes whenever i need them

tender shard
#

does this help?

sage patio
#

wtf xd

tender shard
#

it's a thing

#

lol

sage patio
#

mfnalex

tender shard
sage patio
#

can you import this project too?

tender shard
#

is it on github?

sage patio
#

i wanna know its a network issue or not

#

yea

tender shard
#

if yes, send link

#

ok

#

1 sec

sage patio
#

that will takes longer that 1 sec anyway, its ok

tender shard
#

yeah it's quite big as it seems

#

this is everything the minecraft plugin does:

#

cause errors

#

oh and to display chat colors in the editor

#

but wtf, it still didnt clone the repository yet. how fucking big is it

sage patio
#

it has been cloned in a few moments for me

#

wtf xd

tender shard
#

weird, maybe my intellij is weird, Imma clone it from cli then

#

yeah in git bash it only took 0.5 seconds

#

weird

sage patio
#

try Repair IDE xd

orchid gazelle
#

bro wtf am I completely dumb now?

#

the particles are flying all over the place wtf

tender shard
orchid gazelle
#

well yeah

#

but now more than normal

tender shard
#

hm no idea

echo basalt
orchid gazelle
#

lol what

echo basalt
#

speed, additional data

orchid gazelle
#

they just spray out like a bomb

echo basalt
#

relx, rely, relz

#

it's stupid

#

but you just add a ton of 0,0,0,0,0 params

#

to your spawnParticle method

#

and it will work

#

don't ask me why just accept it

orchid gazelle
#

nice code mojang

echo basalt
#

alex I'll send you a paypal invoice if you doubt me once again

tender shard
echo basalt
#

fuck 5% laptop battery

tender shard
#

ugh

#

fuck gradle

sage patio
#

maybe some of dependencies are no longer exist?

tender shard
#

I'll try with just bash

orchid gazelle
#

nice now no particles are getting spawned

sage patio
orchid gazelle
#

ah there we go ty

#

it needs 4x 0 lol

tender shard
#

that's no problem

#

gradle always complains about itself

#

that's normal

sage patio
#

lol

tender shard
#

the build.gradle is messed up

#

it needs the Taboverlaycommon-config" dep

#

is that one on github too?

sage patio
#

lemme check

tender shard
#

no

kind hatch
# tender shard

Don't you just love it when you download a gradle project and half of the fucking dependencies can't be resolved for whatever fucking reason. I KNOW I DO!

tender shard
#

I won't answer your question

#

because you didnt actually ask any

sage patio
#

this?

tender shard
#

yes

tender shard
remote swallow
#

it probably needs it on maven local

#

gradlew publishToMavenLocal

tender shard
#

haha gradle

#

people claim "gradle is shorter to write"

#

meanwhile

#

mvn install

#

gradlew publishToMavenLocal

#

sorry but I can't help it, gradle is just a huge joke

#

it cannot do anything, cannot even shade dependencies

rotund ravine
#

Hm?

tender shard
#

then people claim "yeah just use the shadow plugin that was made by some random github dude"

#

then I ask "okay and how can I relocate and filter stuff in shadow" and nobody knows

rotund ravine
#

You can do it without, but the shadow plugin is good too.

#

It’s easy

tender shard
rotund ravine
#

Nah it do be fine

tender shard
#

or maybe you can help me

#

one sec pls

rotund ravine
#

Sup?

tender shard
#

maybe you can help me with that

#

because I have no clue

sage patio
#

i prefer maven even in big projects

tender shard
#

I would like to filter classes, do minimizeJar, AND relocate

#

but it seems like the shadow plugin gets confused when trying to do all 3 things

rotund ravine
#

I use something called autorelocate in it

tender shard
#

can you share an example pls

rotund ravine
#

And it’s a kotlin buildscript haha

tender shard
#

oh yeah would work but it wouldn't filter anything

#

I need to add the filters, otherwise minimize() reks it up

#

for the NMS classes

orchid gazelle
#

who the heck is kidding me now?

river oracle
#

Kotlin 💀

rotund ravine
#

@tender shard Yeah, don’t know off the top of my head and I’m too lazy to look into it at the moment.

sage patio
#

my internet in 10 min for downloading a jdk

orchid gazelle
#

lol

tender shard
river oracle
#

Stop supporting the grade people Alex lol just use maven

orchid gazelle
#

nah man someone must be hardcore-kidding me

sage patio
tender shard
#

"Oh yeah, it doesn't work? Well I have no clue on how to fix it. Just live with it. We are not maven, you are expected to have things not working properly. Maybe there's some third party plugin you can use after gradle downloaded itself for the 182th time. good night" lol

orchid gazelle
#
                l.add(vector);
            projectionLocations.add(l);
            length += 5;
            Bukkit.getLogger().info(l.getX() + ";" + l.getY() + ";" + l.getZ());
``` gives me other output than when I return the object out of projectionLocations WTF
rotund ravine
#

I didn’t say to live with it

tender shard
#

I know, I just wanted to complain about gradle

rotund ravine
#

Just that I am too lazy to look into it haha.

#

?paste

undone axleBOT
tender shard
#

I know it's not your fault lol

orchid gazelle
#
    public void shoot() {
        for(Player player : Bukkit.getOnlinePlayers()) {
            for(Location loc : getProjectionPoints(player.getLocation(), new Location(player.getWorld(), 0, -48, 0))) {
                Bukkit.getLogger().info(loc.getX() + ";" + loc.getY() + ";" + loc.getZ());
            player.spawnParticle(Particle.FLAME, loc, 1, 0, 0, 0, 0);
            }
        }
            
    } 
    
    public List<Location> getProjectionPoints(Location bulletStart, Location targetLocation) {
        
        List<Location> projectionLocations = new ArrayList<Location>();
        double distance = bulletStart.distance(targetLocation);
        Location l = bulletStart;
        Vector vector = targetLocation.toVector().clone().subtract(bulletStart.toVector()).normalize().multiply(5);
        double length = 0;
        while(length < distance) {
            l.add(vector);
            projectionLocations.add(l);
            length += 5;
            Bukkit.getLogger().info(l.getX() + ";" + l.getY() + ";" + l.getZ());
        }
        
        return projectionLocations;
    }

different logs lol

rotund ravine
river oracle
#

My wtf

tender shard
tender shard
#

indeed it is

#

anyway, thanks

#

I will probably just keep telling people to use maven lol

orchid gazelle
rotund ravine
#

I don’t use it due to not liking the amount of xml in it

tender shard
#

yeah pom files can become quite large, but at least it works

river oracle
#

I love xml

rotund ravine
river oracle
#

Just like I love java it's verbose but clear

tender shard
#

ssh web

#

wrong window

river oracle
#

Lol

#

I have an command line ssh client I made for myself

tardy delta
#

me thinking \u0000 was an empty char

#

' '

tender shard
#

I like xml-style 🙂

river oracle
#

Ayo apacheee

tender shard
#

apache > nginx

river oracle
#

I use apache too

tender shard
#

nginx is only faster because it cannot do anything

rotund ravine
orchid gazelle
#

Nginx is harder to configure lol

#

But I use nginx

tender shard
#

I think so too

#

nginx config's are a pain to read

orchid gazelle
#

(And to write)

tender shard
#

yeah lol

#

apache is more verbose but also easier to understand

orchid gazelle
#

but not as annoying as this garbage nonsense happing to my code rn

#

WHY WOULD THIS EVER RETURN DIFFERENT THINGS?

#

wait

#

I mean this

tender shard
#

it doesnt return anything

orchid gazelle
#

it logs

#

the return is under it

tender shard
#

you change the locations in the for loop

orchid gazelle
#
    public List<Location> getProjectionPoints(Location bulletStart, Location targetLocation) {
        
        List<Location> projectionLocations = new ArrayList<Location>();
        double distance = bulletStart.distance(targetLocation);
        Location l = bulletStart;
        Vector vector = targetLocation.toVector().clone().subtract(bulletStart.toVector()).normalize().multiply(5);
        double length = 0;
        while(length < distance) {
            l.add(vector);
            projectionLocations.add(l);
            length += 5;
            Bukkit.getLogger().info(l.getX() + ";" + l.getY() + ";" + l.getZ());
        }
        for(Location loc : projectionLocations) Bukkit.getLogger().info(l.getX() + ";" + l.getY() + ";" + l.getZ());
        return projectionLocations;
    }
tender shard
#

wait

#

are you using eclipse?

#

it looks like it

orchid gazelle
#

sure

tender shard
#

ah ok

#

intellij would have complained about the list declaration

orchid gazelle
#

lol

river oracle
#

So would have vscode :P what is eclipse doing

tender shard
#

eclipse is a bad joke

kind hatch
#

Probably the language level. I know eclipse is capable of it.

tender shard
#

if you wanna know why eclipse sucks:

#

Enter this:

orchid gazelle
#

bro

tender shard
#
Player somePlayer = null;
smoePlayer.setDisplayName("someString");
orchid gazelle
#

me using eclipse does not change the fact that my code does not work lol

tender shard
#

then apply the quick fix

#

then you know why eclipse sucks

river oracle
#

What's not working

tender shard
#

the whole eclipse thing

orchid gazelle
#

its returning wrong locations

tender shard
#

then you put the wrong locations into the list

#

as much as I hate eclipse, it's not their fault when you return the wrong stuff

orchid gazelle
#

the logging in the first Logger is using the correct ones

#

the one after the loop isn't

tender shard
#

then that's because you change the locations in your loop

brave sparrow
#

You need to do l.clone().add

tender shard
#

yeah, add() and stuff changes the actual location

brave sparrow
#

Java doesn’t do a deep copy when you add to a list

#

So you’re adding the same modified location to the list a bunch of times

tender shard
#

addIf?!

#

removeIf exists

brave sparrow
#

^

orchid gazelle
#

well but when I just use .clone(), it would still use the normal l for the list

brave sparrow
orchid gazelle
#

ahhh I understand

brave sparrow
#

That way you aren’t modifying what you added to the list later

orchid gazelle
#

sheesh now it actually works

#

ty

tender shard
#

Well, I guess it would be nice if I could touch your body

#

CAUSE I GOTTA HAVE FAITH

brave sparrow
#

Say what now

tender shard
#

crack cocaine

brave sparrow
#

What extra if statement?

#

Ok but that’s not what removeIf does

#

Lol

#

removeIf iterates through all the elements in the collection and removes any matching the provided predicate

glossy venture
#

then removeMatching

#

true

lapis bramble
#

hey

#

do u now how to add particles for arrows in 1.8.8 ? i've search but i havent found

undone axleBOT
lapis bramble
#

minecraft 1.8

#

are u saying that minecraft 1.8 is outdated ? (sory i'm not english i dont understand all very well)

#

ho

#

but it's the best for PVP players

#

and a lot of plugins are in this version

opaque scarab
# lapis bramble hey

This is just a guess, but you’ll need to create an event that gets the projectile, then start a runnable that gets the location of the projectile and spawns a particle at that location.

lapis bramble
#

ho

#

yes

#

i've trail but i've set a while and not a runnable

#

i need to see because i dont understand runnables very well (i'm starting dev)

#

but i see wath is it

#

why ?

opaque scarab
#

@lapis bramble Definitely don’t do a while loop, I learned that the hard way when I first started out. A while loop won’t let the server process anything else until it finishes, meaning the server will freeze.

lapis bramble
undone axleBOT
lapis bramble
#

scheduling is the same that runnable ?

opaque scarab
#

@lapis bramble What you want is something that runs every tick but let’s the server go off and process other things.

lapis bramble
#

ho ok

opaque scarab
#

@lapis bramble Yeah like Morice said, I have and most of us haven’t or have not in a while, used 1.8, so we can’t give you the exact code

lapis bramble
#

it's not a problem, i used playevent and not setparticle but its same

opaque scarab
#

Yeah

lapis bramble
#

but it will freeze the code no ?

#

will

#

ok, so i need to create a sheduler where i set a while loop ?

#

ho

#

ho ok

opaque scarab
lapis bramble
#

ok, thanks

opaque scarab
#

?

lapis bramble
#

they are a litle bit idiots ?

#

so i can't make confidence on the wiki

opaque scarab
#

@last temple Probably should have looked at that documentation a little more

lapis bramble
#

thanks

opaque scarab
#

LOL

undone axleBOT
lapis bramble
#

and this code is where i want ?

opaque scarab
#

@lapis bramble You’d have that there instead

#

Instead of the while loop,

lapis bramble
#

no it's projectil launch event

#

but i know

opaque scarab
#

@quaint mantle No LOL

lapis bramble
#

and just wath mean 1L, 1L at the end of the task ?

kind hatch
#

No, this guy came out of left field.

lapis bramble
#

and L is for ticks ?

hazy parrot
#

L Is long

opaque scarab
#

@quaint mantle @kind hatch Imo, really need to change my profile pic

kind hatch
#

I need to christmasify mine. :3

lapis bramble
#

in second ? in ticks ?

#

thanks

#

yeah

#

yes

opaque scarab
#

@lapis bramble You’ll want an event that detects when the projectile hits a target. You can do an entity damage event and check if it is the projectile, then stop the runnable

#

Right

#

Forgot the name

lapis bramble
#

i think

#

it exist

#

wath means plugin instance ? what i need to set ?

tardy delta
#

do you know java?

lapis bramble
#

I'm starting

lapis bramble
opaque scarab
lapis bramble
#

for this instance

remote swallow
#

?basics

undone axleBOT
charred blaze
#

hello?

tardy delta
#

make it atomic or a one elem array or smth

#

and use runTaskTimer with a lambda instead

#

return ++angle ig

#

dunno what youre doing tho

naive bolt
#

whats the event for right clicking an item in your hot bar while playing

#

as if u were to place the item

tardy delta
sage patio
#

any idea how some of plugins spawn glasses / blocks that only 1 player can see?

tardy delta
#

packets

river oracle
#

Packets

naive bolt
#

Packets

sage patio
#

i guessed

#

but i hate nms

remote swallow
#

?nms

river oracle
#

S tier tutorial my God

lapis bramble
#

i have a problem : i've see the sheduler have to be a int variable to cancel it. but when i do this , it tell me that it have to be a BukkitTask

#

Type mismatch: cannot convert from BukkitTask to int

#

and i can t cancel it if it's a bukkittask

tardy delta
#

scheduler.runTaskX(plugin task -> /* whatever */ task.cancel()) is a thing

#

or use the runX methods that return a bukkittask

tall dragon
tardy delta
opal wedge
#

Hi, I am currently developing a minigame that has 2 different modes, one if you have downloaded the resource pack and one if not. I store this information in a HashMap, which is lost after a reload. Is it possible for me to "carry" this data over a reload without creating a file or is that not possible?

tardy delta
#

so youre just saving what players have the resource pack thing?

opal wedge
#

yep

remote swallow
#

Pdc maybe

tardy delta
#

why not using a Set<UUID>?

#

or ye pdc, but i kinda hate that entries persist even tho the plugin is gone

opal wedge
#

Okay, then I guess I'll go with pdc.
Set will not work, because I will have more than 2 states later.

muted crest
#
public void saveFile(Gson gson, String name, String path, JsonElement element) {
        File f = createFile(name, path);
        f.getParentFile().mkdirs();
        System.out.println(f.getAbsolutePath());
        try (Writer writer = new FileWriter(f.getAbsolutePath())) {
            gson.toJson(element, writer);
            writer.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }```

Ok so now my code its working but everytime is save data into the file the old data is override
brave sparrow
#

Player#sendBlockChange

sage patio
brave sparrow
sage patio
#

thanks

naive bolt
#

how do i add chat click with text components do i need the bungee libary

brave sparrow
#

They’ll run into some issues if they try to walk/jump on it and the bounding box of the actual block is different though so be aware of that @sage patio

naive bolt
#

the false means dont override

#

i think

muted crest
#

OK thnx

sage patio
naive bolt
brave sparrow
remote swallow
#

iirc the TextComponent stuff is in normal api

naive bolt
#

hmm

brave sparrow
#

That’s the documentation for it

pure arch
#

Is there an event that resembles the GameStartedServerEvent from sponge?
The event guarantees, that:

The internal server is started
It will only be called once
The event will ALWAYS be called
The event will be called directly after the Server has started

So far I've been using a Sync Thread, created in onEnable at the first time it is called (subsequent calls will do nothing). The idea here is, that the Sync Thread will be executed at the start of the first server tick. However if the first tick never finishes (e.g. because the server just hangs indefinitely, but the Server Watchdog doesn't kill the server) and tasks are executed at the end of the tick, then my entire plugin breaks (the idea is to get it to be as reliable as possible). As far as I see nothing in the api guarantees that the thread is executed at the start of a tick.

Also another thing to note is that I'm currently using maven and org.spigotmc:spigot-api:1.12-R0.1-SNAPSHOT, because I currently lack a better way to use bukkit. (no non-snapshot seems to be available from spigot's repository).

The WorldInitEvent seems promising, but is still not ideal because I don't know how close or far from the actual internal server start that event is called. (especially when considering other things that implement spigot's api, such as Magma). WorldLoadEvent is also promising, but might be invoked more than once (which I could filter out). Is there any better event that I can use?

naive bolt
#

I cannot send a player a text component

river oracle
#

player#spigot#sendMessage iirc

naive bolt
#

doesnt exist

river oracle
#

Or more plainly player.spigot() should exist

naive bolt
#

nothing .spigot exists

golden turret
#

use spigot api

naive bolt
#

i am

golden turret
#

maven?

naive bolt
#

gradle

sullen marlin
#

?jd-s

undone axleBOT
golden turret
#

send build.gradle

naive bolt
#

this is a spigot plugin

golden turret
#

send build.gradle

naive bolt
sullen marlin
#

'Bukkit'

golden turret
#

use spigot api

sullen marlin
#

org.spigotmc:spigot-api

golden turret
#

you are using bukkit

remote swallow
#

^^

golden turret
#

^

tardy delta
#

fuck why am i here

pure arch
naive bolt
muted crest
sullen marlin
#

1.12 is what, 5 years old?

remote swallow
#

?1.12

#

sad

#

5 years 2 mnths

pure arch
#

feels like it. I just want to support a wide variety of severs tho. when was org.bukkit.event.server.ServerLoadEvent introduced?

golden turret
spice shoal
#

guys , how i can decompile a plugin?

sullen marlin
#

Why can't you use the scheduler

pure arch
#

What I want to do is simpler. I want to create a plugin that detects when a server freezes.

pure arch
sullen marlin
#

If the first tick never executes the server is broken and no one cares about your plugin

remote swallow
pure arch
sullen marlin
#

Well the option has been given to you. If you want to ignore that and stick 5 years in the past that's up to you

pure arch
#

when was org.bukkit.event.server.ServerLoadEvent introduced?

#

so I can just update to that version.

sullen marlin
#

?stash

undone axleBOT
pure arch
#

ah cool! thanks

sullen marlin
#

August 2018

pure arch
#

I would have been grabbing the source jar from the maven repo LUL

brave sparrow
#

Alternatively you can add your own

spice shoal
#

thanks

brave sparrow
#

Which is what we did

#

If you’re set on a specific version

pure arch
#

I want my plugin to work on a wide variety of servers, and explicitly don't want to specify my plugin

near citrus
#

Hello guys i have a problem with building my project, well im using remapped mojang and when i run the project it works well but when i want to build the project to my server's plugin folder, it compiles the wrong one. im not really good at working with maven can anyone help please?

remote swallow
#

make sure you are using the correct jar

near citrus
#

where?

remote swallow
#

if you use special source it exports mutliple jars

near citrus
#

i know that

remote swallow
#

@tender shard which is the right one to use

near citrus
#

but where can i select the jar?

remote swallow
#

they would be in target

near citrus
#

i know which one is the right one

#

i just don't know where to select it

remote swallow
#

how are you building to the plugins folder then

near citrus
#

File > Project Structure > Artifacts

remote swallow
#

does that not give an option to select file]

near citrus
#

no i don't see any

chrome beacon
#

Don't use artifacts to compile your plugin

#

Use maven

#

Run the package task

near citrus
remote swallow
#

press control twice then type mvn clean package

#

for future builds press the green button top right

near citrus
remote swallow
#

do you have a pom

near citrus
#

yeah

remote swallow
#

?paste it

undone axleBOT
near citrus
#

as i said it builds the right one in the target folder

remote swallow
#

the problem is

near citrus
remote swallow
#

well first problem you have is your trying to output into a jar file

near citrus
#

well how to set the output direction to my plugins folder?

remote swallow
#

unless you wait for someone that uses maven to come along the best i can say is do it manually

near citrus
#

nvm fixed it

sage patio
#

how i can get item in player's hand when he scrolls or presses 1 to 9?

river oracle
#

PlayerItemHeldEvent

quaint mantle
#

Hey, I am trying to set ItemMeta of an item inside of runTaskAsynchronously. I noticed that when I do that, it works half of the time so tried to look for another way and found callSyncMethod however it didn't change anything. Any ideas?

remote swallow
#

?paste code

undone axleBOT
quaint mantle
#

Sorry for the reformatting, will work on it later

#

These are my debug messages:

#

As you see, it works sometimes like (It shows the display name of the Item: old name : new name) Deep Dark -> Sunflower Plains

#

But sometimes it doesn't change the ItemMeta and I have to call it again

gleaming grove
#

Is this an proper way to unregister event listener?

quaint mantle
tender shard
#

do you wanna unregister your own listeners, or listeners from another plugin?

river oracle
#

Ayo wtf is going on here

#

Oh the injection thing from guice

#

Forgot about that

#

Lowkey

gleaming grove
#

my own events for current project I would like to have multiple event listeners instead of one

#

so I need dynamic registration and unregistration

tender shard
#

you can unregister event listeners using the handlerlist iirc

gleaming grove
#

ok just askig because never had done this before

sterile token
#

Sorry for asking about obf i know that of you are against it, but is true that Kotlin obfuscated code is more difficult to deobfuscate?

opaque scarab
#

Although this a bit late, but excuse me, what’s wrong with Kody?

rotund ravine
wind tulip
#
WorldBorder border = Bukkit.getServer().createWorldBorder();
border.setCenter(centerLoc);
border.setSize(radius);
border.setWarningDistance(warningDistance);
                    
player.setWorldBorder(border);

Does anyone know why I can't see the border?

subtle folio
#

How do I check if an InventoryClickEvent occured inside the player's inventory?

rotund ravine
#

instanceof PlayerInventory?

kind hatch
#

Or just check if it's the bottom inventory.

subtle folio
#

Wouldn't that also return true if you used a chest inventory?

rotund ravine
rotund ravine
subtle folio
#

with their armor and crafting menu

rotund ravine
#

Check if the top inventory is null might be a way @subtle folio

subtle folio
#

Alright, Where is TopInventory?

rotund ravine
#

@subtle folio nvm you can do

#

getView().getType()

subtle folio
#

I see

#

Just check if its a bottom inventory

#

simple

rotund ravine
#

What?

quaint mantle
subtle folio
rotund ravine
#

Yeah that might work @subtle folio

e.getInventory().getView().getType() == InventoryType.Player

Makes more sense tho

subtle folio
#

ill tryt it

rotund ravine
#

Most event are made to run before changes are made.

opaque scarab
#

@last temple Yeah I agree he does certain things without explanations. I’m still somewhat starting out (I’ve done plugin development off and on for a few months) and was watching his videos, but what would you recommend instead?

rotund ravine
#

Whose videos?

opaque scarab
#

@rotund ravine Kody Simpson’s

rotund ravine
#

No clue who he is

remote swallow
#

good

#

if you want to learn to code go look at github repos

rotund ravine
#

Nah haha

#

Pick up a few books and supplement it with videos and small projects.

remote swallow
#

i saw some of his

rotund ravine
#

What does it even return @subtle folio ?

subtle folio
rotund ravine
#

I mean

#

In your event dummy

subtle folio
#

false?

rotund ravine
#

I mean what type does it return

subtle folio
opaque scarab
#

@last temple Yeah I’ve seen some of his. They seem decent.

subtle folio
#

.equals is for enums !

rotund ravine
#

No

remote swallow
#

.equals for strings

rotund ravine
#

For non-constants

remote swallow
#

strings more

subtle folio
#

i knew that

rotund ravine
remote swallow
#

strings are used most in my use cases

rotund ravine
#

@subtle folio so what did it return?

remote swallow
#

so i just say strings

rotund ravine
subtle folio
remote swallow
subtle folio
covert yacht
#

Is there an issue tracker for spigot builds/ buildtools ?

subtle folio
#

lol

rotund ravine
remote swallow
#

arent issues handled on jira

covert yacht
#

the whole point is i'm asking bc idk

rotund ravine
#

Idk just do something like player.getOpenInventory instanceof PlayerInventory then @subtle folio

terse panther
#

is there a good command creation API?

rotund ravine
terse panther
rotund ravine
#

Might return crafting tho @subtle folio

rotund ravine
subtle folio
#

it returns WORKBENCH

rotund ravine
#

Fun

subtle folio
#

so crafting is fine then lol

#

works for my purposes

rotund ravine
#

The grtOpenInventory?

#

Ah ok

subtle folio
#

checking if its crafting

rotund ravine
#

Oh ok

#

Might be able to check the amount of slots too

#

To specify it even further

subtle folio
#

might might but nothing else that I can think of returns CRAFTING

rotund ravine
#

Oh true might not idk

wind tulip
#

I put it in a PlayerInteractEvent and it works, is this because maybe the chunks haven't loaded yet for the client?

#

and if so how can I check if they are loaded

remote swallow
#

delay it a tick or somethign

wind tulip
#

mmm

#

I mean I could but it's probably not favorable in my situation

remote swallow
#

why

wind tulip
#

basically it's kind of a general thing where I don't know what event this code is gonna run on

#

so I'd rather not delay it by a tick in all scenarios

#

however I just got an idea

#

nvm

wind tulip
#

I figured it out lol

long zephyr
#

Hello ^^.
does someone knows why im not getting the item inside of ItemFrame ? (1.19.2)

 CraftItemFrame craftItemFrame = new CraftItemFrame(((CraftServer) player.getServer()),new net.minecraft.world.entity.decoration.ItemFrame(EntityType.ITEM_FRAME,level));
            craftItemFrame.setItem(CraftItemStack.asCraftCopy(itemStack));
            craftItemFrame.teleport(player.getLocation().add(0,1,0));
            craftItemFrame.setVisible(true);
            craftItemFrame.setInvulnerable(true);
            craftItemFrame.setFixed(true);
            craftItemFrame.setGravity(false);
            craftItemFrame.setPersistent(true);
            craftItemFrame.setFacingDirection(BlockFace.NORTH);


            ClientboundAddEntityPacket clientboundAddEntityPacket = new ClientboundAddEntityPacket(craftItemFrame.getHandle());
            ClientboundSetEntityDataPacket clientboundSetEntityDataPacket =
                    new ClientboundSetEntityDataPacket(craftItemFrame.getEntityId(),craftItemFrame.getHandle().getEntityData(), true);

            ((CraftPlayer)player).getHandle().connection.send(clientboundAddEntityPacket);
            ((CraftPlayer)player).getHandle().connection.send(clientboundSetEntityDataPacket);

            player.addPassenger(craftItemFrame);
``` :(
humble tulip
#

is it handle > c > c?

rotund ravine
#

@humble tulip no

humble tulip
#

where then?

#

@rotund ravine

rotund ravine
#

d

humble tulip
#

And i know for a fact the chunk isn't enpty

rotund ravine
#

Oh my bad it’s a lightpacket too

remote swallow
#

?switchmappings

rotund ravine
#

c for chunkdata yes and then d

#

c in the chunk data is the buffer. d is the data

humble tulip
fluid river
#

?paste

undone axleBOT
subtle folio
#

How do I set the player's cursor item to air ?

sullen marlin
#

I’m sure you can figure that out by typing mainhand into the javadocs

vapid grove
#

What would be the best way to check if player has an inventory open? (Weather be a gui, or their own inventory, a chest, ect)

#

I need to check and see if NOTHING is opened whatsoever

sullen marlin
#

getOpenInventory

vapid grove
# sullen marlin getOpenInventory

I checked that, however in the "InventoryType" enum I didnt see anything that matched something along the lines of "Nothing", the closest I saw is PLAYER, which Im pretty sure also says that if the 2x2 crafting menu is open

sullen marlin
#

Client doesn’t tell the server if player has their own inventory open

late sonnet
fresh timber
#

in a bukkit runnable, how can I check if a player is currently mining a certain block?

last sleet
#

Particles I create seem to "explode" out of their spawnpoint

#

Instead of just staying still. Is there a way to control particle velocity?

worldly ingot
#

You'll want to reduce the speed

#

That's usually just the T data parameter

last sleet
#

Speed is an option on one of the overloaded methods?

#

Oh

worldly ingot
#

Yeah you can set it to like 0.05 or something and most particles will stay pretty slow and in place

humble tulip
#

does anyone know how to modify a chunk before it's sent by intercepting packets?

last sleet
#

it's telling me data should be void

worldly ingot
#

Oh, my bad. It's the extra arg. That's only present when you pass an x/y/z offset though

#

spawnParticle(Particle.SMOKE, location, 5, 0.25, 0.25, 0.25, 0.05);

#

Offset is a bit of a misnomer though. It's more of a spread

last sleet
#

so a random chance?

worldly ingot
#

Not quite. Just how far out from the location the particle can spawn

#

e.g. it will spawn anywhere from location.getX() - 0.25 to location.getX() + 0.25

#

Or something to that effect. It's not that exactly

#

The 0.05 is really what you care about here. That "extra" is speed, and again 0.05 is fine

last sleet
#

Tested it and it works fine, thanks

sage patio
#

why east is not working?

#

its always north, south and west

#

it seems the calculation is wrong

humble tulip
#

(yaw % 360 + 360) % 360 is always more than 0

#

yaw % 360 can be a value from -359 to 359

#

when you + 360

#

it makes (yaw%360+360) have a range from 1 to 719

#

so it'll always be positive

sage patio
#

thanks

#

btw i just copied this code from a website

humble tulip
#

why not just yaw%360?

sage patio
#

lemme try

humble tulip
sage patio
#

again east is not working

#

its not printing any negative number

humble tulip
#

um

#

dont do any math on yaw

#

just let yaw be location.getYaw

sage patio
#

same

humble tulip
#

that's mad

#

ohh

#

i see

#

do yaw = yaw-180

sage patio
#

yea nice

#

yaw never gonna be negative xd

#

but it works

#

#1 rule of programming

humble tulip
#

send ur current code

#

with the debug statements

#

just wanna see something

sage patio
#
public enum Yaw {
        NORTH, SOUTH, EAST, WEST;
        public static Yaw getYaw(Player player) {
            float yaw = player.getLocation().getYaw();
            yaw = yaw - 180;
            if (yaw > 135 || yaw < -135) {
                return Yaw.NORTH;
            } else if (yaw < -45) {
                return Yaw.EAST;
            } else if (yaw > 45) {
                return Yaw.WEST;
            } else {
                return Yaw.SOUTH;
            }
        }
    }
@EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {

        Player player = event.getPlayer();

        BukkitScheduler scheduler = Bukkit.getScheduler();
        scheduler.runTaskTimer(Main.getInstance(), () -> {

            Location location = player.getLocation();
            double x = location.getX(), y = location.getY(), z = location.getZ();

            switch (Utils.Yaw.getYaw(player)) {
                case NORTH:
                    player.sendMessage("You are looking at north");
                    player.sendMessage(player.getLocation().getYaw() + "");
                    break;
                case EAST:
                    player.sendMessage("You are looking at east");
                    player.sendMessage(player.getLocation().getYaw() + "");
                    break;
                case SOUTH:
                    player.sendMessage("You are looking at south");
                    player.sendMessage(player.getLocation().getYaw() + "");
                    break;
                case WEST:
                    player.sendMessage("You are looking at west");
                    player.sendMessage(player.getLocation().getYaw() + "");
                    break;
            }


        }, 5, 10);

    }
humble tulip
#

yep so yaw is 0 to 360 in spigot but -180 to 180 in client

sage patio
#

ow

#

thanks for help

#

i'm trying to spawn something like this

#

like Rust game build system

wet breach
#

It is negative of you turned to the left and positive if you turned to the right

humble tulip
sage patio
#

Player#sendBlockChange

wet breach
#

However you can always use a positive number with yaw unless you trying to simulate motion

sage patio
#

yea

#

but big problems in here are
trying to find a correct location to send block change to player
then remove it (setting back to air)

sage patio
#

but again something is not right

humble tulip
#

swap east and west

#

the enums

wet breach
#

Anything greater then 45 but less then 135 is considered east unless you want to start factoring in things like north east and south east

#

Which i am pretty sure there is cardinal directions for those as well

sage patio
vapid grove
#
right.getOpenInventory().getType()
#

Why when I right click a player this always return as "Crafting"

#

Weather their 2x2 crafitng menu is open or not

wet breach
#

Because hotbar exists which is still an open inventory

vapid grove
wet breach
#

Check the inventory type for hotbar or player inventory i suppose. Dont know related api methods for it

#

?jd-s

undone axleBOT
quaint mantle
#

Can someone review this spigot plugin i need some feedback?

humble tulip
#

var llllIIlIIlIIlIIllIIlIIllI: String? = null
var llIIlIlIIIllIlIlIlIIlIIll: Long = 0
var llIIIlllIIlllIllllIlIllIl = false
var lllllIllIllIllllIlIllllII = false

#

Wtf@quaint mantle

quaint mantle
#

obuscated lunar auth code

#

from a deobuscation

wet breach
#

Ah yes lets review a plugin but lets not state its obfuscated lol

humble tulip
#

That's 1 class

quaint mantle
#

Yeah

wet breach
#

Still, if there is a obfuscation in an open source plugin or being able to freely view source. Automatically i assume something shady

quaint mantle
#

just a package that I was attempting to spoof some stuff with a web socket

vapid grove
quaint mantle
#

ah

vapid grove
#

If its an opensource code that has obfuscated coding in it, most likely has a sketchy thing in it

wet breach
#

Otherwise why hide that portion of code?

quaint mantle
#

its not my code

wet breach
#

I never once said it was yours

quaint mantle
#

Ignore that package

vapid grove
#

"unless something bad was in it"

wet breach
#

^

vapid grove
#

not "why are YOU hiding stuff"

quaint mantle
#

Ah

wet breach
vapid grove
#

i have a 60 in engrish 👍

sage patio
#

i forgot something lol

#

repeating something for ever

wet breach
# sage patio

Server is like, no response for 13 seconds terminate everything now

wet breach
#

Its part of the heart beat stuff

#

If after a period of time the server doesnt set some value every so often. The server considers itself stuck or whatever and then just terminates the process

sage patio
#

wait a second

#

i'm doing this task every 10 tick

#

why server crashes ?

drowsy helm
#

what task

sage patio
#

sending some block changes to a player

drowsy helm
#

show your code

sage patio
#

yea sorry i was busy 1sec

#
    public static void showFloor(Player player) {
        BukkitScheduler scheduler = Bukkit.getScheduler();
        ArrayList<Location> blockLocations = new ArrayList<>();
        scheduler.runTaskLater(Main.getInstance(), () -> {
            Location location = player.getLocation();
            double x = location.getX(), y = location.getY(), z = location.getZ();
            switch (Utils.Yaw.getYaw(player)) {
                case NORTH:
                    break;
                case EAST:
                    x = x + 7;
                    y = y + 1;
                    z = z - 2;
                    for (int i = 5; i >= 5; i++) {
                        for (int j = 5; j >= 5; j++) {
                            Location loc = new Location(player.getWorld(), x, y, z);
                            if (location.getBlock().getType() == Material.AIR) {
                                loc.getBlock().setType(Material.STAINED_GLASS);
                                player.sendBlockChange(loc, Material.STAINED_GLASS, (byte) 5);
                                blockLocations.add(loc);
                            }
                        }
                    }
                    break;
                case SOUTH:
                    break;
                case WEST:
                    break;
            }
        }, 0);
        scheduler.runTaskLater(Main.getInstance(), () -> {
            for (Location loc : blockLocations) {
                player.sendBlockChange(loc, Material.AIR, (byte) 0);
            }
            blockLocations.clear();
        }, 10);
    }
#

in here:

@EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        BukkitScheduler scheduler = Bukkit.getScheduler();
        scheduler.runTaskTimer(Main.getInstance(), () -> {
            StructurePlacement.showFloor(event.getPlayer());
        }, 10, 10);
    }
#

it has some problems for now i know but crashing server?

drowsy helm
#

i dont see anything tat woudl crash it

sage patio
#

y

#

thats weird

drowsy helm
#

but your code would error out once a palyer leaves

#

what does the entire error say

sage patio
#

?paste

undone axleBOT
sage patio
#

any idea?

wet breach
#

Mmm paper

eternal oxide
#

placing too many blocks at once lagging the server

wet breach
#

Does it happen with spigot?

sage patio
#

i don't know

sage patio
wet breach
#

Probably should try considering this is spigot discord not paper lol

sage patio
#

and i know some plugins does this again with no problems

drowsy helm
#
[06:40:06 ERROR]:       Stack:
[06:40:06 ERROR]:               net.minecraft.server.v1_12_R1.PacketPlayOutBlockChange.<init>(SourceFile:23)```
#

1.12

#

pog

wet breach
#

Have to remember your task is also a sync repeating task

sage patio
wet breach
#

So anything that halts the main thread long enough even if it is a task will cause it to panic

#

But who knows could be a paper issue too

sage patio
#

i'm going to try with spigot too

eternal oxide
# sage patio ```java public static void showFloor(Player player) { BukkitSchedule...

This loop, you never use i and j for (int i = 5; i >= 5; i++) { for (int j = 5; j >= 5; j++) { Location loc = new Location(player.getWorld(), x, y, z); if (location.getBlock().getType() == Material.AIR) { loc.getBlock().setType(Material.STAINED_GLASS); player.sendBlockChange(loc, Material.STAINED_GLASS, (byte) 5); blockLocations.add(loc); } } }

sage patio
eternal oxide
#

you are doing that 25 times on the same block

sage patio
#

wth

#

ow my bad

#

better now, but still not right

eternal oxide
#

what are you trying to build?

sage patio
eternal oxide
#

the survival game? yes

sage patio
#

when you try to build something, if the location be right, the preview is green

#

if not, the preview will be red

#

thats what i'm trying to do

#

for now, its a 5x5 floor

eternal oxide
#

trying to build it where the player is looking?

sage patio
#

yea

#

actually not building yet, showing a preview of the build to player

eternal oxide
#

yep

#

ok thats not hard to do

#

just your math is all messed up

sage patio
#

i will die soon, it is

sage patio
eternal oxide
#

one sec let me open my ide. I have some code placing a fake block where teh player is looking

sage patio
#

ow nice

eternal oxide
#

you also need to remove teh blocks you fake place as the player moves his head

sage patio
#

its flashing, i have to remove blocks in that way you said

eternal oxide
#

why 10 ticks? that will flash.

sage patio
#

y

eternal oxide
#

only remove it when the player moves his head

near night
eternal oxide
#

?paste

undone axleBOT
near night
#

oh sorry one sec

#

fixed

eternal oxide
drowsy helm
#

it looks fine to me

near night
#

one sec

eternal oxide
#

its just a case of changing the Map at line 39 to hold a Set instead of a single Location

#

and adding all the blocks in getTarget

drowsy helm
#

BaseBlocks = gson.fromJson(jsonString, type);

#

is probablyh returning null

near night
#

your right

#

thanks!

sage patio
#

i'm on 1.12.2 maybe its because of that

eternal oxide
#

yeah thats not in 1.12

#

you can do the same with vectors

#

if you want it always 10 blocks from the player use Location loc = player.getEyeLocation(); return loc.add(loc.getDirection().multiply(10));

vapid grove
#
p.getInventory().getItemInMainHand().setAmount(p.getInventory().getItemInMainHand().getAmount() - 1);
#

Why does this remove my entire hand?

#

Even if I have 5 items it just deletes it

drowsy helm
#

show your full code

vapid grove
#

?paste

undone axleBOT
drowsy helm
#

unless your event is being called many times over i dont see why it would do that

eternal oxide
#

are you sure it'd deleting them all and it's just your inventory is not updating?

#

see if it's invisible in your hand

vapid grove
#

oh wait i know why

sage patio
#

whats wrong with me

eternal oxide
#

did you use teh code I gave you?

sage patio
#

yea

#

didn't used it, just looked at it

eternal oxide
#

then just start x -2 to x + 2 and z - 2 to z + 2

sage patio
#

what about this, for x + 5 and z + 5

eternal oxide
#

you get teh center location then use +- 2

#

your code you never change the location

#

you loop i and j and never use them

#

oh you are incrementing x and z seperately

#

that would nto work

#

you are incrementing x 25 times

sage patio
#

its 8 am, i didn't sleep from last night
even i can't speak english correctly

eternal oxide
#

don;t alter x and z in your loops, instead add to x and z i and j

sage patio
#

like this?

#

wait

eternal oxide
#

no you asre modifying x and z

#

move your Location loc line inside the inner loop

sage patio
eternal oxide
#

and change the end to x + i, y, z + j);

sage patio
#

ow

eternal oxide
#

remove your x = x + 1 and z lines

sage patio
#

FINALLYYYYYYYYY

#

i'm going to bed

#

thank you

eternal oxide
#

night 🙂

sage patio
#

its morning

#

but gn

sterile token
trim lake
#

Do you guys recommend to saving data from yaml file to RAM/variable (on onEnable method) and use that or its better to access file every time?

#

I mean like this:chests = this.getConfig().getStringList("locking.chests");

#

and use this variable in code or just access .yml file every time

vapid grove
#

Anyone know any librarys I could use to create custom enchantments in 1.19+

drowsy helm
trim lake
drowsy helm
#

anything that uses the default config system will cache

trim lake
#

Soo looks like Im wasting resources by saving data on every plugin load.

#

?paste

undone axleBOT
trim lake
drowsy helm
#

as long as you use FileConfiguration

trim lake
#

So its waste saving data to variable on plugin load, right? So its better to access .yaml file with ex. Main.getConfig().getString("some path");, right?

#

If yes, Im wasting system resources in my plugins xD Thanks.

rotund ravine
#

No it’s fine @trim lake

trim lake
rotund ravine
#

Which ones?

trim lake
#

I don't get it wdym with that answer.

trim lake
#

Idk what is fine or just what do you mean

summer agate
#

Configs can't change during runtime (as far as I know) so there's no need to keep getting a config value from the config. Saving it to a (final?) variable would make more sense to me. That said, unless you're reading that value thousands of times, it really doesn't matter much in performance or resources

quiet ice
#

They can, but you'll notice soon enough when it does and when it does not

#

The confugs privided by the bukkit API do Not Change when the underlying file Changes that is

#

More exactly, the are ready once into memory and that is it

karmic grove
#

i was wondering if spigot has a method getNearbyEntities i was using paper then decided to use spigot and it says its not a thing

#

of the location class

trim lake
karmic grove
summer agate
trim lake
trim lake
summer agate
#

Performance wise it will be insignificant unless you use it a real ton. (say a 100X100X100 for loop)

trim lake
#

For me, seems pointless to save data to some variable if they are already in some variable on memory. So I if will create some variable where I will save some data in onEnable method Im saving value twice, right?

#

that´s the way Im thinking about it.

summer agate
#

I don't like interfacing directly with the config reader because I feel that passing a string is open to mistakes, so I made a wrapper/helper class around it

trim lake
#

Maybe for config like this, will make sense to make variables: ```options:
watering-multiplier: 1.15
fertilisation-multiplier: 1.3
water-bucket-max-usages: 4
plating-time: 1.5

fertilizer:
basic:
material: COCOA_BEANS
# customModelData: 2810401```
Bcs, the values will not be changed at all. They are same for everyone. So in this case I should save data to variable and not needed to access .yml file for every right click (check if player is clicking with fertilizer). So its not bad to save to variable in this case I guess?

#

This is config for plugin witch allows player to watter and fertilize crops.

#

on line 36 is variable used, witch get data with onEnable method

#

So in case like this is better to use variables? or just make more sense to use them?

summer agate
#

It's really just preference. Saving this data will take up (much) less than a kilobyte of memory, so don't worry about performance

#

If you think that it will make your code clearer, then do it

trim lake
#

One of my friends told me is not necessary to save data to variable, bcs they are already in variable. Just another guy told me, I will losse CPU bcs I will every time access that file (sounds like blueshit). That's why I'm asking here. Thanks for advice.
Probably most used is saving to variable from config in onEnable method I guess, right?

quiet ice
eternal oxide
#

there is no file access unless you load or save

trim lake
# quiet ice You gotta Programm it in then though

something like this should be enough mby? ```public void reloadConfig() {
if (this.configFile == null)
this.configFile = new File(this.plugin.getDataFolder(), name);

    this.dataConfig = YamlConfiguration.loadConfiguration(this.configFile);
    
    InputStream defaultStream = this.plugin.getResource(name);
    if (defaultStream != null) {
        YamlConfiguration defaultConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(defaultStream));
        this.dataConfig.setDefaults(defaultConfig);
    }        
}```
trim lake
eternal oxide
#

your own configs not the default plugin one?

faint sedge
#

Hey, in 1.8 i wanted to summon an armor stand that is set to invisble via metada, because it will also be invulnerable. DO you guys know how to use meta data to do so ?
I've senn that the invisible tag is linked to Index: 0, Type: Byte, Bit Mask 0x20 but idk how to apply this to an ArmorStand

onyx fjord
#

1.8 👽

summer agate
#

But I believe that's the gist of it

#

Really the best workflow is make it work with sorta neat code and if it's too slow, then look into speeding things up

trim lake
eternal oxide
#

do you have a need to use your own config files?

#

plugin has it's own config methods

trim lake
#

Yes, I do. I need save data about player (ex. player XP) and some block (if chest is locked, is crop is wattered...).

#

I guess for this is better to make separate file.

snow compass
#

do I this wrong or client bug? Is on 1.12.2, create an door with the name ACACIA_DOOR_ITEM (old version seams to not use ACACIA_DOOR). I set right data also ofc (it should not show the item at all then).

when place it it turn to right item. Only item some not get invalid texture is oak door.

glossy venture
#

where can i find the structure of the nbt tags of an item

rotund ravine
glossy venture
#

ayy thansk

muted crest
#

Someone has an idea of how i can check if mob is nerf by spigot ?
I made a stick to capture mob but i dont want that player can capture mob spawned by a spawner

I made that but its currently not working:

if(main.getUtil().checkCustomItem(it, "§2Mob Collector") && !it.getItemMeta().hasLore()) {
                if(e.getEntity() instanceof LivingEntity) {
                    LivingEntity lve = (LivingEntity) e.getEntity();
                    if(lve.hasAI()) {
                        ItemStack its = it.clone();
                        its.setAmount(1);
                        p.getInventory().getItemInMainHand().setAmount(p.getInventory().getItemInMainHand().getAmount()-1);
                        p.getWorld().dropItem(e.getEntity().getLocation(), main.getUtil().addCustomLoreToItem(its, "§2Mob Collector", ("§a"+e.getEntityType().toString())));
                    }
                    else p.sendMessage(ChatColor.DARK_RED+"You cannot capture this mob !");
                }
            }
vocal cloud
#

Mob is nerf?

onyx fjord
vocal cloud
#

A simple way would be to write to it's PDC a value if it spawns from a spawner and then check when they try to capture it

onyx fjord
#

Persistent data container

#

?pdc

drowsy helm
#

if it doesn't have AI isnt there a .hasAI method?

tender shard
#

yes

#

at least on 1.13+

drowsy helm
#

yeah

tender shard
#

maybe they use an ancient version for dem pvp skillz

drowsy helm
#

what do you mean by has nerf though?

#

lel

tender shard
#

recently I got a commission for a 1.8 plugin

#

then I banned them

#

what a stupid question

drowsy helm
#

can you do 1.6 plugins?

#

pls

tender shard
#

no but I know someone who's the best coder for 1.4.6 plugins

#

@LeGuernic

#

damn shit he was banned

drowsy helm
#

people still touch that shit lol

tender shard
#

this leguernic dude claimed to be "well known in the spigot 1.4.6 scene" lmao

#

I think he's still on my server though

#

let's see

#

damn no

#

he also left my server or got banned, idk

#

lmao my supporters also remember him

molten hearth
#

Probably because he's the only user using 1.4.6

tender shard
#

that makes sense yeah

molten hearth
onyx fjord
#

Lol

molten hearth
#

@onyx fjord explain yourself

tender shard
#

yeah

#

kacper

#

explain yourself

#

but do not use the words "firefox" or "gpl" or "foss"

onyx fjord
#

No

#

#general

faint sedge
#
public static void Circle(float x, float y, float z, float radius) {
        for (double i=0; i<360; i+=10) {
            float x_ = (float)Math.cos(Math.toRadians(i));
            float z_ = (float)Math.sin(Math.toRadians(i));
            PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.BLOCK_DUST,true, x+radius*x_, y, z+radius*z_, 0, 0, 0, 0, 1);
            for(Player online : Bukkit.getOnlinePlayers()) {
                ((CraftPlayer)online).getHandle().playerConnection.sendPacket(packet);
            }
        }
    }

Hey, this command makes my game crash, with an UnpooledHeapByteBuff(ridx:38, widx:38, cap: 38) error IG
and a java.lang.ArrayIndexOutOfBoundsException: 0 error in the console

#

Is it because i'm sending too much packet ?

#

But 36 looks fair :/

tender shard
#

what version? why are you not using mojang mappings 😢

muted crest
sullen marlin
#

Why would you use packets for particles

#

Wtf

faint sedge
#

What should i use ? I'm using spigot 1.8.8 :')

sullen marlin
#

There has literally never ever been a reason to do this

faint sedge
#

The other commands doesn't work

sullen marlin
#

Player.spawnParticle

tender shard
#

iirc in 1.8 you actually need packets

sullen marlin
#

Uh yes?

tender shard
#

hm I just checked the javadocs for player in 1.8 and there's no spawnParticle method

faint sedge
#

Like in particular

faint sedge
#

Tysm

tender shard
#

the official source is to run buildtools though

tender shard
#

you haven't heard of buildtools?

#

where did you get your spigot .jar from

#

lol

#

to get javadocs for 1.8.8:

#

java -jar BuildTools.jar --rev 1.8.8 --generate-docs

faint sedge
#

Error: Unable to access jarfile BuildTools.jar

tender shard
#

?bt

undone axleBOT