#help-development

1 messages · Page 425 of 1

tender shard
#

fixed

native gale
#

Ah, okay

#

Thank you

viral temple
#

I already do that for maven actions using scripts, but I need for jitpack too

tender shard
#

does jitpack not run the github actions?

#

anyway I'd just compile it locally, then use mvn deploy

viral temple
#

i hate maven so much...

tender shard
#

how is it maven's fault lol

viral temple
tender shard
#

I don't know whether jitpack supports the normal deployment / uploading of .jar files

#

I just use my own nexus for repositories

quaint mantle
#

hi.

#

does anyone here have experience working with the mysql database?

#

um

#

i need some help with some stuff.

hazy parrot
#

Pretty sure kinda few guys here have an experience with mysql

#

I would just ask question

little gull
#

I want to add emojis in my minecraft server scoreboard without any texture pack, how can i do that

tender shard
#

you can't

tender shard
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

quaint mantle
#

how do i post images here?

#

i have been here so long i have not really been able to post images here lol.

tardy delta
#

?verify

tender shard
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

tardy delta
#

Or use some image site

tender shard
#

Just get verified, it only takes 10 seconds

little gull
tender shard
#

No you cannot

quaint mantle
little gull
#

We can bru

quaint mantle
#

is there a way to see which columns of the index are being used like sqlite?

tender shard
little gull
#

I cant send images here

tender shard
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

quaint mantle
#

and i am trying to get const/eq_ref for the type.

little gull
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

little gull
#

!verify @little gull

undone axleBOT
tender shard
#

Use your spigotmc username

little gull
#

!verify ArnavJain69420

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

torn shuttle
#

lol I just checked in, there's 4139 files and 272 folders in the configuration folder of my plugin

young knoll
#

Wtf is in there, an entire scripting language?

#

JavaScript2

torn shuttle
#

among other things

#

arenas, custom bosses, loot, dungeons, minidungeons, lairs, sanctums, npcs, quests, worlds

smoky oak
#

anyone know if java has literal JIT? Like, getting a string and translating it into .class/.jar, then executing it?

hazy parrot
#

?

smoky oak
#

inside

hazy parrot
# smoky oak inside

Look at java.tools package, I'm sure there is some kind of documebtation/tutorial online

warm mica
quaint mantle
#

are there any functions which change the colour of the water in a cauldron

tardy delta
smoky oak
#

cuz the ONLY way to do it server side is to define a custom biome, apply it to the block the cauldron is in, and somehow manage to constrain the biome to a 1³ area. The math behind it is as complicated as the code

quaint mantle
#

well i meant dye

#

like not biomes only dye

smoky oak
#

nope

quaint mantle
#

damn rly

smoky oak
#

afaik the only thing affecting water color is biome fog

#

so you need to do biomes

#

which has its own slew of problems

quaint mantle
#

damn alright

smoky oak
#

im not even sure if you can set the biome gradient to 0 so that there's no bleed in from the surrounding biomes

quaint mantle
#

thanks for the heads up

#

are u sure

#

definitely something with this

smoky oak
quaint mantle
#

yea it is

#

jus tnoticed

smoky oak
#

actually

#

do /data get on a water cauldron

quaint mantle
#

ok one sec

#

how do i use it im putting the right coords

#

and it just says the target block

#

is not a block entity

smoky oak
#

dafuq

#

if it has block data why cant u target it

#

lmc

quaint mantle
#

man its not working on any block

#

am i doing it wrong

smoky oak
#

iirc its /data get block <xyz>

quaint mantle
#

not working

#

theres another arg for path

#

after xyz

smoky oak
#

ye

#

im checking myself but minecraft takes ages to boot nowadays

quaint mantle
#

it worked on a beehive

tender shard
#

loop over the char array

smoky oak
#

not a block entity then

quaint mantle
#

thats weird

smoky oak
#

since when are commands caps sensitive bruh

vital sandal
#

re mapped spigot create 2 file :l

#

how to make it only create 1

tender shard
#

why do you care how many files it creates? btw none of those seems to be the correct one

#

?paste your pom

undone axleBOT
tender shard
#

I get 3, plus javadocs/sources

vital sandal
#

i make it output dirrectly to the plugins folder

tender shard
#

that is not your full pom

smoky oak
#

i always forget which one the correct one is

vital sandal
#

nothing else left that matter

smoky oak
#

its the remapped-obf ur allowed to publish right?

tender shard
#

the one that's called ${artifactId}-${project.version} is the correct one

smoky oak
#

srsly?

tender shard
#

AngelChest-9.5.1.jar

smoky oak
#

not the obfuscated

tender shard
#

is the correct one

#

it is the obfuscated one

#

it is

smoky oak
#

whats up with the remapped-obf file then

tender shard
#

that's the same file

#

it gets copied over to replace the original artifact

smoky oak
#

is that part of the md_5 plugin?

tender shard
#

oh yeah my bad. remapped-obf is the obfuscated, original minecraft mappings

#

the one without any classifier is the one that uses spigot mappings

#

remapped-obf uses "axh" instead of "EntityPlayer"

#

"remapped" uses "ServerPlayer"

#

without classifier uses "EntityPlayer"

#

I guess, haven't checked

#

anyway, the one without any classifier is the one you're supposed to use

quaint mantle
#

whats the easiest way to register a listener, i think im doing it wrong

smoky oak
#

ye cuz the spigot SERVER aint using remapped

#

so u have to obfuscate it back

tender shard
#

the obfuscated one won't work, you need to use the spigot mappings

vital sandal
#

how can i make it only create the one that i need :l

smoky oak
#

?remapped

#

ah yes ofc

tender shard
#

AngelChest-9.5.1 is the proper one. AngelChest-9.5.1-remapped uses mojang maps, AngelChest-9.5.1-remapped-obf uses vanilla obfuscated names

tender shard
#

it needs the other files

#

why do you bother about the other files

vital sandal
tender shard
#

you need it

#

otherwise it can't remap your stuff

#

it's like saying "I don't need all the .class files, I just want to have a .jar"

vital sandal
#

usually I just get the final result automatic push to the plugins folder

tender shard
#

as I already said: ?paste your pom

smoky oak
#

i mean

#

lists arent immutable

#

so it shouldnt

vital sandal
tender shard
#

yes

smoky oak
#

say what now

tender shard
#

DO NOT TOUCH the specialsource settings

#

use these settings:

#

?nms

smoky oak
#

alright so i google 'javadoc list.of' and get pointed to the list interface which doesnt list a list.of method bruh

tender shard
#

IDK why everyone thinks they must change the maven-shade-plugin or specialsource plugin settings to change the output directory

vital sandal
#

oh i see

tender shard
#

The maven-jar-plugin is the ONLY proper place to change the output location

smoky oak
#

where

tender shard
smoky oak
#

ah yes ofc

#

it showed me java 8 docs

#

bruh

#

screw google

tender shard
#

java 8 doesn't have List.of iirc?

smoky oak
#

exactly

tender shard
weak meteor
#

How should i make a InventoryHandler?

#

an external class?

#

can you remind me?

ivory sleet
#

Well its just an array delegate, so yeah but then add for instance wouldn’t work

flint coyote
#

For the AsyncPlayerChatEvent#setFormat method it states that it wants a valid String#format value.
I'd assume that's something like "<%s>: %s" which would translate to "<Fabsi>: Whatever I said".
How would I reverse message and username here? e.g. "Whatever I said <- Fabsi"

I know that it's not common practice but since it's gonna be in a configuration idk what requirements owner have.

eternal oxide
#

%2s

#

or somethign close

#

google has it

flint coyote
#

Alright I'll check. Thx

worldly ingot
#

%$2s

#

wait or is it 2$

#

KEKW I hate string formats

flint coyote
#

It's really not well made D:

tender shard
#

it is %2$s for the second string

#

%1$s for the first string

flint coyote
#

still don't like that syntax but alright I'll work with it. Thanks!

tender shard
#

Imagine you wanna make it look like this:

#

"My name is jeff" said mfnalex
Then the format would be
"%2$s" said %1$s

flint coyote
#

Well might be fun to do temporary

#

Or for countries that read right to left

worldly ingot
#

I also love Alex. Not gay tho. Just homie love

#

Sorry bud

crisp forum
#

Is there any open source projects with gradle configuration also uses reflection for NMS or at least any tutorials / docs?

remote swallow
#

For remapped mojang with gradle check my github and epic spigot lib

hasty prawn
#

Mine also does that. But if you're just wondering if you can use remapped names for reflection, you cannot. You have to use the obfuscated ones.

lost matrix
terse ore
#

one question, can you detect when an end portal is replaced by a mushroom?

lost matrix
icy beacon
#

for PathfinderGoalMeleeAttack in v1_16_R3, what is the second argument? is it the damage?

#

also, does anybody know the goal to make an entity run away from another entity?

tender shard
tender shard
icy beacon
#

nah not a thing

#

i took a look at Tweakin and for 1.17 it seems to be FleePathFinder

#

there's no such thing for 1.16.5 unfortunately

#

doing a comm for 1.16.5, seeing if it's possible at all

tender shard
icy beacon
#

huh

#

what version are you at

icy beacon
#

oh yeah just found it

#

just had to switch the search to spigot mappings lol

#

tyty

tender shard
#

TL;DR the boolean is wallhack

icy beacon
#

oh i was talking about the double

#

but interesting i'll switch that to false

tender shard
#

oh I misread

icy beacon
#

the double is apparently speedModifier

#

shit

tender shard
#

yeah the speed modifier is so weird

#

for some entities, 0.2 is extremely fast, for others it's so slow yuo can't see it moving

icy beacon
#

shouldn't it just be 1.0

#

if you don't wanna change it

#

because x * 1 = x

#

quick mafs

#

and everything

tender shard
#

one would imagine that's how it works, but it's not

icy beacon
#

._.

#

anyway do you know how one would change the damage of MeleeAttackGoal?

#

doesn't seem to have any relevant methods either

tender shard
#

it just calls the normal "hit entity with main hand" method

#

I'd put the entities you wanna change in a set, then adjust the damage in EntityDamageByEntityEvent or sth

icy beacon
#

that could work

tender shard
#

oor

#

just change that entity's ATTACK_DAMAGE attribute

icy beacon
#

lastly, could you take a look at the constructor of AvoidEntityGoal for me plz? i'm not using the mojang mappings because i probably hate myself so it's just shit

icy beacon
tender shard
#

that's what it does, so yeah just change the attribute - iirc ATTACK_DAMAGE is only for meelee anyway

icy beacon
#

alrighty i'll do the attribute

icy beacon
rough drift
#

I have a world folder that I just copied from the data folder, whenever I load it using WorldCreator it takes a ton of time (just like if it was generating it, however it doesn't regenerate anything)

#

World folder

pure dagger
#

please how to do it i just want to learn simple world generation

chrome beacon
# pure dagger please how to do it i just want to learn simple world generation
BukkitWiki

This tutorial will give you the basic steps of creating a custom world generator using Bukkit. Following this tutorial, you will be making a simple, infinite world of plains and oceans, with some features added. IMPORTANT: Before reading this tutorial, you are required to know the basics of the Java programming language, and the basics of creati...

rigid schooner
#

hi

pure dagger
#

but isnt it old?

hazy parrot
#

How can i make maven see whole tree of dependency with provided scope
For example i have

        <dependency>
            <groupId>io.javalin</groupId>
            <artifactId>javalin</artifactId>
            <version>5.4.2</version>
            <scope>provided</scope>
        </dependency>

Which have jetty server and jetty utils both shaded in, but in my project

import org.eclipse.jetty.server.Server;

Remains undefined

rigid schooner
#

i would like to know if there’s any cool way to overwrite interaction event making it so the player can eat (food in hand) but cannot open a chest

spare hearth
#

yo guys anyone have any ideas on my problem in #help-server ?

remote swallow
tender shard
#

however I can see the transitive dependencies

rigid schooner
#

or shield blocking

hazy parrot
#

but when i set it to provided

#

without scope

tender shard
#

oh yeah that's normal

#

just add jetty manually

hazy parrot
#

ah alright, thanks

tender shard
#

using provided, you won't see transitive dependencies

rigid schooner
#

i was hoping is there any method to check for the clicked block to return if it is interactable or not

quaint mantle
sick ermine
#

How to send chest opening animation using protocollib

chrome beacon
halcyon hemlock
#

try this

quaint mantle
weak meteor
#

but what do i do here?

#

just logic?¡

winged anvil
#

yes

weak meteor
#

kay

weak meteor
#

bcause i have this class GUIListener that implements a Listener

fallow violet
lost matrix
weak meteor
#

Yes

#

So i dont need to listen and stuff?

#

Just do the logic

#

and should work?

lost matrix
#

Just the logic. And then if you want to use it you simply register it in your manager and open the Inventory

weak meteor
#

Okay

#

Thanks

fallow violet
halcyon hemlock
#

im cracked in the head

fallow violet
#

yes

terse ore
#

I am going to commit an illegal activity rn

fallow violet
terse ore
#

and centered 😭

fallow violet
#

imagine not usin wordpad

#

cringe

halcyon hemlock
#

and make important code bigger

fallow violet
#

aaah smart

terse ore
#

it's true, I use publisher

#

I think it gives my code a better appearance

halcyon hemlock
fallow violet
#

actually the real big bosses uses a sheet of paper in real life and scan the text and make it to computer text

terse ore
weak meteor
halcyon hemlock
fallow violet
#

damn TwT

halcyon hemlock
fallow violet
haughty storm
#

I am trying to implement, that the player is able to basically turn all living entities into marionettes, that will basically behave like wolves and fight for him, but I don't really know how I would do it.
I thought about a custom marionette class

    public Marionette(Location location, org.bukkit.entity.EntityType entityType) {
        super(toNmsEntityType(entityType), ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());

        setPos(location.getX(), location.getY(), location.getZ());
        level.addFreshEntity(this);
    }

But there are a lot of exceptions, for example when I hit the entity and I also don't know how I would make it behave like a wolf.

I also thought about just using a listener to check for when the entity wants to target the player and cancel that event, but then the entity would still not fight for the player

fallow violet
#

we need to visually see the exception my friend

quaint mantle
haughty storm
#

sorry, I forgot abt that. one sec

fallow violet
halcyon hemlock
#

public class Main{ public static void main(String[] args){System.out.println("Hello, World");}}

fallow violet
#

hot code

haughty storm
fallow violet
#

an itemstack is null?

#

okay so the problem is u have some variables undefined

#

as you can see here if u summon the entity

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.item.ItemStack.b()" because "itemstack" is null

means an itemstack is null

#

wait

#

u german?

remote swallow
halcyon hemlock
#

I asked gpt4 to create a spinning donut wtf

fallow violet
haughty storm
fallow violet
haughty storm
#

ah right

fallow violet
#

anyways mistake is in line 20 in Marionette.java

haughty storm
#

thats the line when the entity is added

#
        level.addFreshEntity(this);

fallow violet
#

what is level

#

can u just send the whole class and not small code snippets?

haughty storm
#

theres not much more to the class, sorry. Level is passed to the super constructor in the constructor

public class Marionette extends LivingEntity {

    @SuppressWarnings("unchecked")
    public Marionette(Location location, org.bukkit.entity.EntityType entityType) {
        super(toNmsEntityType(entityType), ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());

        setGlowingTag(true);
        setInvulnerable(true);

        setPos(location.getX(), location.getY(), location.getZ());
        level.addFreshEntity(this);
    }

    @SuppressWarnings("all")
    public static EntityType toNmsEntityType(org.bukkit.entity.EntityType bukkitType) {
        return EntityType.byString(bukkitType.getKey().toString()).orElse(null);
    }

    @Override
    public Iterable<ItemStack> getArmorSlots() {
        return null;
    }

    @Override
    public ItemStack getItemBySlot(EquipmentSlot equipmentSlot) {
        return null;
    }

    @Override
    public void setItemSlot(EquipmentSlot equipmentSlot, ItemStack itemStack) {

    }

    @Override
    public HumanoidArm getMainArm() {
        return null;
    }
}
fallow violet
#

idk if it works like this but never tried it

#

so as you can see here

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.item.ItemStack.b()" because "itemstack" is null

it has to do something with ItemStack so u could start google and search for errors in classes extending LivingEntity and on the addFreshEntity comes NullPointer

sick ermine
pseudo hazel
#

gl getting any plugin code from chatgpt that works

halcyon hemlock
fallow violet
#

ChatGPT is not a code generator

halcyon hemlock
#

gpt4 is better than gpt3

#

I mean like this is questionable

fallow violet
halcyon hemlock
#

i should put this on my portfolio

fallow violet
#

yeah this is nice

echo basalt
#

welp I'm shrieking internally

fallow violet
#

tf is mu

echo basalt
#

1000mu = 1ms

fallow violet
#

this sick

#

but why is it switching to mu? xd

echo basalt
#

I like to debug shit in mu

fallow violet
#

xddd

echo basalt
#

anything that's used more than once is only acceptable within the <100mu range

fallow violet
#

u the pro here

quaint mantle
#

guys can someone help me

#

i have this code here

#

and its meant to put an item in the gui

#

it puts it but it doesnt put the meta

#

here is my code

fallow violet
#

small tip, try to not make so many if nestings

#

try to make an if with the !version and then just return, looks better

dry yacht
quaint mantle
#

thanks do you know why im getting the problem

haughty storm
dry yacht
#

You're not setting the meta back on the item. getItemMeta returns a clone, not a direct reference, iirc.

quaint mantle
#

oh so how would i set the meta

#

is it just

dry yacht
#

item.setItemMeta(meta)

quaint mantle
#

item.setItemMeta(meta);

#

ohok

dry yacht
#

yep

quaint mantle
#

do you any compilers for my ide

dry yacht
#

javac duke

quaint mantle
#

i need a built in compiler

fallow violet
quaint mantle
#

explain the problem

haughty storm
#

I am trying to implement, that the player is able to basically turn all living entities into marionettes, that will basically behave like wolves and fight for him, but I don't really know how I would do it.

dry yacht
haughty storm
quaint mantle
#

itemstack is null

#

theres your error

haughty storm
# quaint mantle show ur code
public class Marionette extends LivingEntity {

    @SuppressWarnings("unchecked")
    public Marionette(Location location, org.bukkit.entity.EntityType entityType) {
        super(toNmsEntityType(entityType), ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());

        setGlowingTag(true);
        setInvulnerable(true);

        setPos(location.getX(), location.getY(), location.getZ());
        level.addFreshEntity(this);
    }

    @SuppressWarnings("all")
    public static EntityType toNmsEntityType(org.bukkit.entity.EntityType bukkitType) {
        return EntityType.byString(bukkitType.getKey().toString()).orElse(null);
    }

    @Override
    public Iterable<ItemStack> getArmorSlots() {
        return null;
    }

    @Override
    public ItemStack getItemBySlot(EquipmentSlot equipmentSlot) {
        return null;
    }

    @Override
    public void setItemSlot(EquipmentSlot equipmentSlot, ItemStack itemStack) {

    }

    @Override
    public HumanoidArm getMainArm() {
        return null;
    }
}
haughty storm
#

nms is kinda confusing

pseudo hazel
#

probably one of the ones where you return null

quaint mantle
#

whats a marionette

#

those are ur 2 problems

haughty storm
#

Oh, wait sorry. i didn't even see those , I just implemented them

quaint mantle
#

alright

icy beacon
#

just so i don't forget to check my debug

#

because i always fucking do

dry yacht
sick ermine
#

I couldn't manage to send the chest boot animation to the player

halcyon hemlock
#

spinning donut in react

#

:)))

#

definitely didnt use gpt4

echo basalt
#

you gotta return something

#

just extending entity won't do it

haughty storm
tardy delta
#

i dont see any point to let an user specify a exit code cuz they will only abuse that

halcyon hemlock
tardy delta
#

my classmate was impressed when i showed him my tests 💀

pseudo hazel
#

what queue size

young knoll
#

?scheduling

undone axleBOT
young knoll
#

Just check every second then

#

Yes

#

Use a repeating task

#

yep

remote swallow
#

should i release my inner 7smile

#

Use a concrete implementation class

tardy delta
#

dont instantiate bukkitrunnables, use the scheduler

#

i should count have many times i've already said that

remote swallow
#

@lost matrix we need the bukkit runnable concrete impl class speech

tardy delta
#

uh well this is some unexpected behaviour

remote swallow
#
Bukkit.getScheduler().runTaskTimer(plugin, () -> {
  stoof
}, 20 * 1, 20 * 3);
#

we love lamda

#

on todays lesson of learning java

halcyon hemlock
#

minecraft

wary axle
#

Hello, I would like to know if it is possible to put a player of the text in his chat.

For example I use a framework for GUI and when I click on an item I would like it to put in the player's chat the command "/msg playername" and after that he can edit the command before sending it.

#

I don't think it's possible but you never know!

pseudo hazel
#

you cannot

#

thats a client side thing afaik

eternal oxide
#

not possible

wary axle
#

Okais thank you

eternal oxide
#

you can send a message as the player but you can't allow him to edit it

pseudo hazel
#

yeah you cant force the player to open the chat even

young knoll
#

I think you can with a clickable component

tardy flame
#

You can but you would need to click it manually

young knoll
#

Yeah

wraith star
#

Is there any good APIs for disguises

young knoll
#

LibDisguises

wraith star
#

Does it's API work on 1.8

young knoll
#

Nope

#

!1.8

#

?1.8

undone axleBOT
patent socket
#

How can I make my plugin command executable in execute run?

wraith star
young knoll
eternal oxide
#

why do you want it available in execute?

tawdry parcel
#

How then?

winged anvil
#

i dont have to worry about packets a player has received after they leave the server correct?

#

wtf does that mean

quaint tapir
#

current.setFireTicks(200);

#

will this set an entity on fire

#

'current' is an entity

young knoll
#

yes

pseudo hazel
pseudo hazel
#

can you show the code again?

tawdry parcel
tawdry parcel
halcyon hemlock
#

// Getting Data for Kick
Date date = Bukkit.getBanList(BanList.Type.NAME).getBanEntry(name).getCreated();

halcyon hemlock
#

also maybe you have to wait a tick or 2?

#

and you're banning the person that executes the command??

eternal oxide
#

pass the players UUID instead of their name

halcyon hemlock
#

you could also try this:

BanEntry banEntry = Bukkit.getBanList(BanList.Type.NAME).addBan(name, reason.toString(), expire, player);
Date date = banEntry.getCreated();
eternal oxide
#

bans are a bit messed up, they take a UUID

tawdry parcel
terse ore
#

getPlayer("name").getUniqueID()?

bright spire
#

Hey guys so I have a plugin.yml with depend: [WorldGuard] but my client says it shows a classnotfound exception he is using 1.8 is the depend part different in older versions?

chrome beacon
#

No it works the same as now

#

Since it's a 1.8 user it might be their fork breaking things or them using the wrong version of WorldGuard

regal scaffold
bright spire
#

maybe thx

tender shard
#

1.8 uses WorldGuard 6 or some other shit, 1.13+ is WorldGuard 7

bright spire
#

thx

halcyon hemlock
#

((Player) sender).getUniqueId(); or something

patent socket
#

Same problem.

regal scaffold
#

Show new code

wary harness
#

Does any one has expiriance with modification/making custom logger one with log4j to get custom colours

#

I manage to modify colors in papermc but there is no effect in spigot

#

so why is that so

patent socket
halcyon hemlock
regal scaffold
#

^

halcyon hemlock
#
System.out.printf("word: ", this.word);```
patent socket
halcyon hemlock
terse ore
#

how can I detect when a portal get's broken

#

?

#

(a nether_portal block after breaking surrounding blocks)

patent socket
eternal oxide
#

?jd-bcc

glad prawn
regal scaffold
#
A problem occurred evaluating root project 'PrivateMines'.
> No signature of method: java.math.BigDecimal.call() is applicable for argument types: (BigDecimal) values: [0.5]
  Possible solutions: scale(), add(java.math.BigDecimal), max(java.math.BigDecimal), wait(), abs(), ulp()
#

what does that mean

#

More like. Does it mean what I think it means? Just doesn't exist?

young knoll
#

Correct

halcyon hemlock
#

It's 5am

#

my brain no work

#

atleast im getting some progress on the pasting of goofy schematics

tawny remnant
#

Im trying to do a Mana system, but its not working. When I check for the mana it doesnt do anything not even an eror, when I try to take it away, it doesnt take it away. What has gone wrong?
https://paste.md-5.net/rozosewido.cs

halcyon hemlock
#

Just a question, Are you making a skyblock remake?

#

also this code will run a runnable everytime the player moves

tawny remnant
#

I know

eternal oxide
#

very bad

#

a move event is fired for mouse movement too. LOTS

round finch
#

eclipse fix version is too low
select java version

-product
org.eclipse.epp.package.java.product
-vm
C:\Program Files\Java\jdk-18.0.1.1\bin\javaw.exe

put this here to remind myself if i ever forget

eternal oxide
#

your events never end so you are startign and running thousands of runnables

#

millions over time

halcyon hemlock
#

if you run a runnable, it already runs every second

eternal oxide
#

your server will die

halcyon hemlock
#

yeah

#

there are thousands of movement packets every second or 10 seconds

#

not sure but server tps will drop hard

eternal oxide
#

start a runnable for each player on join and stop it on quit

#

OR one runnable which loops over players and updates their action bar

#

start your runnable when the first player joins, stop it when the last leaves

halcyon hemlock
#

this is what I do

#

dont put stats into hashmap, make a player object

eternal oxide
#

you just need a Set in your listener to hold their UUIDs

halcyon hemlock
#

this is what I do

hazy parrot
#

Me when cpp in java

young knoll
#

Are skyblock plugins the new LifeSteal plugins

halcyon hemlock
#

i've been working on this plugin for like 8 months lol

tardy delta
#

please dont do a bunch of redundant map lookups

terse ore
#

how can I get a safe teleport location under y = 51?

young knoll
#

Uhh

#

I guess your best bet it to pick a x and z and then loop down from y51 looking for a space

terse ore
#

hm

#

what if there's no safe space

#

search until I get a safe place?

young knoll
#

Pick a new x and z

blazing sinew
#

segz

terse ore
blazing sinew
#

segz

#

segz

#

segz

terse ore
#

I don't think you are above discord's minimum age

regal scaffold
#
    for (BlockVector3 vector : region) {
      Block block = BukkitAdapter.adapt(vector).getBlock();
      if (block.getType().equals(Material.AIR)) {
        airBlocks++;
      }
    }
#

This doesn't work because #adapt(vector) isn't a thing

#

What can I do about it

young knoll
#

Make a location with the xyz of the vector

regal scaffold
#

Need something more efficient

#

I'm trying to loop through every block in a CuboidRegion from WG

young knoll
#

I think there is a world#getBlockAt(xyz)

regal scaffold
#

Or more specifically, I'm trying to get the % difference between air and other in a CuboidRegion

desert loom
regal scaffold
#

Need something more efficient than that

#

Or is there nothing better?

#

To get the % difference between air and other?

young knoll
#

Idk what more you want

desert loom
#

I'm not sure if there's an alternative

young knoll
#

Worldguard may have methods to get the count of blocks in a region already

#

Idk, but it does have a count command so maybe

tardy delta
#

interesting

sullen marlin
#

It'd still have to read every block

#

It's not magic

regal scaffold
#

Is it that bad then?

desert loom
#

I think you might be able to make it a bit faster if you use isEmpty() on the block instead of checking for air

eternal oxide
#

do you want to know how many blocks (solid) or just total?

desert loom
#

since getting the type requires a conversion iirc and I don't think isEmpty() does

regal scaffold
#

I want to know how many blocks have been removed in a region

#

I need a % specifically

young knoll
regal scaffold
#

So I guess airblocks * 100 /total

young knoll
#

Is this like

#

A resetting mine or something

regal scaffold
#

Yes

young knoll
#

Well, you could listen for the break event, check if it's in the mine, and then add 1 to a counter

regal scaffold
#

I guess I can just store the data every time instead of resetting to 0 every single call

#

So it'll optimize a biktr

patent socket
sterile token
#

Okay im discovering new java exceptions

#

UnsupportedOperantion hahaha

tardy delta
#

didnt even know this was a thing

sterile token
#

Oh lol, first time i seen that

tardy delta
#

that nextDouble(-1, 0) wont work makes sense

open marten
#

hey iam new at Minecraft dev stuff
is there a plugin that if the user use it that he teleport than to a coord ?
minecraft 1.19.4

hazy parrot
#

are you trying to dev it or you are looking for tp plugin

open marten
hazy parrot
#

isn't that just vanilla command ?

torn shuttle
#

every nms guide on pathfinding seems to apply it to a custom entity, but it should be possible to do it to a non-custom entity right? or nah?

young knoll
#

Yep

torn shuttle
#

I really don't know if I want to do my own pathfinding or use paper's

#

really wish spigot had it

winged anvil
#

are there any resources/guides on packet listening?

torn shuttle
young knoll
torn shuttle
bold vessel
#

What should i had to make it usable by the console ?

desert loom
#

Move the instanceof check and player cast to the if statement's block at line 120

#

also I don't believe the iron golem case will ever be true since the arguments are split by space

#

could benefit in readability by moving some of that method's logic to like private methods

buoyant viper
#

"squelette" wtf is French

rough ibex
#

krankenwagen

torn shuttle
#

am I just SOL if I want to use mojang mappings but use gradle?

eternal oxide
#

for Spigot yes, Maven all the way

torn shuttle
#

man why does maven have to be so much slower than gradle

#

is there a way to optimize it to run as fast as gradle?

eternal oxide
#

Maven never takes more than a few seconds for me on any project

torn shuttle
#

maven was taking 30s per compile when I gave up on it

#

actually over 30s

#

sometimes over 1m

torn shuttle
eternal oxide
#

uh, Groupmanager, Towny, iConomy a few larger but unreleased

torn shuttle
#

I was more asking class / line count so I have an idea

eternal oxide
#

no idea, I never count

torn shuttle
#

I'm on 1195 classes according to this

eternal oxide
#

probably more than me then

torn shuttle
#

75k lines

echo basalt
#

anyways I rewrote my scripting system today

#

and I'm thinking on maybe just maybe using the same logic for commands

#

as the syntax is easy enough

torn shuttle
echo basalt
#

it was like a couple hours

#

but it supports variables, if statements

torn shuttle
#

they call me first try andy because it only takes one try

echo basalt
#

they call me first try andy because I be coming in handy if y'know what I mean

#

they call me woody by the way I be making this paper

#

how the fuck is it wednesday already

torn shuttle
#

I am still not sure if I want to do this pathfinding thing

#

at this point the "easiest" way for me to do it would be to make an api using mojang mappings because I just can't insert it in my normal project, I refuse to switch back to maven

#

and I feel like depending on paper would come back to bite me in the ass

echo basalt
#

just use obfuscated stuff

torn shuttle
#

I did say easiest

#

and tbf this is not the only project that I need pathfinding for so it would make sense to make it standalone

limber mesa
#

Something weird is going on with my server, where me and my players cannot activate a left click packet event or a damage event within a certain range of a hit box

#

Heres a screenshot, which I will go into detail with:

quaint mantle
#

Like use paperweight

#

Also no reason not to use paper

torn shuttle
#

I don't expect 100% of people downloading there to be using paper, that would be silly

limber mesa
# limber mesa

the distance of the zombie and the player makes it so that I am UNABLE to hit the mob, yet it doesn't trigger a left click event, only when i get further away from the entity that is the case.

quaint mantle
torn shuttle
limber mesa
quaint mantle
#

If you don’t want to switch back to maven

torn shuttle
#

namely the one I am already halfway through coding or the one imillusion suggested

young knoll
#

I just use userdev

#

Works fine if you avoid paper methods

#

Never again will I have to look at obfuscated code

torn shuttle
#

I mean mapped code isn't truly obfuscated anyway

#

although it does pose some fun questions like how am I supposed to get a level for this pathfinding thing

#

got it

limber mesa
river oracle
#

dayum

#

you should ask in skript discord, most people here use Java, though I'll say you might wanna learn java imo gives you more options to do crazy shit

bold vessel
#

Hi i have a question som1 know how i can make armor with more protection without using enchantement, like a custom gold armor with + 50 protection on the full stuff (by exeample)

#

Wdym by keyset ?

#

And how do i calcule how much the protection is going to give protection

#

uh ?

#

What if player add a protection 4 book on the armor ?

#

Its cancelling the other or just "upgrading"

#

wdym with this ?

#

Can i give armor protection instead of the protection echantement ?

limber mesa
#

Well its not because I'm calling the events for damage and left click which are the only events(that I know) are used from clicking the left mouse button

limber mesa
#

It seems my player reach is lower in survival

flint roost
#

Hello, I would like to ask a question, as soon as a Bedrock player wants to connect to the server, he must have a Java account so that he can join my server. Can this be deactivated?

eternal oxide
#

java account?

flint roost
#

yes

eternal oxide
#

never heard of that

#

bedrock is c++ though, so no java

#

or C# I forget which

flint roost
#

I mean the gesyr

eternal oxide
#

This is Spigot, and this channel is for Spigot plugin devs

limber mesa
eternal oxide
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

flint roost
eternal oxide
#

lol why?

flint roost
eternal oxide
#

what file?

flint roost
eternal oxide
#

I have no idea what you are talking about

flint roost
#

Ok, let's start again

#

I have a Paper Server with the Spigot plugin on it.

#

I want to register as a Bedrock player, but first I need to register with a valid Java account. However, I would like to disable this feature

eternal oxide
#

Ok, well right in your first statement, you are running a Paper server.

eternal oxide
#

Spigot is not a plugin

#

Spigot is a server, Paper is a server (a fork of Spigot)

#

Paper != Spigot

#

if you need help with a specific plugin you need #help-server

regal scaffold
#

Go ask geyser @flint roost

flint roost
young knoll
#

I think they are looking for floodgate

tardy flame
#

@som1

#

Don't know this guy :/

bold vessel
#

forgot the if

#

^^

vital sandal
#

what is packetplayout in remmaped version ?

torpid blaze
#

Hey,
How can I reroll the enchantments a enchantmenttable gives a player?

buoyant viper
bold vessel
#

I have no error its just not working

#

And if som1 know how i can let player in survival place spawner with egg inside pls

halcyon hemlock
#

Ill help wait let me get on pc

sacred prairie
#

you need a class to extend command executor, the on command method in the 2. class is so random there

torpid blaze
#

Hey,
How can I let a player enchant an item multiple times in a enchantmenttable?

sacred prairie
#

o/ hey

sacred prairie
graceful crescent
#

It basically just runs the next tick

haughty storm
#

How would I be able to make it so the entity I am spawning will follow the player around and fight for the player??
This is my entity class:

public class Marionette extends LivingEntity {


    @SuppressWarnings("unchecked")
    public Marionette(Location location, org.bukkit.entity.EntityType entityType) {
        super(toNmsEntityType(entityType), ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());

        setPos(location.getX(), location.getY(), location.getZ());
        level.addFreshEntity(this);

    }

    @SuppressWarnings("all")
    public static EntityType toNmsEntityType(org.bukkit.entity.EntityType bukkitType) {
        return EntityType.byString(bukkitType.getKey().toString()).orElse(null);
    }

    @Override
    public Iterable<ItemStack> getArmorSlots() {
        return new ArrayList<>();
    }

    @Override
    public ItemStack getItemBySlot(EquipmentSlot equipmentSlot) {
        return CraftItemStack.asNMSCopy(new org.bukkit.inventory.ItemStack(Material.AIR));
    }

    @Override
    public void setItemSlot(EquipmentSlot equipmentSlot, ItemStack itemStack) {

    }

    @Override
    public HumanoidArm getMainArm() {
        return HumanoidArm.LEFT;
    }

heavy mural
#

Is there a way to rename a team or do I have to get all players from one team to be added in a new team and then remove the old team?

graceful crescent
#

Team#setDisplayName

#

Prob best bet

echo basalt
vocal cloud
terse ore
#

the illusion of choice

torn shuttle
#

this remapping thing is killing me

remote swallow
#

how

torn shuttle
#

am I supposed to use the reobfuscated jar?

remote swallow
#

yes

torn shuttle
#

it's a long chain of stuff that needs to work for this to work

#

I have to make a maven repo on sonatype so I can use the pathfinding api I'm making on my other plugins and I'm still trying to figure out how everything is meant to be hooked up

#

a smarter man would've just gotten the pathfinding test to work standalone first...

#

nope still getting a noclassdeffound for craftmob

tender shard
#

paste your pom

torn shuttle
#

?paste

undone axleBOT
torn shuttle
tender shard
#

you are supposed to use the .jar that's just called "EasyMinecraftPathfinding-1.0.0.jar"

torn shuttle
#

hm

tender shard
#

however you are using 1.19, is that correct?

torn shuttle
#

yes

tender shard
#

no 1.19.3 or 1.19.4?

#

well ok

torn shuttle
#

uh

#

1.19.3 actually, I tried to get 1.19.3 several times and was about to test by going back

tender shard
#

replace every occurance of 1.19 with 1.19.3 in your pom

torn shuttle
#

I tried, it can't get that

remote swallow
#

have you ran buildtools with remapped for it

torn shuttle
#

good point I might've not

#

let me retry

tender shard
#

and in your java files, replcace 1_19_R1 with 1_19_R2

remote swallow
#

iirc java -jar BuildTools.jar --rev 1.19.3 --remapped

torn shuttle
#

that writes to a local repo on my machine?

twilit roost
#

is this correct use of CF's TimeOut?

remote swallow
#

USER_HOME/.m2/repository/stuff

torn shuttle
#

I ran remaps ages ago when 1.19 came out and forgot about it so I was thinking this was going to pull from remote because I couldn't remember doing remappings before

smoky oak
#

actually what's the correct identifier for 1.19.3? Like the fully qualified version? I cannot figure it out

tender shard
#
  1. run buildtools 1.19.3 --remaped
  2. change all 5 occurances of "1.19" with "1.19.3" in your pom
  3. change your imports to 1_19_R2
  4. then mvn package it and use the YourProject-YourVersion.jar (not the ones with "obf" or "remapped" in the name)
    then it should work
tender shard
smoky oak
#

aaaalright. So this is what buildtools says:

[INFO] BUILD SUCCESS

Copying spigot-1.19.3-R0.1-SNAPSHOT-bootstrap.jar to D:\Minecraft\.\spigot-1.19.3.jar
  - Saved as .\spigot-1.19.3.jar

and this is what maven says:

Could not find artifact org.spigotmc:spigot-api:jar:javadoc:1.19.3-R0.1-SNAPSHOT

i did run the --generate-docs flag

torn shuttle
#

hot dang

#

I think it works

#

insofar as it doesn't error lol, now I need to get the pathing to work

#

thanks

smoky oak
#

like seriously im stumped, if i do --generate-docs why arent the docs there

wet breach
#

I could be wrong

smoky oak
#

it worked like this with every previous version i have used

#

all i did was change the version number

wet breach
#

are you using the correct version number?

#

o.o

smoky oak
#
<dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.19.3-R0.1-SNAPSHOT</version>
            <classifier>javadoc</classifier>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.19.3-R0.1-SNAPSHOT</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
#

i think so

#

also why would it find the api but not the docs

wet breach
#

because the javadoc jar was most likely not created

#

when maven errors on javadoc creation it doesn't necessarily halt the build process depending how it is setup

#

or should say, it doesn't make the build a failure

smoky oak
#
[INFO] Building jar: D:\Creation\Minecraft\Spigot\Spigot-API\target\spigot-api-1.19.3-R0.1-SNAPSHOT-javadoc.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
#

any other ideas

#

it didnt fail the build

#

its just not recognized for some reason

wet breach
#

using intellij I presume?

smoky oak
#

ye

pseudo hazel
#

did you refresh the project?

smoky oak
#

ye

wet breach
#

have you tried clearing caches?

smoky oak
#

no

wet breach
#

this should be like the go to thing for people who use intellij

smoky oak
#

i told maven to do -U tho

#

ill try anyways

wet breach
#

not talking about maven caches

smoky oak
#

its system files and VCS log right?

wet breach
#

talking about intellij caches

#

somewhere in the menus there is an option to clear caches

#

the next thing if this doesn't work, is to navigate to your project with the command line

#

and invoke maven directly on it, assuming you have maven installed

#

and not just using the one provided by intellij lol

smoky oak
#

i have maven installed

#

whats the arg

#

its still not finding the javadoc

wet breach
#

mvn package

smoky oak
#

dafuq

#

i installed and liked the path

#

wheres my mvn gone

#

uuuuuurgh

wet breach
#

did you name it maven instead?

smoky oak
#

no i installed it and it worked yesterday but today its an unrecognized command

wet breach
#

lol

eternal oxide
#

no path

wet breach
#

maybe that has been your issue

#

especially if you told intellij to use the installed maven version too

smoky oak
#

hm

#

?????

icy beacon
#

can i force-add an attribute to a nms entity? i'm trying to make a hostile chicken, and apparently if i just give it some attack goals, the server literally crashes when the chicken starts attacking because it does not have a Generic.ATTACK_DAMAGE attribute lmao

smoky oak
icy beacon
#

yeah i'm trying to add an attribute

#

that's why i'm asking how to do it lmao

#

the code in the if-statement is never executed

#

because the damageModifier is always null

#

i debugged it

wet breach
#

does the chicken even have an animation to attack?

#

think that would be the only other problem

icy beacon
#

nah i don't think

#

i don't care though

wet breach
#

sure, but the server or client wouldn't know what to do with that

icy beacon
#

it did try to attack

smoky oak
#

@wet breach
i set my PATH to both ...maven-3.9.1 and to ...maven-3.9.1\bin but in either case typing mvn or maven in cmd just told me 'unrecognized command'

icy beacon
#

and the server crashed because there's no attribute

wet breach
icy beacon
#

[16:18:12] [Server thread/FATAL]: Preparing crash report with UUID d2bebd74-3c54-45b9-849e-cb5a39ccbe76
[16:18:12] [Server thread/ERROR]: Encountered an unexpected exception
Caused by: java.lang.IllegalArgumentException: Can't find attribute minecraft:generic.attack_damage

#

(evertyhing omitted)

wet breach
#

well as I said, that is only one problem

smoky oak
#
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.160 s
[INFO] Finished at: 2023-03-22T14:22:14+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project PermissionShards: Could not resolve dependencies for project org.example:PermissionShards:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.spigotmc:spigot-api:jar:javadoc:1.19.3-R0.1-SNAPSHOT (absent): Could not find artifact org.spigotmc:spigot-api:jar:javadoc:1.19.3-R0.1-SNAPSHOT -> [Help 1]
#

im so done

wet breach
#

is the javadoc jar in the maven repo?

smoky oak
#

uh

#

good question

tender shard
#

buildtools only creates the javadocs html

#

it doesnt create a javadoc jar

icy beacon
#

ok but currently i'm asking how to force-add an attribute to an entity, if it doesn't work i'll stop trying, if it does then it's perfect

#

maybe that's only one problem

wet breach
#

ah right you would need to execute the javadoc goal to get the jar

tender shard
#

why dont you just download them from the official repo?

remote swallow
#

isnt there a param to make it gen javadoc jar

smoky oak
icy beacon
#

but i like solving problems in the order of their appearance

wet breach
#

or goal I should say

remote swallow
#

i mean on buiildtools

smoky oak
#

well yes

#

thats what i did

wet breach
#

but I don't think buildtools moves it to the local maven repo

tender shard
#

in intellij, just go to "execute maven goal" and enter this

mvn dependency:resolve -Dclassifier=javadoc
wet breach
#

and that may be the issue

tender shard
smoky oak
#

i couldve sworn buildtools also copies javadoc and sources into the .m2 folder

#

apparantly i was mistaken

icy beacon
#

hm maybe this on AttributeBaseMap will work

wet breach
#

guess we solved the mystery

smoky oak
remote swallow
#

screaming sandles

icy beacon
remote swallow
#

nms

#

that

wet breach
tender shard
icy beacon
smoky oak
#

in this channelon ly sarcastic commands work

icy beacon
#

i'll just try

wet breach
tender shard
#

in your .m2 folder

#

$HOME/.m2/settings.xml

wet breach
#

if the zombie has a chicken model it will behave like a chicken, but the attacks are done as if it was a zombie just looks like a chicken 😄

icy beacon
#

ah ig

tender shard
#

$HOME/.m2/settings.xml:

<settings>
    <profiles>
        <profile>
            <id>downloadSources</id>
            <properties>
                <downloadSources>true</downloadSources>
                <downloadJavadocs>true</downloadJavadocs>
            </properties>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>downloadSources</activeProfile>
    </activeProfiles>
</settings>
smoky oak
#

all my .m2 contains is the repo folder

icy beacon
#

but i don't wanna go that far in lol

#

i'll see

tender shard
#

create that file

wet breach
#

I don't know of a different way since you can't just mash two entities together

#

unless that does work

icy beacon
#

i don't wanna mash two entities

#

i just wanna add an attribute

#

😭

tender shard
#
cat <<EOF > $HOME/.m2/settings.xml
<settings>
    <profiles>
        <profile>
            <id>downloadSources</id>
            <properties>
                <downloadSources>true</downloadSources>
                <downloadJavadocs>true</downloadJavadocs>
            </properties>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>downloadSources</activeProfile>
    </activeProfiles>
</settings>
EOF
smoky oak
#

i mean alternatively just make a baby zombie and pretend its a chicken

wet breach
#

lol

icy beacon
#

that's a very original idea i must say

remote swallow
#

@tender shard i found a funny

smoky oak
#

whats the code to unload in onEnable if a dependency is not found? or does that happen automatically?

torn shuttle
#

oh lawd they're pathfindin'

#

hide yo wife hide yo kids they're a* now

smoky oak
torn shuttle
#

the only humans that move in a* are cool parkour kids like me 😎

icy beacon
#

this bitch won't start 😭

icy beacon
hybrid spoke
#

did i hear a*

#

how.. pathetic

icy beacon
#

but you can always do getServer().getPluginManager().disablePlugin(this)

torn shuttle
#

loser talk

torn shuttle
#

it's all ogre now

icy beacon
#

hey, I still haven't figured out how to force add an attribute to an entity, this is the closest I've got:

// class NMSChicken extends EntityChicken
// this is in the main constructor
this.getAttributeMap().getAttributes().add(new AttributeModifiable(Attribute.GENERIC_ATTACK_DAMAGE, AttributeModifiable::getAttribute));

unfortunately this does not work because the first argument in AttributeModifiable must be an AttributeBase (nms), not Attribute
i got here by the virtue of brain and google (also https://www.spigotmc.org/threads/nms-add-attack_damage-attribute-to-a-mob-that-doesnt-have-the-attribute.586397/)
ples help?/

tender shard
#

what's getAttributeMap?

icy beacon
#

it's a method on EntityChicken, but probably somewhere deeper

#

one sec

#

it's on EntityLiving

tender shard
#

oh are you using spigot mappings o0

icy beacon
#

yeah unfortunately

#

i was too lazy to switch to mojang in the beginning

#

and now i don't care enough

tender shard
#

there's also no getAttributeMap() in EntityLiving

icy beacon
#

i'm on 1.16.5

tender shard
#

ugh

icy beacon
#

i'm doing a comm 😭

#

i wouldn't be doing it voluntarily trust me

tender shard
#

well 1.16.5 doesn't have any mojang mappings anyway

icy beacon
#

oh true too

#

oh wait

#

i think i got it

#
this.getAttributeMap().getAttributes().add(new AttributeModifiable(GenericAttributes.ATTACK_DAMAGE, AttributeModifiable::getAttribute));
#

bless copilot

#

i'll try it out now

torn shuttle
#

so what are cool kids doing to maintain nms code throughout versions?

icy beacon
#

generally abstraction

#

but i don't do nothing i'm working on specifically 1.16.5 atm

#

ah shit this didn't work

#

gonna debug the fuck out of it now

#

it still says no attribute found

smoky oak
#

ive only seen it once so i dont remember the exact code tho

torn shuttle
#

library is basically what I'm doing, I'm wondering what the best way to structure it would be

#

multi module project and reflections?

smoky oak
#

I'd probably do switch statements

#

they're easy to copy paste and if the call doesnt change you can just leave a few lines empty

native gale
#

What does this mean? (It's in spigot source code at Spigot-API/pom.xml line 68)

smoky oak
#

i mean

#

maven isnt spigot

#

so its probably that

native gale
#

What is "proper"?

torn shuttle
#

I don't know that I can avoid modules because I am using remappings

#

I was thinking I might be able to do per-module remaps (probably?)

smoky oak
#

i mean

#

i remember it essentially being
version_1.18.2
version_1.18.1
version_1.18
and then another file serving as endpoint that redirects depending on the current server version

#

like i said no idea where it is

hybrid spoke
#

i'm a fan of multiple modules

#

fuck reflection

torn shuttle
#

how do you end up using the multiple modules?

#

does it output different jars?

remote swallow
#

1 jar, you have an interface that has the methods you would need nms for

#

a manager class or whatever to call get the adapter for that version

hybrid spoke
torn shuttle
#

oh interesting

#

they each have their own pom?

hybrid spoke
#

yes

#

also its very useful if one version doesnt work properly

remote swallow
hybrid spoke
#

you dont have to figure out what could cause that and do hacky stuff in your overall code