#help-development

1 messages · Page 1295 of 1

fading dew
#

Posted this on the Paper discord already. Just wondering if you share their opinion.
I was working on a events util that imo simplifies registering event handlers and reduces boilerplate.

https://github.com/OpenBukkitUtils/Eventive

So for example you can do this:

package openbukkitutils.eventive.example.easyway;

import openbukkitutils.eventive.EventsUtil;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class ExamplePlugin1 extends JavaPlugin {
    @Override
    public void onEnable() {
        var util = new EventsUtil(this);
        util.registerEventExecutor(PlayerJoinEvent.class, event -> event.setJoinMessage(event.getPlayer().getName() + " just joined the server!"));
        util.registerEventExecutor(PlayerQuitEvent.class, event -> event.setQuitMessage(event.getPlayer().getName() + " left the server."));
    }
}

Or this:

public class ExamplePlugin2 extends JavaPlugin {
    @Override
    public void onEnable() {
        var util = new EventsUtil(this);

        util.registerEventExecutor(PlayerJoinEvent.class, this::handleJoin);
        util.registerEventExecutor(PlayerQuitEvent.class, this::handleQuit);

        // only call the event if player isn't sneaking
        util.registerEventExecutor(PlayerQuitEvent.class, this::handleQuit, event -> !event.getPlayer().isSneaking());
    }

    private void handleJoin(PlayerJoinEvent event) {
        event.setJoinMessage(event.getPlayer().getName() + " just joined the server!");
    }

    private void handleQuit(PlayerQuitEvent event) {
        event.setQuitMessage(event.getPlayer().getName() + " left the server.");
    }
}

What do you think?

buoyant viper
#

its neat

#

dunno if i personally would use it

sullen marlin
#

How is this simpler

#

You've just moved an if statement from one spot to another

spiral cape
#

@drowsy helm Thank you for hinting the pdc idea (have forgotten a lot about mc/spigot/bukkit API's). This had worked great 🙂

#

It was about this 🙂

drowsy helm
#

No problem

spiral cape
fading dew
stiff harbor
#

Ive cooked my plugin. After working on a few files today everything ive been doing for the past 3 weeks isnt working anymore... time to create a new project and slowly reimplement everything 🙂

mortal vortex
#

Does anyone know of plugins that provide their own APIs with custom events? I’m trying to understand how they implement them. I want to design my API to fire events so that addons can perform additional actions after my main plugin handles them.

For instance, master plugin handles the Event from the server directly through Bukkit’s Events, then performs any additional logic or checks, then at someplace within the code, perhaps nested under conditions, fire an event of its own. Such that further addons would not need to perform the same if statements to validate if code should run.

fading dew
fading dew
mortal vortex
#

No. It isn’t.

fading dew
#

dang 🥲

echo basalt
#

HuskSync does it in a weird way where each event is basically an interface and each platform has an impl that is called in its native system

mortal vortex
#

I don’t mind creating a custom event object, and then passing the actual event context through as additional shit.

fading dew
#

I was assuming we were talking about Bukkit events

mortal vortex
#

Fuck, maybe I shouldn’t text while in the shower, and actually properly explain this when I’m out.

echo basalt
#

at work we have a skills system that works under a similar context

mortal vortex
#

please censor the w word.

echo basalt
#

where it "triggers" actions with a context

mortal vortex
#

(W*rk)

echo basalt
#

and those actions can have restrictions and stuff

fading dew
#

because you can create custom events with Bukkit too. That's what I was talking about

#

w**k 🤬🤬🤬

echo basalt
#

Here's an example

#

we use it for more than just abilities because it's so flexible

fading dew
#

what kind of API is this?

echo basalt
#

uh

#

spigot / paper :)

#

with a lot of abstraction on top

fading dew
#

no I mean the code that I'm reading here uses specific methods n classes from a specific API. Did you write that API or is it from Paper/Spigot?

echo basalt
#

I wrote it all

fading dew
#

okay

echo basalt
#

it takes some effort

fading dew
#

honestly i have no idea what that code does from reading it

echo basalt
fading dew
#

yea. it feels too "declarative" i feel like procedural with a couple if statements and functions wouldve worked too

echo basalt
#

It's basically an action that runs every time a player takes damage, as long as they have a trinket equipped and the damage falls under one of those given types

echo basalt
#

it's also incredibly easy to change the firing order of things and these "contexts" often offer some clever systems that basic events do not

#

For example, a custom damage modifier system that can properly stack values

#

It makes adding items that, for example, give you +20% damage really really easy

fading dew
#

yea i dunno your usecase. you probably know what you're doing. these days i'm just scared of too much "boilerplate and api masturbation" that I fell into myself back in the day 😂😂😂

#

cause a wise programmer once said: complexity very very bad

echo basalt
#

Keep abstractions sensible

fading dew
#

definitely

buoyant viper
#

and then recommends other to 😞

echo basalt
#

Benefits of being paid hourly

buoyant viper
#

i cant over engineer 😞

#

i CAN over think, however

#

(this has had severe negative consequences on my mental health)

young knoll
#

Yay overthinking

echo basalt
#

joeshrug I legit did other random stuff at work for a solid 2 weeks while I came up with this

orchid brook
#

Hi guys is there a way to prevent Player::hideEntity method to hide player from tablist ?

echo basalt
#

Only alternative is to use packets

sly topaz
#

you can't make hideEntity not hide the player from tablist but you can send an additional packet to list them on the tab again after they are hidden

buoyant viper
#

wouldnt be very hidden now would it 😔

sly topaz
#

one may question why even bother using the visibility API if you're going to be sending packets anyway and that is simply because the visibility API also removes them from the entity tracker as well as tracking which entities have been hidden in case you want to make them visible again, so that is one less thing to handle by yourself

#

ideally the hidePlayer method should just have a listed boolean but welp, a good first PR if anything

left jay
#

so i cant figure out why my CustomDamager.doDamage() method is only doing 98.2% of the damage that is being passed on through the damage variable

#

ok apparently it works on golems, what the hell?

mortal vortex
#

Legal Abuse Victim kek

smoky anchor
eternal oxide
#

hmm, not seen you pink before steve

smoky anchor
#

I did the thing just so I could send a sticker once

eternal oxide
#

lol

wet breach
wary harness
#

So I got strange problem

#

I am creating xp bottle with custom amount of xp

#

but when is picked up if player has Mending enchant it will fix there stuff and they will receive full amount of xp of that orb

#

so amount which was used on mending is not substracted away from orb amount

#

why does that happens

left jay
#

Well thanks then

mellow bough
#

hey ! Do you guys have an idea how to not have this error (I'm new to intellij)

chrome beacon
#

Reload the pom

#

with the reload icon in the top right or in the maven tab that's also on the right

mellow bough
#

oh ty

misty ingot
#

is there a way to get a listener for when a player obtains a certain item by any source

pickup, /give, whatever the hell

chrome beacon
#

Not easily, what are you trying to do

misty ingot
#

give every item the player gets a unique UUID and then check for duplicates and remove them

grand flint
#

well if its for keys

#

just check the key being used on the crate

#

save all used keys

#

its barely any data

misty ingot
#

its for every item the player obtains

grand flint
#

another example of over security

grand flint
#

also why add this? simply eliminate the dupes

#

paper works hard so does minecraft on eliminating all dupes

#

if u find a dupe just report it

misty ingot
misty ingot
#

lets assume for now that we are fine with non stacking

#

i talked to the team and thankfully its only for very rare items actually

grand flint
#

its a part of owning a server u cant have everything perfect

#

the important thing is that things u monetize doesnt get duped or stuff like that

#

which are easy, for cosmetics i simply store it in a database and they can see what they can wear on their inventory

#

its not a physical item

misty ingot
#

yes i get that but we have a TON of custom physical items that the player can obtain

grand flint
#

yeah so make them non stackable

#

for example i have some op weapons

#

those are non stackable and use a uuid system

#

but again, there are no current dupes

#

the thing that matters is ur own plugins, make sure they dont have dupes

misty ingot
#

we want pretty much the same setup that you have
but we have deviated from my actual question

grand flint
#

for an open world, u have season resets anyways

grand flint
#

i have a pretty large plugin just for fixes like that its private but its not that hard

misty ingot
#

i have not been able to find a listener that detects /give

grand flint
#

especially with a uuid system

#

well why would /give dupe?

#

these r the type of stuff u need to not worry about

misty ingot
#

we dont want players to dupe the item we /give-ed to them

grand flint
#

u need to worry about them duping normal ways

grand flint
#

if u have a uuid system

#

give it with mythic give command

#

that has a uuid system

#

u shouldnt be worrying about that though

misty ingot
#

so basically we dont need this system

grand flint
#

basically dont worry about /give

#

u can worry about the rest but not extremely

#

i have the budget and these items make high game changing progress

#

so these r important to me

#

know what u need

#

100% security is not a thing

#

have an anticheat, have updated plugins and server, have active staff

#

have a good host and a ddos protection

misty ingot
#

we are in the same boat as you
i just wasnt as aware about this

grand flint
#

just basic stuff

tiny badger
#

sorry i'm about to post a kinda big text wall

#

i'm trying to write a 1.21.7 plugin with a feature that creates auto-aggro zombie piglins
it almost works, but it's got a problem
basically, 20% of pigzombies that spawn in are set metadata, given a cosmetic change (stone sword, boots), and are set to automatically target the nearest player

this works, but the problem is that the remaining 80% of pigzombies will see the auto aggro pigzombies, and get angry as a result
of course, this is how pigzombies work normally
is there a way i could circumvent anger spread among the auto-aggro pigzombies?
the goal is that when a player is near a group of pigzombies, and one of them is auto-aggro, the auto-aggro will attack the player but the other pigzombies will ignore the player unless the player hits back

grand flint
#

for example idk why crate plugins dont have a builtin uuid system for keys

#

its super easy to implement

#

but i dont have keys i sell crates as a value on my database

misty ingot
grand flint
#

then simply add a uuid system to keys as i said its super simple

#

if crate open check key uuid, if not used save uuid to used and open crate if used warn players with litebans that they used a duped key

misty ingot
#

and what shall we do about the other rare items

grand flint
#

then use liteban templates so if they get another warning on that category they get baned

grand flint
#

i recommend working with the mythic ecosytem

#

crucible is my recommendation if u have the time and want proper customization

#

all sorts of animations, mechanics and such plus it had uuid system as well

#

so it will check built in for dupes im pretty sure

thorn isle
#

mythic is 🚮

ivory sleet
#

lol why

tiny badger
grand flint
young knoll
#

Last time I tried to use a mythic plugin it claimed to support spigot but it in fact did not

#

No idea if it has been fixed since then, but still

#

Smh my head

grand flint
#

but why would u use a plugin like mythic on spigot 😭

young knoll
#

Because I was developing another plugin for spigot and wanted to support mythicmobs

#

Also if it still doesn’t support spigot then it shouldn’t be on spigotmc

remote swallow
#

@md

slender elbow
#

hi is there a vault replacement that works on 1.21.8 since it isnt marked as supported thx

remote swallow
#

use hypixelvault2.159811169

karmic plume
#

🙏 Seeking Help to Finalize a 1.8.9 Plugin 🙏

Hey everyone! I'm working on a passion project and have gotten stuck on the final technical steps. I was hoping a more experienced developer from the community might be able to lend a hand.

Project Details

  • 👾 Plugin: A custom RPG/Survival plugin with features like bosses, pets, and an XP system.
  • ✅ Status: All the Java code is 100% written and ready to be structured.
  • Minecraft Version: Spigot 1.8.9

Technical Help Needed
I need assistance with the final packaging and compilation. The tasks are:

1️⃣ Project Structuring: Organize my existing .java files into a proper Maven project.
2️⃣ Configuration: Correctly set up the pom.xml (for Java 8) and plugin.yml files for Spigot 1.8.9.
3️⃣ Compilation: Compile the final, working .jar file.

My Offer
I'm not in a position to offer payment for this, as it's a personal project made with a lot of care.

In return for your help, I would be extremely grateful and will give full, prominent credit for your contribution within the plugin itself and anywhere it's shared!

How You Can Help
➡️ If you have experience with this and a little bit of free time to help out, please send me a Direct Message (DM)!

Thank you for reading!

thorn isle
#

i usually clown emote these but i'll bite for once; the maven build and plugin.yml sound like fairly trivial things you could probably get set up after reading a few minutes online

#

as for

compile the final, working .jar file
that's what maven is for

pseudo hazel
#

this reeks of AI

#

if you can create a plugin full of bosses and pets but cant set up a plugin.yml? Please man

#

you didnt even try

karmic plume
# thorn isle i usually clown emote these but i'll bite for once; the maven build and plugin.y...

You're right, for an experienced developer I'm sure this is a trivial task. I've spent most of my time focused on writing the actual Java logic for the features, but I'm still new to the Maven build process and how it all connects. I've looked at some guides, but was having trouble applying them to my specific project.

That's exactly why I was hoping someone who finds this part easy could lend a quick hand to get me over this final hurdle. Thanks for the input, though!

thorn isle
#

now be honest here, did you write the java logic with chatgpt

left jay
#

is there a way to get around minecraft's 1s cooldown of taking damage?

thorn isle
#

because if you have like 85 .java files written by chatgpt that you want to turn into an actual plugin, a pom.xml and a plugin.yml aren't going to help you do that

left jay
#

sweet, thanks

thorn isle
#

i don't remember if you have to do it every time the entity gets hit or if it persists

chrome beacon
#

Need to do it every time

thorn isle
#

i vaguely remember having trouble with this because setting it in the damage event would get overwritten by the damage since the event fires before the damage is applied

chrome beacon
#

yeah might need to delay it until next tick

thorn isle
#

so i had to delay setting it by one tick and that meant you couldn't deal multiple hits per tick on an entity

#

which was okay but not ideal

#

use case was an arena boss that was getting pummeled by a bunch of players at the same time so hits landed on the same tick more often than you might expect

karmic plume
#

Hey folks, just wanted to clear the air real quick ‘cause I think my message came off the wrong way.

I totally get the whole “if you can do the hard part, you can do the easy part” logic — and I actually agree with it. But the thing is, this was never about ability, it’s about time.

I’ve got a full-time job, and in the little free time I do have, I like to focus on the part of this project that I actually enjoy — building out features and writing code. That part I’m good with. But when it came to the Maven setup — which isn’t something I deal with regularly — I hit a wall.

It’s not that I can’t learn it. Of course I could. But learning it from scratch, plus all the trial and error that comes with it, would eat up a bunch of time that I just don’t have right now.

So when I asked for help, it wasn’t because I didn’t want to learn — I was just hoping someone with more experience (someone who could knock this out in 5 minutes) could give me a hand and save me a few hours.

If I had more free time, trust me, I’d dig into it myself. But right now, I’ve got to pick my battles. Big thanks to everyone who gets that 🙏

chrome beacon
#

Are those em dashes

buoyant viper
#

thats a lot of AI

sly topaz
#

jokes aside, if you want help, then just post whatever issue you might be having here and someone might be able to help

#

nobody is going to be personally assisting you in DMs because that is often too much of a burden on the helper when there's multiple people capable of providing that in the help channels

#

you might get some comments about using AI but it is whatever really, you can just ignore it if it isn't helpful to your situation

young knoll
#

Does ai not know how to make maven projects yet

sly topaz
#

the AI isn't smart enough to tell you how to proceed if you don't know what questions to ask in order for it to go down that path

karmic plume
#

Hey, just to clarify, I'm Brazilian and not a native English speaker, so I used AI to help me express myself better. I wasn’t trying to overcomplicate anything or dump work on anyone. I just hit a part I’m not used to and asked for help to save time. That’s it. I’m a good person and didn’t expect to be mocked for that. Thanks to those who understood.

thorn isle
#

we can start with the plugin.yml

#

what is the full path and name of your main class

chrome beacon
#

Could also just let the mc dev plugin for Intellij handle it

#

still knowing how to setup maven is useful

thorn isle
#

the issue is he's building for 1.8 and god only knows the repository and artifact name for the spigot 1.8 api

#

i for sure don't remember

#

and even if i did, what i remember is probably not even up anymore

chrome beacon
#

It's the same as modern versions

young knoll
#

Always has been

karmic plume
karmic plume
thorn isle
#

terrible mistake, vscode is garbage

#

regardless

#

this is the documentation for plugin.yml

thorn isle
#

name, version and the other required fields should be self-explanatory

sly topaz
#

I think name, version and main are the only required fields

thorn isle
#

mmmaybe

sly topaz
#

what does your directory structure look like right now Daniel?

karmic plume
# thorn isle and even if i did, what i remember is probably not even up anymore

Yes, I understand perfectly. Version 1.8 is super outdated, and I know it's not easy to remember that off the top of my head. I just thought maybe someone here had noted it or still had a working configuration. Anyway, no problem, thank you for your honesty. As I said before, in Brazil it's super common to program in version 1.8.9, since computers here are weak and can't run the latest version of Minecraft.

sly topaz
#

it should be something like this:

thorn isle
#

the locals tell me that the repository and artifact are the same for 1.8 as they are for modern versions, so you should be able to follow a modern tutorial and just substitute 1.8.9 in place of 1.21.4 or whatever

indigo thunder
#

chat

#

how can i create a custom block?

slender elbow
indigo thunder
#

i dont know how

#

and i dont have any tutorials

sly topaz
sly topaz
indigo thunder
#

so???

buoyant viper
indigo thunder
#

i tried AI it but its confusing

buoyant viper
#

org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT

sly topaz
#

people usually use some block with a bunch of block states and replace their textures to simulate a new block, I think people use noteblocks nowadays

indigo thunder
#

. . .

#

so i create a new block that is a noteblock

#

and then change the attributes

#

and then create the resource pack?

karmic plume
#

Thanks guys, this will help me a lot. When I get home, I'll figure out how to do this! Thanks a lot anyway, you'll still see my server above Hypixel.

#

😀😀

sly topaz
indigo thunder
#

why is this so complex

#

couldnt it be like with a command you could put the texture path and include it and ecc

sly topaz
#

this plugin is a teeny bit old but the concept is the same, you can take it as reference

indigo thunder
#

wut

sly topaz
#

though this seems to use block displays

sly topaz
crimson agate
#

How do I get custom playerhead? I mean apply custom texture not from playername

thorn isle
#

do you figure preventing pick-block with nbt data, and the set creative slot packet (which the client uses to spawn in items), would be enough to prevent creative exploits?

#

i think most of the "crash chest" style exploits rely on those two things but i'm not sure

sly topaz
chrome beacon
#

^ all skins must be bound to a player account, mineskin helps do that for you

sly topaz
#

well, achktually 🤓 🖕, it just has to come from mojang servers and they don't really expire unused skins so it just has to be in an account once for it to work

thorn isle
#

hence being able to load those 256x256 transparency-supporting education edition skins on java skulls

sly topaz
thorn isle
#

did they ever patch that?

sly topaz
thorn isle
#

i should abuse it one of these days

#

what's a hacked client that won't rootkit my machine the moment i install it

sly topaz
#

wurst is a common one

crimson agate
#

I'm not a vibecoder xD

sly topaz
#

using the API or just applying the skins

#

for applying the skins, there's this

crimson agate
#

Doing the normal stuff when I have the playername?

sly topaz
#

?customheads

sly topaz
#

-# nobody saw me fail at that command 4 times

crimson agate
thorn isle
#

it's a fabric mod, neat

torn shuttle
#

wait when did .8 come out

#

tf

#

buddy come on

remote swallow
#

i think its technically a client only version

#

but paper decided to just yolo and version bump it anyway to make it less confusing

maiden kiln
#

Yeah so did Spigot now

eternal night
remote swallow
#

smh nerd

eternal night
ripe depot
#

how do i serialize an entity?

sullen marlin
ripe depot
ripe depot
#

also, the painting is wrong

chrome beacon
#

Make sure you're using Spigot and that it's up to date

ripe depot
#

i'm using paper

chrome beacon
#

Time to head over to the Paper discord

ripe depot
#

oh

#

what i meant is i'm making a spigot mod but i'm running it on a paper server

chrome beacon
#

Still, Paper discord if you're running Paper and somethings not working

ripe depot
#

how do i serialize tile entity data? it (PersistentDataContainer) doesn't seem to have a toString method anywhere

acoustic galleon
#

minecraft entities names allows +16 caracters?
I know players can't do it. But entities?

grand flint
#

What?

mortal vortex
acoustic galleon
mortal vortex
#

No?

acoustic galleon
#

nice

sullen marlin
mortal vortex
sullen marlin
#

It was pretty small at some point

acoustic galleon
#

md5 omg

mortal vortex
potent crescent
#

?whereami

mortal vortex
sour spade
#

Hi, im new to plugin development. I need to solve a very special task. I want to generate/access a chunk’s heightmap / terrain BEFORE it’s loaded. So load biome map and generate heightmap and then return it from a function. This is to create a top down map off the seed like chunkbase.com with terrain accuracy. The easy approach is to just generate the chunk then get the heigh but would it not be very slow?

Im using paper 1.21. Is a plugin even capable of doing such things? Or is there better solutions?

This is my code so far 🤣 :

package org.potbob.ecomc;

import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.plugin.java.JavaPlugin;

public final class Ecomc extends JavaPlugin {
    @Override
    public void onEnable() {
        // Plugin startup logic
        getLogger().info("Hello Minecraft!");
        
        generateAndReadHeightmapWithoutLoadingChunk("world", 0, 0);
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
        getLogger().info("Goodbye Minecraft!");
    }

    public void generateAndReadHeightmapWithoutLoadingChunk(String worldName, int chunkX, int chunkZ) {
        World bukkitWorld = Bukkit.getWorld(worldName);

        if (bukkitWorld == null) {
            getLogger().warning("World not found: " + worldName);
            return;
        }

        bukkitWorld.getChunkAtAsync(chunkX, chunkZ, true).thenAccept(chunk -> {
            getLogger().info("Chunk");
        });
    }
}

chrome beacon
#

I suggest heading over to the Paper discord since you're not using the Spigot API

sour spade
sly topaz
chrome beacon
#

^^ It wouldn't

sour spade
#

Oh ok good to know il ask paper

#

But if anyone has done this before hmu

sly topaz
#

I would honestly just do a chunk generator that delegates to vanillla but logs the information that you want to get

potent crescent
sour spade
# sly topaz I would honestly just do a chunk generator that delegates to vanillla but logs t...

I was thinking of just generating the chunk normally and then grabbing the top block. But if I want to create a larger map—say, 100,000 by 100,000 blocks—it would take days and consume nearly a terabyte of storage for all the chunk data.

My goal is to leverage Minecraft’s built-in terrain generation without actually loading the full chunk on the server. Instead, I want to extract just the top block of the terrain and store that in my own database. That way, I can significantly reduce both processing time and storage requirements.

Skip last four steps here:
https://www.youtube.com/watch?v=YyVAaJqYAfE&t=945s

azure zealot
#

And 48bytes

sly topaz
#

a 100kx100k world would be probably around the 60-70gb range

#

and it shouldn't take more than a few hours in a modern processors to pre-generate with Chunky

sly topaz
#

I don't remember worlds ever being that heavy but I guess I haven't gotten around having a server in a long time to know for sure

#

i would still do the same, though

#

given you'd still need to generate those chunks

#

or if you just want the surface area for some reason, then you can probably have a chunk generator that generates only the surface. Don't know what side effects that might have but it's worth a try

sour spade
crimson agate
#

Will you implement a method in a future Spigot version to remove the new waypoint transmission range Display on Playerheads?

sly topaz
#

there is a way to set the waypoint color and style right now but I am unsure whether that affects what you're talking about

crimson agate
chrome beacon
#

That just looks like an attribute

#

you can remove that

sly topaz
twin venture
#

Hi , if someone make a Automatic servers creation on demand using lettuce is that goodd?

sly topaz
#

either the adding the HIDE_ATTRIBUTES or HIDE_ATTRIBUTE_MODIFIERS item flags should owrk

twin venture
#

i have been working on soomething and the results i really like it ..

sly topaz
#

what is lettuce and what does "automatic server creation" entail

twin venture
#

check live stream

sly topaz
#

there's nothing there

#

I still have no idea what I am looking at lol

twin venture
#

skywars replica like big servers xD

#

AND A AUTOMATIC SERVERS CREATIONS on demand

sly topaz
#

so like, it creates maps as necessary?

twin venture
#

yes

#

the files you will need as a arena that yoou finished setu

#

like setspawn , set lobby , etc

#

and it will copy the files froom that foolder :
preset-game-servers

to game-servers

sly topaz
#

I mean, it is a thing. I am unsure of in which scenario one would use it on your server but sounds cool nonetheless

#

what is lettuce though

twin venture
#

1000k players and more

#

Lettuce - Advanced Java Redis client

sly topaz
#

I see, so it is just a redis client

twin venture
#

anyway , i need to go now , i was just asking if anyone know if this system is good or nah using lettuce and redis

sly topaz
#

I mean, redis is pretty common in networks for cross-server communication

twin venture
#

and if big servers like hypixel when a skywars-3451- server created , dooes it get removed the files? or keep it for next round? only restart it ?

sly topaz
#

the only issue I see with this is that you're trying to make something for big servers, whereas big servers are prone to just build their own solutions for these things

twin venture
sly topaz
#

if you're planning to sell this, it'd have to be really solid in order to become a viable alternative to whatever solution people already use

twin venture
#

4 jars ,lobby , game , proxy (bungeecord) , and the app that i made to cominucate and create servers , close servers ..

sly topaz
#

gamemodes like skywars are always popular, and the on-demand map provisioning sounds good so you'll just have to give it a go

#

people on marketplaces like polymart eat that kind of thing

twin venture
#

tbh this project started as a joke that i can't make this , and now i finished 80% or so ..

#

it turned out to be the best project i worked on , i learned so much stuff 🙂

slender elbow
thorn isle
#

i don't think using redis to transfer world files from one server to another makes any sense

#

almost anything else would be better i think

#

it kind of sounds like you're reinventing docker

viscid walrus
#
public static final CreatureSpawnEvent.SpawnReason SPELL
When an entity is created by a cast spell.

Anyone know if the spell refers to the spell evokers cast to spawn vexes? Or does this refer to the 1.21 potion effects?

viscid walrus
sly topaz
thorn isle
#

potion effect clouds aren't creatures

#

so almost certainly yes

viscid walrus
thorn isle
#

i don't see what else they'd spawn either

#

or can we make thrown potions spawn any arbitrary entity now?

viscid walrus
#

yup it is an evoker

#

is there a a way to get the inventory and ender chest of a player who has joined before but currently isn't online? Because right now, I'm using:
offlinePlayer.getPlayer().getInventory() (essentially) and offlinePlayer.getPlayer() always returns null.

sly topaz
#

wait, I am really confused

#

there's loadData and saveData on Player but not on OfflinePlayer, why lol

lilac dagger
#

wait, there's load data and save data?

lilac dagger
#

that's nice

#

altho i don't see a use for myself

#

offline player can't load nor save data if you think about it

#

unless it's a player that went offline and have the instance i guess

#

but it'd be working only then

pseudo hazel
#

yes because then that instance is still a Player instance afaik

twin venture
glacial narwhal
#

How can i freeze a player? Not allowing mouse input

thorn isle
#

i think the only way is to force them to spectate an entity, but that'll hide the hud

#

you can limit the range they can rotate by mounting them on e.g. a boat; players can only turn around 180 degrees if mounted on a vehicle

thorn isle
#

you can send them teleport/relative rotation packets to try and make them face a certain direction, but it will feel jittery; depending on the player's latency it can be very ass

#

i once tried to implement a skyrim style system where I slowly rotate the player to face the npc they're talking to, but it was very awkward no matter how i tweaked the numbers

#

these are basically the three extant options

#

pick your poison

sly topaz
#

relative teleport should get a pretty smooth rotation for that kind of thing no? Latency aside

rotund ravine
#

Clientside mods

smoky anchor
#

you could theoretically get rid of the jitter by applying a shader that just forces the view matrix to some values
ofc that might fuck with what gets rendered due to culling
but

#

¯_(ツ)_/¯

thorn isle
#

since it doesn't interpolate, even just a few degrees worth of rotation appears very jittery

glacial narwhal
#

But is there anyway to check if the clicked inventory is the player own inventory?

echo basalt
#

Does anyone have a core shader to disable the advancements menu

#

I do some packet stuff to open a custom thing but the advancements menu flickers

#

if I remove all the advancements the client stops sending that packet

ripe depot
sly topaz
ripe depot
#

so how do i store that data

sly topaz
#

you would have to serialize the BlockState, for which there is no form of serialization right now

ripe depot
#

so would i have to make a pr to spigot or something

sly topaz
ripe depot
#

i don't

#

it's private

sly topaz
#

well, it'd be a good idea nonetheless as it'd incur less of a maintenace burden on you in the long run

#

that being said, you can probably hack away a solution using internals

ripe depot
#

wait, i think i found something on the forums (recent as well, it's 1.21)

                    if (state.getType() != Material.AIR) {
                        if (state instanceof TileState) {
                            System.out.println("Is tile state!");
                           
                            TileState tileState = (TileState) state;
                           
                            CraftPersistentDataContainer cpdc = (CraftPersistentDataContainer) tileState.getPersistentDataContainer();
                           
                            NBTTagCompound nbtTagCompound = cpdc.toTagCompound();
                           
                            String serialized = nbtTagCompound.toString();
                           
                            System.out.println(serialized);
                           
                            // Add the serialized NBT data to a list that will be saved.
                            pdcs.add(serialized);
                        }
#

i don't have the NBTTagCompound class though

#

or the CraftPersistentDataContainer

sly topaz
#

those are internal classes, though that won't really serialize the whole tile entity, just their PDC

ripe depot
#

is that not the tile entity data

sly topaz
#

it is not, that's the custom data plugins inject into it

ripe depot
#

oh

young knoll
#

You can get the entire block entity if you cast to CraftBlockState and then getHandle or whatever it is

worldly ingot
#

*if that entity is in the world

ripe depot
#

how do i get access to CraftBlockState, and other Craft classes? i don't have them for some reason

young knoll
#

?nms

ripe depot
#

oh i see

sly topaz
ripe depot
#

i'm already serializing entitysnapshot, so if there's a way to get it from the tile entity it would make everything so much easier

young knoll
#

?

#

Ah wait it’s probably a spawner?

ripe depot
#

in the post, it says org.spigotmc:spigot instead of :spigot-api, but i tried both and neither work

ripe depot
#

oh

#

buildtools

#

lol

sly topaz
#

it honestly doesn't look like it would be too hard to make EntitySnapshot support tile states, one would just have to make an EntitySnapshot impl that uses BlockEntityType save/load methods instead of the EntityType ones

#

I wonder if it just wasn't considered when making that API or they just didn't want to scope creep the feature

young knoll
#

Well the entity snapshots are designed for entities

#

Block entities are only “technically” entities

ripe depot
#

ok, so what should i do to serialize the block entities?

#

make a custom EntitySnapshot implementation?

ripe depot
thorn isle
#

like already said, you cast the BlockState interface type to its implementation type, CraftBlockState

#

and then call getHandle() on it to get the NMS block state

#

and on that you should be able to find the serialization method

ripe depot
#

getHandle returns the BlockState

thorn isle
#

yes, nms block state

#

distinct from bukkit block state

ripe depot
#

why don't i just cast to CraftBlockEntityState? that stores the EntitySnapshot

thorn isle
#

i don't know, i've never worked with or used entitysnapshots

#

but if you want the nms object with the serialization methods, getHandle is your ticket

ripe depot
thorn isle
#

((CraftBlockState)block.getState()).getHandle()

ripe depot
#

no i meant on the getHandle result

thorn isle
#

i don't remember

#

that's nms; there is zero documentation and you are on your own

ripe depot
#

i miss fabric already

thorn isle
#

from what i recall you probably want the block entity instead

ripe depot
thorn isle
#

LevelChunk::getBlockEntity(BlockPos) is the first path to the block entity i see

#

alternatively cast to CraftBlockEntityState

#

which only works for furnaces and other things that are actually block entities, of course

#

from that you can get the nms block entity

young knoll
#

What are we doing with the block entity anyway

slender elbow
#

lighting up a joint

thorn isle
#

serializing it to persist it, i guess

#

though come to think of it, doesn't bukkit already offer something for that? or was that only for blockdata

young knoll
#

Probably only block data

#

You could technically export it as a single block Structure

crimson agate
#

Can I use the new dialogs in spigot?

sly topaz
grand flint
crimson agate
grand flint
#

idk

ripe depot
#

custom world serialiser/deserialiser

#

.getSnapshot() is protected on the CraftBlockEntityState, is there any way to access it/set it?

#

or alternatively, where does minecraft handle serialisation/deserialisation? i could look at how they do it

sly topaz
#

getSnapshot just gets a clone of the BlockEntity

#

honestly, you can just use CraftBlockEntityState#getSnapshotNBT

crimson agate
#

I am trying to use the InventoryDragEvent, but it doesn't fire. I have doublechecked everything, I registered the class (2 Events in same Class, 1 works, other (DragEvent) doesnt) and I want to know why. Do I have to pay attention to anything when 2 events in 1 class or what. The event isn't even fireing. I want to detect if the player puts some trash into the GUI, but it just lets him, and doesn't do anything.

earnest girder
#

does anyone know the best method for cancelling breezes opening doors with wind charges?

slender elbow
#

i believe it calls EntityExplodeEvent

#

with ExplosionResult.TRIGGER_BLOCK

crimson agate
slender elbow
#

that event, along with many other inventory events, does not work in creative mode

#

creative mode just tells the server "spawn this item with this data in this slot", there is no dragging happening on the server

#

test on survival

#

you can use the InventoryCreativeEvent, but that event lacks so much context due to how creative mode inventories work, good luck dealing with it

#

my personal suggestion is to simply not bother with creative mode and disallow its usage, or usage of your inventories with it altogether

#

i'd just get rid of creative mode tbh lmao

crimson agate
#

Thanks for the info. I was just in create for testing purposes, in the actual game I am making, you are in survival mode.

sharp zenith
#

so I just started my mc server and I want to have 2 custom commands /discord and /shop. I use the mycommand plugin and this is the custom.yml script

``discord:
command: /discord
type: TEXT
text:
- "&bClick to join our &9Discord: &n&lhttps://discord.gg/Xaa4qabY48"

store:
command: /store
type: TEXT
text:
- "&aVisit our &6Store: &n&lhttps://store.astopia.org"

rules:
command: /rules
type: TEXT
text:
- "&cServer Rules:"
- "&7- &cNo Hacking"
- "&7- &cNo Duping"
- "&7- &cNo Disrespecting Mods"
- "&7- &cNo Exploiting Bugs"
``

#

I want to make the links accessible and all but it just doesnt work

#

everytime i execute /store or /discord it says "tellraw @p etc etc and bassically the whole command

#

can anyone help

worldly ice
#

sounds like a mycommand issue, would ask the dev of that plugin specifically

#

also seems really weird that the dev is using commands instead of the API for sending messages

sharp zenith
#

it also says this

#

I did restart the server a couple of times

#

also this is the response of the server once executing the command

sharp zenith
mortal vortex
#

Or are you using Paper, and is paper reporting it as “Bukkit” when you run /pl

unique shuttle
#

Hi! Does anyone know how to detect when an arrow hits an Interaction entity? Thanks!

young knoll
#

They don’t

#

Interaction entities don’t have arrow collision

worthy yarrow
sly topaz
# unique shuttle cry

If you want arrow collision then just use any other entity with the invisibility potion effect

unique shuttle
buoyant viper
#

?jd-s

undone axleBOT
pastel axle
#

I notice Player#showDialog only accepts a Dialog, but ShowDialogClickEvent (in net.md_5.bungee.api.dialog.chat) accepts a string. The latter works great for opening dialogs defined in data packs but only via already-open dialogs. Is there an equivalent outside of that?

sullen marlin
#

?jira

undone axleBOT
sullen marlin
#

Thanks

pastel axle
pastel axle
# mortal vortex what you having?

Tortellini in pumpkin!

I really need to remember to open feature requests more often. I sometimes spend an hour trying to do something, realise the API can't do it quite the way I want, and just give up. Which isn't helpful.

mortal vortex
#

Holy shit ur obs guy

#

i remember using one of ur patches when i had some issue with h265 on windows.

misty ingot
#

how can i get/edit the player's entire inventory?
(inventory, armor, offhand)

sullen marlin
#

look up PlayerInventory class

lilac dagger
#

yup ^

#

player.getInventory()

misty ingot
#

i was not aware that #getInventory gave you the armor and offhand too

lilac dagger
#

it does

misty ingot
#

i am so used to that so i didnt even bother checking documentation i just thought theres a different method

grand flint
#

L

misty ingot
#

well great

#

btw how does the uuid class know to always give you a unique uuid when you ask for a new one? is there a cache of used ones?

#

or are we just banking on the ultra low probability

grand flint
#

.-.

misty ingot
#

dumb question i know but like im curious

grand flint
#

UUIDs are effectively unique

lilac dagger
#

what like UUID.randomUUID?

misty ingot
#

but how does it know

#

in order for the new one to be unique it needs to make sure not give me a used one

misty ingot
lilac dagger
#

it can be processed in such a way to be unique

misty ingot
lilac dagger
#

for example for offline uuids it uses the player name and some prefix

#

i'm not sure what they do for online mode tho

misty ingot
#

im just looking to give some items some unique ids

lilac dagger
#

but i remember some users having duplicate uuids at some point

#

just do what offline mode uuids do then

grand flint
#

dude

#

its not possible

#

to get the same one

#

if u do

#

u might as well go buy a lottery ticket

#

why do people worry about the stupidest little things 🙏

lilac dagger
#

UUID.nameUUIDFromBytes("OfflinePlayer:<player_name>".getBytes(StandardCharsets.UTF_8));

#

but as fase said

#

the random uuid is good too

fossil cypress
#

I’m still a beginner Java coder but is passing the main plugin instance as static as bad as people make it out to be?

grand flint
#

yeah ur plugin could explode

fossil cypress
ivory sleet
misty ingot
crimson agate
ivory sleet
misty ingot
#

i try to always have getters and setters but this is the ONE thing im kinda like ehhhhhh

crimson agate
#

How does inventoryDragEvent work? What counts as a drag? Because it just doesn't like me

eternal oxide
#

When you click to put an item in an inventory slot BUT move teh mouse before releasing the click.

ivory sleet
crimson agate
eternal oxide
#

it will fire for one slot or multiple

crimson agate
#

But that is how it should fire right? Because it doesn't even trigger

eternal oxide
#

just moving teh mouse after you press the mouse button will cause a drag event

#

if you are in creative, I can believe it does not fire

crimson agate
#

Strangely, I just got it to fire, even though I did nothing different lol

#

This is so strange, it triggers every 5th time

#

Does this thing have a cooldown or sth

eternal oxide
#

no

crimson agate
#

Is there sth more reliable?

eternal oxide
#

listen to both click and drag

crimson agate
#

Thanks, I'll just do it with click event

alpine solar
mortal hare
#

i really miss from java true immutable collection type

#

you cant create for example array which is immutable

#

if only we could do

final Foo final [] foos = {
    ...
}
#

we wouldnt need defensive copying for example for varargs if it was enforced at compile time level

slender elbow
#

have you considered using another language?

pseudo hazel
#

there are other languages?

sly topaz
buoyant viper
#

just write Rust

ripe depot
worldly ingot
slender elbow
#

Yes

ripe depot
#

where does minecraft handle serialization?

slender elbow
#

depends for what

wet breach
#

not sure I would say that is a super long time ago

worldly ingot
#

There have been 16 Java releases since Java 8, 11 years ago. 4 years is a long time

young knoll
#

There have been a lot of minecraft release since 1.8.8, 10 years ago (soon™)

#

Actually I wonder what version would be 4 years ago

#

?howold 1.18.2

undone axleBOT
young knoll
#

?howold 1.17.1

undone axleBOT
young knoll
#

Almost perfect

wet breach
drowsy helm
#

@echo basalt can i see ur fawe extent for custom blocks

echo basalt
#

uh

#

I made it for itemsadder

#

nexo has native support

#

I assume that's fine, right?

drowsy helm
#

yeah I just want to sus how you are setting the block type/blockdata in the extent

#

because i asked in the disc and no one replied lol

echo basalt
#

afaik it was just scheduling a task

drowsy helm
#

yeah thats what I was doing initially and they said i was doing it wrong

#

but didnt explain how to do it properly

echo basalt
#

if you're doing it with IA there's no real alternative

drowsy helm
#

does //undo work for you? I found it doesn't work with a scheduler task

echo basalt
#

uh

drowsy helm
#

for replacenear and replace actions

echo basalt
#

might not I don't recall

drowsy helm
#

dang all good ill see if i can dig through src

echo basalt
#

I tried doing it the customblock route but worldedit makes a fucking array and stuff

#

it's all hardcoded

drowsy helm
#

ah that's annoying

#

yeah thats pretty much how I was handling it earlier

#

it behaves really funky, you can't undo replace or replacenear commands

torn shuttle
#

does entity#damage(int, entity) not trigger a entitydamagedbyentityevent?

#

and secondary question, how can I trigger one

#

I feel like it should, this is weird

#

what did I do

#

also this custom model plugin cursed

#

it's a never ending rabbit hole of optimizations

#

oh oops

#

correction the code I am running is livingEntity#damage(livingentityb)

#

which... maybe does not do that

#

that's annoying

mortal vortex
#

wouldnt you need to provide a non-zero amount for it to fire

torn shuttle
#

no

#

well

#

sorry I did not type that right

#

attack

#

it's livingEntity#attack(livingentityb)

mortal vortex
#

o

worthy yarrow
#

you'd think a result of attack would throw an event

torn shuttle
#

yes

#

that is exactly what I thought

#

and yet here I am, doing everything I can

#

holding on to what I am

mortal vortex
#

manually call it?

torn shuttle
#

pretending I'm a superman

echo basalt
#

just look at the nms impl smh

torn shuttle
#

brother I'm already busy making async modeled entities

#

this is one of the few things I can use the api for

worthy yarrow
#

Wonder why it wouldn't be done internally

torn shuttle
#

wait is attack_damage new

#

surely not

echo basalt
worthy yarrow
#

Probably renamed

echo basalt
#

not non-players it doesn't fire

torn shuttle
#

smh

#

clear racism

echo basalt
#

if you're calling attack on a player it does fire

torn shuttle
#

#mobsmatter

echo basalt
#

from what I'm seeing

sullen marlin
echo basalt
#

so

#

player.attack(mob) fires
mob.attack(otherMob) doesn't

worthy yarrow
#

I guess you'd have to jump through a couple hoops to throw the event yourself...

sullen marlin
#

no it should fire for mobs attacking mobs from what I see

echo basalt
#

you just call CraftEvemtFactory

worthy yarrow
#

I haven't looked into how the server "calculates" damage though

echo basalt
#

damage and attack are different things

#

michael derp 5

sullen marlin
#

?

echo basalt
#

because of the damagemodifier api and stuff

torn shuttle
#

that's a weird way of saying it sucks

worthy yarrow
#

kek

torn shuttle
#

the whole mc health system is a complete nightmare

#

top to bottom

#

both conceptually and in implementation

worthy yarrow
#

I guess that's why a lot of people write their own damage systems

#

Easier to work with something you created anyway

torn shuttle
#

that's what I did yes

#

but even then I get dragged down by mc

sullen marlin
#

I just called Zombie.attack(anotherZombie) and get an EntityDamageByEntityEvent

torn shuttle
#

I'll double check, I ran into 3 other problems while doing this such as realizing my registry compatiblity system was backwards

#

just really making sure the registry values could never be found

#

ok yeah this is looking like a different problem, now let's cehck that

echo basalt
worthy yarrow
echo basalt
#

non-creatures attacking entities won't fire

worthy yarrow
#

Am I making too many registries or not enough smh

echo basalt
#

For example if you make a pig attack players or something

#

I wonder if wolves fire it

#

Block#getBlockType when

worthy yarrow
#

isn't there like .isAngry in wolf or something? Perhaps if that's true it will fire 🤷‍♀️

sullen marlin
#

Idk what you get in older versions

torn shuttle
#

my kingdom for working on my own game

#

this is a nightmare

#

I have 5 different plugin projects open to get this one thing working

echo basalt
sullen marlin
torn shuttle
#

fmm, rspm, em, emg, mc

#

ok yeah I guess my detector isn't working with my current model implementation for some reason, let's see

echo basalt
#

I just have like 1-2 really big projects open :)

worthy yarrow
torn shuttle
#

do you even have projects larger than mine

echo basalt
#

dunno

sullen marlin
#

Monoproject ftw

echo basalt
#

one of them is an RPG I've been working on for the past like 7 months

worthy yarrow
#

GOT impl

torn shuttle
#

64k lines of code

#

just checked

echo basalt
#

yeah this is about 80k

torn shuttle
#

1304 classes

#

we love classes

#

man that reminds me this doesn't count the translations anymore

echo basalt
#

it fucking froze the statistic plugin

torn shuttle
#

otherwise it would definitely be way over 200k

echo basalt
#

it's about ~1.5k classes

#

half of it is probably the ability system

torn shuttle
#

I can't make this a monoproject because the overlap between people who want models and people who want bosses is not exactly 100%

echo basalt
#

the other half is probably items

torn shuttle
#

or custom structures

#

or resource pack management

echo basalt
#

betterstructures memo leak when

torn shuttle
#

it just makes it hell on me

sullen marlin
#

public static boolean bossesEnabled = false; // modular

torn shuttle
#

he read my source code on how I made events modular, it's joever

#

in my defense I made a slick ui you only have to run once to pick which stuff you want on

#

it has an animation and that's how you know it's good

worthy yarrow
#

Magma makes me want to go to school for 20 years and only focus on cs

echo basalt
#

that takes like 15 minutes to make

worthy yarrow
#

I don't mean the ui

echo basalt
#

maybe 30 if you're using a state machine

torn shuttle
#

grap des is passion
hic ign my

echo basalt
#

I can't wait to spend 2 months writing a profiling lib when we launch the project at work ❤️

torn shuttle
echo basalt
#

that neat thing prolly took you 3 months

torn shuttle
#

?paste

undone axleBOT
echo basalt
#

paste is down

torn shuttle
#

that thing is still broken

echo basalt
torn shuttle
#

yeah

#

I say hating is ugly

sullen marlin
#

Weird

#

No one said

torn shuttle
#

I said like weeks ago

echo basalt
#

hardcoded fucking items

torn shuttle
#

why on earth would the plugin initialization not be hardcoded my dude

#

are admins going to customize what the 1-time first run menu says to say something that it doesn't do?

worthy yarrow
#

Do you use minimessage magma?

torn shuttle
#

no

worthy yarrow
#

Just regular & codes always?

torn shuttle
#

until spigot updates yeah

worthy yarrow
#

kek

torn shuttle
#

or until enough people annoy me about it

#

whichever happens first

worthy yarrow
#

It's really nice :p

#

and you only have to shade all of adventure

torn shuttle
#

I can not exaggerate just how little I care

#

it surely must be a negative value

worthy yarrow
#

Something like that

#

I only like it because & codes are too limiting

#

Well without additional work I don't wanna do

torn shuttle
#

believe it or not I don't spend my days thinking what shade of green I'm going to make the next 5 characters in my message

worthy yarrow
#

I only say that in the sense of configuration, it's nice as an end user to have more options when it comes to it

#

Not that this point relates to your snippet, but still niche configurability options make the end users very grateful

#

most times

torn shuttle
#

clearly they also don't care because I think I've had 5 requests for it total

worthy yarrow
#

Well if the impl doesn't exactly revolve around fancy text colors, then sure

torn shuttle
#

why is this entity not tagged man

#

it should be tagged

worthy yarrow
#

My only real point being that whether it may be an issue now or later, it still could be an issue

#

And tbf we don't see too many qol api from spigot so

torn shuttle
#

what kind of cursed bs did I do here

echo basalt
#

hm

#

how would you guys write a profiling lib

#

or something that pushes stuff to a time series database

torn shuttle
#

I'd probably start by going on #help-development and asking something like "how would you guys write a profiling lib"

#

then while waiting for the answer ask the same thing to chatgpt

#

and probably have the answer before I am done typing this

echo basalt
#

chatgpt never comes up with good apis

torn shuttle
#

well you never said it had to be a good profiling lib

echo basalt
#

things like that go without saying

worthy yarrow
#

I did the work for ya

#

When did chatgpt start putting emojis in responses

echo basalt
#

hm

#

that's a good start

torn shuttle
#

long enough ago that if you put any emojis anywhere right now you get accusde of being a bot

echo basalt
#

I can then add context to the scope like a player or something

torn shuttle
#

same with em dashes

#

suddenly everyone is an em dash expert

worthy yarrow
#

Never hoid of it

torn shuttle
#

but that's just a theory - a game theory

worthy yarrow
#

I'd rather be an expert on one topic than an idiot in a lot of topics

torn shuttle
#

alright so

#

where were we 15 minutes ago

#

what if players attack a living entity

#

man now it's doing it twice, what

worthy yarrow
#

is it two of the same events?

torn shuttle
#

yeah

worthy yarrow
#

Perhaps it's throwing entityDamageByEntity and EntityDamageEvent

#

damn that took me too long to type out

torn shuttle
#

maybe it's maybeline

#

hm

#

man I'm starting to regret that cooldown code I removed

#

new use for ai

#

just have it generate a ton of debug messsages on my behalf

#

the more I debug this the more confused I get

bold nebula
torn shuttle
#

ooooooooooooooooooooooooooooooooooooooooooooh

#

that's why

#

damn it

#

me stuck wondering why the damage was wrong, it's because I am running the attack method after attacking

#

so the cooldown is about as bad as it can be

#

oh boy how do I even fix that one

echo basalt
#

you do some inverse mathematics

#

the damage is linear to the cooldown percentage

#

full bar = full damage

#

half bar = half damage

quartz gull
torn shuttle
#

I can't even really pass the cooldown forward because it's not guaranteed that the action is going to result in damage happening

#

hm

bold nebula
#

This is the code i use (it's skript-reflect)

#

allows me to use java language into skript

torn shuttle
#

aw man

#

what do you mean you can't set player attack cooldowns

#

this makes it so much worse too

mortal vortex
bold nebula
#

my gun system is based on skript

torn shuttle
#

down from 30%, which was down from 70% before that

#

not too bad

#

there's a lot of entities loaded right now

#

hm still got some stuff I can improve but I think I can live with this for now

remote swallow
#

Yeah but 30% of what

mortal vortex
plain vessel
#

I'm going to write a plugin Minecraft for processing donation requests from a website. And I want to know which of these frameworks is best suited for my task in terms of security and performance. Or maybe use a completely different framework for this or even change the way the donation is processed, that is, something instead of REST API?

mortal vortex
#

okay which frameworks?

mortal hare
#

does any of you use checker framework in CI/CD pipeline?

#

i wonder if its worth it to set it up for example for jspecify annotation checking

#

since intellij has good support but when it comes to vscode, it doesnt know what to do with @NullMarked classes

wary harness
#

how to fix this problem

#

happens when I compile plugin with lates spigot api

#

actually all of them after 1.20.4

mortal hare
#

and you're importing the artifact .jar file i guess?

wary harness
#

well thing is plugins stops working on older versions

mortal hare
#

because plugin uses some kind of API which is not present in older versions of Spigot

wary harness
#

in this case we have Sounds class

mortal hare
#

you need compatibility layer classes to fix those kind of issues for multiversion support

wary harness
#

what do you mean by that

#

making multi modular project

#

and compile each module for specific version

#

basicaly I should have interface class and then load proper version instance

#

like with NMS

mortal hare
#

then at runtime you check the spigot version and then using plugin's classloader load the specific class you need

#

well you can also make module for each version and shade it into fat jar

#

it depends™

#

spigot API is backwards compatible but not forwards compatible, it doesnt backport API features back to older versions of minecraft

#

that means you can use deprecated methods in modern spigot versions which are not deprecated in older versions at some degree, but its not recommended tho

young knoll
#

It’s not fully forwards compatible at compile time

#

Many enum constants have been renamed over the years

wary harness
mortal hare
#

its not win32 api

#

TL;DR

wary harness
#

that is cose of my error

#

I think easier work around this would be droping old versions

#

and fuck it

#

let people use older jars without new fatuers

#

I think it is not worth hassling

mortal hare
#

i usually decouple my plugin logic from spigot api's itself

#

and implement gluecode for spigot api and nms through other package/module

young knoll
#

You can use the old api and the old constants

#

Spigot will remap them at runtime

wary harness
mortal vortex
#

to a degree

wary harness
#

but if I want to use new api like custom models with Components insted of Intager based ones I am not able because that is not yet implimented in 1.20.4

#

but like I said droping older versions will make my life easier

mortal hare
wary harness
#

I was just asking is there any simple work around it

potent crescent
#

guys How to post src in GitHub?

young knoll
mortal vortex
potent crescent
#

its app not web!

#

lol i wasnt know

bold nebula
young knoll
#

Can you post a link to the actual recoil code

bold nebula
#

this is the code

lilac dagger
#

skript looks so much like java now that you might as well use java

sullen marlin
#

Wow you weren't exaggerating

bold nebula
#

my gun system is made with skript

#

so i gotta use skript

#

i just need to know if the problem is the plugin or the code

smoky anchor
#

With this you are setting the players rotations, can you not do a relative rotation ?
Idk how/if that would work

bold nebula
#

It will feel jittery

#

I tried everything

#

teleport flags

#

nms

#

packetevents

#

mythicmobs recoil

lilac dagger
#

what about making recoil only in bullet trajectory

#

and leave yaw pitch of player as is

bold nebula
#

I can't because its raytrace

#

there is no bullets

lilac dagger
#

raytrace is what i'm talking about

#

one sec

bold nebula
#

This is what im trying to get

#

it's the only server i know that managed to do it

smoky anchor
#

Could this be shader fuckery ?

#

Do this with F3 and do not move mouse, does your pitch/yaw change ?

grand flint
#

nah its not shaders cuz mythic crucible does it without a rp

bold nebula
grand flint
#

?

bold nebula
#

no the recoil

grand flint
#

recoil in what

#

with crucible?

bold nebula
#

mythicmobs recoil skill

grand flint
#

oh might be cuz of version

#

but yeah shaders would make it much smoother

young knoll
#

Technically Steve is probably strong enough to use a gun without recoil

#

:p

grand flint
#

real

bold nebula
grand flint
#

how about just give up and dont add recoil @bold nebula

bold nebula
smoky anchor
#

well, you can always inspect what packets they are sending to know for sure what they're doing

bold nebula
#

really?

#

how

grand flint
#

yeah obv

#

its ur client

bold nebula
#

do i need a mod that reads packets?

grand flint
#

try and see

smoky anchor
#

ye that would prob be best

grand flint
#

jk idk probs a mod

bold nebula
#

not for 1.21.4

smoky anchor
#

it is open source, you can build it and fix it yourself

#

It's just 2 classes

bold nebula
#

im not that smart

#

oh wait i can connect with 1.19+ to the server

lilac dagger
#

no rotation

#

it looks like shaders

#

or some potion

mortal hare
#

and then i got mocked for using skript

#

after like i was like: 🖕 , im gonna prove u that im capable of learning java