#help-archived

1 messages Β· Page 205 of 1

quick arch
#

Don't think you can without turning on allow-flight πŸ€”

fair abyss
#

maybe check where spigot reads spigot.yml

#

that will help you

#

but you will need source code of spigot for this

#

build tools can help you

#

or maybe choco when he is online

unkempt ridge
#

I'm making a minigame and I'm wondering where is the best place to teleport a player back to their spawn if they die? I've tried PlayerDeathEvent and PlayerRespawnEvent and both do not work. The location exists because they are teleported once the game begins. In PlayerRespawnEvent I added System.out.println(); to verify the code is being reached and it is, however, the player is not teleported upon re-spawning.

fair abyss
#

first of all you dont know how events work

#

you can get world's spawnpoint and teleport there

frigid ember
#

PlayerRespawnEvent will do

fair abyss
#

and you can always set an option for spawnpoint

frigid ember
#

both will

fair abyss
#

you can change location by setLocation in that events

unkempt ridge
#

wdym I don't know events?? I created a location and I can teleport players there when the game begins. The problem is when they die I can't use player.teleport(location) again to bring them back to their spawn point.

frigid ember
#

u can

#

if you define the coords of the location

#

show ur event

unkempt ridge
#

?paste

tropic merlin
#

I'm getting a 403 error resolving my spigot-api dependency, is it a problem with the server or is it just me?

unkempt ridge
#

nvm I'll just go to the link manually

fair abyss
#

Event#setLocation

#

or Event#setSpawnLocation

#

dont sure which

#

PlayerRespawnEvent

frigid ember
#

setRespawnLocation

unkempt ridge
#

I'll try that now, but why doesn't teleport work?

fair abyss
#

ah i was sending right now 😦

frigid ember
#

:p

fair abyss
#

if they died

frigid ember
#

rubber

fair abyss
#

you cant teleport died one

#

actually you can

#

but they are dead

frigid ember
#

did you add @EventHandler

#

implements Listener

quick arch
#

You can respawn them

frigid ember
#

and registered the listener

quick arch
#

and then teleport

fair abyss
#

when you respawn they will teleport to default spawn point

#

so its not what you want

#

change spawn point of world for one time

#

or you can set respawnlocation in respawn event everytime...

unkempt ridge
#

@frigid ember yes as I stated in OP the event works I added println() statements and the code is reached the player.teleport() isn't working in that event. I'm going to try setRespawnLocation now.

#

I'm going to try it now give me a sec

frigid ember
#

System.out.println();

#

is for debugging

#

send ur event

fair abyss
#

note that debugging void method wont help you

frigid ember
#

yes

#

it'll only give you the information about ur variables

fair abyss
#

actually you should write yes

#

but nvm

frigid ember
#

lol xd

#

happy? :p

fair abyss
#

yes much

frigid ember
#

πŸ™‚

unkempt ridge
#

I know what System.out.println() is for I added it to see whether or not the player.teleport(location) was being reached or not.. setRespawnLocation worked it was just the fact you can't teleport them on respawn.

frigid ember
#

just send ur event

#

than we'll tell you what you did wrong

#

πŸ™‚

ionic hound
#

does anyone know a plugin to sync the spigot console to the bungee console

fair abyss
#

"syncing console"

#

why you need that

frigid ember
#

setRespawnLocation worked so it works? @unkempt ridge

fair abyss
#

i didnt understand is it worked but looks like he has a problem

#

but he probably dont knows how to tell

#

when he sends we will got it

frigid ember
#

yes but he isnt sending it

#

thats the thing

#

hes just saying idk how to do this and trying this when not learning java/spigot

fair abyss
#

its her problem πŸ™‚

ionic hound
#

@fair abyss because i need a command to run on a spigot server that runs a command on a bungee server

wraith moth
#

the BlockExplodeEvent isn't working for me

fair abyss
#

@wraith moth you can alvays entity explod event

#

or similar event not sure

wraith moth
#
@EventHandler
    public void onBlockExploded(BlockExplodeEvent bee)  {
        System.out.println(bee.getBlock());
    }
fair abyss
#

so you dont need syncing ? @ionic hound

frigid ember
#

looked through the docs @wraith moth ?

fair abyss
#

i looked no info for tnt

wraith moth
#

what about the docs?

frigid ember
wraith moth
#

yea?

fair abyss
#

entityexplodeevent will work for sure

ionic hound
#

@fair abyss i just need a command to run a command on bungee from a spigot server

unkempt ridge
#

yes it worked, and I don't need you telling me "I'm not trying to learn java/spigot" @frigid ember all I was asking is why the teleport method wasn't working in RespawnEvent which is a valid question.

frigid ember
#

all you need

#

πŸ˜‰

wraith moth
#

?

#

ofc I read the docs

fair abyss
#

@ionic hound this means you dont need sync πŸ™‚

ionic hound
#

yes

frigid ember
#

And I answered @unkempt ridge

#

and then you answered with all vague sentences

ionic hound
#

i just need to run a commad in spigot and it runs a command on bungee

frigid ember
#

but great, it works

fair abyss
#

fuck you just answered same πŸ™‚

#

i was developed a plugin for that

#

but you can code your own

#

it should really simple

#

or check spigot for this

wraith moth
#

so is the blockexplode event broken?

fair abyss
#

dont think so

#

actually tnt isnt exploding

ionic hound
#

i donot know java or spigot @fair abyss

wraith moth
#

BlockPlacing works

fair abyss
#

it just turns into entity

wraith moth
#

ahhhh

fair abyss
#

and entity is exploding

wraith moth
#

thanks for clearing that up @fair abyss

fair abyss
#

so its entity explode event

frigid ember
#

Stoozy

#

did ur method return tnt

#

when exploding it?

wraith moth
#

no

frigid ember
#

did it print tnt in console?

wraith moth
#

didn't log anything

fair abyss
#

@ionic hound i will check google for that

#

@frigid ember like i said its some interesting πŸ˜„

#

i was had this "issue" when I started to coding

ionic hound
#

i have tried command sync but it does not work

fair abyss
#

cus "Last Update:Dec 18, 2013"

#

it will abs wont work for sure

#

i can code for you it will be really ez

#

but its 3:34 am here

#

the sun will rise in 2 hours

#

soo its bad time for you πŸ™‚

ionic hound
#

you would code a plugin for me

fair abyss
#

yes its simple plugin

#

and looks like theres no working plugin for this

ionic hound
#

that i could run a command on a spigot server and it would run it on the bungee?

fair abyss
#

yep

ionic hound
#

Thankyou so mouch

fair abyss
#

a simple bungee plugin will help you
so you wont need to install the plugin to all servers

frigid ember
#

@wraith moth the event is just trash

#

it doesnt print anthing when tnt explodes

#

the event doesnt even fire

ionic hound
#

@fair abyss can we move to a pm ?

fair abyss
#

cus tnt exploding isn't a block explosing

#

@ionic hound i can code it when I back home;
i mean when the sun rise i weak up go work back home later than

frigid ember
#

shouldnt matter kingOf0?

#

something explodes

#

should print 1

        System.out.println("1");```
fair abyss
#

something should be block

#

not anything

frigid ember
#

yes

#

but when tnt explodes something explodes

#

and the event doesnt seem to know something is exploding

fair abyss
#

"BlockExplodeEvent only fires when the explosion has an unknown source.
If the source is known like when a player explodes a TNT, an EntityExplodeEvent is fired."

#

val59000

#

2015

#

simple google

ionic hound
#

i just need to run a command through the concle on a spigot server then it runs the command on the bungee

fair abyss
#

yes i got it

#

its 5 line plugin

frigid ember
#

kingOf0?

#

do you know how to make an entity invisible

fair abyss
#

yes?

frigid ember
#

a boat

ionic hound
#

so wont i need a plugin on the spigot server to ?

fair abyss
#

nope

#

just bungee

frigid ember
#

which people still have to be able to use

#

could you tell me pls

#

cuz im struggling with that

fair abyss
#

i can add permission

#

or check your name

ionic hound
#

wate how will a spigot server run it then?

tender quarry
#

Running commands from the Spigot server console will not execute on a bungee server / bungee plugin.

fair abyss
#

yes but if you register a command for that in bungee

tender quarry
#

Nope

fair abyss
#

and it can run in bungee console

frigid ember
#

does any1 knows how to make boats invisible when they still have to be able to be used

fair abyss
#

why?

tender quarry
#

If you run a bungeecord registered command in the Spigot console (as he is saying) it will not execute at all.

fair abyss
#

i know that bungee commands are not real command and not work same as spigot commands but it should work from console or player

tender quarry
#

Player is irrelevant

frigid ember
#

hello, I am the owner of the server that needs the plugin. I had my admin @ionic hound ask, is anyone able to bring it into a group dm?

tender quarry
#

Executing a command that is registered in bungeecord from a Spigot console will not execute the command code at all.

wraith moth
#

how can I check if a block is a glassblock?

fair abyss
#

@tender quarry hey dude

tender quarry
#

if(block.getType() == Material.GLASS_BLOCK)

balmy sentinel
#

just ask your question here @frigid ember

frigid ember
#

does any1 knows how to make boats invisible when they still have to be able to be used

fair abyss
#

are you crazy

tender quarry
#

Nah

fair abyss
#

nothing will be happen if you dont write anything

tender quarry
#

That's not how proxies work

fair abyss
#

i think evetyone knows that

tender quarry
#

The proxy intercepts commands from a player which does not relate at all to the console

#

That's not his question. You are relating something that is not relevant to his question.

fair abyss
#

so it just means i just have to send the command package to bungee directly from a spigot server

#

not a big deal

tender quarry
#

You would need a plugin

#

With a database / redis

wraith moth
#

@tender quarry if it was that simple I think I would've found it

fair abyss
#

or just with plugin messaging

wraith moth
#

there is no such material "GLASS_BLOCK"

tender quarry
#

Not if there are no players online

fair abyss
#

meh

tender quarry
#

Try GLASS?

fair abyss
#

i think he wont use when no knows online

wraith moth
#

there is only BUILDABLE_GLASS whatever the fuck that means

tender quarry
#

It might only be me, but I like to develop systems that work all the time. Not just in certain circumstances.

fair abyss
#

@ionic hound

wraith moth
#

the codebase of bukkit is getting me frustrated

ionic hound
#

what

fair abyss
#

will you use it when anybode is online

ionic hound
#

no

tender quarry
#

Yes

fair abyss
#

its just for one person

#

not a public plugin

tender quarry
#

Depends on the situation dude

fair abyss
#

just for solving own poroblem

#

its always better than nothing

ionic hound
#

no it is just for my server

tender quarry
#

I am providing the most efficient and correct way to do something. If he choses to use your way because it meets your lower standards, good for him; go for it.

fair abyss
#

using redis will make it like another plugin

#

im not here to give extremly best plugins

ionic hound
#

just use my sql

fair abyss
#

and plugin messaging isnt the trashest way

ionic hound
#

my server host does not have redis

wraith moth
#

why is GLASS not a material type?

#

when I log the block.getType() on the explode event it prints GLASS but there is no such thing as Material.GLASS

fair abyss
#

if i was writing a paid plugin and my customer wanted the best, i will write the best.
but in this situtation am just trying to solve his problem for free

wraith moth
#

is bukkit still in progress?

tender quarry
#

So....my opinion that I gave was not free? DM for my paypal

fair abyss
#

i not mean that

ionic hound
#

@fair abyss I just need it to work

fair abyss
#

i dont like too "just need to work" idea

ionic hound
#

i understand

fair abyss
#

but using redis will make it like another plugin

#

and wont simple like this

ionic hound
#

can't you just use my sql

#

my server host says that redis is not supported

fair abyss
#

what was your version?

ionic hound
#

1.15.2

fair abyss
#

looks like its for 1.13

ionic hound
#

let me try it

fair abyss
#

i dont know exact what changed in messaging api but it should work in 1.15

#

note that it wont work when no one is online

ionic hound
#

that is fine

frigid ember
#

will it work if the console sends the command?

wraith moth
#

is there a bukkit server?

#

I want to talk to the devs

ionic hound
#

@fair abyss it does not work

fair abyss
#

so you will have to wait me like 18 hours

#

maybe i can forgot to came here

#

tag me 18 hours later

#

@wraith moth just look for bukkit servers on google

green cedar
#

What API event is triggered when an arrow hits TNT block?

#

i tried EntityInteractEvent but that doesn't trigger on TNT

agile girder
#

Anyone here knows about Ubuntu, dpkg? phpmyadmin? installing packages? im having some issues

tender quarry
#

sudo apt get install

agile girder
#

I know

#

but

#

Im having more issues

#

Im getting this big error message after trying to install mysql-server

fair abyss
#

@green cedar arrow land event

#

and it will trigger if arrow even not set in fire

green cedar
#

There is no arrow land event. Troll? Looks like maybe EntityChangeBlockEvent would work. Im going to test it.

tough kraken
#

is there a way to get the old 1.14 trading-system in 1.16 back?

subtle blade
#

Oh just read above about arrows hitting TNT

#

It is EntityChangeBlockEvent

green cedar
#

Okay, back to testing that one.

subtle blade
#

Thought you just wanted the arrow hitting the ground. Yeah, the entity change one will work. I'm looking at the call lol

#

Worth noting that's just for flaming arrows, right?

#

Else, yes, you would have to listen for a ProjectileHitEvent and ignite it yourself as non-lit arrows do not ignite them and will not call that event

wraith moth
#

@fair abyss I found the repo, its all good.

subtle blade
#

The Bukkit team is no more

#

Spigot maintains Bukkit and CraftBukkit. You're here lol

#

md_5 is the maintainer, I'm a frequent contributor. If you want to ask questions, you're welcome to

ionic hound
#

does any one have a plugin that sends players to a server based on permision. I want to have a donar only lobby

quick arch
#

From the same person I mentioned a couple days ago to you 😐

craggy jolt
#

Does anyone know how to inflict a potion effect on a player once he is attacked by a certain entity?

subtle blade
#

EntityDamageByEntityEvent, check damaged and damager type accordingly, LivingEntity#addPotionEffect()

craggy jolt
#

if (event.getEntityType() == EntityType.SPIDER) {

        Spider spider = (Spider) event.getEntity();
        Player player = (Player) event.getEntity();
    
        if (event.getEntity() instanceof Player) {
        if (event.getDamager() instanceof Spider) {
        
        player.addPotionEffect(new PotionEffect(PotionEffectType.POISON, Integer.MAX_VALUE, 3));
#

this is what I have

#

Im pretty sure I set everything correctly but it is not working

#

public void EntityDamage(EntityDamageByEntityEvent event) {

#

This was above the if statement

ionic hound
#

does any one have a plugin that sends players to a server based on permision. I want to have a donar only lobby

green cedar
#

PeterYeet, you are casting to player before checking if its instanceof player.

#

Your whole code logic needs fixing. You are casting the same .getEntity() to both spider and player.

#

@craggy jolt

craggy jolt
#

I tried checking the instance of the player before casting but that still did not work

#

What should I do instead?

quick arch
#

Instances should be before casting

bronze acorn
#

so im getting this error that an event has to be called synchronously

#

it's a custom event

quick arch
#

Is it an async custom event

#

or atleast trying to be one

bronze acorn
#

it's uh

#

being called in a netty thing

quick arch
#

o

bronze acorn
#

yeah

quick arch
#

super(true); to make it async

bronze acorn
#

ooh

#

wait hold on it would be false right?

quick arch
#

it's false by default

bronze acorn
#

figured it out

#

xD

#

thanky ou

#

❀️

green cedar
wraith moth
#

@subtle blade thank you for clearing things up

#

I wanna contribute

craggy jolt
#

Thank you so much @green cedar it work phenomenally! I greatly appreciate your help dude!

sharp crystal
#

Where can I get support for general server issues?

solid sundial
#

what do you need help with?

#

?

wheat mirage
#

Two questions:

  • What made world#regenerateChunk not possible anymore?
  • Is there any way to copy a block exactly along with it state etc?
strong lantern
#

I need help running a spigot server

#

I can't get the file

#

idk how to get buildtools

zinc atlas
#

for what version do u need a spigot.jar file for??

strong lantern
#

1.8.8

zinc atlas
#

Oh hun u dont need build tools.

#

ill send the link 1 moment

#

@strong lantern

strong lantern
#

yes?

zinc atlas
#

Damnit im a need to dm u it

strong lantern
#

ok......

frigid ember
#

anyone know an entity control plugin

azure osprey
#

no.

wraith moth
#

Anyone know how to stop a ExplodeEvent from breaking a block?

#

Does removing the block from the blockList do it?

wheat mirage
#

yes

high mantle
#

Documentation is neat

#

And reading the question fully before answer is also neat

#

Jesus Christ hold up

#

Actually no that might work

wheat mirage
#

Why is RecipeChoice.ExactChoice deprecated?

#

I'm not sure what draft APImeans

frigid ember
#

got the same question

little dock
#

How would I play a sound? I've been trying for so long and just can't figure it out. :/

open ibex
#

World and Player should have sound methods

#

Don't know the exact name though, probably playSound or something

little dock
#

Player.playSound(Player.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1F, 0F);
Like that?

open ibex
#

Probably

#

Keep in mind pitch goes from 0.5-2

#

Don't know which argument there is pitch though

little dock
#

Okay, cool.

#

I think it's the 2nd

open ibex
#

Oh wait playSound is static?

little dock
#

Lol

open ibex
#

Yeah you need to use your player variable instead, not the Player class

little dock
#

Okay, cool.

#

Cannot resolve symbol 'player'

#

Nvm, I figured out why

#

Thanks.

open ibex
#

Alright you're welcome

frigid ember
#

Is it just me or is there no way for me to ignite a TNT Minecart from the API? πŸ€”

void jackal
#

does anyone know of a plugin that can set players health per world?

frigid ember
frigid ember
#

Hey i need my plugin deleated how can i deleate it.

high mantle
#

by deleting system 32

vernal spruce
#

Report it and ask for deletion

high mantle
#

ez fix

quick arch
#

@wheat mirage @frigid ember
Draft API means the method can change in the future

#

It’s apparently only implemented for Shaped Recipes

high mantle
#

by deleting system 32
@high mantle

just in case anyone is somehow whooshed, this is a joke. please don't.

vernal spruce
#

You can always delete the message

high mantle
#

that is indeed true

#

but also

#

it is funny

vernal spruce
#

And yes there are people who might do it

high mantle
#

that is why i put the notice

#

and if you do that still

#

then it is no longer my problem

vernal spruce
#

You still were the guy who said itmd_5

high mantle
#

so im in control of people's actions?

vernal spruce
#

You give th bad practices

high mantle
#

typo?

wheat mirage
#

@quick arch Any idea why Recipe choice can't be implemented by plugins?

vernal spruce
#

Got a javadoc for it?

quick arch
#

The server would blow up according to Choco

vernal spruce
#

Ahh yes you need to use the precraftingevent rather than recipechoice

sage summit
#

i keep getting this when i run my commandhttps://hastebin.com/utokalifin.bash

dusky sigil
#

What does @NotNull mean?

#

its like

#

3000 errors

#

in all one hell of a package

#

sometimes i dont understand how the thing gets to my code

sage summit
#

i have no idea

buoyant path
#

@NotNull means you cannot provide a null argument

#

or it will show up as an error

#

newer versions of minecraft may have implemented this im not sure

dusky sigil
#

why does it cause so many errors though?

buoyant path
#

it also cannot be potentially null

dusky sigil
#

and how tf did it get there

buoyant path
#

it has to be 100% not null

#

no way to be null

#

newer versions of minecraft may have implemented this im not sure
@buoyant path

dusky sigil
#

huh okay

buoyant path
#

either that or you use a fork

#

of spigot

#

that has it

dusky sigil
#

fork?

buoyant path
#

basically altered version of spigot to enhance performance and allow for easier development

dusky sigil
#

Huh

buoyant path
#

you probably arent but they are good to think about

#

your compiler will assess if it could be potenitally null

#

and if so

#

it will cause an error

dusky sigil
#

isnt spigot a bukkit fork?

buoyant path
#

essentially I guess?

dusky sigil
#

yeah, it changes a lot

buoyant path
#

but spigot still isnt the best out there, obviously its good, but the devs here have a large amount of work, so there are other nonrelated devs who spend time on enhancing it

dusky sigil
#

fork of a fork

#

its a forkception!

buoyant path
#

lol

sage summit
dusky sigil
#

Vectors!

#

im hiding

buoyant path
#

well you werent meant to use it in that class

#

have you looked at BukkitAdapters documentation?

#

also those naming conventions 🀒

#

PrisonMines should be the name

#

and you should ideally move the command to another class

#

but that is not related to the issue

#

it will help in the future though

sage summit
#

I was just doing it like that to get the basic code for it

#

sure

buoyant path
#

is inventory#equals reliable ?

#

I want to check that in the inventoryclickevent

#

but Idk if it works

sage summit
#

like what?

buoyant path
#

actually it will not

#

because inventories have no form of unique identifier

#

so if they had the same contents

#

it would confuse them as the same

sage summit
#

idk

#

upload it as a new one maybe

#

ok
@frigid ember then send the link when you have done it

idle zodiac
#

Is there a simple way to do a levelling system? I tried using mysql but it seems very clunky. I need the level to be accessed from multiple plugins.

#

Aha

#

Ok, I'll just use the xp bar and see if that works

craggy spade
#

What do you mean by a levelling system?

idle zodiac
#

It's ok

#

I've figured it out

craggy spade
#

Nice

left plover
#

how do I make constructors of instances with unlimited args of the same type? like my reflection supports only 2 different args when the second one is supposed to be an unlimited array (im not wording this well)

What I'm doing:
Object packetPlayOutPlayerInfo = getClassNMS("PacketPlayOutPlayerInfo").getConstructor(getClassNMS("PacketPlayOutPlayerInfo").getDeclaredClasses()[2], getClassNMS("EntityPlayer");

what it needs to support
public PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction var1, EntityPlayer... var2)

#

getClassNMS just returns a Class<?> object

bold anchor
#

It’s an array internally

left plover
#

how do I make an array out of a Class<?> tho?

tiny dagger
#

well you get the object

#

and cast it to an array

left plover
#

ah, I must use my fivehead yes

bold anchor
#

Could ehm Array.newInstance(entityPlayerClass,0).getClass()

#

Probably

#

Oh wait i’m dumb

#

No wait no

#

Wait yes

#

No

left plover
#

O_O

bold anchor
#

Sigh whatever

#

How many constructors does that class have?

left plover
#

which class? the packet?

#

cause it also takes an Iterable<EntityPlayer> instead of an array

#

thats its other constructor

bold anchor
#

Show me the class

left plover
#

sorry my internet is about to go, could you give me 5 mins? sorry

bold anchor
#

Yeah, okay so this works fine Array.newInstance(Class.forName("me.jantuck.AClass"),0).getClass() Yeah, okay so this works fine Array.newInstance(getMNMSClass(β€œEntityPlayer”, 0).getClass()

left plover
#

stupid internet, I tried it and I'm getting this java.lang.ClassCastException: [Lnet.minecraft.server.v1_8_R3.EntityPlayer; incompatible with java.lang.reflect.Array

sterile viper
left plover
#

@bold anchor

tiny dagger
#

well then that's just a player

#

not an array

#

unless

#

wait

#

that's array

#

is different

left plover
#

?

tiny dagger
#

you need to cast to Object[]

sterile viper
#

I have an issue where the player keeps the crate key after using it and I'm trying to figure out how to make it disappear after use

tiny dagger
#

or i dunno

#

EntityPlayer[]

left plover
#

I'm using reflection. I can't do that

tiny dagger
#

okie

#

good luck then

#

ohh

#

getObject

#

you don't need to look into the array do you?

left plover
#

I'm trying to access the first constructor using reflection on this packet

bold anchor
#

You didn’t do ut coorectly wtf macho

left plover
#

wdym?

bold anchor
#

Replace getNMSClass(β€œEntityPlayer”) with

#

Yeah, okay so this works fine Array.newInstance(getNMSClass(β€œEntityPlayer”),0).getClass()

left plover
#

thats what I did?

bold anchor
#

Clearly not

#

Show me your line after

frigid ember
#

Someone copy my plugin and upload it to spigot

#

staff help me please.

bold anchor
#

Report it abhiram

frigid ember
#

i did

#

noting happned

bold anchor
#

Then wait

left plover
#
Object handle = player.getClass().getMethod("getHandle").invoke(player).toString();
//PacketPlayOutPlayerInfo info = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, (EntityPlayer) ((CraftPlayer) player).getHandle());
Array players = (Array) Array.newInstance(getClassNMS("EntityPlayer"),0);
Array.set(players, 0, handle);
Object packetPlayOutPlayerInfo = .getClassNMS("PacketPlayOutPlayerInfo").getConstructor(getClassNMS("PacketPlayOutPlayerInfo").getDeclaredClasses()[2], players.getClass()).newInstance(packetEnum, players);
bold anchor
#

Don’t cast it to an array

left plover
#

how do I set values to it then?

bold anchor
#

You don’t set the values og that areay

#

Or well you do

#

But you need to pass it without changing the type

left plover
#

I'm confused, wouldn't I just be sending an empty array then?

bold anchor
#

Omg, if you don’t have the required knowledge to use reflection don’t. Go use protocollib

left plover
#

alright I'll just have another look on google, thanks for the help ig

bold anchor
#

Don’t cast it, refer to it as an β€œObject”

sturdy oar
#

abhiram did they upload your same JAR, or they "copied it"?

#

because if they just used your ideas, that's.. not illegal

bold anchor
#

So, remove the cast and make it an object and it should be good @left plover

left plover
#

oh, I'll try it, thanks

bold anchor
#

Hou probably want to set the 0 to a 1 if you are adding something to the areay

sage summit
left plover
#

ye

sturdy oar
#

people already helped you there @sage summit

sage summit
#

Oops wrong link

#

Also I think i just figured it out

left plover
#

thank you ❀️ @bold anchor

bold anchor
#

Smh

left plover
#

okAy plS I've only just started trying reflection and since have only had experience with invoking and instantiating new methods ;-;

bold anchor
#

Don’t use it then

left plover
#

ive got to start somewhere

thin musk
#

The instructions for getting Spigot makes no sense

#

Git is a prerequisite, but:

The very latest versions of BuildTools will automatically download and install Git for you. Only grab it manually if you are having troubles!

#

Except one of the very first instructions is:

Open your terminal if you are on Linux, or git bash on Windows.

#

I need the thing to run the thing that gets me the thing to run itself. I- Uh- What?

sinful spire
#

just open it with the normal windows terminal

left turtle
#

hi

#

i need some help

opal crest
#

Hi :o)

left turtle
#

i think this is either perms or ess

#

when i try and break something it says im not permitted to interact with block

opal crest
#

Do you use a permissions plugin?

left turtle
#

just ess

#

essentialsxantibuild

#

shall i delete that

opal crest
#

Yes!

#

If you need or want it you will need to add a premissions plugin to allow building/block interaction

left turtle
#

ill test this fix first

#

its fixed, thanks for the help ❀️

opal crest
#

Well.. 'fix' would be subjective! :o)

static geyser
#

hey, i'm french, and my english is bad, can i have a french assistant ? please

potent narwhal
#

Hello, πŸ™‚ i installed Luckperm and created a group. Next i gave the group the permissions with lp group user permission set permission murdermystery.join.* true. But when i try to connect in murder the error message shows up " you dont have permissions murdermysterie.join.*

pastel arrow
#

Attempting to retrieve all files including sub folders files and such...

List<File> accessibleFiles = new ArrayList<>();
for(File f : c.parent.listFiles()) {
    if(f.isDirectory()) {
        accessibleFiles.addAll(Arrays.asList(f.listFiles()));
    }else {
        accessibleFiles.add(f);
    }
}
```But if there were multiple directory files inside the file would this still add them?

Ex;
`path/to/file/Main` - Contains 2 folders and 1 file
`path/to/file/Main/Folder1` - Contains 1 folder and 5 files | `path/to/file/Main/Folder1/Sub` - Contains 1 file
`path/to/file/Main/Folder2` - Contains 2 files
grim halo
#

You need recursion for that.

pastel arrow
#

Yeah was hoping I didn't.

grim halo
#

But i think apache commons has a method for that. Let me check if its shaded into spigot

pastel arrow
#

I always fuck something up with that lol

grim halo
#

Didnt find it... But i just wrote this (should work):

  public List<File> getAllFiles(File mainFolder) {
    if (!mainFolder.isDirectory()) {
      throw new IllegalArgumentException("File has to be a folder.");
    }
    List<File> fileList = new ArrayList<>();

    for (File subFile : mainFolder.listFiles()) {
      if (subFile.isDirectory()) {
        fileList.addAll(getAllFiles(subFile));
      } else {
        fileList.add(subFile);
      }
    }

    return fileList;
  }
idle zodiac
#

is there any way to compile a maven project to another directory

#

i really wanna build it to the plugins folder

grim halo
#

@idle zodiac Yes

idle zodiac
#

how do i do it?

pastel arrow
#

Didnt find it... But i just wrote this (should work):
Was already writing out a new method. Thank you.

grim halo
#
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <version>2.3.1</version>
      <configuration>
        <outputDirectory>/my/path</outputDirectory>
      </configuration>
    </plugin>
  </plugins>
</build>

One example. Maven jar plugin

idle zodiac
#

thanks!

patent monolith
#

Will the client ever send it's IP address to the server through it's connection like http?

grim halo
#

Yes you see the clients ip for the first time in the AsyncPlayerPreLoginEvent (if you dont use bungeecord)

patent monolith
#

Will the client ever send it's IP address to the server via packets?

fair abyss
#

yes, theres no other way to send

grim halo
#

Do you want it per mail?

patent monolith
#

@grim halo yes. I want the USPS involved

#

So if I made a proxy server out in the cloud, the server still know the original IP

#

mcserver

spark phoenix
#

Anyone got any idea why I stop receiving packets in my client? It happens only in my server, I don't know where to dig to fix that

#

I connect, play for a minute or so, and my client just stops receiving packets from the server, I can't see any update in my game, but if I do type, for example, it appears in my server console

#

till it exceeds the time out time and disconnects me

patent monolith
#

Any plugins?

spark phoenix
#

well yeah, around 40 plugins

grim halo
#

@patent monolith If the client uses a proxy then the server wont know the original ip of that client. That is kind of why proxys exist.

patent monolith
#

what version of bukkit

spark phoenix
#

I just swapped to paper-114 to try out the anti X-Ray, but happened with spigot as well

patent monolith
#

@grim halo so the original IP is not sent through packet data?

#

@spark phoenix did this start happening after you installed a plugin?

spark phoenix
#

Hmm, kinda

patent monolith
#

@spark phoenix which plugin?

spark phoenix
#

I can only think about StackMob

grim halo
#

@patent monolith If the client uses a proxy then the server only sees that proxy ip... There would be no point in using a proxy if you could just get hold of the original ip

spark phoenix
#

and SimpleAdvertising but I doubt it's related to a message-sender plugin

patent monolith
#

@spark phoenix try temporarily removing them anywya

#

anyway*

#

And then test

#

@grim halo will the client send the server's IP through the packet data?

grim halo
#

there is no point in the client sending the server its own ip...

#

But the server will (in the handshake) send its own ip to the client

patent monolith
#

Well just in case, because I remember playing with http once and it sent the server address in the headers

left turtle
#

is there a way to stop ops from having a red name?

patent monolith
#

So I didnt know if mc did the same

grim halo
#

@left turtle Yes if you disable it in the plugin that causes this. Admins dont have anything by default,

left turtle
#

is it ess plugin?

patent monolith
#

@left turtle try that

left turtle
#

thanks

fossil thorn
#

Error:java: Compilation failed: internal java compiler error

#

how can i fix this error

patent monolith
#

@fossil thorn intellij?

frigid ember
#

These software names XD
Paper
Bukkit
Spigot
Sponge
CubeMelon

Whats next raspberry?

nimble sparrow
#

Hi so I have a custom mob that I want to spawn on a specific location, using a runnable. This is the code so far:

WorldServer world = ((CraftWorld) Bukkit.getWorld("world")).getHandle();
Location loc = new Location((World) world, 5.0D, 66.0D, 153.0D);
CustomZombie zombie = new CustomZombie(loc); // 5.0D, 66.0D, 153.0D

Bukkit.getScheduler().runTaskTimer(Main.getPlugin(Main.class), () -> {
  System.out.println("Got here");
  world.addEntity(zombie);
}, 100, 20);

Now what's happening, is that I get an error on the Location loc line. I perfectly know why, I just don't know how I could convert the WorldServer world to a normal world so I can make a location off of it. Can someone help me?

bold anchor
#

Don’t do that

frigid ember
#

world.SpawnEntity(loc, zombie)

#

Yeah u need to install Rasberry script do u know Pyhton?

#

*Python

bold anchor
#

He is casting something he shouldnt

nimble sparrow
#

Yea that was a quick fix from the IDE.

frigid ember
#

Use raspberry its fast and efficient

#

And tasty

nimble sparrow
#

@frigid ember I can't get the location therefore I can't do world.SpawnEntity.

balmy sentinel
#

@frigid ember please stay on topic. If you’re not asking or helping someone take it to #general

grim halo
#

@frigid ember What are you even talking about? Do you have a question?

frigid ember
#

You spawn it on a specific location

#

So why can't you?

#

If you know the specific location you can

nimble sparrow
#

Cause getting a location requires a World not a WorldServer

frigid ember
#

@grim halo Nothing its just these software names XD

Oh you'll want Bukkit or Spigot for that

Oh yeah install FoRgE MoDS

I prefer CubeMelon Myself

You should use Buycraft if ur planning on hosting with Apex or Sponge

Whatever you do dont use Paper

What's next, raspberry?

balmy sentinel
#

that’s has nothing to do with spigot development therefore it’s off topic.

frigid ember
#

Yes I know its just hilarious

grim halo
#

I dont rly get the point. Do you want to name them "program_01", "program_02" etc?
In web dev its the same. Ther is Vue, React, Atom, Spring... etc.

frigid ember
#

Hmmhhh which sounds more comprehendable to the programming community, ScriptForm1 or ScriptForm2, nah u know what...

Just call them Ruby and Python cuz that makes sense

Me:.......,

digital ledge
#

any1 runs anarchy servers?

balmy sentinel
#

?ask

worldly heathBOT
#

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.

crimson sandal
#

When saving a String in a YamlConfiguration it doesn't escape apostrophes so when they get read back in they disappear

frigid ember
#

If I want a command for my good quality Minigame server lobby and the command is to kill all entities (including players and npcs) forever with no tick delay how would I write that

digital ledge
#

i need free plugin for 32k enchanted swords? so that id you place shulker with them or you have them in your hotbar they revert. But you can bypass it with dispesners or hoppers

balmy sentinel
#

loop through all entities on the server and kill them @frigid ember

frigid ember
#

What server software is good for 1.16, I'm talking runs fast, is efficient, supports all the plugins I need, cheap?

balmy sentinel
#

@crimson sandal I’m not sure if it’s the most efficient way, but you could just use a different symbol and when it’s sent to the player replace that symbol with an apostrophe.

#

@frigid ember that’s a completely opinionated question check the forums. No matter who you ask you’ll get a different response.

digital ledge
#

nice help lol

balmy sentinel
#

@digital ledge I can’t help you because I don’t know of a plugin it’s not that I was ignoring you I only answer questions I can answer. Your best bet is to search under resources on the forums.

digital ledge
#

ok

wheat mirage
#

Does paper have an implementation of world#regenerateChunk()

grim halo
#

world#regenerateChunk() should not be used anymore. There are so many bugs with trees and structures etc

#

@wheat mirage Maybe there is a xy problem?

#

?xy

worldly heathBOT
grim halo
#

So why do you want to regenerate chunks?

wheat mirage
#

To regenerate the map from griefing periodically

#

And yeah, I've thought about other options

#

Loading a mimic world is an option

#

WorldEdit does it that way

#

But given how fucking atrocious spigot chunk loading is

#

Think I'll pass

#

I hear paper has re-implemented async chunk loading

#

To some decent extent

#

May be worth looking there I feel

#

I want to use vanilla spigot, but it just isn't viable for serious server distributions it seems

grim halo
#

I dont think this will help as you cant load a world async

wheat mirage
#

Are worlds multi threaded?

#

Seems like an ideal spot for it

grim halo
#

wdym by that?

#

Like in: "Does every world have its own thread" or "can worlds be loaded async"

#

But either way the answer is no. The only important part of the game that is async is chunk loading on paper

#

@wheat mirage There is a plugin that lets you roll back certain worlds or actions from certain ppl. Its called CoreProtect

wheat mirage
#

Resource Hog

#

Configurable, but still

#

I'd rather implement the worldedit solution

#

And save the bloat

grim halo
#

Last time i used CoreProtect it was pretty decent.

#

Was like 3 or 4 years ago but still.

left turtle
#

is anyone here familiar with the Custom Crafting Recipes plugin?

craggy jolt
#

Does anyone know how to make a mob shoot fireballs at a player every few seconds?

#

I know you have to get the mob location and the player location and spawn the fire ball where the mob is

golden geyser
#

I am currently trying to set a player's spawn when they step on a block. However, I can't find an extension of player that would set his spawn location. I see "setBedSpawnLocation" but I'm assuming that wouldn't work...

craggy jolt
#

but what is the event for spawning the fireball and what would the order of the code be like

golden geyser
#

And I'm also not trying to set the world spawn location, rather just the player's.

silver sky
#

Does anyone know, in bukkit.yml, which settings for the mob spawn rate holds the guardians and which the fish?

water-animals: 3
water-ambient: 5

i suppose water-ambient is for guardians etc and water-animals are fish?

#

its just players are running guardian farms and it causes quite a tps loss

#

want to lower these

ripe token
#

how i skript command /unbreak
and i do /unbreak wooden_pickaxe is give me unbreak wooden pickaxe how i do that?

steep smelt
#

My terminal says error after I do the chmod a+x build.command

#

line 1: {rtf1ansiansicpg1252cocoartf2513: command not found
line 2: syntax error near unexpected token }' line 2: \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fmodern\fcharset0 CourierNewPSMT;}'
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

frigid ember
#

does some1 know a way to do this:```java
Entity vehicle = world.spawnEntity(entloc, EntityType.BOAT);
((CraftBoat) vehicle).getHandle().setInvisible(true);

this one doesnt work...
#

any1? ive been struggling for a long time with this

balmy sentinel
#

@ripe token I don’t know scripting but I’m sure they’re are more than enough tutorials you could fine online to create and listen for when a player executes the command and when the do spawn an unbreakable pickaxe in their inventory

grim halo
#

@frigid ember Extend EntityBoat and make a custom boat that is invisible

frigid ember
#

There is no default constructor available in 'net.minecraft.server.v1_16_R1.EntityBoat'

#
public class Driving extends EntityBoat implements Listener{```
balmy sentinel
#

@steep smelt are you on Windows?

frigid ember
#

@grim halo

lone hatch
#

is someone able to hop in vc and gimme a hand w/ my plugin?

steep smelt
#

@balmy sentinel no on macOS

balmy sentinel
#

mhmm the only thing I can think of is if chmod is different in zsh than in bash? All macs unless you didn’t update yours use zsh now instead of bash. I know nothing about zsh. Are you sure you copied the start.command correctly?

grim halo
#

@frigid ember You should not let your custom entity implement Listener.
Create a new class. Let it extend EntityBoat and implement the constructor that suits you.

frigid ember
#

it just has to be a regular boat

#

that is invisible

steep smelt
#

@balmy sentinel yea mine is in bash should I try to make it use zsh?

grim halo
#
public class CustomBoat extends EntityBoat {

  public CustomBoat(org.bukkit.Location location) {
    super(((CraftWorld) location.getWorld()).getHandle(), location.getX(), location.getY(), location.getZ());
    this.setInvisible(true);
  }

}

@frigid ember There you go. Thats a custom invisible boat using nms

frigid ember
#

love you

grim halo
#

Also. Have you tried giving it the invis potion effect?

balmy sentinel
#

@steep smelt that’s a personal preference I’ve been using bash for so long I don’t want to switch to zsh. Things I would check is if you copied the start.command right, and check if the account you’re on is an administrator. You can check if you have the file execute permissions by navigating to the directory of the start.command file and execute the command ls -la

frigid ember
#

cant be done to a regular boat

#

:/

#

thats LivingEntity

grim halo
#

Btw not quite sure how to spawn the boat...

lone hatch
#

@grim halo hey, are you able to gimme a hand w/ a problem im getting when trying to create a custom yml file when you get a free moment?

grim halo
#

Sure go ahead

lone hatch
#

are we able to jump in vc so i can stream my screen?

frigid ember
#
            Entity vehicle = world.spawnEntity(entloc, CustomBoat.CustomBoat);```
#

how would I call the boat xd, this way of calling it is not working :/

grim halo
#

Sure

#

@frigid ember That is not how you instantiate a class

severe garnet
#

Im wondering if anyone knows of a plugin like this that exists?
TP for players, but has a 5 second standstill cooldown, cannot tp while monsters are nearby, and links to vault economy (cost / tp) ?

frigid ember
#

essentialsx?

severe garnet
#

partically cannot tp while monsters are nearby is what im looking for

frigid ember
#

idk if it has the monsters are nearby thing

#

hm

severe garnet
#

would be cool if this existed somewhere!

#

if not I could just make the standstill longer I suppose to ensure nothing is attacking someone long enough to get away easy

frigid ember
#

maybe you can make it

severe garnet
#

id like to, no idea how to java yet 😿

frigid ember
#

@grim halo how would this be done in the new class

#
        this.setPosition(locx, locy, locz);``` I need to get these from my event in my other class
#
            double locx = e.getRightClicked().getLocation().getBlockX();
            double locy = e.getRightClicked().getLocation().getBlockY();
            double locz = e.getRightClicked().getLocation().getBlockZ();```
grim halo
#

@frigid ember The constructor i gave you takes Location

frigid ember
#

of what

#

which location?

grim halo
#

Of the custom boat class

frigid ember
#

but it needs to be placed at a certain location

grim halo
#

It takes an instance of org.bukkit.Location. The basic location you get everywhere

frigid ember
#
            Location entloc = e.getRightClicked().getLocation().add(0,1,0);

            Entity vehicle = world.spawnEntity(entloc, EntityType.BOAT);```
#

it needs to be placed at this location

#

EntityType.BOAT should be the custom boat

grim halo
#

Ok maybe this a xy problem. What do you want to do with the boat?

frigid ember
#

wait?

#

I havent tried it yet

#

does it replace all boats?

grim halo
#

No. It does not ^^

#

Just tell me your plans πŸ˜›

frigid ember
#

no so I should call it somewhere right?

#

im tryna spawn it at a location of an entity

#

Location entloc = e.getRightClicked().getLocation().add(0,1,0);

#

which is this location

#

this is in my event in my other class

grim halo
#

Ok but why do you need to spawn a boat at a location

frigid ember
#

for the plugin xd

grim halo
#

Whats the big picture

frigid ember
#

ohh

#

riding a mob using WASD

#

without dependencies

grim halo
#

Or do you want a plugin that just spawns random invis boats

frigid ember
#

no xd

grim halo
#

Oh ok. And a ArmorStand would not work because it does not react to the input right?

frigid ember
#

I can't drive an armorstand can I?

grim halo
#

Have you tried a LivingEntity like a horse or pig?

frigid ember
#

when a boat does not have gravity you can just drive it in the air

grim halo
#

Because you can make them invis pretty easy

frigid ember
#

will cause different in height @grim halo

#

maybe a pig would've worked

#

horse wouldn't

#

think a pig would still fuck it up when riding a bunny

#

or flying a bat

grim halo
#

Ok interesting. So this looks like it is a bit more advanced as you need to create a custom entity, register it and handle server restarts etc (Otherwise it would just be a normal boat again)
I think you should google something like "spigot spawn custom entity" and see where it gets you. Because this is not easy and you will need nms for this to work.

frigid ember
#

im ok with nms

#
public class CustomBoat extends EntityBoat {```
#

is already NMS

grim halo
#

Yes but had trouble understanding how to pass instances via a constructor so i had my doubts.

frigid ember
#

yes, im a beginner :/

#

and haven't used nms before

#

so it'll be a lot of work

stoic shell
#

From earlier this month, I'm having the same issue as this:
(CastoloGR)

my villagers wont change profession in my server. I summon them with the egg, place down the lectern, they pickup a job and then wont change

grim halo
#

nms is the very last thing you should use. It breaks fast and it breaks nasty.
I would recommend you to set this project aside for now and think about making some basic plugins to get a better understanding of java and the SpigotAPI.

frigid ember
#

thats what I did for a long time xd

#

now im starting to do some difficulter things

#

but if I save everyone who accesses a mob into a hashmap

#

and check the hashmap with PlayerJoinEvent

#

remove them at VehicleExitEvent

#

and remove the old boat onjoin

#

and add the custom boat onjoin

#

it will work I think

grim halo
#

I assure you that this will not work (not quite)

frigid ember
#

why wouldnt it?

ashen stirrup
#

My PlayerInteractEvent listener seems to be fired twice for each interaction. I've registered the WrenchListener() once πŸ€”

frigid ember
#

are u checking for right click action

#

if so check which hand too

#

cuz it fires twice, once for each hand (mainhand and offhand)

ionic hound
#

anyone know how to get command sync to work?

frigid ember
#

Hey, does anyone know if it’s possible to auto-update a configuration file? Say I have config version 1.0 and I make changes to the config, making it config 1.1 - how can I automatically apply the changes (like adding config values?)

stoic shell
#

uhm...

#

I'm trying to use ChunkMaster to pregenerate chunks, and this is my first time using it.

#

I started a pregen of 20000 blocks 10 minutes ago, and ever since, it has been stuck at 0% and 0 chunks have been pregenerated.

#

Does anyone know why and how to fix this?

quick arch
#

@strange roost recommends it πŸ‘€

strange roost
#

it's true

#

both chunky and my WB are significantly faster than chunkmaster in its current state

stoic shell
#

Oh... I looked in the config and pause-on-player-count was set to 1... whereas I had more than 1 player online.

#

huh... Chunky?

strange roost
#

it's brand new

quick arch
#

It's using PaperLib's async chunk stuff πŸ‘€

stoic shell
#

Does it integrate with dynmap?

strange roost
#

no, you'll need to use my WB if you want those kind of features

#

but for purely pregen, chunky is fastest

stoic shell
#

oh

#

then I just re-render with a dynmap command?

strange roost
#

fullrender, yeah

quick arch
#

Just use Pure's fork of WB :D

craggy jolt
#

Does anyone know how to make a mob shoot fireballs at a player every few seconds?
I know you have to get the mob location and the player location and spawn the fire ball where the mob is but what is the event for spawning the fireball and what would the order of the code be like

grim halo
#

There is no event. You need to have a runnable that ticks the mob.
After x ticks -> get mobs target -> check if null -> if player shoot fireball

#

And pls. I know its tempting and i see it at least once per week, dont use anonymous runnables like
new BukkitRunnable(){doStuff}.runTaskTimer() or something similarly obnoxious

#

btw i think you can just spawn the fireball at a Location and it will fly in the direction vector of the location. But dont quote me on that.

quick arch
#

Pretty sure you have to apply the vector

grim halo
#

Ill test it rly quick

stoic shell
#

wait a moment...

#

Is the chunky radius in chunks, or blocks?

quick arch
#

blocks

stoic shell
#

Well it's saying it's processed 0.12%

#

The radius is 20000 blocks.

grim halo
quick arch
#

That's a lot of blocks

#

o

stoic shell
#

And it's at 7597 chunks.

quick arch
#

that's 121552 blocks (the 7.5k chunks)

stoic shell
#

WHAT

#

how?

quick arch
#

It has to go through 400,000,000 blocks

#

._.

#

actually should be more cause I didn't count negatives in πŸ€”

grim halo
#

isnt the value a radius? So more loke 40k * 40k chunks

stoic shell
#

oh

grim halo
#

wait

stoic shell
#

um

#

it's giving me this as the ETA: ETA: 132:34:30

grim halo
#

square(20000 / 16 * 2)

quick arch
#

yeah... your giving it a lot of blocks

stoic shell
#

thought you said this was fast @strange roost?

grim halo
#

Its as fast as it gets. I looked at the code and its basically the same as i use for my personal chunk generator

quick arch
#

πŸ€”

#

yeah it's using PaperLib's async chunk stuff

stoic shell
#

oh ok

grim halo
#

square(20000 / 16 * 2) = square((20000 / 16) * 2)
Its only what you wrote if it was square(20000 / (16 * 2))

quick arch
#

o

#

desmos dumb sometimes

#

It gives 50 πŸ€”

grim halo
quick arch
#

o

#

oh wait, square()

#

god dammit, I did the inverse of it

#

._.

grim halo
#

^^

quick arch
#

that's a lot of chunks

grim halo
#

Thats a ton. If you dont use async chunloading you will be there a while. Whats the cps? I get around 51cps on my machine with my code

open ibex
#

Why not use BukkitRunnable?

craggy jolt
#

wait so basically I spawn the fireball in the location of the entity and then the location of the player and then spawn the fireball right

#

I also need to make a tick to time the fireball

grim halo
#

You need to create a vector that points from the entity to the player.
Just make sure to normalize it.

#

Wait ill write you an example...

craggy jolt
#

ok thank you so much

#

what is normalizing something mean?

opal adder
#

Just to be clear. I'm updating my 1.15.2 survival map to 1.16. I've already done this actually, but I kept the 1.15.2 world folder, and all the player data inside of it. Is this an issue? I've not really noticed problems, although there are some annoying console spam issues sometimes

quick arch
#

is it about bee hives or something

opal adder
#

Not sure actually, but I just want to make sure this is okay to do. I noticed the player data files get re-created in the playerdata section. I'm just wanting to make sure no one loses any of that player data

stoic shell
#

The cps...

opal adder
#

from the update

quick arch
#

chunks per second

stoic shell
#

here's what I got just a second ago

#

yes ik

grim halo
#
  public void shootFireball(LivingEntity shooter, Location target) {
    Location headLoc = shooter.getEyeLocation();
    Vector direction = target.toVector().subtract(headLoc.toVector());
    direction.normalize();
    Location fireballSpawnLoc = headLoc.clone().setDirection(direction).add(direction);
    World world = fireballSpawnLoc.getWorld();
    world.spawnEntity(fireballSpawnLoc, EntityType.FIREBALL);
  }

This shoots a fireball from the shooters head to the target location.

stoic shell
#
[12:27:51 INFO]: [Chunky] Task running for world. Processed: 14808 chunks (0.24%), ETA: 144:03:06, Rate: 12.0 cps, Current: -1245, 1058```
#

It stays around 10cps .-.

opal adder
#

?

grim halo
#

I would send you my chunk generator but its not quite ready yet...

rare prairie
#

Hope chunks will get removed from minecraft and instead it loads everything without chunks to do not cause memory leak

craggy jolt
#

Thanks for the example man I appreciate it!

grim halo
#

@rare prairie If minecraft removes chunks then the game would be literally unplayable

craggy jolt
#

But how would I make sure that every witch in the world can shoot a fire ball at the player?

rare prairie
#

@rare prairie If minecraft removes chunks then the game would be literally unplayable
no, there is another way to load worlds more fastest, like on server startup, it loads everything (entities, generating things etc)

grim halo
#

You need to track every witch that spawns or gets loaded. Put them in a set. use a runnable and tick them.
Maybe you should use a Map<Witch, Long> to track when the witches shot the last time (the long is the unix timestamp)

#

@rare prairie Sure if you have 2TB of RAM and want the server startup to take 2 hours you can just do that.

#

Actually you could do that just now.

#

If you want i can write you a quick pluigin that forceloads all chunks of a world on startup.

craggy jolt
#

ok I'll go look up how to do those

#

Thanks for the help!

grim halo
#

np. look at -> EntitySpawnEvent and ChunkLoadEvent to get all witches. Just make sure to unload them again

rare prairie
#

@rare prairie Sure if you have 2TB of RAM and want the server startup to take 2 hours you can just do that.
no need 2TB, only 50MB, there is async threads in C languages

quick arch
#

πŸ€”

rare prairie
#

I'm not okay today, don't believe me, it's just a joke what I'm wrote

grim halo
#

Ok i was just about to go on a rant

craggy jolt
#

I was thinking of using entity spawn event but I do not know how to incorporate that event into the code

#

and why do i need a chunk load event if i am using the creature soawn event?

grim halo
#

You also need the ChunkLoadEvent. I think if a witch gets loaded like this then the spawn event will not fire.

craggy jolt
#

Oh i see because the witches can load in when the game starts up and not spawn

quick arch
#

Chunky's message is wonky

#

Shouldn't that be blocks instead of chunks πŸ€”

grim halo
#

Nope that looks fine.

quick arch
#

That's a 1000 block radius task

#

wonky

grim halo
#

20 cps are around 512000 blocks per second

quick arch
#

o

craggy jolt
#

But where would I put those events? there is already a public void how would I incorporate the events into the code? Sorry if my question is stupid I'm new to this lol

grim halo
#

Oh if you are new to this then you should start with something simpler...

quick arch
#

^ Don't be like me and get into making an extensive plugin

craggy jolt
#

Too late my dudes lol

#

Already started lol

grim halo
craggy jolt
#

bro thats literally the video im watching right now for the runnable lol

frigid ember
#

hey

#

how can i register an custom nms entity in 1.15.2

sturdy oar
#

"custom"???

frigid ember
#

modified

#

nms

#

i tried spawning it dosnt work

#

i googled it says no need to register entities if the version 1.14 +

#
    public CustomBoat(EntityTypes<EntityBoat> type, World world) {
        super(type, world);
        Boat craftBoat = (Boat) this.getBukkitEntity();
        this.setInvisible(true);
        this.getWorld().addEntity(this);
    }```
I created a modified boat

```java
            net.minecraft.server.v1_16_R1.World nmsworld = ((CraftWorld) plloc.getWorld()).getHandle();
            CustomBoat boat = new CustomBoat(EntityBoat , nmsworld);
            boat.setPosition(loc.getX(), loc.getY(), loc.getZ());```
I want to spawn it here but `EntityBoat` is not recognised :/
stoic shell
#

Is Chunky the fastest of all the existing chunk generation plugins?

quick arch
#

yes

#

Loaded a 1000 block radius task in 10 minutes

frigid ember
bold anchor
#

?

frigid ember
#
    public CustomBoat(EntityTypes<EntityBoat> type, World world) {
        super(type, world);
        Boat craftBoat = (Boat) this.getBukkitEntity();
        this.setInvisible(true);
        this.getWorld().addEntity(this);
    }```
So Im creating a custom boat
```java
            net.minecraft.server.v1_16_R1.World nmsworld = ((CraftWorld) plloc.getWorld()).getHandle();
            EntityTypes type = EntityTypes<EntityBoat>;
            CustomBoat boat = new CustomBoat(type, nmsworld);
            boat.setPosition(loc.getX(), loc.getY(), loc.getZ());```
And I want to spawn it here but the type `EntityTypes<EntityBoat>` is not recognised
#

NMS

quick arch
#

uh...

open ibex
#

That's a class

quick arch
#

Fix the annotation dependency

open ibex
#

To get the registered type get it from the registry

frigid ember
#

how ;|

quick arch
rare prairie
#

add repo

open ibex
#

Registry.ENTITY_TYPES maybe

#

Not quite sure

frigid ember
#

`Required type:
EntityTypes

Provided:
Registry
<org.bukkit.entity.EntityType>`

#
            EntityTypes type = Registry.ENTITY_TYPE;```
#

ENTITY_TYPES doesnt exist

vital copper
#

Yes.

frigid ember
#

i donk know how add

quick arch
#
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>16.0.2</version>
#

It should be something like that for maven

#

πŸ€”

open ibex
#

Your type variable should be a registered instance of EntityType<CustomBoat>

#

NMS EntityType

frigid ember
#

hmm

vital copper
#

Yes @quick arch is correct.

         <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>16.0.1</version>
        </dependency>
quick arch
#

maven is scary

#

gradle, good

open ibex
#

I've made TileEntities in Forge before which work similarly I think

frigid ember
#
            EntityTypes type = EntityTypes.BOAT;
            CustomBoat boat = new CustomBoat(type, nmsworld);```
vital copper
#

Gradle sounds like something you cook on.

frigid ember
#

this doesnt give errors @open ibex

rare prairie
#

gradle, good
gradle is too complicated

open ibex
#

Well depends on your contructor code, but that doesn't look right

frigid ember
#

no thought so too

#
    public CustomBoat(EntityTypes<EntityBoat> type, World world) {```
open ibex
#

Should be EntityType not EntityTypes

frigid ember
#

its NMS

open ibex
#

Yes

frigid ember
#

EntityType is spigot

#

bukkit

open ibex
#

Guess it depends on the mappings

#

Spigot mappings are different from mcp mappings after all

#

Ok I'm looking at in now and mcp EntityType contains all the registered vanilla types

#

So if EntityTypes is the Spigot mapping then it should be fine

frigid ember
#

Ill try now

#

and tell if it worked

open ibex
#

Ok

#

Even if it doesn't give you an error and the boat summons, it still might not work correctly because your EntityType would be parameterized with EntityBoat instead of your CustomBoat

frigid ember
#

Cant tell if its right

#

A class which im using to register it isnt working

open ibex
#

But if you make your own EntityType the client won't know it exists so I'm not quite sure why you're making a custom entity in the first place

frigid ember
#

how would I make my own EntityType

#

if I could just make a boat invisible

#

it would be very easy

#

:/

open ibex
#

Making a new entity won't make that work

#

Because once again the client won't know about it

#

Boat invisible? So you can interact with it but not see it?

frigid ember
#

yes

#

exactky

open ibex
#

It seems like a texture pack would be the easiest way but the player might not put it on

frigid ember
#

and I dont want to do it with a texture pack ;|

open ibex
#

With some packet manipulation you could make the client think the boat isn't there unless the player is right next to it or in it, but it wouldn't really be invisible

frigid ember
#

hmm

#

it should be ;/

open ibex
#

I don't think you can make it completely invisible without a texture pack or using mods then

sturdy oar
#

Guys my BuildTools is yeeting itself

#

?paste

worldly heathBOT
winged sparrow
#

@frigid ember what exactly is your end-goal here?

sturdy oar