#help-development

1 messages · Page 40 of 1

echo basalt
#

I just made a tool that ran on a usb drive

sterile token
#

You can just save bunch of time using bash

echo basalt
#

then copied it to like 5 other drives

tardy delta
#

i'd just make a java program

#

actually dunno

echo basalt
#

so yeah I made it in java

#

about 200 lines

sterile token
tardy delta
#

ouch

#

dunno batch

#

i only know echo

echo basalt
#

saved the computer's id, mac address and ip address on a .txt file on a special folder

sterile token
#

I think they are not the sae

echo basalt
#

then I'd get home all night, just stick the drive in and fill up the spreadsheet in like 5 minutes

#

we did about 2 weeks worth of work in 3 hours

tardy delta
#

bash idk

real blaze
#
ItemStack item = p.getInventory().getItem(0);
                        
if(item == null) {
  p.sendMessage(ChatColor.RED + "Target slot is empty!");
  return;
}
ItemMeta meta = item.getItemMeta();

if(meta.isUnbreakable()){
  p.sendMessage(ChatColor.RED + "Target is already unbreakable!");
  return;
}
if(!(meta instanceof Damageable)){
  p.sendMessage(ChatColor.RED + "Target has no durability!");
  return;
}

interestingly the first 2 ifs work flawlessly, but not the last

echo basalt
#

try printing the meta class

#

it should come out as like CraftItemMeta or something

real blaze
#

i forget

echo basalt
#

getClass().getSimpleName

#

works too

tardy delta
#

sysout(meta)

real blaze
#

it returned
org.bukkit.craftbukkit.v1_19_R1.inventory.CraftMetaItem

#

which i guess is correct

#

on a granite block

real blaze
#

then it should be entering the if statement

#

but it aint

sterile token
#

if (meta instanceof Damageable) { p.sendMessage(ChatColor.GREEN + "Target has durability!"); return; }

#

Try like that if it works

sterile token
#

Okay

#

So just let code like that

real blaze
#

both damageable and non damagable items will go through this code

#

so that wont work

#

it seems like just about any itemmeta is an instance of damageable

echo basalt
#

try checking damageable.hasDamage

real blaze
#

will that return even if an item is at full durability?

real blaze
snow compass
vestal matrix
#

anyone know how long premium plugins take to get accepted? ive seen forms but they are like 4 years old so im assuming its different

snow compass
#

You could add debug inside the even and you will directly see if the is new world or old 🙂

quaint berry
#

Is there a way to check if a block is within the world border?

modest garnet
#

anyone know if there is a mine reset API? or lib

real blaze
sterile token
tardy delta
#

and nullcheck

sterile token
#

Yeah thanks for telling it fourten

modest garnet
sterile token
#

And them find the main class name

#

PluginManager#getPlugin("name") will return you a singleton instance of the main plugin class

tardy delta
#

maven/ gradle

#

hoping it had a repo

sterile token
#

Also you can import in maven as

<scope>system</scope>
<systemPath>path/to/file</systemPath>

chrome beacon
#

That's deprecated

sterile token
vocal cloud
#

I figured it you but you're not going to like it KEKLEO

chrome beacon
modest garnet
sacred mountain
#

could someone explain what exactly these do?

#

i have a rough idea, im just not sure why theres a delay option

tardy delta
#

?jd-s

undone axleBOT
sacred mountain
#

ok thanks

#

got it

#

i was thinking between each iteration not only the first one

opal juniper
vocal cloud
tardy delta
#

lemme listen to daddy mikes voice

vocal cloud
#

👀

#

TLDR don't use CraftBee unless you absolutely have to

tardy delta
#

when the bee goes tududududu

echo basalt
#

removeIgnoredBeeTags removes most paper tags

#

but doesn't remove custom tags

#

I already looked into it

vocal cloud
#

Well it removes my custom tags it seems

#

I'm still looking into it

echo basalt
#

The beehive stores it

#

but doesn't load the new tags when it's released

carmine nacelle
#

I cant check until later

vocal cloud
echo basalt
#

that mic doesn't have any background noise

tardy delta
#

the poor bee looses its data 😢 😢

echo basalt
#

where's the background fan and mouse sounds

vocal cloud
#

I type loudly it should be there

#

Need me to type louder in my next video lol

echo basalt
#

I want to hear pc noises

tardy delta
#

smash the keyboard against the wall next time

#

that would be fun

vocal cloud
#

The solution to this issue is simple, either don't use CraftBee or make your own custom entity tile entity if you can even do that

echo basalt
#

mike

#

what if

#

we make our fancy entitytype

#

because your example just uses the bee entity type

vocal cloud
#

?

#

I'm trying something stupid rn

echo basalt
#

hm

#

I rememver vivian having a problem where he wouldn't know if it was a minecraft bee or his custom bee

#

but looking at the internals suggests that this might work

vocal cloud
#

Maybe? Not sure if the reg can be frozen

ornate mantle
#

i have a custom events question

vocal cloud
#

I have a custom events answer

ornate mantle
#

lovely

#

i was typing it lol

#

lets say i have an event that gets called when player gets coins

#

some random currency

#

crap i dont even know what im asking

#

forgor the question

echo basalt
#

💀

ornate mantle
#

OK

vocal cloud
#

Stop drinking and coding

ornate mantle
#

if i have a custom event that has methods to set value

fossil lily
#

Why do items given by spigot have 2 tags on them?

ornate mantle
#

and i call that custom event inside a EntityDeathEvent

#

and set values inside that entitydeathevent for the custom event

#

will the changed values run when i make a listener for the custom event

vocal cloud
sacred mountain
#

lol

vocal cloud
#

@echo basalt Do you know how to see the unmapped stuff? I have an idea

echo basalt
#

I do

vocal cloud
#

nvm got it

echo basalt
#

you gonna do reflections?

vocal cloud
echo basalt
#

uhh

#

could be a forge user

#

That's a protocol thing

dusk flicker
#

Stop asking in every channel

echo basalt
reef peak
#

I am sorry.

dusk flicker
#

You should be only in help server

#

Be patient

reef peak
#

Ok sir

echo basalt
#

actually

#

nvm you probably need to update bungee

reef peak
#

I already downloaded the latest stable update so

echo basalt
#

try dev builds

reef peak
#

ahh

#

Well, thanks I will try. Sorry for disturbing

vocal cloud
#

NMS makes me want to NMS myself

echo basalt
#

nms is fun wdym

#

I love getting to know all the internals

#

been doing obfuscated nms until about 3 weeks ago so this actually brings me joy now

sacred mountain
#

how would i go about spawning ambient particles such as void particles ? around a lobby or something

#

but only temporarily

slate mortar
sacred mountain
#

well yes i'm aware

#

im thinking about everywhere around the spawn and theres got to be a better way than spawning hundreds of particles

slate mortar
#

well i dont think so

#

i mean

#

there's the offset parameters - maybe theyre the "distance" in which the particles spread out?

#

idk i never used particles

echo basalt
#

uhh

#

you can spawn fog particles by making a bossbar

#

but you gotta have a bossbar you can't really hide

#

I mean you can try calling setVisible(false)

sacred mountain
#

what about the void? thats pretty much endless particles

#

is there a way to spawn them above the void

echo basalt
#

that's rendered client-side

sacred mountain
#

not sure if thast client side

#

oh ok

echo basalt
#

the boss bar fog should give a similar effect

sacred mountain
#

but that will make the bossbar visible right

#

wdym bossbar

#

like a literal

echo basalt
#

yes

sacred mountain
#

oh righ

echo basalt
#

try setting the bossbar to invisible

#

it might still create the fog

#

not sure

sacred mountain
#

when you say fog

#

what do you mean

#

because most people disable fog in their video settings

#

and that isnt even particles

carmine nacelle
vocal cloud
#

I'm not sure, it seems like the data should be there. You just need to remake your entity technically. I'm looking into something else though..

carmine nacelle
#

Yeah, like the nbt IS on the entity

#

but I just need a way to get it

desert frigate
#

Would it be possible to get all armor stands in a world even if there is no player loading it?

carmine nacelle
#

7smile7 made me a method to get nbt stuff from entities a few days ago that I just remembered, but it combines them all into a string

#

but it could probably be modified...

zenith saddle
#

Whenever I try to create a world, it times out

sacred mountain
#

ok so.i have some sort of method

#

but this was 2 thousand particles, and only a 5 by 5 box of particles

#

not nearly enough for what i want

sacred mountain
#

infinite loop

zenith saddle
#

?

sacred mountain
#

do u have anything that could stop the main thread

#

huh

zenith saddle
#

Im loading a world using this code:

#

public static World generateWorld() {
WorldCreator wc = new WorldCreator("map");

    wc.environment(World.Environment.NORMAL);
    wc.type(WorldType.NORMAL);

    map = wc.createWorld();

    return map;
}
sacred mountain
#

im not sure about this stuff but should it be async

#

servers will time out after a while of non response, and that method will take a while to complete

#

and nothing else can happen whilst its running if im correct

#

but i would wait for someone with a better knowledge lol

eternal oxide
#

Your server has not crashed. Its till generating the world. It even says 45% half way through your crash

zenith saddle
#

I think you are right

eternal oxide
#

its taking too long, probably a very weak host/slow HD

#
[12:12:06] [Worker-Main-7/INFO]: Preparing spawn area: 45%```
zenith saddle
#

8gb ram, 4 allocated

#

intel xeon

#

not enough?

eternal oxide
#

xeon

#

what OS?

zenith saddle
#

Windows 2019 server software

eternal oxide
#

I'd guess you have a VERY slow storage (HD)

delicate fossil
#

how do i make a crafting recipe from custom items? like a pickaxe from iron ingots named "steel ingot".
i tried everything i can think of.
i cant find any tutorials
i learnt entire java and plugin dev yesterday.

zenith saddle
#

what about what LightFury102 said?

delicate fossil
#

yes i know that

#

i can make a normal shaped recipe

#

but not with custom items

peak depot
#

give tge result itemstack the name

delicate fossil
#

not the result but the materials

#

i managed to rename the result

#

but thats ItemStack and the input is Material

peak depot
#

yeah you cant atleast im prettysure about that

delicate fossil
#

what does Material.CreateBlockData do then? i thought it modifies the Materials meta

#

but i could not get it to work

eternal oxide
eternal oxide
#

Not on Spigot

somber hull
#

So I’m not currently at my pc, but I’m trying to think of how to fix a problem I have been having with a plug-in.

I have a list of spawners stored in a gui. In each spawner there is a PDC containing the type of spawner + the last time xp was generated. The xp bit has been working great, However I am trying to implement drops support so people can collect the spawner drops.
My idea for how to do this was to add another PDC for the last time items were generated, but that won’t work as I want them to be able to take just a few items at a time.

Essentially I need to figure out how hypixle skyblock minions work, as that’s the exact type of storage I am trying to achieve here.

#

I can’t figure out how to calculate the drops

#

Long story short

zenith saddle
eternal oxide
#

no

sacred mountain
#

oh

#

unfortunate

#

anyways

eternal oxide
#

very

zenith saddle
#

why not?

sacred mountain
#

i need help with ambient particles

#

smoke_large seems to be the best bet, but they dissapear way too quickly

#

and spawning them constantly will decrease performance

#

is there a way to set their decay time

eternal oxide
#

You can test it if you want. Just throw yoru worldgen code in an runTaskAsync

#

or whatever its called

#

Particles have a fixed animation/life

sacred mountain
#

ah shet

eternal oxide
#

you can control their position and direction/randomness is all

sacred mountain
#

how should i go about creating a cloud that will obscure most of what's behind it

#

does areaeffectcloud have that option

#

i was think an explosion but that only lasts for a fraction of a second and lags the client

eternal oxide
#

You can spawn a lot less particles then and have them much denser

sacred mountain
#

so basically i have 8 'gauntlets' surrounding the player(s) and i want them all to become obscured temporarily whilst i do some particle show or sum

#

but i wnat the rest of the stuff to be visible

eternal oxide
#

I don;t believe there is any particle suitable to cover a large area

sacred mountain
#

like i want them to be able to see the obscured place clearly, i know it sounds a bit weird but yea

sacred mountain
#

i was also gonna ask, they added tinted glass.. does that have a density option? im just theorising i have no clue what it's properties are

somber hull
#

Has anyone here played hypixle skyblock?

tardy delta
#

doesnt async worldgen fucks up things?

sacred mountain
#

lol

somber hull
#

Ok

#

Well

sacred mountain
#

rip hundreds of hours

#

1.2bil 😔

tardy delta
#

got permbanned and got an unban noob

sacred mountain
#

wtfrick

tardy delta
#

same for cube

somber hull
#

How do the minions generate items?

tardy delta
#

tellin some bs in the appeal lmao

sacred mountain
#

u cant get unwiped from skyblock :(

somber hull
#

I’m trying to do the exact same thing

#

Efficiently

sacred mountain
somber hull
#

Anyone got any ideas

sacred mountain
#

wdym bruh

#

if you want skyblock help go ask in the hypixel discord

#

or sbz

somber hull
#

No

#

I’m making a plug-in

sacred mountain
#

hypixel has their own calculations for offline and online

somber hull
#

And I need to generate items

sacred mountain
#

wdym generate

somber hull
#

But I can’t check every five minutes to generate items

#

That would be inefficient right?

tardy delta
#

can still join lmfao

#

anyways it was fun

#

btw isnt there some EnumMap.of constructor?

sterile token
tardy delta
#

i forgot

#

hypixel but idk what gamemode

dire marsh
#

hypixel never accepts ban appeals afaik

#

i've never heard of anyone getting their appeal accepted

#

and I've heard most of it is automated

somber hull
#

I love how I asked a question and it just got sidetracked to hypixle bans 💀

sterile token
#

I think they are just armor stands

somber hull
#

No

sterile token
#

No?

somber hull
#

How they generate items

sterile token
#

Okay

somber hull
#

Like

#

You open their inventory

#

And they have items

sterile token
#

Ohh ok

somber hull
#

Any idea how to do that?

sterile token
#

They are just an entity

somber hull
#

I’ve been trying to figure this out for a long time

somber hull
sterile token
#

They look for the entity and open their inventory

#

🤔

#

Isnt what u are asking...

somber hull
#

Sorry I’m back

#

I’m trying to figure out

#

The way the items are generated

#

It doesn’t check every minute and add an item to the list of items does it?

#

@sterile token

eternal oxide
#

you only need to generate items when someone opens the inventory

somber hull
#

So

#

Currently what I have

eternal oxide
#

you store teh last time the inventory was opened

somber hull
#

Exactly

#

But then I run into the issue

eternal oxide
#

in its PDC

somber hull
#

Am I stupid?

#

Can I just save the list of items to the players data

sterile token
somber hull
#

Omg

#

Wow

#

I looked past the most obvious solution for like a week

sterile token
#

Hyper ill you sell that plugin?

somber hull
#

?

#

Why?

sterile token
#

I ask because i really like to use something like that

somber hull
#

Well I never explained what it was?

#

It’s a spawner plugin

zenith saddle
#

Can Someonw give me some world gen code that does not crash?

boreal seal
#

decent guide on papi?

somber hull
#

You throw the spawners into a gui and it generates stuff

#

But yes

boreal seal
#

(i need to make few extentions)

somber hull
#

It’s on spigot rn

#

A free version

#

Generates xp only

sterile token
eternal oxide
zenith saddle
#

yes

eternal oxide
#

that will tell you if its your system

somber hull
boreal seal
#

wait ill get into git

#

to see whats there

tardy delta
#

this doesnt look right lol

eternal oxide
# zenith saddle yes

what world are you trying to generate? it may be worth pregenerating and keeping it ready

sterile token
#

Have a good day mate!

somber hull
#

This is the plug-in I was referring to

#

That I’m making

sterile token
#

Im looking for a minion/automatic worker but free

somber hull
#

A

#

Got it

sterile token
#

Like JetsMinion but free

#

So maybe i just code one in a future

#

Oh lmao im really hating sub domains hahaha

tardy delta
sterile token
tardy delta
#

that will become expensive

sterile token
#

Your welcome

#

Is it understable?

boreal seal
#

it is

#

got to think creative on how to make my placeholder

#

since its not from an event

golden kelp
#

yo guys, so I generate my library using java 8

<properties>
        <java.version>1.8</java.version>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>

(1.8 temurin)

and then i load classes from this jar using my plugin but when i try to do that, it says

java.lang.UnsupportedClassVersionError: META-INF/versions/9/module-info has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_332]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_332]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_332]
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:473) ~[?:1.8.0_332]
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_332]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_332]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_332]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_332]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_332]
sterile token
#

You are trying to use the library on a new server version

#

Let say spigot 1.19 doesnt support plugins compiled with java 8 for example

boreal seal
#

^

#

u need open jdk17

sterile token
#

He needs to compile it using java 17

boreal seal
#

like the stacktrace wanna be like

#

so simple

#

my man

eternal oxide
#

plugins can be compiled for java8 and run on spigot 1.19

boreal seal
#

please learn how stacktraces work

golden kelp
#

now i know you guys are gonna go ?1.8

sterile token
boreal seal
#

lmao

sterile token
#

In other words here not mostly help when using legacy versions

golden kelp
#

😭 i dont want to work on it but its from the place i work at

boreal seal
#

is this your first plugin?

golden kelp
#

oh no no

boreal seal
#

since honestly you should learn about stacktraces

golden kelp
#

its my first one using 1.8

sterile token
#

😂

boreal seal
#

nah i dont know

golden kelp
#

na man i dont want to act like a java noob here i m pretty good at java (i m workin as a backend dev rn as well)

#

the thing i was confused was that i DO compile it with 1.8

boreal seal
#

so please learn stacktraces.

sterile token
#

Okay my question is why do you accept 1.8 works?

sterile token
carmine nacelle
#

1.8 is shit

sterile token
golden kelp
sterile token
#

I think they should ban 1.16 under api

#

Because its really old my bro

#

?1.8

undone axleBOT
golden kelp
#

dayum you will trigger kids who click really fast

boreal seal
#

not here to judge

#

its wanna be dev a bit different situation

golden kelp
#

is it my profile?

boreal seal
#

anyway learn about how stacktraces work

golden kelp
#

the profile readme*

boreal seal
#

not its mine

#

like

golden kelp
#

ou

sterile token
#

Sorry if we sound rude but if you are a java dev you should know how to read/identify errors

boreal seal
#

like i would like to help you Vinesh

#

but you cant read stacktrace

#

which is very essential

golden kelp
#

nah i understand because i have helped people here too when they get stupid questions

boreal seal
#

you will have many errors like those during plugin dev

golden kelp
eternal oxide
#

META-INF/versions/9/module-info has been compiled by a more recent version of the Java Runtime (class file version 53.0)Is Java 9

golden kelp
#

Yea but I dont use Java 9 at all, neither do I have it installed on my machine

eternal oxide
#

I'm guessing you are shading something

golden kelp
#

Also, i had a JNA error with the same class loading in the past

eternal oxide
#

including some library or plugin

golden kelp
#

Yea it wasnt shading jna

eternal oxide
#

you are shading something thats built for Java 9

golden kelp
#

oh i m so dumbbbb

#

oh i dont think

#

the only thing i shade is protocol lib (in the library)

eternal oxide
#

open your jar with a compression util and see what is shaded

golden kelp
#

nvm i m having a smooth brain moment here gimme a sec

#

yay, it fixed the issue, thank you for being actually helpful and not being passive aggresive 😄

rapid sable
#

Hi.
I've been trying to update my plugin to 1.19.1 but cannot figure out what's wrong..
I've ran BuildTools using "--remapped", added the dependency-related things to my pom.xml and still cannot get things to work. Some classes I am unable to import are: EntityPlayer and WorldServer.

Anyone that is able to help me with this?

eternal oxide
#

You shoudl be importing ServerPlayer not EntityPlayer if you are using NMS

tardy delta
#

is it correct that you should run buildtools once to be able to use nms?

#

and then just using the spigot artifact

eternal oxide
#

no, you have to change your pom a little

rapid sable
eternal oxide
#

spigot is obfuscated names only

tardy delta
#

ah

#

adding the remapped specifiers to the pom right

#

just to make things clear for myself

eternal oxide
#

using Mojang Mappingsxml <!--Bukkit/Spigot NMS --> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot</artifactId> <version>${project.spigotVersion}</version> <classifier>remapped-mojang</classifier> <scope>provided</scope> </dependency

rapid sable
#

It seems that other things have been renamed too...
Kind of stupid not looking at that..

golden kelp
#

is obfuscation allowed for plugins?

eternal oxide
#

then specialsource-maven-plugin to remap at compile time

eternal oxide
tardy delta
#

hmm

golden kelp
eternal oxide
#

No clue I've never done anything premium

golden kelp
#

I am thinking of making a plugin with like 200 custom ultra op items which include some stuff that require external apis

tardy delta
#

lmao

#

filtering the word

vestal matrix
#

anyone know how long premium plugins take to get accepted? ive seen forms but they are like 4 years old so im assuming its different

golden kelp
tardy delta
#

black spigot

eternal oxide
#

I do know Premium plugins must work without an internet connection

golden kelp
#

oh

#

well big oof

tardy delta
#

but spigot works only with an internet connection kekw

#

makes sense but lemme make fun of it

somber hull
eternal oxide
#

spigot will run fine with no connection

somber hull
#

THE NAME THAT SHALL NOT BE NAMED!!!

tardy delta
#

huh really?

eternal oxide
#

once its been run once, but its also not premium

tardy delta
#

doesnt it do lookups to the mojang servers?

golden kelp
#

it does

eternal oxide
#

not if set to offline

golden kelp
#

but not if u turn off online mode

#

yea

somber hull
tardy delta
#

offlinemode smh

golden kelp
#

cracked mc

tardy delta
#

not talking bout that shit 😂

golden kelp
#

same

sacred mountain
#

hey is it possible to spawn in the visual fire of an entity ? without the actual entity

#

you know when a player or mob is on fire, and they have that fire effect, can i spawn that in in any way?

#

if that isn't possible, i can just use invisibility on a mob

#

also another question: is it possible to modify the height of said fire effect without modifying the entity's hitbox entirely

obsidian drift
#

Anyone know how can I get an entity to walk from A to B using NMS? (Mojang mappings)

eternal oxide
#

there shoudl be a moveTo method

sacred mountain
#

why is the broadcastMessage and broadcast deprecated

#

bruh

eternal oxide
#

You are using Paper

obsidian drift
sacred mountain
#

oh

#
Bukkit.getOnlinePlayers().forEach(online -> {
  online.sendMessage("Message");
});```
#

is that a viable alternative

#

or is that not good

eternal oxide
#

thats fine

sacred mountain
#

ok

obsidian drift
tardy delta
#

what about a normal for loop ._.

sacred mountain
tardy delta
#

i used to do forEach too

#

but when you need to access non final stuff it'll suck

eternal oxide
sacred mountain
#

well yes but then i can use a loop

#

so theres no problem

obsidian drift
#

I'll check now

tardy delta
#

i'm only using lambdas now when you can pass in a method reference, otherwise normal for loop

eternal oxide
sacred mountain
#

is the beacon from the end gateway clientside?

eternal oxide
#
    @Override
    public void moveTo(double d0, double d1, double d2) {
        this.teleportTo(d0, d1, d2);
        this.connection.resetPosition();
    }```
obsidian drift
#

damn

sacred mountain
#

and is there a way to create an end crystal beam so that it moves from point a to point b

#

slowly

#

or a guardian beam

#

or do i just have to limit the length and update in a loop

obsidian drift
#

How can I change the skin of a ServerPlayer?

#

I think it has something to do with GameProfile

tardy delta
#

hmm cleaned my stuff a lil bit

sacred mountain
#

nice

eternal oxide
#

method in Entity.java

tardy delta
#

now implementing a loop to handle cases where a player gains so much xp that he levels up a few levels at the same time :/

sacred mountain
#

is it possible to change the state of a beacon to activated

#

theres no properties with the debug stick

tardy delta
#

Beacon#someMethod?

#

pretty sure there is a beacon class

#

cast blockstate ig

sacred mountain
quiet ice
#

?jd-s

undone axleBOT
quiet ice
#

Not through the blockstate class

obsidian drift
tardy delta
#

oh right was the beacon beam not clientside?

sacred mountain
#

i dunno

#

gateway beams are

#

so im guessing beacons are too

#

but idk

#

when you place a beacon with block#setType() does it play the beacon activation sound

#

because i'm trying to get rid of that

#

and idk how

worldly ingot
#

Beacon beams are client-sided, yes.

sacred mountain
#

do you know if the fire on entities is

sterile token
#

Wait wait async mongo-java-driver doesnt exists anymore?

sacred mountain
#

because there is a nbt tag HasVisualFire

worldly ingot
#

That one you can actually set with an NBT tag

#

Yeah

sacred mountain
#

ok

worldly ingot
#

Entity#setVisualFire() should exist

sacred mountain
#

can you modify the dimensions of that fire

obsidian drift
worldly ingot
#

No

sacred mountain
#

but endermen ones have like

#

3 blocks of fire

#

is that just to do with their hitboxes

#

and not changeable externally

worldly ingot
#

Yeah the server can't do anything about that

sacred mountain
#

rip D:

#

would be cool to make columns of fire

#

lol

#

i was thinking slimes but they scale on the x and z axis too, so it wouldnt work ig

tacit drift
#

send the full exception in a paste

#

?paste

undone axleBOT
quiet ice
#

If you need to Cast this you do something wrong

obsidian drift
#

The exception not the code

quiet ice
#

If you really need, Cast to Object beforehand - otherwise the Compiler won't compile it

obsidian drift
#

Click save and copy the url

quiet ice
#

It is clear that the issue is a CCE

#

They are trying to Cast an instance of a non-plugin Class to plugin

#

Javac should NOT Compiler it however

#

Oh right Plugin is an interface

#

Still, the JVM won't let it fly

obsidian drift
quiet ice
#

So use the Plugin fueld instead

quiet ice
#

Yea

obsidian drift
quiet ice
rain mason
eternal oxide
#

Pretty sure velocity is reset when teleporting

rain mason
#

but why does it act so weird tho? it shows me the actual velocity if I jump before "teleporting", but if I just drop into it it says 0,0,0

carmine nacelle
#

nvm

rain mason
#

ig ill just use the eye location

#

instead of the current velocity

obsidian drift
#

Anyone know how I can enable skin layers for a ServerPlayer?

eternal oxide
#

new ClientboundSetEntityDataPacket(serverPlayer.getId(), serverPlayer.getEntityData(), true)

#

so long as its enabled, if making NPCs

obsidian drift
#

Should I send the packet after sending ClientboundPlayerInfoPacket?

eternal oxide
#

yes

obsidian drift
#

Doesn't seem to work... here's my code:

#

The goal is to create an NPC of the Player player

eternal oxide
#

you probably need to create a class which extends ServerPlayer

obsidian drift
#

Everything works well except for enabling the other skin layers

eternal oxide
#

in that, in its constructor you add this.getEntityData().set(Player.DATA_PLAYER_MODE_CUSTOMISATION, (byte) 0xFF);

obsidian drift
#

net.minecraft.world.entity.player.Player?

eternal oxide
#

yes

obsidian drift
#

DATA_PLAYER_MODE_CUSTOMISATION is protected

eternal oxide
#

which is why yu create a class that extends SereverPlayer

obsidian drift
#

Is there a way to hide the NPC in the player list?

eternal oxide
#

send a remove packet, after add

#

new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.REMOVE_PLAYER, npc)

supple elk
#

I'm trying to stop a list of boats from moving by setting their velocity to 0 each tick

#

the code ^

#

period of 1 tick for the runnable

#

boat can move slowly

#

I don't want it to move at all

#

any ideas?

cold tartan
#

Access player from variety of events

supple elk
#

there's a vehicle move event

#

which would save the hassle of the has map

#

but you have to remove passengers to teleport the boat

supple elk
#

so that means the putting the player back on the boat every tick

#

which causes horrible visual bugs

#

I tried for over a day to get that to work

#

does changing the priority of the listener do anything?

#

I'd want it to be the last thing which fires before the boat actually moves

#

I don't understand why the velocity is kind of half of what it normally is tho

#

a period of 1 tick is the fastest right? That runs every tick...

#

oh wait

#

priority is on listeners

#

not runnables

#

it's definitely firing every tick...

#

so if the velocity is being set to 0 every tick how can it still move???

solid cargo
#

You can always try while loops. It will crash ur server tho

#

Idk if there is a cooldown thingy. Check that out

supple elk
#

wdym by cooldown thingy

#

how would a while loop help?

solid cargo
#

Well while loops occur way more than bukkit runnables

#

Like every milisecond or even more idk

alpine urchin
#

@supple elk

supple elk
#

hey dude

alpine urchin
supple elk
#

oh sorry, ig I missed them

dusk flicker
#

lol

supple elk
#

I'll dm u now

alpine urchin
#

whOOps

#

i missed your dms

#

for a year

dusk flicker
#

sureeeee

supple elk
#

.>

alpine urchin
#

you sound like my dad

#

whOps i missed the house

#

ill come now

obsidian drift
eternal oxide
#

new ClientboundRemoveEntitiesPacket(serverPlayer.getId())

sacred mountain
#

how do i make something run after it detects a beacon has been activated?

#

i would do a while loop in normal coding but

#

some sort of completablefuture idfk

dusk flicker
#

what do you mean by activated?

sacred mountain
#

the beam

#

so theres a short period where the beacon beam doesnt actually fire and the sound doesnt play

dusk flicker
#

is there not a event for when its ignited?

sacred mountain
#

i dont need to detect it like that

#

as in i'm fixed to one beacon block

#

and it's inside that specific method

#

but no matter i've already fixed it

random breach
#

Hey i have a question
i have downloaded the Chest viewer but i cant find it in the minecraft launcher what should i do ?

dusk flicker
#

stop asking in multiple channels

rain mason
#

i wanna add authentiation to my plugin (/login, /register), what's the best way to store the passwords?

dusk flicker
#

encrypt it

#

I run BCrypt, I think Optic gave me it lol

eternal oxide
#

don;t store passwords

cold tartan
eternal oxide
#

Store the SHA of teh password the player sends. You only store teh sha then check if your stored value matches each time.

#

no password to be stolen from your server/database

sacred mountain
#

I would check if the IP is the same before prompting authentication

#

it gets annoying sometimes

#

relogging and having to authenticate

rain mason
#

okay

sacred mountain
#

or maybe have an auth cooldown of 10 hours or something

#

5 hours even

rain mason
#

i remember just logging onto an owner's account when I was younger and typing /stop

#

dont want that to happen to me tbh lmao

#

so ill probably do the IP thingy

buoyant viper
#

in plaintext pls

#

and leave the back door open 👉👈

rain mason
#

might aswell just do a /passwords command which lists everyone's passwords

buoyant viper
#

yes!

sacred mountain
#

oh and

#

make that command list everyone's IP online

#

so people can socialise better

rain mason
#

yes!!!!!!!!! best idea

fleet falcon
#

what
is
that

buoyant viper
#

id reckon its a class cast exception

steel swan
#

hey so i have this code ```java
case "action" ://line 64
Player pl = (Player) sender;//line 65
Game ge = new Game();//line 67
PacketPlayOutChat packet = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a(BLUE + "Ultra Jump : Progression Indisponible."), (byte) 2);//line 68
((CraftPlayer) pl).getHandle().playerConnection.sendPacket(packet);//line 69
return true;

that writes smth in the action bar when a players sends the command /jump action
i have this error while running the command :
https://paste.md-5.net/verojufubi.sql
vocal cloud
#

Are you sure? Looks like a ClassCastException to me

fleet falcon
#

oh funny

buoyant viper
steel swan
#

yeah but im using this

worldly ingot
#

Right but... why? lol

#

API exists so it's version-independent

buoyant viper
#

if a working method exists why use something that doesnt

wispy crescent
#

What format should the player animations be in (with PlayerModel)?

steel swan
delicate lynx
#

doesn't mean it's the best way

buoyant viper
#

in the nicest way possible, no need to reinvent the wheel

steel swan
#

so no one has any idea why it doesnt want to send a message with a SPACE in it?

worldly ingot
#

Issue is that it's not in JSON format, which is what ChatSerializer.a() expects

#

It's a text component

#

ChatSerializer.a("{\"text\":\"Ultra Jump : Progression Indisponible.\",\"color\":\"blue\"}") would work

#

But again, you're really doing this the hard way

#
BaseComponent[] message = new ComponentBuilder("Ultra Jump : Progression Indisponible.").color(ChatColor.BLUE).create();
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, message);```
#

Or something similar to that. I'm writing based on memory

#

iirc you might be able to do just a new TextComponent() as well

TextComponent message = new TextComponent("Ultra Jump : Progression Indisponible.");
message.setColor(ChatColor.BLUE);
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, message);```
delicate lynx
#

what MC version are you using?

steel swan
#

an old one

#

1.8.8

delicate lynx
#

im sorry to hear that

steel swan
#

usually work in 1.16.5 but for this one, i need to use that one

steel swan
#

like Ultra Jump : 20

peak depot
#

why doesnt it find JavaPlugin?

kind hatch
worldly ingot
lost matrix
steel swan
lost matrix
#

Ah. Its a 1.8 peasant. Thats why he doesnt use the api.

echo basalt
#

peasant

#

👨‍🌾

steel swan
#

..any idea?

lost matrix
#
  1. Update to a version that is supported and actually used by people
  2. Use the api
steel swan
#

that doesnt answer my question

#

the question is why doesnt it show in color

lost matrix
#

It solves your problem

steel swan
#

i dont wanna change version or use the api i said it earlier, if u dont know why it doesnt show up in color

#

just donc tell me that then

sacred mountain
#

guys

#

im so cracked

#

plugin worked first try

delicate lynx
#

try every single case situation

#

then you'll find random problems

sacred mountain
#

but i think like that

#

i think of the most stupid scenarios that i can catch and patch

#

oh that rhymes

gleaming grove
#

Is there some event that is invoked by scroll click?

zenith saddle
#

How do you break out of bukkit runnables?

lost matrix
lost matrix
gleaming grove
#

thx

steel swan
#

it worked

zenith saddle
lost matrix
zenith saddle
#

yes , I have:

#

final DeathSwap plugin = DeathSwap.getPlugin(DeathSwap.class);
Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
@Override
public void run() {

lost matrix
#

The cache library is typing

zenith saddle
#

How do I cancel that

inland axle
zenith saddle
#

?

cold tartan
lost matrix
# zenith saddle How do I cancel that

The method returns an int which represents the task id. You can cancel it using the BukkitScheduler.
But in most cases you want to use a BukkitRunnable that can cancel itself.

    new BukkitRunnable() {
      private int i = 0;
      @Override
      public void run() {
        if(i++ < 10) {
          Bukkit.broadcastMessage(String.valueOf(i));
        } else {
          this.cancel();
        }
      }
    }.runTaskTimer(yourPlugin, 10, 10);

This runnable will broadcast 0 to 9 over the course of 110 ticks and then cancel itself.

supple elk
#

Ok I've found a solution to the boat problem I've been having, almost

#

is there a packet which updates the location of an entity?

#

server thinks boat and player are in one place, player thinks they are in another

lost matrix
supple elk
#

they sync up eventually though?

#

every few seconds I'm warped back to the correct position

#

or if I leave the boat

lost matrix
#

Yes through packets. Movement is not fully server authoritative in minecraft.

supple elk
#

ok so which packets do I need to send?

#

that's the question I was asking

cold tartan
supple elk
#

I just want to force the sync up

inland axle
lost matrix
supple elk
#

don't need velocity

#

just position

supple elk
#

ooh ok

zenith saddle
#

@lost matrix However, if the BukkitRunnable did not schedule itself for execution, it cannot cancel itself from execution.

supple elk
#

so maybe update entity position for boat, and sync player pos for player?

#

or maybe I just need the player

#

I shall experiment

#

this is so stupid just to stop a boat from moving

lost matrix
cold tartan
supple elk
#

yeah

eternal oxide
#

how about new ClientboundSetEntityMotionPacket(entity)

cold tartan
# supple elk yeah

i have a funny idea, if u make the player ride a tiny invisible entity or smthn, then have that entity ride the boat

supple elk
#

I did think about that

#

but it seems a little complicated

cold tartan
#

ive done it b4

inland axle
supple elk
#

a lot to keep track of, which could be avoided

cold tartan
zenith saddle
#

Put it in a try catch around it and have a intentional error?

supple elk
#

what if players leave and shit, then you just have invis entities in boats

#

I imagine there's a lot of edge cases

#

or the player is tped

#

idk

supple elk
#

I'll experiment

cold tartan
supple elk
#

if the entityMountEvent triggers on things like quitting the game

#

which ig it should

#

but still easier if I can go down the current route

cold tartan
#

yeah

eternal oxide
#

are you trying to lock these boats in place?

supple elk
#

The key was setting the position of NMS entity

#

meaning i don't have to dismount the player to warp the boat

#

and they move as one

#

which fixes all the visual errors I was getting when trying to dismount the player, warp, then remount

sacred mountain
#

i have a loop with a delayed task

#

nto sure if thats the best way but

#

thats what i do

cold tartan
supple elk
zenith saddle
#

does not exist

supple elk
#

show code

#

cause it def has cancel() event

zenith saddle
supple elk
zenith saddle
#

cancel from Inside the loop

supple elk
#

you can do that

zenith saddle
#

So I have A timer from a game

supple elk
zenith saddle
#

Btw its repeating

supple elk
#

that's fine

zenith saddle
lost matrix
# zenith saddle So I have A timer from a game

Just create one runnable for all games and let it contain a List<Game>. Then your Game class has a tick method.
When the game finishes you simply remove it from the game runnable.
The game runnable always runs.

supple elk
#

or use this syntax instead

#

runTaskTimer does the same thing as the method you called

zenith saddle
#

hmmm

supple elk
#

you can do this

#

the reason why you couldn't cancel is cause you created a new Runnable()

#

which does not have the cancel() function

zenith saddle
#

Wait what

lost matrix
#

I would do this

public class GameTask implements Runnable {
  
  private final List<Game> gameList = new ArrayList<>();
  
  public void addGame(Game game) {
    this.gameList.add(game);
  }
  
  public void removeGame(Game game) {
    this.gameList.remove(game);
  }
  
  @Override
  public void run() {
    gameList.forEach(Game::tick);
  }
}
supple elk
#

is making a runnable for each game more expensive?

supple elk
#

not a BukkitRunnable

#

BukkitRunnable extends Runnable

#

and has the cancel() function

lost matrix
supple elk
#

you do plugin, new RUNNABLE(){}

zenith saddle
#

same code?I fixed it

#

Tysm

supple elk
#

np

zenith saddle
#

Im a dumbo

supple elk
#

nu

#

huge brian

lost matrix
supple elk
#

that's also true

#

do you need to clean them up?

zenith saddle
#

out of subject, how do I do somthing not on the main thread?

supple elk
#

on like, a server reload or reset I mean

lost matrix
#

I mean when a game stops then you should remove all tasks associated with this game.

supple elk
zenith saddle
lost matrix
zenith saddle
#

non async

lost matrix
buoyant viper
#

async would be off main thread

zenith saddle
#

it cant be async

#

Im generating a world

#

and it crashes every time

lost matrix
buoyant viper
#

in java?

lost matrix
#

In any language

supple elk
#

Can anyone help me decipher the flags bit? I don't really understand how to do bytes

buoyant viper
#

ik in other languages

supple elk
fierce dock
#
if (e.getClickedInventory().getType() == InventoryType.BREWING) {
                if (e.getSlotType() == InventoryType.SlotType.FUEL) {
                    if (e.getCursor().getItemMeta().equals(item.getItemMeta())) {
                        BrewerInventory brewingstand = (BrewerInventory) e.getClickedInventory();
                        brewingstand.setIngredient(item);
                    }
                }``` Instead of setting the ingredient of the brewing stand to the item, I am instead given another  item in my cursor. Why is this so?
supple elk
#

I saw a really good tip on how to speed up world gen tho

#

let me find it for you

#

you need to disable spawn chunk loading

#

which removes the time the server spends making them

#

which is 95% of the time spent making a world

zenith saddle
#

OHH COOL

#

I have spet the last day

lost matrix
supple elk
lost matrix
#

Im still confused as to why spigot still does IO on the main thread when loading worlds.

supple elk
#

ik

#

it's so annoying

vivid cave
#

How to retrieve the max distance (in blocks) at which players are able to see the contents of itemframes (maps for example)
(considering that they it defaults to the server configuration)
is it server view distance? server render distance? (i never understood difference between those two) but most importantly which one wouuld i be interested by and how do i retrieve it from code

lost matrix
#

You could actually make this really efficient

supple elk
#

big lag spike every time you load a world

zenith saddle
#

and you cant make worlds async

supple elk
#

why can it not be done async ;-;

zenith saddle
#

ILHVIHLVibhvlibulvub

supple elk
lost matrix
vivid cave
lost matrix
vivid cave
supple elk
#

but how do I set the flags in a byte?

#

and what does this section mean?

lost matrix
zenith saddle
lost matrix
supple elk
supple elk
#

that's really simple

#

thanks

zenith saddle
#

its e.getworld.blah

supple elk
#

right

fierce dock
lost matrix
# supple elk that's really simple
+ 0000_0001
+ 0000_0010
+ 0000_0100
___________
  0000_0111

This is bitwise or.

This is how flags look. The first 3 bit flags are set if you just bitwise or them together.

lost matrix
lost matrix
supple elk
#

just realised that it actually wants a set of relative arguments

#

but still, the byte info is useful

peak depot
#

whats the char limit at playername still 16 in the 1.18?

fierce dock
lost matrix
lost matrix
supple elk
#

Ok well I just tried this and the player now just bounces up and down on the boat, boat continues moving off

zenith saddle
#

Will this actually work?

supple elk
#

so I'll try syncing the position of the boat

opal juniper
lost matrix
zenith saddle
#

darnit

glossy scroll
#

yall completeable future is messing with my brain im very confused

#

is there some video on this

lost matrix
glossy scroll
#

yea

#

im confused at

#

i see some examepls like this

#
    CompletableFuture<String> completableFuture = new CompletableFuture<>();

    Executors.newCachedThreadPool().submit(() -> {
        Thread.sleep(500);
        completableFuture.complete("Hello");
        return null;
    });

    return completableFuture;
}```
lost matrix
#

I would never downcast to just a Future

supple elk
#

neither of these seem to have any effect

glossy scroll
#

these articles are not making this easier to understand lol

supple elk
#

This makes the boat move slow, so does have some effect

#

server still thinks boat is stationary tho

#

but client thinks it's moving very slowly... for some reason

#

any ideas on how to fix?

lost matrix
#

The server can not fully enforce the movement of vehicles for players

young knoll
#

It will get the value associated with that key, or return the default you provide if there is none

supple elk
#

so after like, 10s of moving, the vehicle snaps back to the correct position

#

or if I dismount

#

so I must be able to send whatever sequence causes that to occur?

lost matrix
#

Explain what you are trying to do

rough drift
#

Can you use Scala for plugin development?

supple elk
lost matrix
#

No
@fervent prawn

supple elk
#

the best way I found to stop the boat from moving was to set the velocity to the difference between the boat's pos and the desired pos

lost matrix
rough drift
#

fair enough

glossy scroll
#

we have @NotNull for a reason

lost matrix
#

Nothing in your code makes any sense. Take a look at this article:

#

?pdc

glossy scroll
#

ok so