#help-development

1 messages · Page 917 of 1

worldly ingot
#

ProtocolLib lets you have an outgoing packet listener which is cancellable

glacial narwhal
#

how can i do colored glass pane ? 1.20.4

chrome beacon
#

just like any item/block

glacial narwhal
umbral ridge
#

this doesn't work

#

it always prints out false

kind hatch
#

You have it backwards.

#

File(directory, fileName)

umbral ridge
#

o

#

weird javadoc

#

parent, child...

tardy delta
#

Files.exists?

rigid loom
#

I'm using https://paste.md-5.net/dexeripiso.js currently to try and save info and restore it. i didnt include the save method but it works as intended. its a custom library that i can send the link to if needed. can someone help?

umbral ridge
#

How do you know if player.getPing() is still buffering or if ping is actually 0

young knoll
#

Ping is basically never 0

#

Unless you are connected to localhost

umbral ridge
#

Yeah

#

what if I am?

young knoll
#

Well then it’s probably 0

umbral ridge
#

So player.getPing() returns 0 also if it's still loading

#

So.. how do I know the ping .. state? xD

rigid loom
#

even if its not what i used in the link

glad prawn
#

what does your data look like btw?

rigid loom
glad prawn
#

yes

rigid loom
#

give me a sec

rigid loom
glad prawn
rigid loom
#

mhh

#

thx for pointing that out

#

it doesnt restore any of the other data tho

umbral ridge
#

how do I include io.netty to pom.xml

quaint mantle
#

Hi , how to get numbers of enitity of server ?

worldly ingot
#

world.getEntities().size() is probably your closest bet but that's only loaded entities

quaint mantle
worldly ingot
#

Oh you're not making a plugin

#

#help-server in the future but no, I don't think PlaceholderAPI has any placeholders for this. You can probably find an extension maybe

quaint mantle
#

i mean can i use api of placeholderapi for this ?

worldly ingot
#

I'm not sure how PlaceholderAPI is relevant?

quaint mantle
#

can ?

worldly ingot
#

You have no reason to use PlaceholderAPI for that kind of info

#

PAPI isn't a way to fetch state information via code. It's a way for server owners to display data to their users

quaint mantle
worldly ingot
#

No. You can use PlaceholderAPI and provide new placeholders if you'd like. i.e. I add new placeholders like %veinminer_active% which gives either "true" or "false" based on the player's active state. But I'm supplying data, not retrieving data

rigid loom
#

is there any way to get a string from a memorysection?

heavy zephyr
#

I want you to send you something really important that’s hypixel related and it had to be in DMs if that’s fine @worldly ingot

kind hatch
#

Inb4 phishing link. kek

foggy cave
quaint mantle
#

Hi , how to get tps ?

#

in code ?

glad prawn
rigid loom
#
playerRank.put(player.getUniqueId().toString(), (String) sc.get("rank.") + player.getUniqueId().toString());```
#

i assume that rank.) is part of it

glad prawn
river oracle
young knoll
#

Yeah choco I also have something very important that’s hypixel related but even DMs isn’t gonna be good enough

#

I’m gonna have to mail it to you

kind hatch
#

Not the pipebomb. lol

young knoll
#

Actually it’s ricin

#

(For legal reasons that’s a joke)

rigid loom
#

im making sure the file actually contains a player before restoring the data to the hashmap

glad prawn
#

why is your code look so weird

rigid loom
#

wym?

rigid loom
#

i deleted space so the full thing was inline

lilac palm
#

@Override
    public void enable(MAS plugin) {
        listener = new ToggleEventsListener(plugin, this);
        Bukkit.getPluginManager().registerEvents(listener, plugin);
        HandlerList.unregisterAll(plugin.getAutoSellManager().playerListener);
    }

    @Override
    public void disable(MAS plugin) {
        HandlerList.unregisterAll(listener);
        Bukkit.getPluginManager().registerEvents(plugin.getAutoSellManager().playerListener, plugin);
    }```

Can I disable and re-enable listeners like this over and over?
young knoll
#

Yes

#

But generally you should avoid it

lilac palm
#

ok

inner mulch
summer scroll
#

Just want to make sure, does throwing snowball to player no longer gives them knockback?

native ruin
#

Never did

quaint mantle
#

is it possible to see when an entity pathfind fails

summer scroll
rough drift
rough ibex
#

WAI

rough drift
#

xceing's response is correct

rough ibex
#

mandela effect

rough drift
#

not mandela, hypixel added that in

summer scroll
#

I remember it's giving player's knockback, but in 1.8

rough drift
#

so he probably is mistaking with that

rough ibex
#

that's definitely mandela effect-adjacent

#

thinking snowball KB was a thing normally

native ruin
#

There were servers who added those, but I've heard people say it was built in in some servers like spigot

summer scroll
#

I'm bugging out lmao.

sullen marlin
#

It was or wasn’t a spigot bug at some point

#

I can’t remember which was intended at the time

native ruin
#

There's the awnser we've been looking for

umbral ridge
sullen marlin
#

I think vanilla behaviour has also changed

summer scroll
#

Yeah, now I'm questioning my whole existence playing this game

#

Anyways, how can I implement that in a plugin? I've tried to damage the player on ProjectileHitEvent, but it doesn't affect the player.

sullen marlin
#

Give em 0.0000001 damage maybe

native ruin
sullen marlin
#

The damage event code is complicated and annoying af

#

The issue is that snowballs damaged with 0 damage

#

I think at the time spigot added the knockback because it still ran the damage code even though the damage was 0

native ruin
#

yea that make sense, did eggs have the same issue?

summer scroll
native ruin
torn shuttle
#

welcome to hell

    private Location getDisplayEntityTargetLocation() {
        Location newLocation = skeleton.getCurrentLocation();
//        newLocation.subtract(boneBlueprint.getBlockSpaceOrigin());
        //This readjusts the offset from the entity origin offset, necessary because armor stands can have offset models but display entities can't
        Vector offsetBasedOnModelOrigin = boneBlueprint.getDisplayEntityModelSpaceOriginOffset().clone().multiply(1 / 25.599d);
        //This rotates the position of this specific bone relative to other bones to put it in the correct location
        offsetBasedOnModelOrigin.rotateAroundX(Math.toRadians(boneBlueprint.getOriginsForDisplayEntityLocationShiftBasedOnRotation().getX()));
        offsetBasedOnModelOrigin.rotateAroundY(Math.toRadians(boneBlueprint.getOriginsForDisplayEntityLocationShiftBasedOnRotation().getY()));
        offsetBasedOnModelOrigin.rotateAroundZ(Math.toRadians(boneBlueprint.getOriginsForDisplayEntityLocationShiftBasedOnRotation().getZ()));
        newLocation.subtract(offsetBasedOnModelOrigin);
        newLocation.add(getOffsetBasedOnParentRotation()); //todo: this will probably break some sub-bones when rotating in animations
        //todo: experimental trying to figure out the skeleton rotation
        Vector skeletonRotation = newLocation.subtract(skeleton.getCurrentLocation()).toVector().rotateAroundY(Math.toRadians(skeleton.getCurrentLocation().getYaw()) + Math.PI);
        newLocation = skeleton.getCurrentLocation().add(-skeletonRotation.getX(), skeletonRotation.getY(), skeletonRotation.getZ());
//        Bukkit.getLogger().info("his");
        if (animationTranslation != null) newLocation.add(animationTranslation);
        return newLocation;
    }

don't ask me why the rotations just work with those exact values

#

it just kinda works

tardy delta
#

looks like hes vegetarian

tired star
#

Hello, is there an interface for reading how much damage player did to another with an attack?

fallen lily
#

DamageSource

#

Or through the event

tired star
#

ahh yes ty

wet breach
worthy star
#

?paste

undone axleBOT
worthy star
#

i've tried to debug

#

and everything

smoky anchor
#

Scoreboard.# does not exist in your config file would be my guess

worthy star
#
Scoreboard:
  name: '&3&lZyptrik'
  
  # Lines
  '13': '&7'
  '12': '&f%player%'
  '11': ' &f| &7Kills: 1'
  '10': ' &f| &7Kills: 1'
  '9': ' &f| &7Deaths: 0'
  '8': ' &f| &7Mined Blocks: 1k'
  '7': ' &f| &7Playtime: 1 hour'
  '6': ' &f| &7Balance: 500$'
  '5': ' &7'
  '4': '&fServer'
  '3': ' &f| &7Online: 1/10'
  '2': ' &f| &7Store: /store'
  '1': ' &f| &7TPS: 20.0'
  '0': ' &f| &7IP: &fserver.gg'
  
  total-size: 14 # VERY IMPORTANT, IT WILL BREAK CODE OF NOT CHANGED
``` it does
smoky anchor
#

you do not have line 14...

worthy star
#

yea but it starts from 0

smoky anchor
#

this loop starts at 14

smoky anchor
worthy star
#

i think i should get a new brain 💀

#

its fixed !!!

#

finally

#

after like 2 days

#

now i have to do the placeholder API thing 💀

smoky anchor
#

(why did you even iterate from the back...)

smoky anchor
#

actually nvm, I don't actually know what TreeMap is

next iron
#

does anyone know how to store data between restarts? im new to making plugins and want to keep my hashmap that i have for my data to persist

wet breach
#

use flatfile or a db

echo basalt
#

pdc

#

maybe

#

Just something persistent

next iron
#

could you elaborate? as i said im not familliar with making plugins

worthy star
#

persistent data containers

echo basalt
#

Are you experienced with development or brand new to the whole industry?

hybrid spoke
worthy star
#

its like metadata but won't be gone after server shuts down

echo basalt
#

?pdc

next iron
worthy star
#

and you can use data folder with player files so you can edit/see their data

echo basalt
#

Read over that post and let me know if it works for you

#

If not we can discuss other options

worthy star
#

yea but i mean

#

in the plugin folder

echo basalt
#

That's just a poor version of an sqlite database

#

But I guess it's document based instead of relational which can be good and bad

worthy star
#

sql or mongo

#

isn't sql advanced stuff for new people

echo basalt
#

s3 md_5

worthy star
#

hes asking because hes new

inner mulch
worthy star
#

okay

inner mulch
#

*both have

echo basalt
#

From the way they're speaking, they seem to have some basic programming knowledge

worthy star
#

whats best way for scoreboards refreshing, do the tasks thing every tick for whole server or when player joins while hes online

echo basalt
#

No clue how far that goes but we could imagine a world where they're really experienced with working with mysql in c# and in that case it isn't advanced

echo basalt
echo basalt
#

I like to imagine

inner mulch
# worthy star okay

I like sql because its safe and you know what is stored, with nosql there are no rules

echo basalt
#

nosql has its benefits with highly polymorphical data structures :)

inner mulch
#

Yeah

#

No rules arent bad

echo basalt
#

basically if you abuse your AbstractFactoryProviderRegistryTemplate

#

:)

#

You'll end up facing a few situations where you need to store weird abstract data

next iron
#

persistentdata only takes primitive types right? so no instances of classes

echo basalt
#

?morepdc

undone axleBOT
echo basalt
#

uh

#

yeah

#

You can just serialize your data to a bunch of primitive types and move on from there

#

No clue about your exact use case scenario

wet breach
#

its pretty essential

echo basalt
#

For more complex objects I'd probably just do my own data storage

next iron
wet breach
#

yes

#

its an entire language

echo basalt
#

Data in SQL is stored in a table

#

And you can have multiple tables and create relations between them

#

SQLite is an implementation of an SQL database management system which works on a local .db file

inner mulch
echo basalt
#

MySQL is the same but instead of a local file it's a whole thing

#

PDC is a lot more raw. Think of it as a really fancy Map<String, Object> wrapper

#

And that data is stored on whatever NBT container you're interacting with (player data / item nbt / entity / chunk / world)

next iron
#

alr

#

im prob just gonna stick to writing to files for now

worthy star
#

do i need to do something for skript (coding plugin) registered placeholders (with skript-placeholders addon) to be used?

#

with placeholder api

#

or it will do it by itself

#

if i use the PlaceholderAPI#setPlaceHolders method

echo basalt
#

?tryandsee

undone axleBOT
worthy star
#

ok

#

lol

tired star
#

im making a plugin thats supposed to record pvp damage done to each player by other players. Any ideas what would be the best way to store the damage done by each player?

echo basalt
#

I did that on my uh

#

minigame core

#

Let me start by saying NMS already tracks this

#

But if you want to do your own, the idea is to:

  • Make an entry class
  • Make an expiring fixed-size queue class type deal, where entries get evicted after let's say, being <50 entries old or older than, let's say, 3 minutes
#

In my case because games have a limited time scope I skip the whole expiring part and just have a list of every entry throughout the game

#

These entries are basically just wrappers of EntityDamageEvent with the minor difference of not storing hard references to players

#

And maybe adding some checks to get the true source, because people can shoot projectiles or ignite explosives and it's indirect damage

young knoll
#

I wanna know about all damage I took prior to death

#

Including that 1 heart of fall damage 3 hours ago

echo basalt
#

that one mf playing hardcore

#

hasn't turned his pc off in 3 weeks

tired star
#

im trying to make it record all damage until the players death. final goal is to make it heal percentually based on damages.

echo basalt
#

I mean yeah but there has to be some sort of time limit

#

Let's say I hit you once and then you prickle yourself to death 2 hours later

young knoll
#

You deserve the kill credit

tired star
#

its going on this pvp arena part. the games last until everyone is dead. no hp regen except based on the percentual damage done to killed player

echo basalt
#

Then yeah you just adapt the data structure towards you need

tired star
#

so you're suggesting using EntityDamageEvent to record damages and dumping correct entries to queue type thing?

#

im new in spigot so i have to ask to make sure

echo basalt
#

Not storing the exact event but extracting the data you need into a separate class

#

and then having a list of all the data

#

For each player

#

I'd show code but I'm taking 3 days off work because I was working really unhealthy hours and I'm not gonna open my IDE

tired star
#

could you possibly DM me when you get back to work?

wet breach
echo basalt
#

thursday?

tired star
#

sure

echo basalt
echo basalt
#

You can figure this out by then

#

I think I have it on github somewhere

#

lemme check

#

this way I'm not opening my IDE

#

totally a mentally sane alternative

tired star
#

ahh that would be very helpful too

sleek estuary
#

//paste

#

/paste

#

/copy

echo basalt
#

thank you

potent ocean
#

Does anyone have any idea on how to stop a Fireball from entering a certain region, I have the list of blocks I don't want the fireball to enter.

sleek estuary
#

Why does the armorstand with the helmet (before the scheduler) have the correct yaw but the zombie that was created in the scheduler has the yaw at 0?

potent ocean
#

Like if the location of the Fireball is in that list of blocks, delete the firstball.

tired star
echo basalt
#

?paste

undone axleBOT
echo basalt
#

Sounds like an xy issue to me

potent ocean
torn shuttle
echo basalt
#

no

potent ocean
#

like the second the fireball entity location is in that list of blocks

#

delete the fireball

#

before it even explodes or hits anything

torn shuttle
# echo basalt no

too bad

    private Location getDisplayEntityTargetLocation() {
        Location newLocation = skeleton.getCurrentLocation();
//        newLocation.subtract(boneBlueprint.getBlockSpaceOrigin());
        //This readjusts the offset from the entity origin offset, necessary because armor stands can have offset models but display entities can't
        Vector offsetBasedOnModelOrigin = boneBlueprint.getDisplayEntityModelSpaceOriginOffset().clone().multiply(1 / 25.599d);
        //This rotates the position of this specific bone relative to other bones to put it in the correct location
        offsetBasedOnModelOrigin.rotateAroundX(Math.toRadians(boneBlueprint.getOriginsForDisplayEntityLocationShiftBasedOnRotation().getX()));
        offsetBasedOnModelOrigin.rotateAroundY(Math.toRadians(boneBlueprint.getOriginsForDisplayEntityLocationShiftBasedOnRotation().getY()));
        offsetBasedOnModelOrigin.rotateAroundZ(Math.toRadians(boneBlueprint.getOriginsForDisplayEntityLocationShiftBasedOnRotation().getZ()));
        newLocation.subtract(offsetBasedOnModelOrigin);
        newLocation.add(getOffsetBasedOnParentRotation()); //todo: this will probably break some sub-bones when rotating in animations
        //todo: this part tries to readd the animation
        if (animationTranslation != null) {
            Bukkit.getLogger().info("test");
            newLocation.add(animationTranslation);
        }
        //todo: experimental trying to figure out the skeleton rotation
        Vector skeletonRotation = newLocation.subtract(skeleton.getCurrentLocation()).toVector().rotateAroundY(Math.toRadians(skeleton.getCurrentLocation().getYaw()) + Math.PI);
        newLocation = skeleton.getCurrentLocation().add(-skeletonRotation.getX(), skeletonRotation.getY(), skeletonRotation.getZ());
        if (animationTranslation != null) newLocation.add(animationTranslation);
        return newLocation;
    }
echo basalt
#

then yeah you cancel ProjectileHitEvent and remove the ent

echo basalt
torn shuttle
#

I'm honestly just malding that it works

#

see that random -x near the end?

echo basalt
#

yeah

#

o_o

torn shuttle
#

that doesn't make sense to me but it's the only way this will rotate right

echo basalt
torn shuttle
#

and it's not even the right axis to invert

#

don't ask

sleek estuary
torn shuttle
#

chatgpt says it's a gimbal lock but that makes less than no sense that it would lock on a single axis rotation

#

besides my solution wouldn't fix that anyway

echo basalt
#

chatgpt's only good for regex change my mind

torn shuttle
#

hm it was really good at translating my discord bot to 6 languages actually

echo basalt
#

was it though

torn shuttle
#

very convenient for automatically translating stuff with markdown

#

yeah it was pretty good

echo basalt
#

yesterday I learned that custom escape menus are the most gimmicky shit

torn shuttle
#

I understand all but two of the languages it did and it generally tbh I've hired translators that turned in things significantly worse than what I got back

echo basalt
#

they dont respect gui scaling no nothing

echo basalt
#

regular uis do though

torn shuttle
#

not all, not always, not all formats

echo basalt
#

and I had to get it done in like 5 minutes so I told them to eat ass

torn shuttle
#

I was going to ask if you ever played warcraft 3 but then I remembered you're a disgusting zoomer

echo basalt
#

I grew up with flash games

worthy star
#

does fastboard api has no flicker?

torn shuttle
#

smh

#

can't be bothered to show what I mean here but I did a menu style similar to wc3 which uses chains that come from the top of the screen, but the problem is that there is a size limit and if you use the smallest scaling you can actually see the top of the chains

#

we just kinda made a custom holder for the top of the chains but it was "fun" to find out

echo basalt
#

anyways im going to the gym

torn shuttle
#

lmao

echo basalt
#

its been a solid 3 weeks

torn shuttle
#

you're slacking

#

I literally just came back

#

was about to go get my post-gym meal and then crash

echo basalt
#

remember how I said I was working really really unhealthy hours

torn shuttle
#

buddy I just stayed up all night

#

I woke up at 5 pm yesterday

echo basalt
#

buddy

#

homie

#

I just pulled 3 back-to-back 18 hour work sessions

torn shuttle
#

that's nothing

echo basalt
#

I've been waking up, working 10-18 hours, sleeping for 1 hour and repeat this

#

slept like 6 hours last week

torn shuttle
#

see your problem is that you're not sleeping 8 hours

#

you're supposed to work 20 hours but then still sleep 8

echo basalt
#

And I've been at this pace for like

#

3-4 weeks

torn shuttle
#

that's what the real OGs do

#

as long as you get your 8 hours it doesn't matter if you're working 20 is what I've learned in the last decade

#

if you're not sleeping you're not being as productive anyway

echo basalt
#

eh

torn shuttle
#

one day you'll think back to this moment and appreciate just how right I was, as with everything else

echo basalt
#

now that I have mone all of a sudden my family needs so much help paying the bills

torn shuttle
#

yeah well now that I've placed my money in investments my car died in the middle of the highway at night (yesterday)

echo basalt
#

it was a shitbox thank me later

torn shuttle
#

there's always going to be some financial leech

torn shuttle
#

that is the perfect car and if I had a million euros I'd spend 60k modding the shit out of it so it can live for another 60 years

echo basalt
#

fumes older than me

#

mm

wet breach
sleek estuary
hybrid spoke
echo basalt
#

I'm productive at night

torn shuttle
#

everyone is productive at night, that's when no one bothers you and things are quiet

wet breach
#

but I don't get 8 hours of sleep either

hybrid spoke
#

who does nowadays

torn shuttle
#

I do

#

every time

hybrid spoke
#

right

#

only weird people

echo basalt
#

but a bit less productive when I'm running on like 30 minutes of sleep

wet breach
#

some people do. I don't because I have insomnia and don't get REM sleep

torn shuttle
#

I get exactly 8 hours of sleep almost every time

echo basalt
#

ah insomnia my beloved

torn shuttle
#

but between each time I sleep I might be up and working for 18-25 hours

#

or these days working for 16 hours and then at the gym for 2 hours

echo basalt
#

I just have obsessive issues that sometimes cause insomnia

#

nothing as good as working 18 hours and not being able to sleep because you're obsessing over some minor irrelevant detail

torn shuttle
#

just wait until you start doing your own projects

#

sometimes I take a break and do some godot work

echo basalt
#

homie I have my own projects

torn shuttle
#

so I'll just work 10 hours and then be like "oh just let me go do a prototype real quick"

#

and before I know it I've stacked another 18 hours

echo basalt
#

my problem is not stacking 18 hours, my problem is not being able to sleep after those 18 hours because you're still thinking about it

torn shuttle
#

that's why you go to the gym

echo basalt
#

my gym's not open at 4am

#

or whatever

torn shuttle
#

man I wish mine was

echo basalt
#

also working out after coding for like 20 hours

torn shuttle
#

I went at 8:30 am when I would've rather gone to bed

echo basalt
#

recipe for failure

torn shuttle
echo basalt
#

another icky thing of this 1 hour of sleep thing is scheduling shit

#

I was trying to schedule going out with my homie yesterday

#

"ah yeah I'm gonna be working until 6pm and then imma head to bed"
"what time are you gonna wake up?"
"8pm maybe"

torn shuttle
#

I don't even try to schedule things more than 3 days into the future

echo basalt
#

3 hours*

torn shuttle
#

that's because you've not hit the golden schedule yet

#

I know I'm probably going to be sleeping at midday today, then tomorrow at 2pm, then 4pm, then 6 pm

echo basalt
#

ok boomer

torn shuttle
#

so I schedule dnd for friday when I know I'll have pushed my sleep schedule back

echo basalt
#

I don't even know what time I'll be sleeping

#

I just work, pass out for an hour, work, pass out again

#

I just know I have to be awake at certain times

#

like 4pm yesterday

#

or 5pm today because I have an appointment somewhere

torn shuttle
#

lvl 1 amateur non-24h work day enjoyer

echo basalt
#

level 1 crook vs level 100 mafia boss

#

except it's 2 denegerate people boasting about who has the worse sleep schedule

torn shuttle
wet breach
#

and not to stray from it too much

#

this also means learning to stop doing work

echo basalt
#

I have nothing to make a routine over

wet breach
#

you do, you should always have free time to do whatever you want and relax

modern falcon
#

Hi how get tps?

icy beacon
chrome beacon
worthy star
#

where do i put this

torn shuttle
#

is there a spigot api getter for the body yaw of an entity vs the head yaw?

worthy star
#

on the green line?

eternal oxide
torn shuttle
#

hm is that even accurate

#

wouldn't that mean that if you get the entity location -> yaw you should be getting the entity direction and not where it's looking?

eternal oxide
#

yes

torn shuttle
#

I'm going to have to test that one, it looked to me like the base location was the eye location

eternal oxide
#

entity location has the direction the body is facing. EyeLocation is teh head

torn shuttle
#

starting to get there

#

probably will be able to be done with this tomorrow

#

yeah just need to figure out why the animation math isn't working out and fix the one error that is probably causing it to jump around every so often

#

oh and probably actually implement mount points

#

right now I just got the bone directions working with the display entities and the packet stuff

icy beacon
worthy star
#

the maven in the rep looks different than one i have

icy beacon
#

This is a plugin

#

So put it along with other plugins

#

Is that what you wanted?

#

Or did you mean the relocation?

worthy star
#

yes

icy beacon
#

The <configuration> in which the relocations are put is the same level as <executions>. <configuration> inside <executions> is different

#

So create a <configuration> after or before <executions>

#

There you'll put the <relocations>

worthy star
#

i mean

icy beacon
#

Read my words again

worthy star
#

<configuration> and <executions> look different here

#

they're not next to each other

#

they're in each other

icy beacon
#

<configuration> inside an <execution> is not the same configuration

#

There's a configuration for an execution, and a configuration for the plugin

#

You want to put relocations inside the plugin configuration

worthy star
#

ok

icy beacon
#

The <configuration> in which the relocations are put is the same level as <executions>.

worthy star
icy beacon
#

You... left the scope of maven-shade-plugin

#

You are in maven-compiler-plugin

#

How even

worthy star
#

uh im so bad

icy beacon
#

Either of the rectangles

#

Is where you place your relocations config

#

As mentioned, the configuration block is same indentation level as the executions block

worthy star
#

thats what i did in first place

#

but

icy beacon
#

Nope

worthy star
#

it showed error

worthy star
icy beacon
#

You placed your relocations deeper

icy beacon
worthy star
#

isn't this what you mean

icy beacon
#

Look at the example again again again

#

The relocations are wrapped in a <configuration>

worthy star
#

oh so i need to put them in another <configuration>

icy beacon
#

Y e s

remote swallow
#

you only have 1 configuration for shade iirc

icy beacon
worthy star
#

im blind 💀

#

im p sure this is the right one

icy beacon
#

Looks good yes

worthy star
#

ight thanks

#

my bad xD

icy beacon
#

Np

worthy star
#

is this dangerous?

lost matrix
worthy star
#

bet

#

?paste

undone axleBOT
worthy star
#

am i doing something wrong? i did like the github says

#

it doesn't show the scoreboard, and doesn't send errors to console

#

i tried to install fastboard plugin but i get this

[14:18:13 ERROR]: [DirectoryProviderSource] Error loading plugin: java.lang.IllegalArgumentException: Directory 'plugins\fastboard-2.0.2.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
java.lang.RuntimeException: java.lang.IllegalArgumentException: Directory 'plugins\fastboard-2.0.2.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
        at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:70) ~[paper-1.20.4.jar:git-Paper-430]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:47) ~[paper-1.20.4.jar:git-Paper-430]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:17) ~[paper-1.20.4.jar:git-Paper-430]
        at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:15) ~[paper-1.20.4.jar:git-Paper-430]
        at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:101) ~[paper-1.20.4.jar:git-Paper-430]
        at net.minecraft.server.Main.main(Main.java:131) ~[paper-1.20.4.jar:git-Paper-430]
        at org.bukkit.craftbukkit.Main.main(Main.java:326) ~[paper-1.20.4.jar:git-Paper-430]
        at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalArgumentException: Directory 'plugins\fastboard-2.0.2.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
        ... 9 more```
#

it says the plugin doesn't have a plugin.yml

#

and it doesn't in source code? why lol

remote swallow
#

fastboard is an api not a plugin

#

or is that something else

lost matrix
#

Nope thats pretty much it.

worthy star
#

ok but

worthy star
#

no errors

remote swallow
#

you include it inside your plugin

worthy star
#

and no scoreboard

lost matrix
#

You shade it and you dont install it on the server.

#

If its an actual plugin like PlaceholderAPI or ProtocolLib, then you dont shade it and install it on the server.

#

But this one you shade

worthy star
#

ight thanks

#

but how does it work lol, i did what github says

#

but it doesn't seem to be working
i don't get errors and it doesn't show scoreboard

quaint mantle
#

hey guys

#

im how to remove potion damage delay

#

im hitting player 2 - 3 times and i using splash potion but dont working this potion

icy beacon
#

How fast are you hitting the player

#

Could be no damage ticks

quaint mantle
lost matrix
#

You need to set the maximum no-damage-ticks to 0

quaint mantle
#

i can't find it

lost matrix
#

LivingEntity

icy beacon
#

Are you developing or administrating

quaint mantle
icy beacon
quaint mantle
icy beacon
#

???

lost matrix
#

This is a development related channel.

quaint mantle
#

i making server

worthy star
#

its for coding plugins

icy beacon
worthy star
#

anyway

worthy star
#

:)

lost matrix
worthy star
#

ok

#

is broadcasting within the run() method safe? xD

lost matrix
#

You can broadcast pretty much anywhere. But why not just log to console?

worthy star
#

ok lol

quaint mantle
echo basalt
#

What's up smile I'm still alive

lost matrix
quaint mantle
#

broo please

echo basalt
lost matrix
quaint mantle
#

where is the LivingEntity

#

i dont know

worthy star
#

thats coding thing

#

LivingEntity is a entity that is alive

#

like players, zombies, villagers

echo basalt
#

?jd

undone axleBOT
echo basalt
#

Look it up

quaint mantle
#

ye i know that

worthy star
#

i think this is where the problem is, it doesn't broadcast

quaint mantle
#

but where is that

lost matrix
worthy star
#

but this was working before i move to FastBoard

echo basalt
#

Radical I'm too tired for this

lost matrix
worthy star
#

i just did board.updateLine... instead of obj.getScore()...

lost matrix
echo basalt
#

Imagine the run method isn't even running in the first place

#

Add more debug

worthy star
#

oh well

#

ig thats true

#

because nothing broadcasts at all places

#

its not even functioning

#

so

#

why lol

#
        boardTask = getServer().getScheduler().runTaskTimer(this, BoardTask.getInstance(), 0L, 10L);
``` i used this before
#

and it worked with 0 problems

lost matrix
#

Send your code again pls

worthy star
#

boardtask class or main

#

?paste

undone axleBOT
worthy star
lost matrix
#

All off it

worthy star
lost matrix
#

Show the reload command pls

worthy star
#

i restart server

#

or you mean the reloadscoreboard?

lost matrix
#

-.-

worthy star
#

if i use /reload confirm papi crashes

lost matrix
#

This class

worthy star
#

ah lol

#

i don't really think that is the problem but ok xD

lost matrix
#

Was just checking.
Did you add a debug message in the run method?

worthy star
#

1 sec

#

ig the for sentence is broken

lost matrix
#

Ah i see the problem

#

Please make the constructor of BoardTask private.
This will resolve your problem.

lost matrix
sleek estuary
#

what effect is this?

echo basalt
#

villager happy

#

p sure

#

am I tripping or does it say play.akumamc on the scoreboard eyeszoom

sleek estuary
#

its a video 😂

echo basalt
#

yeah I worked there fuck akuma

sleek estuary
#

😂

echo basalt
#

bros makin a 1:1 copy

sleek estuary
umbral ridge
#

how much time does a player#getPing take to load?

echo basalt
#

p sure it takes a measurement every second

#

and averages it out with past measurements

umbral ridge
#

it shows 0 for a few seconds after you join in

sleek estuary
#

I didn't understand what you meant

half arrow
#

Sad OG prison was fun back in the day

#

With player guards etc, then OP prison came round and fucked it

young knoll
#

Any concept will inevitably be over simplified to appeal to the kids

river oracle
worthy star
#

wait nvm

dire blaze
#

does anyone know of a plugin that allows you to sell from chests, that isn't chestshop?

umbral ridge
#

how would I detect when a player enters a new chunk?

eternal oxide
#

move event

umbral ridge
#

what would I do in move event

chrome beacon
#

or have a scheduler check every tick

eternal oxide
#

Check both x and Z for from/to and see if they match Math.floorMod(value , 16)

umbral ridge
#

Now, to get all the blocks within that chunk I though I'd have something like Chunk#getBlocks but instead I have getBlock() 😣

#

So I have to manually do a for loop?

chrome beacon
#

yeah

#

So what exactly is your goal?

#

Why do you need every block

eternal oxide
#

First, why are you getting all blocks in a chunk?

umbral ridge
#

I'm just playing around lol

#

does each block have a specific amount of bytes?

#

or does that depend on the light.. texture? are all block textures the same size?

#

I guess they are right? 16x16 rgb

lost matrix
#

The textures are not being sent to the client. That would be insane.
Its just meta data like type, rotation etc. The client can display this as he pleases.

worldly ingot
#

type, rotation
even these are considered in the same byte. Each combination of block states is a unique block type :p

#

The chunk block data packet only really cares about the type (and light information). Entity and block entity data comes in another packet

#

Oh I lied. Block entity data is included in the chunk packet. I could have sworn they separated that

river oracle
#

Damn Choco don't let hypixel know you got that wrong they might fire you

#

I'm pretty sure they hired you because you're always right

worldly ingot
#

If that's true, they got scammed lol

next iron
#

im trying to add protocollib as a dependency but maven cant find it it
i just copied what was on spigotmc
does anyone know what im doing wrong?
https://hastebin.nl/yOwytRF (my pom.xml)

young knoll
#

Can't believe Choco removed mystery boxes

worldly ingot
#

Looks fine to me, but there is a 5.1.0 version you should probably use instead

#

Just be sure you're updating your project. In IntelliJ you have to explicitly reload the pom.xml

next iron
#

oh reloading fixed it ty

worldly ingot
#

Just needs a bit of encouragement :p

shadow night
umbral ridge
#

This is why im looking at chunks manually and each time i enter a new chunk, I want to get all the blocks, and process them and return a chunk size in KB. If that's even possible. It's for debug purposes and only for my server really

#

That way I could calculate eg.: spawn size in KB, and then test it when I "optimize" the spawn area by removing unnecessary blocks that can't be viewed

#

Every byte matters! XD

shadow night
#

Ooh sounds like hell

umbral ridge
#

Yeah... I would appreciate any help XD

#

This is why I'm asking if every block is a constant amount of bytes, because it has to be right? Ignoring the batches compression. I need the raw data

shadow night
#

It's not... From what I remember

umbral ridge
#

I could use the BlockData class but where am I supposed to get the size of a block, I guess it would be in bytes

#

Block#getData() is deprecated and I don't know what a Magic value even is

eternal oxide
#

size?

umbral ridge
#

Amount of bytes that the block is

eternal oxide
#

Thats not reall ypossible

shadow night
#

It is theoretically

#

You could calculate it

umbral ridge
#

If you press F3+3 you get this... How are these values even obtained?

thin holly
#

i found that in the BukkitCommand class you can set the name and the label. What's a label? and is different from the name?

shadow night
shadow night
umbral ridge
shadow night
#

Nah

#

Haven't used netty in ages

zinc moat
#

How do i add multiple commands in 1 file?

#

nvm

paper rain
quaint mantle
#

i how to learn code plugin ?

#

i know some java

eternal oxide
#

Pick a tutorial and begin

quaint mantle
#

dont have a good teacher for that ?

chrome beacon
#

wdym you don't learn anything?

quaint mantle
#

yea

#

i understand

#

dont understand

chrome beacon
#

What part don't you understand?

quaint mantle
#

all

#

dont have good teachers for that ??

#

youtube videos etc.

chrome beacon
#

There are plenty of youtube videos too

#

Just do a search

quaint mantle
#

you a know make plugin ?

chrome beacon
#

?

#

I know how to make plugins if that's what you're asking

quaint mantle
#

i ask you you a learned in where

chrome beacon
#

There is no single place I learned from

#

I learned by looking at open source projects, videos and forum posts like the wiki link above

quaint mantle
#

oh okey

#

in how much time ?

chrome beacon
#

if you're in a hurry then hire someone to make a plugin

quaint mantle
#

i want to learn

chrome beacon
#

It depends on the person, personally I'm quite a fast learner

worthy star
#

idk why

next iron
#

how can i edit the nbt of an entity? i want to spawn an item display entity displaying an item

quaint mantle
#

i starting to learn tomorrow!

chrome beacon
#

if you're wondering what the difference is; the spawn method consumer runs before the entity is spawned allowing it to spawn with your data

#

spawnEntity will immediately spawn the entity and you can then use the reference to modify the entity

next iron
#

alright

chrome beacon
#

Ideally you'd want to spawn it with your data directly to avoid updating the entity

#

it also allows other plugins listening to the spawn event to grab your data since it's set before the event fires

next iron
chrome beacon
#

ItemDisplay.class

next iron
#

ah thanks

inner mulch
#

is there a way the call .class on a generic?

next iron
chrome beacon
#

Use a lambda, will make the code much cleaner

#
world.spawn(location, ItemDisplay.class, item -> {
    ItemStack itemstack = new ItemStack(Material.WRITABLE_BOOK);
    item.setItemStack(itemstack);
});
quiet ice
chrome beacon
#

Yeah

next iron
chrome beacon
#

<>

quaint mantle
#

is there any way i can listen for sweep attacks from players ?

chrome beacon
#

You can check for the sweep conditions yourself

#

other ways depend on what you're trying to do

quaint mantle
#

i need to increment the damage on sweep attacks

#

kind of like the sweeping edge enchantment but on any sweep attack

chrome beacon
#

?

#

what's the difference between what you're trying to do and Sweeping Edge

quaint mantle
#

that i want some players to have kind of a global sweeping edge effect on all tools even non enchanted ones

chrome beacon
#

or look at how nms checks it and use that

inner mulch
#

guys what happens when i deserialize an object, later recreate it, but there were changes made in the constructor, or new fields. Does somebody know what will happen? Will it just continue to work except the other fields are just null? Or will there be errors?

lilac dagger
#

if there's new fields they'll be null

#

big no no in most cases

#

i don't like java's deserialization system

inner mulch
#

okay

river oracle
#

Avoid Javas deserialization system where possible its a little rough

river oracle
#

Things get especially fucky if you don't specify. A static serialization ID constant

mental moon
#

Anyone know how to modify a player's stepheight, or make a listener that could simulate that effect?

chrome beacon
#

The best way would be to wait for 1.20.5

#

It will add a simple attribute for step height

mental moon
#

Incredible. Thank you.
I'll put it on the back burner xD

eternal night
torpid blaze
#

Hey,
I have a question about how I could prevent a player from interacting with a endercrystal? Right and Left click
Does anyone know?

torpid blaze
#

but there I can only do event.getRightClicked() and not prevent the left click

mental moon
#

Might that be EntityDamageByEntityEvent?

torpid blaze
#

oh, right

#

haven't thought about that. I will try. thanks!

near quartz
#

hey

#

package com.andrei1058.bedwars.shop.listeners;

import com.andrei1058.bedwars.api.arena.GameState;
import com.andrei1058.bedwars.api.arena.IArena;
import com.andrei1058.bedwars.api.arena.team.ITeam;
import com.andrei1058.bedwars.arena.Arena;
import com.andrei1058.bedwars.shop.ShopManager;
import com.andrei1058.bedwars.shop.quickbuy.PlayerQuickBuyCache;
import org.bukkit.Location;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;

public class ShopOpenListener implements Listener {

    @EventHandler
    public void onShopOpen(PlayerInteractAtEntityEvent e,PlayerInteractEntityEvent d){
        IArena a = Arena.getArenaByPlayer(e.getPlayer());
        if (a == null) return;
        if(!a.getStatus().equals(GameState.playing)) return;
        Location l = e.getRightClicked().getLocation();
        for (ITeam t : a.getTeams()) {
            Location l2 = t.getShop();
            if (l.getBlockX() == l2.getBlockX() && l.getBlockY() == l2.getBlockY() && l.getBlockZ() == l2.getBlockZ()) {
                e.setCancelled(true);
                if (a.isPlayer(e.getPlayer())) {
                    ShopManager.shop.open(e.getPlayer(), PlayerQuickBuyCache.getQuickBuyCache(e.getPlayer().getUniqueId()),true);
                }
            }
        }
    }
}

how i can add left click to this plugin

worthy star
#

join event is in there, and and i register in mainclass

#

should i make it in a seperate class

river oracle
#

Mojang made some great stuff there

eternal night
#

Very easy to read too ashlolnodders

echo basalt
#

ah yes codec

#

almost as nice as the brain system

river oracle
worthy star
#

hi

#

i want to get a private Map<UUID, FastBoard> from a class to another, i made a public method to get from it to use in other classes, is that safe?

echo basalt
#

Ideally no

#

You encapsulate the entire class and don't expose the collection itself

worthy star
#

what should i do then

echo basalt
#

what I just said

worthy star
#

if i use the listener in that class it causes errors

lost matrix
worthy star
#

what should i do then?

teal venture
#

To be able to make decent spigot plugins how much of Java should learn like I see stuff like -> symbols and all kinds of stuff I know about data types and if statements at switch statements and while loops but like some of the stuff just doesn’t make sense I’m starting to get the idea of making objects and creating instances and stuff but like, I just don’t know what to do.

I watch videos but then when i get on IntelliJ it’s like retained nothing that I learned. Is there any advice anyone has for me? I’ve never been super smart but I thought this would come easier than it has so far.

echo basalt
#

Project-based learning

lilac dagger
echo basalt
#

Instead of learning all the theory at once just break it down and learn along

#

It's kind of how I learned

lilac dagger
#

exposing certain methods like get set and something else

lost matrix
lilac dagger
#

and then expose the manager to both classes via a tree like structure

worthy star
teal venture
worthy star
#

?

echo basalt
#

I'd avoid using chatgpt for development as it's just plain bad

#

(we should make a thread for this)

teal venture
# echo basalt We start by breaking down the feature

If you make a video tutorial of how to implement Java docs into your code and just go over of if you get an idea and going to the javadocs and implementing stuff I’ll edit it and give it to you to upload or I can upload it myself I feel like that’s the hardest part 😭

#

Like the javadocs are scary bro

echo basalt
#

Javadocs is really just automatically generated html for comments

teal venture
#

Oh another question, I see stuff like ‘item stack’ is that creating an instance of an object? And like where I can I find all of these kinds of things like item stack that spigot has to offer

rotund ravine
#

?jd-s

undone axleBOT
worthy star
lost matrix
worthy star
#

yes

#

i think

#

registering the listener requires a public class, and the contrsucter is private

lost matrix
# worthy star i think
class Car {
  private int tires;
}

______________________________

Car first = new Car();
Car second = new Car();

first.setTires(4);
System.out.println(second.getTires());

Tell me what this prints

eternal night
#

7

lost matrix
zealous osprey
#

Bannana

worthy star
#

nothing

#

:)

echo basalt
#

?learnjava!

undone axleBOT
worthy star
#

uh wtf

#

lol

#

mb

echo basalt
late sonnet
#

how many varians of the larnjava exists now? xd

echo basalt
#

2 pretty sure

lilac dagger
echo basalt
#

it is 0

lilac dagger
#

no way

worthy star
#

whats even a Car, and a class is not a method is it

tardy delta
#

anyone got a better name for a node in a char trie that stores the end of a word (it still has child nodes), ValueHoldingNode sounds pretty vague to me

echo basalt
#

ResultNode?

tardy delta
#

mwoa

lilac dagger
#

FinalNode?

echo basalt
#

mm I'm starting to get the impression I should make a while pinned post about java terminology

#

this is a class, it does stuff

#

new is new

#

-> points to the right

tardy delta
#

learn em some strictfp

echo basalt
#

<- isn't a thing because we need to write our code right

tardy delta
#
  • breaking out of named blocks
worthy star
#

what does that code do, its not a right code is it

echo basalt
#

<< is like that <.< face but without the dot

echo basalt
#

why am I getting french networking yt recommendations

lost matrix
worthy star
#

ok

#

@lost matrix this souted 0

echo basalt
#

Now, why

lost matrix
worthy star
#

In the Cars class i save tries as a private integer, as nothing (like didn't save a value to it) and then i made getters and setters
and i set first.setTries() not second so second didn't change

#

and that was what i meant nothing in first place, nothing because it didn't have a set value

lost matrix
#

Right. Because a new instance of a class has its own variables and doesnt know about variables in other instances.

Now if you create two instances, and each instance has a Map<> variable, then those two maps are different.

ivory sleet
tardy delta
#

https://en.wikipedia.org/wiki/Trie (would be the node where "tea" ends, or "inn")

In computer science, a trie (, ), also called digital tree or prefix tree, is a type of k-ary search tree, a tree data structure used for locating specific keys from within a set. These keys are most often strings, with links between nodes defined not by the entire key, but by individual characters. In order to access a key (to recover its value...

worthy star
#

and ty for that it was fun xD

lost matrix
#

And that was your problem. You had one instance for a listener and one instance for a runnable.
And if you put stuff into one instance, then the other instance will be still empty

ivory sleet
worthy star
tardy delta
lost matrix
#

Only use one instance

ivory sleet
#

I remember there being a term that we got encouraged to use

#

Cant just remember what it was called

worthy star
#

thanks

tardy delta
#

red nodes would be ValueHoldingNode (assuming this is an inbalanced tree)

#

you get it?

ivory sleet
#

Yea

worthy star
#

but is this a normal thing from the api

#

?

ornate heart
#

So I'm using Inventory#setItem with an inventory that the player has opened. There seems to be a difference between what the client sees and what the server sees though.

The item is set, but I can't actually see it. It's invislble. I know that it's set because I've tried to get the item after I've done Inventory#setItem and the item is there. I just can't see it.

Any reasons as to why this may the case?

#

I'll note, I've already tried player#updateInventory to try and update what the player sees on the client-side but that doesn't do anything.

chrome beacon
#

Make sure you have a reference to the correct inventory instance

ornate heart
#

I believe I do have the correct reference, because like I said: The item is actually set but there seems to just be a visual bug.

zenith gate
#

java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_20_R3.block.CraftBlock cannot be cast to class org.bukkit.block.Chest

What is a CraftBlock??

remote swallow
#

the impl of Block

zenith gate
#

am i supposed to get that from the blockPlaced? BlockPlaceEvent I am trying to get my chest that is being placed.

remote swallow
#

chest is a block state iirc

zenith gate
#

yes.. I just made stupid mistake. it working now. Thanks.

ornate heart
zenith gate
#

It was generated by Dalle

tardy delta
#

finally

sterile token
#

Someone can explain me why if i use CompletableFuture with a void, then when i want to use exceptionally/) to throw up the exception via a logger or throw exception keyword. I get tell that void cannot be applied to Void?

tardy delta
#

show code

#

and Void != void

sterile token
#
public CompletableFuture<Void> insert(String field, Object value) {
        return CompletableFuture
                .runAsync(() -> handler.getClient().hset(this.identifier, field, handler.getGson().toJson(value)))
                .exceptionally((error) -> {
                    handler.getLogger().severe("[Redis]");
                });
    }```
tardy delta
#

return null

sterile token
#

oh okay, but why? If that doesnt disturb you

tardy delta
#

idk exceptionally returns a new future

remote swallow
#

exceptionally doesnt return a future

sterile token
#

okay, thats weird so

#

Why would you have to return if its void, but idk if it works, it works

remote swallow
#

so you can do stuff if its finished

sterile token
tardy delta
sterile token
#

I know that for doing that you use CF.sppluyAsync() why is designed for working the generic end value / result, that yes makes sense using a return

remote swallow
#

when the future has completed the operation, you can do something, like handle the response, notify users

remote swallow
sterile token
#

lmao not even GPT can explain the reasons of why returning null inside a exceptionally code block of a void future. Seems weird if we see the point because why a void future, would have to return null ¿?

quiet ice
#

Void != void

#

java.lang.Void must always be null and is like every other object. It just happens to be a very special object that can never be initialized (and thus you can be sure that everything that returns java.lang.Void is returning null).

#

The main usecase of java.lang.Void is to have an Object-equivalent of the void primitive, which can not be used with generics (yet - valhalla when?)

sterile token
#

oh allright, realyl thanks

worthy yarrow
#
private void calculateResult() {
        String expression = display.getText();

        try {
            ScriptEngine engine = new ScriptEngineManager().getEngineByName("graal.js");

            if (engine == null) {
                display.setText("Error: JavaScript engine not available");
                return;
            }

            Object result = engine.eval(expression);

            display.setText(result.toString());
        } catch (ScriptException e) {
            display.setText("Error: Invalid expression");
        }
    }```
I know it's not spigot api, but I can't find help anywhere else and I'm too dense to figure out why the engine is always null
quiet ice
#

Well evidently ScriptEngineManager cannot discover the graal.js engine - perhaps you forgot to merge service files?

#

Oh, and don't use the no-args constructor of ScriptEngineManager.

worthy yarrow
#

Bear with me too, because this is the first java project outside of mc framework

quiet ice
#

Well in that case it might be worth defining on how your classloading is set up. Because JSR-223 usage to differ from setup to setup

worthy yarrow
worthy yarrow
sterile token
#

but why js on Java?

worthy yarrow
sterile token
#

i just seen it weird haha because is not common thing

worthy yarrow
tardy delta
#

what are you trying to eval?

worthy yarrow
#

It's a calculator

tardy delta
#

what kind

worthy yarrow
#

?paste

undone axleBOT
worthy yarrow
#

basic

chrome beacon
#

Then why js?

worthy yarrow
#

Like I said, I was following a thing I found online

tardy delta
sterile token
worthy yarrow
#

Also I'm a bit dense with this... first java project outside of mc framework

tardy delta
#

what

sterile token
#

what?

tardy delta
#

register commands in plugin yml

worthy yarrow
#

I hardly know what I am doing lol

tardy delta
#

id say just use my library and put all user input in a string and ask to parse it

worthy yarrow
#

Sounds easy enough

tardy delta
#

would work fine if its a simple calculator

visual laurel
#

thanks

worthy yarrow
#

It's awesome you just had that ready to go

remote swallow
#

the command isnt in plugin.yml

#

i love when discord scrolls me up

torpid blaze
#

Hey,
I have a question about spawning endcrystals, because I use this code:

EnderCrystal enderCrystal = getGameMap().getWorld().spawn(playMap.getCrystalForTeam(team.getTeamColor()).toLocation(gameMap.getWorld()), EnderCrystal.class);
                    System.out.println(enderCrystal.getEntityId());
                    System.out.println(enderCrystal.getLocation().toString());

and in the console I can see the right coordinates and the entityId, but in the world ony the third endcrystal is spawned from 3.
Has anyone any idea?

#

My only guess is maybe something with gamerules? Because when trying it on another world, it works fine as far as I tested it.

chrome beacon
#

You probably have some other code messing with it

sullen marlin
#

// other plugin

torpid blaze
#

no

torpid blaze
azure vault
#

how do i remove all bossbars? this doesn't work:```java
server.getBossBars().forEachRemaining(BossBar::removeAll)

#

they still appear at the top of the player's screen

tardy delta
#

i dont think custom bossbars are added to Bukkit.getBossBars() (could be wrong ofc)

#

atleast didnt work for my vanish plugin

azure vault
#

Ah

#

lemme try making a manual list then

paper rain
#

hello

azure vault
tardy delta
#

doesnt do anything, i believe those are for vanilla ones

paper rain
#

is there some1 who can help me with some api?

#

im tryna detect trade finish in TradeSystem by erikzimmerman

#

but it doesnt work

#

?paste

undone axleBOT
paper rain
tardy delta
#

registered it?

paper rain
#

yeah

native nexus
#

How can I get a list of materials that do not include MinecraftExperimental? I know it is an annotation but how can I check against it?

#

Here is an example from the JAVA_DOC

remote swallow
#

iirc there should be an isExperimental

native nexus
#

I checked and couldnt find it :/

sullen marlin
#

It's isEnabled something or other

paper rain
drowsy helm
# paper rain is there some1 who can help me with some api?

is it printing these


        System.out.println("Trade Finish Event - Player 1 Progress: " + plugin.getConfigManager().getPlayerProgress(p1.getUniqueId()));
        System.out.println("Trade Finish Event - Player 2 Progress: " + plugin.getConfigManager().getPlayerProgress(p2.getUniqueId()));```
paper rain
#

no

#

its outside

tardy delta
#

@worthy yarrow have you found anything useful?

drowsy helm
#

and you're 100% registering it

#

because it really couldnt be anything else

paper rain
#

getServer().getPluginManager().registerEvents(new OnTradeFinish(this), this);

drowsy helm
#

it's on their end

paper rain
#

okay

#

bcs i really added it to the pom

#

i have it on server

worthy yarrow
paper rain
#

and also as a external library

drowsy helm
#

or just rewrite your own implementation

tardy delta
paper rain
#

yeah but these are like 2 lines of code

drowsy helm
#

that don't work

paper rain
#

yeah

#

do i have to add some instance of the api?

worthy yarrow
drowsy helm
#

it should be in the documentation

paper rain
#

can i send u?

#

im not sure

drowsy helm
#

What's it called

harsh rose
paper rain
#

TradeSystem

#

by erikzimmermann

tardy delta
tardy delta
#

ah dang it im on 19, for no particular reason

native nexus
tardy delta
#

could probably change it if you really wanted

drowsy helm
#

and are you using the remap plugin

worthy yarrow
#

I don't think it's the dependency, something is messing with the import, intelliJ won't even recognize com."githhub" as a symbol

tardy delta
#

com.github? show screenshot

paper rain
harsh rose
worthy yarrow
tardy delta
#

thats not even the correct import

worthy yarrow
#

It's an example because "github" again, isn't recognized

tardy delta
#

i wanted to see what happens when using my code

worthy yarrow
drowsy helm
worthy yarrow
#

I did too tbf, I'd love to implement more than just a basic math calculator and if I could use your repo, it'd make it a whole lot easier