#help-development

1 messages · Page 23 of 1

tender shard
#

can you maybe send me a list of all "public" commands?

#

then I'll just write a tiny wiki article about them

fickle pine
#

Yo

tender shard
#

yo

ivory sleet
#

Thatd be truly awesome

tender shard
#

if you send me a list, I'll write it, takes like 10 minutes

#

I know about
?pdc
?learnjava
?learnjava!
?eventapi
?configs
?notworking
?interactevent

fickle pine
#

So I have a team system that randomly assigns people to it, I need to somehow limit each team to five players only, any ideas?

ivory sleet
#

Yeah mfnalex

#

Will do

tender shard
#

if yes*

fickle pine
#

Would that not be super inefficient though?

arctic moth
fickle pine
#

Id have to run that whole thing for each team no?

tender shard
#

not at all

river oracle
#

Tbf 5 isss a super big number I'd never loop over that

tender shard
fickle pine
river oracle
#

Ohhh boy

tender shard
river oracle
#

That's getting crazy

fickle pine
#

very

tender shard
arctic moth
river oracle
#

I think you'll be fine just don't loop over 2 or 3 million times

tender shard
arctic moth
#

oh wait that might be the other function

fickle pine
#

Making a plugin for a big YT/Twitch event so I need it to be as efficient as possible

river oracle
#

Than I joined a server dev team now i care even less about ticking events

fickle pine
tender shard
#

people also do stuff like "uuugh use an EnumSet<> instead of Set<Material>, its way faster"

#

bullshit

#

I mean, yeah, it's faster

#

maybe like 0.03 milliseconds faster

#

noone cares about that

river oracle
#

I just use set because it's faster to type

arctic moth
tender shard
#

premature optimization is not good

tender shard
#

if you wanna get rid of certain biomes, you gotta do so while/prior to generating the world

#

removing the biomes of already generated worlds makes no sense anyway

arctic moth
#

oh

fickle pine
tender shard
tender shard
arctic moth
#

im just trying to get rid of Biome.CUSTOM so it doesnt throw that error

fickle pine
#

Oh thats what they meant

#

my b

#

lol

echo granite
#

Is it okay to have at the same time ~300 tasks that were created using runTaskLater? The code inside the run() methods doesn't do anything crazy.
The context is that my plugin allows players to create their own timers, and the timers should notify once they're done.

arctic moth
#

ill go paste it rq

river oracle
#

If you see even a slight tps drop probably best to reformat

arctic moth
river oracle
#

Also you should dynamically create the timers rather than have all 300 at once

echo granite
river oracle
#

/tps

echo granite
river oracle
#

yea should be fine as long as the task isn't super intensive

#

I'd also try to run some async if they don't require the api

echo granite
#

The only other solution I can think of is to have a single runnable that runs every second and loops through all of the timers and checks which is done

river oracle
#

that way you can call your plugin UltraSuperAsyncTimerCreator

arctic moth
peak depot
#

is there a way to compile .jar files with maven like add them together on compile

echo granite
peak depot
tender shard
echo granite
arctic moth
tender shard
#

"adding .jar files together"? you probbaly mean "shading stuff"

tender shard
#

ofc the default world generator doesnt know on how to generate CUSTOM biomes

tender shard
#

if you use maven, USE MAVEN

arctic moth
#

throws an error either way

peak depot
tender shard
tender shard
#

just add spigot 1.8.8 as <dependency> in your pom

peak depot
tender shard
#

maven doesn't know when you add stuff manually to your intelliJ project

tender shard
# peak depot https://prnt.sc/l4kvXSAHJnhX

@eternal night is totally right. He did NOT tell you to add spigot 1.8.8 manually to your project. He told you to run buildtools for 1.8.8 and then add the dependency to your pom

#

oh shit

#

didnt mean to ping you

#

I did that out of habit

#

sorry lol

eternal night
#

lol no worries 😅

tender shard
#

idk why but I always add @ before any username lmao

arctic moth
tender shard
subtle folio
#

balls

tender shard
#

Ntdi my love

#

where have you been

subtle folio
#

i’ve been at a camp

#

for coding ai

tender shard
#

a camp?

#

oh

#

wtf

subtle folio
#

its like a stay away camp

#

so i’m living in the standford dorms

arctic moth
subtle folio
#

snd then going to classes

subtle folio
arctic moth
#

oh

subtle folio
#

i mean we do use beautiful soup

#

but not data data science

#

just fun stuff

tender shard
subtle folio
#

i trained an ai to detect people

#

and such

tender shard
#

discord has a very weird AI

subtle folio
#

discord has an ai?

tender shard
#

whenever I send a video of myself where my nipples are visible, it blocks it

subtle folio
#

lmao

tender shard
#

it's very strange because normally male nipples arent considered "nsfw"

#

lemme try sth quickly

subtle folio
#

ur not a male

tender shard
#

fuck

#

in images it works

subtle folio
#

lmao

tender shard
#

its only in videos

#

so weird

eternal oxide
#

pervert

subtle folio
#

nice pedo stache

tender shard
#

haha I just tried it with a video and it was blocked

#

makes no sense

arctic moth
#

lol

waxen vapor
arctic moth
#

try gif

tender shard
#

lmao

subtle folio
#

suck boings

waxen vapor
#

Lmao well i need some help xD

tender shard
#

discord blocks videos with visible nipples

#

but doesnt block pics with visible nipples

subtle folio
#

we’ll stop

arctic moth
tender shard
#

?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!

tender shard
#

if any actual spigot coding question arrives, we'll immediately stop talking about AI nipple detection, I promise

arctic moth
eternal oxide
#

um

waxen vapor
#

So i have this code that when i place a custom block i made it spawns a strucute. The point of this structe is that its a generator that automaticly mines money for you. In the middle of this structure i spawn a chest. I already made som gui, that i can also see using /gui for test purpose. How can i make it so when i click on the chest, it shows the ui? Not just any chest in the world, but the specific chest the structure just made

arctic moth
#

why cant you spell structure

waxen vapor
#
e.getBlock().getLocation().add(0,0,-1).getBlock().setType(Material.CHEST);
#

thats how i spawn the chest

waxen vapor
arctic moth
subtle folio
#

that can go on blocks

#

right

arctic moth
#

oh thats how

waxen vapor
arctic moth
#

i thought you were asking how lol

waxen vapor
#

let me show you a video

#

2 sec

arctic moth
#

cant read

#

lol

subtle folio
arctic moth
#

cringe

subtle folio
#

what

arctic moth
#

its from minehut

subtle folio
#

how is an emoji cringe

#

okay

#

didiask

waxen vapor
#

I have this block that when i place it spawns my generator. How do i make it so when i click the chest that just spawned, it opens some gui i have already made?

subtle folio
arctic moth
waxen vapor
#

Not just when i click any chest, cause the player can have normal chest. But when i click a chest in the generator

subtle folio
#

then do checks

subtle folio
#

then check if that chest has the pdc in the interact event

#

?pdc

waxen vapor
#

Alright i will try, thanks!

subtle folio
#

np

#

okay @tender shard

#

he’s offline dammit

tender shard
#

im not offline

arctic moth
#

what should i return in getBiomes() if i want every biome except the CUSTOM one

subtle folio
#

yes finally

tender shard
#

I'm currently writing a spigot wiki article

arctic moth
tender shard
arctic moth
#

oh

subtle folio
#

oh sweet

#

but isn’t that ?help

#

lmao

tender shard
#

no

#

it used to be ?cc

#

but it was removed

subtle folio
#

okay man wtv u say no cap

#

all fax

waxen vapor
#

What is the event called for checking if the player opens a chest?

tender shard
#

InventoryOpenEvent

subtle folio
tender shard
#

and PlayerInteractEvent

subtle folio
tender shard
#

that gets called too

subtle folio
#

not for this case

tender shard
#

100%

subtle folio
#

it does but it’s not what they want

tender shard
#

first, interactevent, after that, inventoryopenevent

#

I am 100000% sure

subtle folio
#

they want to cancel the inevntory open

#

entirely

subtle folio
#

with a custom gui to replace it

waxen vapor
eternal oxide
#

Do they though?

hard lion
#

do dead entities get removed from arraylists?
im cleaning up my old code but i haven't noticed any memory leaks

waxen vapor
#

how do i check if its a chest being used?

eternal oxide
#

They o0nly want to know if the chest is being used so they can open their own UI

tender shard
arctic moth
#

yeah

tender shard
#

@quaint mantle we also need a command to tell people to "reload maven" in intelliJ

eternal oxide
#

You can do it either in teh PlayerInteractEvent, or the InventoryOpenEvent

arctic moth
#

oh so hes the one that does the bot

peak depot
arctic moth
peak depot
#

yes

arctic moth
#

reimport

waxen vapor
#

idk

#

i will just try a few things ig

tender shard
#

@quaint mantle ?reloadmaven
"If you're using IntelliJ + maven, and you've changed something in your pom.xml, be sure to hit the maven reload button, so that IntelliJ can recognize the changes made in your pom.xml file."

#

oh wait the screenshot is shitty

#

better screenshot ^

peak depot
tender shard
#

then see what happens

waxen vapor
#

Im sry i just started learning plugin development yesterday

#

im very new to all of this

tender shard
#

?cda

#

?cda

#

is this command dead?

peak depot
tender shard
#

it compiled fine, so everything's good. Use File -> Invalidate Caches

waxen vapor
sacred prairie
#

hi, im trying to load schematics with the help of worldedit-api. My debug messages say that the schematic has been successfully loaded but they are still not loading. Here is my code: ```java
try {
System.out.println("addrome");
File schematic = new File(path + "/" + room.type.toString() + "/" + room.id + ".schem");
ClipboardFormat format = ClipboardFormats.findByFile(schematic);

            ClipboardReader reader = format.getReader(new FileInputStream(schematic));
            Clipboard clipboard = reader.read();

                    Operation operation = new ClipboardHolder(clipboard)
                    .createPaste(worldEditPlugin.createEditSession(Bukkit.getPlayer("CarsCupcake")))
                    .to(BlockVector3.at(5*32 - room.x * 32, 50, 5*32 - room.y * 32))
                    .ignoreAirBlocks(false)
                    .build();
            Operations.complete(operation);
            clipboard.commit();
            Bukkit.broadcastMessage("§a A schematic succesfully load Loc: " + (5*32 - room.x * 32) + " " + 50 + " " + (5*32 - room.y * 32));
        } catch (Exception e) {
            Bukkit.broadcastMessage("§c A schematic failed to load");
            System.out.println(e);
        }
charred blaze
arctic moth
charred blaze
charred blaze
#

bukkit's?

chrome beacon
#

Yes

#

?scheduling

undone axleBOT
charred blaze
#

oh okay

arctic moth
#

and my pc doesnt suck

#

something is straining it, dont know why

chrome beacon
#

getChunk will load it

#

You're better of bitshifting x and z

arctic moth
#

oh

#

how

gray merlin
#

How would I test my plugin?

arctic moth
chrome beacon
#

i >> 4

#

for example

arctic moth
chrome beacon
#

Use that for x and y

arctic moth
#

of server

glossy venture
#

it puts in the z, shifts that 32 bits to the right

#

and then puts in the x

arctic moth
gray merlin
arctic moth
#

16?

chrome beacon
#

You shift by bits

gray merlin
arctic moth
gray merlin
#

is there a way to not restart the server every time at least?

chrome beacon
#

so that's 2^4 = 16

glossy venture
arctic moth
#

which is what

glossy venture
#

id recommend two ints (32 bits) for x and z into one long (64 bits)

arctic moth
glossy venture
#

yes

chrome beacon
#

Wait why are we making this so complex

arctic moth
#

idk

#

im just dumb

glossy venture
eternal night
#

some say x | z << 32 might work too

glossy venture
#

idk

#

more compact

arctic moth
#

*by

#

left or right tho

#

im guessing it doesnt matter but whatever

glossy venture
#

it wraps around so it doesnt really natter i think

arctic moth
#

oh ok

chrome beacon
#

Just replace chunk.getX() with i >> 4 and chunk.getY() with i2 >> 4

#

;/

eternal night
#

x | (long) z << 32 works out

glossy venture
#

ah

glossy venture
arctic moth
chrome beacon
eternal night
#

you have to cast z to long, else shifting it by 32 bits -> 0

quaint mantle
#

so all plugins have to be compiled to a jar file, is there a plugin that allows you to keep them as a regular file so i dont have to always compile it then make it a jar, and then run?

glossy venture
#

the e.getMaterial() returns the type of the item in your hand

#

or the used item

#

i guess

glossy venture
quaint mantle
#

how?

glossy venture
#

but you cant interpret java

eternal night
#

cool kids just ByteBuffer.allocate(Long.BYTES).putInt(x).putInt(z).flip().getLong();

glossy venture
#

idk

#

use sun.tools.compiler

#

and embed it in a plugin

quaint mantle
#

sorry im new to java

glossy venture
#

which then also uses the bukkit plugin manager to load it

glossy venture
waxen vapor
glossy venture
#

just stick with compiling it every time

quaint mantle
#

no no i need it to it would speed up my development alot

#

lol

glossy venture
#

ok well then learn how to use sun.tools.compiler

quaint mantle
#

ok thanks

eternal night
#

this makes no sense what so ever

glossy venture
#

and how to runtime load plugins

eternal night
#

you are not going to get any better results than just following the debug setup for intellij on the spigot forums

arctic moth
eternal night
#

well obvs that isn't

#

you have to assign it

#

long packed = ....

arctic moth
#

oh

arctic moth
#

srry im not used to bitshifting and stuff

chrome beacon
#

You don't need to package the it though? ;/

#

You just want the chunk coords

glossy venture
#

because you will need to pacakage it into a jar

#

and add the spigot api and other deps to the classpath

#

you could call gradle using Runtime.exec

quaint mantle
#

so everytime i make a change ima have to send it to a zip, then ima have to make that zip a jar.. and then run the server??

arctic moth
glossy venture
eternal night
#

either you pack two ints into a long

#

or you unpack two ints from a long

#

which one do you need

glossy venture
#

but just stick with compiling it every time

chrome beacon
#

They need the chunk coords

eternal night
#

then wtf is their point xD

#

oh

arctic moth
chrome beacon
#

Orbyfied has been confused

eternal night
#

ahhhh

#

location.getX() >> 4

#

returns you the chunk x cord

chrome beacon
#

^^ I sent that earlier

arctic moth
#

k

eternal night
#

yea

quaint mantle
chrome beacon
#

Why not use a build tool like maven or gradle

#

Makes things easier

quaint mantle
#

idk how to or what those are

arctic moth
#

still hangs

quaint mantle
#

im literally this is my first day learning java

chrome beacon
#

oh

#

You don't need to make a jar then you should focus on the learning java part

#

You can run things directly in your IDE

quaint mantle
#

yes but i want to run them in my server

chrome beacon
#

(I really hope you aren't making plugins on your first day)

#

oh no you are

#

.-.

quaint mantle
#

thats how i learn best

#

I learned php like that

#

and typescript

#

and js

arctic moth
chrome beacon
gray merlin
#

I seem to be missing something. My .jar doesn't get my plugin.yml file packaged with the code for some reason. Do I need to specify it anywhere?

chrome beacon
hard lion
#

do dead entities get removed from arraylists?
im cleaning up my old code and i realised i didnt remove anything from arraylists, but there is no memory problems on my server

hard lion
dusk flicker
#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
dusk flicker
#

oh cool

chrome beacon
#

Nice

visual tide
#

neat

arctic moth
chrome beacon
ashen quest
#

yo guys, i wanna limit the way a witch moves, i dont want to let it go outside of X radius. how can I do so, especially when theres no event for entity movement

arctic moth
hardy pivot
#

Guys

chrome beacon
ashen quest
hardy pivot
#

Do you make your plugins according to your needs or do you also use community options?

ashen quest
#

Depends on what the plugin is

#

And how big that audience is

chrome beacon
#

Use community options it saves time

tender shard
tender shard
ashen quest
#

?main

rustic pecan
#

Hi all, I am trying to get BuildTools to run and I am getting the following error:

Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Is there any tutorial on how to add a certificate to Java? I have already tried with the flag --disable-certificate-check argument. I am using Windows.

ashen quest
tender shard
ashen quest
#

oh 100 more

#

brah

tender shard
#

but thanks ❤️

ashen quest
#

:D

tender shard
#

I asked conclure for a full list of commands

tall dragon
#

?learnjava!

undone axleBOT
tall dragon
#

lmfao

ashen quest
#

I wanted to know, why is your company/thing called "Jeff" Media

ashen quest
chrome beacon
tender shard
tall dragon
#

?workdistribution

tall dragon
#

@tender shard ^

tender shard
tall dragon
#

add that one

tender shard
#

oh yeah

#

add it yourself 😛

tall dragon
#

i can?

tender shard
#

of course!

#

the wiki is "open"... to edits

ashen quest
#

oh and btw @tender shard your plugin update bot aint on github

tender shard
#

just click on "Edit" and adjust the page

tender shard
#

I will upload it rn

ashen quest
#

tysm

arctic moth
#

so @chrome beacon what am i supposed to actually do to stop the hanging?

#

idk what is causing it to hang

tender shard
#

I just forgot to add the link on the spigot page >.< shame on me

#

wait

#

I didnt

chrome beacon
tender shard
tender shard
arctic moth
chrome beacon
chrome beacon
arctic moth
#

oh

#

it hasnt sent it

#

i noticed it doesnt send the preparing world thing

#

lags before showing that log

#

ig ill wait for thread dump

#

still hasnt happened

#

weird that its taking this long

#

usually when i crash my server its quicker

chrome beacon
#

A thread dump should happen after 10 seconds

arctic moth
#

maybe its not fully frozen or smth

#

console is frozen and no commands work

chrome beacon
#

No idea

arctic moth
#

its not putting much strain on my pc

#

it has a ram cap tho

#

eventually itll surpass the ram cap and crash

#

but its been at 2 gb for the past 5 minutes

#

of ram usage

arctic moth
#

wait is it

#

i saw it like 10 seconds ago

#

yeh

tender robin
#

so it's my first time working on a plugin supporting multiple versions with NMS, one part of my code looks like this

        if (version.equals("v1_8_R1")) {
            actionbar = new Actionbar_1_8_R1();
        } else if (version.equals("v1_8_R2")) {
            actionbar = new Actionbar_1_8_R2();
        } else if (version.equals("v1_8_R3")) {
            actionbar = new Actionbar_1_8_R3();
        } else if (version.equals("v1_9_R1")) {
            actionbar = new Actionbar_1_9_R1();
        } else if (version.equals("v1_9_R2")) {
            actionbar = new Actionbar_1_9_R2();
        } else if (version.equals("v1_10_R1")) {
            actionbar = new Actionbar_1_10_R1();
        } else if (version.equals("v1_11_R1")) {
            actionbar = new Actionbar_1_11_R1();
        } else if (version.equals("v1_12_R1")) {
            actionbar = new Actionbar_1_12_R1();
        } else if (version.equals("v1_13_R1")) {
            actionbar = new Actionbar_1_13_R1();
        } else if (version.equals("v1_14_R1")) {
            actionbar = new Actionbar_1_14_R1();
        } else if (version.equals("v1_15_R1")) {
            actionbar = new Actionbar_1_15_R1();
        } else if (version.equals("v1_16_R1")) {
            actionbar = new Actionbar_1_16_R1();
        } else if (version.equals("v1_16_R2")) {
            actionbar = new Actionbar_1_16_R2();
        } else if (version.equals("v1_16_R3")) {
            actionbar = new Actionbar_1_16_R3();
        } else if (version.equals("v1_17_R1")) {
            actionbar = new Actionbar_1_17_R1();
        } else if (version.equals("v1_18_R1")) {
            actionbar = new Actionbar_1_18_R1();
        } else if (version.equals("v1_18_R2")) {
            actionbar = new Actionbar_1_18_R2();
        } else if (version.equals("v1_19_R1")) {
            actionbar = new Actionbar_1_19_R1();
        }
        return actionbar != null;
    }
#

my question is can I now put sth else in this code? like

        if (version.equals("v1_8_R1")) {
            abcdfg = new Action_1_8_R1();
        } else if (version.equals("v1_8_R2")) {
            abcdfg = new Action_1_8_R2();
        }
tall dragon
arctic moth
#

oh?

tall dragon
#

spiget is an api

#

look it up

tender shard
#

spiget is correct

quaint mantle
#

so how can i create a minecraft 1.8 plugin if the minecraft extension for intelj only lets me go to .12

arctic moth
#

my server has been hanging on world creation for the past 10 or so minutes and hasnt had a thread dump

tender shard
arctic moth
#

it loads the world before it and just stops

quaint mantle
tender shard
chrome beacon
#

Then you can use modern versions

#

You can disable the new pvp

arctic moth
#

1.9+ pvp is shit lol

tender shard
#

are you afraid that your players cannot do PVP if there's more to pvp then just "spam left click"?

tall dragon
#

?paste

quaint mantle
#

1.8 is different combat systems

undone axleBOT
tender robin
# tall dragon reflection

btw in these different classes
Actionbar_1_8_R1
Actionbar_1_9_R1
Actionbar_1_13_R1
I have to code it in their version or api right?

tender shard
quaint mantle
#

im wanting the players to use minecraft 1.8

quaint mantle
arctic moth
#

and damage thing

#

PlayerDamageByPlayerEvent#setDamage

#

my server finally used another 3 mb of ram

#

wtf is happening

#

its like it just stopped the entire thing or smth

#

it doesnt say not responding and isnt using like any resources

#

so its not the standard high-usage hang

#

another 0.1 mb

#

of ram

#

is this gonna take like 6 hours to crash

dusk flicker
#

?1.8

undone axleBOT
umbral bear
#

Hi, i was recently working on a bungeecord plugin, and i was wondering how to get a player's last login date (i know that in spigot you could do p.getLastTimePlayed() or something similar, but idk how to do that on bungeecord)

arctic moth
#

then load it

umbral bear
#

that's what i was thinking

#

but i thought there was an easy way to do it

arctic moth
#

nah

umbral bear
#

ok, thx

arctic moth
#

i noticed that the world files are all made, just seems like they are empty (1 kb each lol)

#

well stuff in folders isnt there yet

#

i just dont understand whats happening rn

#

@tender shard any idea?

ashen quest
arctic moth
#

help is dead rn

arctic moth
#

youll have to play with the ai

arctic moth
ashen quest
#

well

#

seal in franch

waxen vapor
#

How do i check if the chest i just clicked have a specific block next to it?

#

the current code is

if(e.getClickedBlock().getType() == Material.CHEST){
#

for checking its a chest. So how do i check if it have specific blocks next to it

boreal seal
#

Easily

#

Loop a cube around and make an array list contains the results

gray merlin
#

How would I have my plugin create a directory to store stuff?

waxen vapor
#

Im very sorry, i started learning plugin development yesterday

#

could you explain a bit more in depth maybe?

boreal seal
#

Learn Java first I think

#

Loop thru a cube around the block cords

#

Store the results in an list

#

If list contains the block

#

{ … ur code

#

I think if u don’t know Java

#

Start of Java basics

waxen vapor
#

Nah, i know C# so im not new to programming

#

im a game developer

#

but i wanted to learn plugin development too

#

so my problem is not that i dont understand what i need to do, or how. I have the functionality in my head, it just need to learn the names for things, events etc

boreal seal
#

Then do a loop and check if any of results block is the block u was checking for

#

It’s so simple

#

If u don’t know how to loop u either not Dev of anything

#

Maybe html

waxen vapor
#

Lmao i do know a loop xD

waxen vapor
boreal seal
#

Then what part u didn’t understand

#

Sorry for begin rude

fossil fiber
#

How can i make a placeholder which show custom prefix/suffix?

glossy scroll
#

?jd

waxen vapor
glossy scroll
#

@waxen vapor

boreal seal
boreal seal
#

I can spoon feed u later if u want

glossy scroll
#

Evan you're not really being helpful lmfao

boreal seal
#

Or check direction to block

glossy scroll
#

you cant "loop cube"

#

thats not really a thing

boreal seal
#

West to block

waxen vapor
boreal seal
#

You can

waxen vapor
#

its alright i will figure it out

boreal seal
#

K I’ll explain easily

#

Get block x y a

#

X y z location

#

After make a loop

waxen vapor
#

Nono its fine

#

i got this ;)

boreal seal
#

That will calculate a cube around

#

The self block

#

X+ Y+ . . . Simple math

#

If result = block unwanted

#

{

gray merlin
#

I actually did something similar to this on a mod once, although in two dimensions. You would just need to add a third loop to it for the Y dimension there

#

It's a mod, but the logic's still the same, since it's mostly maths

boreal seal
glossy scroll
#
for x = -1 to x = 1
  for y = -1 to y = 1
    for z = -1 to z = 1
      get block at (x,y,z) + block location
      if block is desired block
        do something here, and break out of x, y, z
boreal seal
#

Here

#

But I don’t think he will understand

gray merlin
boreal seal
#

Thanks

#

I lost my mind I was thinking he is trolling

#

😿🥺

waxen vapor
glossy scroll
boreal seal
#

I’m not Dev either

waxen vapor
#

Im sry if i said something that insult your gaint ass ego, but just stop please?

waxen vapor
waxen vapor
boreal seal
#

Chill man only truth hurt people

waxen vapor
#

No im not hurt lmao

#

you some guy on the internet ;)

boreal seal
#

I see

#

Reflection.

glossy scroll
#

evan you are beign very aggressive lmfao

#

touch grass or smt idk

waxen vapor
#

Yeah exactly, so i dont know what i done wrong?

boreal seal
#

That’s the problem you didn’t understand

waxen vapor
#

I dont remember insulting you, but if helping me is so hard, no one asked you to? I never pinged you

glossy scroll
#

guy asks for help and you compain that he cant understand your vague directions

boreal seal
#

So I was thinking ur making joke out of me

glossy scroll
#

and when he asks for more clarification you wild out on him for being bad dev

waxen vapor
boreal seal
#

I didn’t insult you

glossy scroll
boreal seal
#

When did I

waxen vapor
simple silo
#

Can I somehow send a message to a player on a different server (connected with bungeecord) using just spigot plugins?

waxen vapor
#

Well im done wasting my time with this guy, have fun doing whatever you doing! Hope you have a wonderfull day Evan <3 No hard feelings, we all have bad days, i will let this slide ;)

simple silo
boreal seal
#

Not would be best way

#

But in general it would work

glossy scroll
#

redis is an option

#

plugin messages

gray merlin
#

Not everyone learns the same way, even though your explanation was clear, if someone doesn't understand it, you usually just have to adapt in order to make them understand it...

glossy scroll
#

up 2 u

echo basalt
#

SQL for messaging 🤮

boreal seal
#

Possible .

simple silo
echo basalt
simple silo
#

but alright, thank you for the help

echo basalt
#

There's the message and messageraw types

simple silo
#

I didn't know they can send messages

glossy scroll
#

people tend to use redis or plugin messaging

#

i would say plugin messaging is most popular

echo basalt
#

messageraw might work better as you can grab a textcomponent, serialize it to a json string and just send it directly

glossy scroll
#

redis messaging is quite helpful for things beyond simple server stuff

echo basalt
#

plugin messaging has drawbacks

simple silo
#

and can I somehow do that using UUID instead of usernames?

glossy scroll
#

but redis also requires its own instance running on machine

boreal seal
waxen vapor
# gray merlin Not everyone learns the same way, even though your explanation was clear, if som...

I understood what his point was, and what he told me to do that was not the problem. The problem was that im new to the variable names that was needed, not programming. I understand what he wanted me to do, i simply just dont know the code to do it. And as i said before, i dont want spoon feeding, therefor i said: Can you please explain in more depth, so he could say: First you get an instance of this and then do that and that. I didnt want the code, just smaller steps on how to do it

boreal seal
#

From player

#

There a method .toString at the end

simple silo
#

I mean if I have a list of UUIDs I want to send a message to, can I somehow do it directly or just with Bukkit.getOfflinePlayer

glossy scroll
#

@simple silo

#

you cannot send messages to offline players

simple silo
#

does it throw an error when I try to send a message using the Message subchannel with plugin messaging?

glossy scroll
#

that i am unsure of ive nevert done such a thing

simple silo
#

Alright, I guess I will just try it, thanks for the help everyone!

gray merlin
#

Is there a way to get all the dimensions on the server?

simple silo
#

you mean the worlds?

gray merlin
#

yea

glossy scroll
#

Bukkit.getWorlds()

simple silo
#
Bukkit.getWorlds()
gray merlin
#

Amazing, thank you!

#

Actually, I'm using this documentation here... is that method not documented at all? I can't find it under org.bukkit

simple silo
#

you have to search under org.bukkit.Bukkit

gray merlin
#

ahhh alright, my bad

#

thanks

#

Oh, btw

#

Is the onEnable() method the one that acts upon the plugin when it is loading?

tardy delta
#

there is an onLoad too

#

which gets called when loading the plugin

rough drift
#

If I have a CommandSender field, and it is passed in as a player, how can I check if that command sender is no longer valid? (such as if the player quits)

tardy delta
#

::isOnline?

rough drift
#

no

#

I only have a reference to CommandSender

rough drift
#

not player

tardy delta
#

if youre sure that it is a player then cast it

rough drift
#

That's the thing

#

I am not

#

CommandSender sender = anySenderMayBeAPlayerThatCanQuit;

bold kernel
#

hi im creating a spigot plugin where the server listens for the player crouching and makes them crawl instead. I can make the client think that there is a block above the player (with player.sendBlockChange) and that puts them in the swimming position, but the position change does not reflect on the server. is there a way to make the server poll the player's position and make it change on the server?

gray merlin
gray merlin
tardy delta
#

so commandsender might be rcon too

rough drift
#

any

simple silo
#

@rough drift if (commandsender instanceof OfflinePlayer)

glossy scroll
glossy scroll
#

?1.8

undone axleBOT
boreal seal
#

1.7 and 1.8 are decent

gray merlin
bold kernel
boreal seal
#

Not matter how poor is the api back comparing to now

tardy delta
#

a passed in player object wont be an instanceof offlineplayer?

glossy scroll
boreal seal
#

And newer versions just shit

simple silo
rough drift
#

wrong reply

boreal seal
rough drift
boreal seal
#

The api is a lot better now then it used to be with 1.7 - 1.8

glossy scroll
#

oh

rough drift
#

I would have to manually check for every single possible command sender and call appropriate methods?

boreal seal
#

Just newer versions are shit with features many don’t want

#

My server runs on 1.8

rough drift
#

isn't there a way to know if a sender isn't valid anymore? such as if a player quits, or rcon disconnects, or anything like that

glossy scroll
#

i dont care if you're on 1.8, just dont ask us to help with it

#

because its 7 years old

tardy delta
#

just do proper cleaning up id say

rough drift
gray merlin
#

Can I get the logger from a static context? I'm assuming that the logger name is Minecraft, if I can without issues?

glossy scroll
#

no

#

use dependency injection

#

?di

undone axleBOT
glossy scroll
#

nevermind

gray merlin
#

I see, thank you.

boreal seal
#

I mean understand the concept

#

Because abuse singletons really badly

#

And static sometimes

gray merlin
glossy scroll
#

that wasnt a dig at you specifically

#

just in general

gray merlin
#

Oh, apologies.

boreal seal
#

There really no difference

#

Infact

#

Just make sure u use 1.7.10 api

simple silo
#

Is there a clean way to run code when a player leaves/enters an area between 2 given corners?

boreal seal
#

Like from x to y?

rough drift
#

area

#

from x1y1 to x2y2

boreal seal
#

U cloud check player location every 4 ticks

#

Even every 20 ticks

#

And if he enters the arena add him to hashmap and check more often

#

( would be bad for many players )

rough drift
#

it's not that difficult

#

PlayerMoveEvent -> BoundingBox.contains(Player.getLocation)

#

it's really not that difficult

simple silo
#

wait what is a BoundingBox?

#

never heard of that class

rough drift
#

literally what you want

simple silo
#

ohh I see

#

omg why didn't I see that before

#

this is great

boreal seal
#

Idk I would just loop theuvplayers

#

Using a runnable

rough drift
#
BoundingBox area = new BoundingBox(loc1, loc2);

@EventHandler
public void on(PlayerMoveEvent ev) {
  if (!area.contains(ev.getFrom()) && area.contains(ev.getTo())) {
    // Entered
  }

  // do the same check backwards for left
}
rough drift
#

and it's much more unstable

boreal seal
#

Onplayermove event

eternal night
#

i'd also back the runnable approach

boreal seal
#

Is a really bad event to use

rough drift
#

not really

#

it's like what

boreal seal
#

It seems worse use a runnable

rough drift
#

8-10 integer operations

eternal night
#

a tick delay is barely the ping to your server

rain mason
#

how would I do something like this but in java? ```js
let finished = {}
something.on("event", (e) => {
finished[e.id] = e;
});

(async () => {
let ID = "abc";
console.log("Foo");
while (!finished[ID]) do { await wait(1); }
console.log("Bar: "+finished[ID].value);

delete finished[ID];
})();```
that isn't the best example but I'll try to explain it using words : I want my code to wait until a player chats something and then process their message.

rough drift
#

it's fine

rough drift
boreal seal
rough drift
#

Yes

#

it is

eternal night
#

no

boreal seal
#

Making a runnable ?

eternal night
#

lmao

boreal seal
#

It’s better

#

For sure

#

Then using move event

rough drift
#

don't loop unless you have no other choice

eternal night
#

what are you talking about 😂

boreal seal
rough drift
#

Well you gotta loop over all players

boreal seal
#

And then loop thru the online players

rough drift
#

and you gotta run the loop every X ticks

#

that's WAY more processing power than what you need

boreal seal
#

More easy

rain mason
eternal night
#

your move event fires often enough to make the runnable seem like 0

ashen quest
#

?paste

rough drift
#

check if the locations without yaw and pitch are the same

undone axleBOT
rough drift
#

fixed a bunch of calls

#

hell you can even check per blocks

ashen quest
rough drift
#

but like, do not

#

DO NOT

#

use runnables

boreal seal
#

Run a loop to near location let’s expand it by 40 blocks from border and if inside it loop every 20 ticks otherwise loop every 400 ticks

#

Performance

rough drift
#

I made that exact same mistake myself

tender shard
gray merlin
#

Question

rough drift
tender shard
gray merlin
#

Is there a concept of "pluginid" like there is "modid" in forge?

rough drift
#

oh but runnables are faster than player move event

#

more performance

#

easier

#

but no

#

it's not

tardy delta
#

?

gray merlin
# tender shard ask

Was, my typing style is just stupid and I sent that without thinking, my bad.

gray merlin
boreal seal
#

Player move event is called everytime player moves

boreal seal
#

Really not necessarily

tender shard
rough drift
#

Is it necessary to loop over all the players then?

rough drift
#

also, you can just check if the player just rotated their head

dusk flicker
#

But plugins can have the same name which is not so simple lol

rough drift
#

they can't

#

A duplicate id will cause an error

dusk flicker
#

Well on one server it'd be only one

#

On like the resources section there could be more than one that has the same plugin yml name

rough drift
#

oh yeah

#

ofc

tender shard
rough drift
#

^

#

Apparently ppl in my disc

dusk flicker
#

lmao

boreal seal
#

It would be really easy

tender shard
rough drift
#

no like

tender shard
#

what did you expect lol

quaint mantle
rough drift
#

someone installed my plugin twice

#

lmao

tender shard
#

"LifeSteal" is not a proper name for a plugin

rough drift
#

learn how the server works

rough drift
boreal seal
#

Voodoo

rough drift
#

someone ran /pl and it listed twice

#

XD

tender shard
#

you should use your own plugin name

#

VoodooLifeSteal

boreal seal
#

Wanna run a server in my network

tender shard
#

or similar

boreal seal
#

I have a dedicated server

#

So it will be hosted for free

tender shard
rough drift
boreal seal
#

What

tender shard
rough drift
#

YEEE

boreal seal
#

This method doesn’t even exist in 1.8

rain mason
#

anyways reading about Future rn

rough drift
#

not like even my pc is most likely better

rain mason
#

thanks @rough drift

rough drift
rain mason
#

alr

tender shard
#

@boreal seal noone ever uses dedicated servers lol

rough drift
#

CompletableFuture<Object>

myFuture.get() will throw an exception if it runs out, but will wait until myFuture.complete(Object) is called

rough drift
boreal seal
#

No to hype

#

Lol

#

Not *

rough drift
#

tell me the specs @boreal seal

#

I am genuinely curious now

boreal seal
#

5700x 128ram

#

1gbps

carmine nacelle
#

Does anyone know if theres a packet that fires off when a bee chooses a new hive?

rough drift
#

not bad, not bad, way overkill but not bad

eternal night
#

bees are server side

boreal seal
#

In general I have only 1 game mode

eternal night
#

no packet will be sent

tender shard
#

I love my proxmox so much ❤️

boreal seal
#

And my server isn’t p2w no donations at all

rough drift
subtle folio
rough drift
#

Like spawn entity, remove entity

eternal night
#

I mean

rough drift
#

and beehive update

eternal night
#

the choice of choosing the beehive doesn't do anything

#

that is what they asked

rough drift
#

well ye

boreal seal
#

So I like to find some people who will like to host their unique game modes there

eternal night
#

yes obv when the bee enters the hive it is removed from the world

rough drift
#

close their connection

#

and market it as your own

#

nice

boreal seal
#

I either have 200 players base

quaint mantle
boreal seal
#

No not really

rough drift
#

Yes really

boreal seal
#

I’m not that kind of person

rough drift
#

I know people like you

boreal seal
#

Leave a back door

rough drift
#

You are that person

boreal seal
#

I’m ur plugin

rough drift
#

what

boreal seal
#

In ur plugin

#

A back door

rough drift
#

You're my plugin?

#

Nice

boreal seal
#

Nah iOS

#

Auto typo fix

#

0/

rough drift
#

bro you look like if GPT-3 got a heavy stroke

#

and malfunctioned

gray merlin
#

Does onLoad get fired when /reload is run?

subtle folio
#

LOL

rough drift
#

oh it does?!

subtle folio
#

only enable

boreal seal
gray merlin
#

Well now, conflicting answers! o.o

rough drift
tender shard
#

ofc it gets run

subtle folio
#

on load doesn’t get called iirc

rough drift
#

you want money, why use that server otherwise

boreal seal
#

My server is non p2w I don’t need money

rain mason
boreal seal
#

My only gain is expand community

#

Thanks god I have a job

rough drift
#

but .get throws InterruptedException iirc

boreal seal
#

To pay off my bills

rough drift
#

so you gotta catch that

rough drift
tardy delta
#

why get

quaint mantle
gray merlin
#

I don't quite understand what onEnable and onDisable do... could someone enlighten me there?

simple silo
#

Can I somehow check if a player is touching the world border?

rain mason
eternal night
simple silo
gray merlin
tender shard
#

it does get called

rough drift
rough drift
tender shard
#

onLoad DOES get called on every reload