#help-development

1 messages Β· Page 426 of 1

torn shuttle
#

because up till now I refused to touch nms

hybrid spoke
#

you can just adjust the module

remote swallow
torn shuttle
#

and tbf I was still hoping someone would've added a pathfinding solution by now

obsidian hearth
#

How do I enable royal economy shops? Whenever i click on the npc it says that shop is disabled, should I make changes in permission to open?

eternal oxide
#

Someone about 6 months back did a huge thread on pathfinding

obsidian hearth
ancient plank
#

I've had many instances where I've almost made a multi-module project, but then I don't

torn shuttle
#

basically the last 6 years for me

#

but now I really want pathfinding

eternal oxide
#

Pathfinding ^

icy beacon
torn shuttle
twilit roost
icy beacon
#

how would that help in adding an attribute

#

also according to screaming sandals it seems like attackentitygoal isn't in 1.16.5

icy beacon
#

also 1.16.5

#

I wonder if I can do something with this

#

EntityInsentient.p().a(GenericAttributes.ATTACK_DAMAGE, damage).a()

#

(found via EntityMonster)

quaint mantle
icy beacon
#

yeah

#

?

quaint mantle
#

doesnt exist

icy beacon
#

do you think it could be that it doesn't exist at all

#

actually wait

quaint mantle
#

what about registergoals?

icy beacon
#

i have this code snippet that always says "no modifier"

#

which means that i fail to add the attribute

quaint mantle
#

whats the interface

#

of attributes

icy beacon
#

if it didn't exist at all, it'd probably crash when this was called

#

and it doesn't

icy beacon
quaint mantle
icy beacon
icy beacon
quaint mantle
quaint mantle
icy beacon
#

because if it works don't touch it

icy beacon
quaint mantle
#

so it works?

icy beacon
#

not when the chicken spawns

quaint mantle
#

OH

#

alright

icy beacon
#

which is when i add the attribute

quaint mantle
#

so the attribute works

#

or what

icy beacon
icy beacon
#

the attribute ATTACK_DAMAGE by default is not on a chicken

#

and without it, the chicken can't attack

#

so i need to add that attribute to my chicken

quaint mantle
#

you could just write code that checks for when a chicken is in a 1 block radius of you, it attacks you

icy beacon
#

i tried these code snippets

#

neither worked

chrome beacon
#

I'm looking at the 1.19.2 Mojmapped code. Things shouldn't have changed too much. You cannot add the attribute like you're doing. You need to modify the supplier

quaint mantle
#

just a suggestion

icy beacon
#

and what supplier exactly would i need to modify

icy beacon
quaint mantle
#

yea

chrome beacon
icy beacon
#

ah jesus christ

#

well what supplier are you talking about?

chrome beacon
#

Yeah ignore that

#

Just replace the attribute map entierly with reflection

icy beacon
#

also, this snippet of code:
EntityInsentient.p().a(GenericAttributes.ATTACK_DAMAGE, damage).a();
this is "sort of" what EntityZOmbie uses to add an attribute

icy beacon
#

hm alright i guess

chrome beacon
#

Don't forget to change the craftAttributes too

icy beacon
#

so, if I get this right:

  1. i get the original attrs map
  2. i add my attack_damage attr
  3. i put the attr map back in with reflection
#

is it?

chrome beacon
#

How compatible to you want to be with other plugins?

icy beacon
#

acceptably compatible idk honestly

chrome beacon
#

(that are trying to modify the same thing)

icy beacon
#

i'm doing a commission so i have no idea

#

bro is running catserver so things are gonna fail sooner or later

chrome beacon
#

oh no

icy beacon
#

yeah so far i told him that i don't guarantee that i'll get nms working

#

because i explicitly mention that i don't do nms in my comms details

#

so i'm just curious as to how far i can get

#

and maybe succeed

ancient plank
#

Hurr hurr post on spigotmc using paper api

icy beacon
#

paper police with ?whoami on their way

#

?whereami

icy beacon
#

wait

#

AttributeMapBase has an AttributeProvider field

#

EntityInsentient.p().a(GenericAttributes.ATTACK_DAMAGE, damage).a()

#

this returns an AttributeProvider

#

what if i mightily replace it

smoky oak
#

wait ur not on remapped?

icy beacon
#

nah 1.16.5 + i don't care enough atm

smoky oak
#

cant help you then lol

#

ive been using remapped for years

icy beacon
#

just tell me remapped and i'll take a look at screaming sandals lol

smoky oak
#

dont remember how to use acutal NMS lol

icy beacon
#

you know this is a thing right

smoky oak
#

ye

#

since yesterday

icy beacon
#

xD

#

doing nms without it must've been a pain

smoky oak
#

well like i said i used remapped

#

so not as big as you imagine

#

since yknow

#

methods have names

#

unlike native code

icy beacon
#

i normally use remapped 😭

#

but i just didn't care at first and now i don't care enough

chrome beacon
#
        AttributeSupplier supplier = Chicken.createAttributes()
            .add(Attributes.ATTACK_DAMAGE)
            .build();

        AttributeMap attributeMap = new AttributeMap(supplier);
        CraftAttributeMap craftAttributeMap = new CraftAttributeMap(attributeMap);
        
        // Use reflection to inject them

^ This is untested and using mojmaps

solar mauve
#

hey there

icy beacon
#

oh thanks Olivo, I'll try it now

quaint mantle
#

does NMS exist in older versions

#

like 1.8

icy beacon
#

but i was also gonna try this:

try {
        final AttributeProvider provider = EntityInsentient.p().a(GenericAttributes.ATTACK_DAMAGE, damage).a();
        final Field field = AttributeMapBase.class.getDeclaredField("d");
        field.setAccessible(true);
        field.set(this.getAttributeMap(), provider);
      } catch (final Exception ex) {
        ex.printStackTrace();
      }
solar mauve
#

whats the 1.8-1.12 line limits for scoreboards?

icy beacon
smoky oak
#

i mean

icy beacon
smoky oak
#

nms exists in all versions

solar mauve
#

no, i don't mean character limits

#

line limits

smoky oak
#

its just becoming increasingly more difficult to use the older it is

sterile token
#

Any simple way for doing a cooldown before getting teleported?

icy beacon
#

yeah just uh

#

delay the task

#

oh wait

#

you mean cooldown

sterile token
#

no no

sterile token
#

I mean wait some time before doing x

icy beacon
#

a map<UUID, Integer>

sterile token
#

A delay mainly

smoky oak
#

uuid long

icy beacon
#

value is seconds before it's accessible again

sterile token
#

no no that no

smoky oak
#

int cant contain timestamps

icy beacon
#

or you can make Long and make it ticks

tardy delta
#

use the date time api

#

theres Instant

sterile token
#

Im doing a teleport, so before teleporting i need to display:

Teleporting in 5 seconds
teleporting in 4 seconds
...
...
Etc

icy beacon
#

ah

sterile token
#

So mainly a delayed schedule?

quaint mantle
#

make a loop

icy beacon
#

well just get an int and decrease it until it's 0

quaint mantle
#

exactly

sterile token
#

Hmn

icy beacon
#

basically the following

#

you have 2 schedulers

#

one to teleport

#

one to send the message

#

the teleport scheduler will be ran in X seconds

#

and the sender will be ran every second

#

but when the int reaches 0, the sender stops

sterile token
#

right ik, i having problems with the logic

eternal oxide
#

one task

sterile token
#

any example

#

I cant understand the logic

quaint mantle
#

bro make a loop that loops 5 times

then just put a sleep(1) and then ur message

eternal oxide
#

no sleep

glad prawn
#

Yes

icy beacon
#

in mojang

sterile token
undone axleBOT
native gale
#

Btw, what I am curious about. Let's say I somehow got a decompiled source code of let's say Minecraft 1.2.5 server. What if I take and re-implement the everything by myself using that source code as the reference. And by "re-implement" I mean not modifying the existing thing, but making my own thing from scratch. Does this still count as copyright infringement?

sterile token
#

Just having troubles with the logic

icy beacon
icy beacon
native gale
sterile token
#

Just want to get the logic explained

native gale
sterile token
native gale
eternal oxide
#

repeating timerjava int loop 5; @Override run() { sendMessage... loop--; if (loop == 0) { teleport; this.cancel; } }

sterile token
#

Will the task get re executed?

eternal oxide
#

one task per player

#

as they won;t run at the same time

#

unless it's a countdown for all players, then use a Set of the players UUIDs

icy beacon
#

@chrome beacon thanks for your help, i'm going to be trying this now

final AttributeProvider provider = EntityChicken.eK().a(GenericAttributes.ATTACK_DAMAGE, damage).a();
      final AttributeMapBase base = new AttributeMapBase(provider);
      final CraftAttributeMap map = new CraftAttributeMap(base);

      try {
        final Field attributeMapField = EntityLiving.class.getDeclaredField("attributeMap");
        final Field craftAttributeMapField = EntityLiving.class.getDeclaredField("craftAttributes");
        
        attributeMapField.setAccessible(true);
        attributeMapField.set(this, base);
        
        craftAttributeMapField.setAccessible(true);
        craftAttributeMapField.set(this, map);
      } catch (final Exception ex) {
        ex.printStackTrace();
      }
#

OH MY GOD

#

yes modifier

#

moment of truth

quaint mantle
#

does the turkey deal damage now

icy beacon
#

i'd like to thank my parents, friends and everyone who supported me

#

and especially olivo

#

a life saver

#

i owe you my firstborn

icy beacon
quaint mantle
#

damn can you show what it looks

#

like

#

im interested

icy beacon
#

yeah i took a video

#

one sec

quaint mantle
#

kk

icy beacon
#

but quite fine

quaint mantle
#

lol thats sick

icy beacon
#

yeah haha

#

gotta now apply it to them

#

shouldn't be hard

#

i don't wanna eat my words

quaint mantle
#

what type of commission is this lmao

icy beacon
#

well

torn shuttle
#

yo modules are whack

icy beacon
#

the main part is that mobs now have customizable health, and after they die, they rotate 180 degrees instead of dying

#

one can them click them multiple times

#

every time they drop something

quaint mantle
#

??????

#

wtf lmao

icy beacon
#

after a select amount of drops the mob dies

#

but also a part of the commission is that these mobs now attack the player

quaint mantle
#

why would anyone ever need that

icy beacon
#

well i have no fucking clue

quaint mantle
#

lol

icy beacon
#

but i'm getting my money's worth

#

plus a fair bit of json and nms experience

quaint mantle
#

what do u need json for

hasty prawn
#

yay nms cheergi

icy beacon
#

i really thought that writing a custom json deserializer was the hardest part of this project

#

silly me

torn shuttle
#

libraries take care of that for you

icy beacon
#

etc

icy beacon
#

i was writing a gson deserializer from the file to my class

#

well this project is quite fun

#

apart from the times when i wanted to rip my shirt apart

quaint mantle
#

i need ideas for a project

icy beacon
#

code this

#

go

quaint mantle
#

lol

winged anvil
icy beacon
#

one that charges stuff

#

make a smart one

quaint mantle
quaint mantle
icy beacon
#

yeah

torn shuttle
#

sticking your finger in and getting electrocuted

winged anvil
#

like a server socket

quaint mantle
#

ok i will get 5 buff hamsters

#

running on a wheel

#

to generate electricity

winged anvil
#

is there really no way i can make a completely raw custom socket

quaint mantle
#

and pass that through copper wire

icy beacon
hasty prawn
#

Make a server socket that charges the sender $0.50 per message then pitch it to Apple

quaint mantle
#

ill put a cpu in my socket

#

smart socket

icy beacon
hasty prawn
sterile token
#

Legacy versions resources should be removed so then you oblise and encourage them to use latest versions

#

Cuz if servers doesnt add the ability for something its because its hasa reason if not they would allow to do everything

icy beacon
sterile token
icy beacon
#

answer the question

winged anvil
#

?paste

undone axleBOT
sterile token
#

Thats the way for going

icy beacon
#

i already code for latest versions normally

#

but this commission is kinda out of this world

#

it's not just 1.16.5

#

bro is running catsevrer

#

so it's probably gonna die sooner or later

quaint mantle
#

who still runs catserver

icy beacon
#

like 2 pepople

quaint mantle
#

why dont they use sponge or smth

#

does it still have support

sterile token
#

whats sponge?

icy beacon
sterile token
#

i never heard about those weird things

quaint mantle
#

or bukkit

#

idk

icy beacon
#

i thought you'd noticed that this commission is very weird

#

why ask questions

#

just go with the flow xd

quaint mantle
#

Β―_(ツ)_/Β―

#

do people still play hard core factions

icy beacon
#

yeah

quaint mantle
#

maybe i should make a core

sterile token
#

πŸ’€

#

So we must encourage ppl to use latest versions and dont use harcoded legacy versions

quaint mantle
#

legacy >>

sterile token
#

Also latest versions have better api implementations

quaint mantle
#

ok but i dont like the latest version

sterile token
smoky oak
#

i still hard code shit wdym modern code isnt hardcoded

quaint mantle
#

nO

smoky oak
#

*new

sterile token
#

Spigot doesnt give support on legacy versions, because they are already out of they hand

sterile token
#

That why i have try to explain md5 plenty of times to delete the the legacy sources, so then people is encourage to use 1.19. If not the wheel of using legacy versions wont stop

#

πŸ€”

quaint mantle
#

never delete the legacy sources

#

bro wtf are u talking about

#

1.19 is so shit

torn shuttle
#

md5 is not the authority on minecraft, if spigot decides to take down old code just because people will just stop using the service

sterile token
torn shuttle
#

legacy versions are stable and some software only works for that one version. People are allowed to choose which version they want to use

quaint mantle
#

+1

icy beacon
#

have you heard about opinions

#

or have you only heard about opinion

#

like singular and plural

sterile token
#

Now I'm with the translator, what I'm trying to say is that if you keep supporting legacy versions people will keep using them and that will never stop. The reason for removing legacy sources is to force people to use the new versions. Since they are the functional ones, they are up to date and open to suggestions.

icy beacon
#

why does it pain you that people use legacy versions

#

code for your 1.19 and be happy and dandy

quaint mantle
#

with legacy

torn shuttle
#

if I run a server that is 1.12 because there's a minigame that only existed for 1.12 I am not going to update because you forced me to update, I'm going to another server that allows me to download the version that will work for the software I want to use

quaint mantle
#

the old ones still function

#

exactly

icy beacon
#

yep

quaint mantle
#

imagine just removing 1.8 support

#

on like

#

hypixel for example

tardy delta
#

wdym support?

quaint mantle
#

like

#

they just stop using it

#

because its "unfunctional"

sterile token
#

Anyway, I see that you are not understanding my point of view. So I'm going to continue in class. Because I will only waste time arguing. Besides it obviously makes too much sense to only use recent versions.

icy beacon
#

you'd be a great politician

quaint mantle
#

some people want to use old combat in games such as skywars etc

#

honestly i never play 1.19

eternal night
#

Deleting legacy source sounds pretty dumb indeed

tardy delta
sterile token
quaint mantle
#

bro why does it matter to you

#

not everyone wants better things

#

let people choose

#

like wtf is ur argument rn

sterile token
quaint mantle
#

man

#

so just because u do 1.19

#

u cant do 1.8

#

its very similar

sterile token
#

It is not possible to waste your time looking for solutions to problems for legacy versions and get paid a lot of money on top of that. When in 1.19 they wouldn't have that kind of problems, because the apis are correctly designed.

torn shuttle
#

so we have to get rid of software that works for older versions so you can make money selling updates?

quaint mantle
icy beacon
#

It is not possible to waste your time looking for solutions to problems for legacy versions and get paid a lot of money on top of that.
i'm currently working on an expensive 1.16.5 commission

quaint mantle
#

bukkit will always exist

icy beacon
#

according to you 1.16.5 is legacy

quaint mantle
#

exactly

sterile token
quaint mantle
#

just because you cant use legacy api doesnt mean that it should be removed

#

lol

icy beacon
#

you said this implying that 1.16.5 is legacy lmao

#

otherwise why the fuck did you say that

#

tell me

sterile token
winged anvil
#

major coder beef

quaint mantle
#

lol

sterile token
#

I never seen that message

#

πŸ‘†

icy beacon
#

so why did you even mention legacy

young knoll
#

1.16 is still legacy

icy beacon
#

did you just assume i was coding in legacy because i was using unmapped

#

what the fuck

icy beacon
sterile token
#

The point is that legacy versions are a mess and they should be taken out of market. So we latest versions get paid the money they should

icy beacon
#

what the actual fuck

quaint mantle
#

what is ur argument

icy beacon
#

we should kill old people so youngsters have more bus seats

sterile token
#

And no getting paind less with the excusa that legacy versions are difficult to work and they get paid more by that excuse

icy beacon
#

old people are harder to look after, too

quaint mantle
#

ur argument is like "they should delete other games so us minecraft devs can make more money"

eternal night
#

You just force people to get 1.8 from other sources

tardy delta
#

watching people discussing is always interesting

eternal night
#

Sources that aren't as reliable

icy beacon
tardy delta
#

wasted time

eternal night
#

Does running 1.8 make sense ? Fuck no, the software has not been maintained for eternity and is riddled with bugs

icy beacon
#

and after coding in nms for 6 hours i need to put my anger somewhere

eternal night
#

Does deleting it's source mean anything

#

No

sterile token
#

πŸ€”

eternal night
#

You are talking about a userbase that actively uses unmaintained software

icy beacon
#

what's your argument

quaint mantle
eternal night
#

They don't give a shit about where and how reliable the server is

#

Else they would be using maintained software e

#

Imo we could have just let them die with log4j2

#

Or well it's exploit

icy beacon
#

also sometimes hardware requirements are a bitch

#

and that includes minecraft lol

wet breach
winged anvil
icy beacon
#

i remember my 1.8 test server launching in like 1.5 seconds

#

my 1.19 takes 40

wet breach
#

start up times are meaningless

icy beacon
#

that's an example

tender shard
#

1.19 takes 2 seconds on my laptop (using spigot)

wet breach
#

regardless of server other then mc, start up times are meaningless

torn shuttle
eternal night
#

M2 zoom

wet breach
#

starting up faster doesn't yield any benefits

icy beacon
#

i'm just generally talking about legacy software and hardware requirements

torn shuttle
icy beacon
#

used minecraft as an example

icy beacon
wet breach
#

then disable stuff you are not using

eternal night
#

Or hot reload...

icy beacon
#

i'm using a dedicated hosting

#

well maybe it's shit because i pay 1.5$ for it

torn shuttle
#

you can't hot reload everything

icy beacon
#

but my point still stands πŸ’€

eternal night
#

jetbrains runtime gets very far

torn shuttle
#

and sometimes you can't even hot reload things you should be able to

eternal night
#

Far enough for the repeated tweaking you do during development

#

Use a hot reload focused runtime then

wet breach
#

but, yeah in terms of server development, some people in the mc community are kind of spoiled between what some of the community provides and mojang though especially if you have a complain of how slow the server starts up and its not even past the 1 minute mark lmao

tender shard
icy beacon
#

'll buy your laptop

#

30$

#

it's a great deal

torn shuttle
#

24s on my current test setup

#

tbf it is testing a lot of things

winged anvil
#

https://paste.md-5.net/ucavazifuh.cs this read() method intercepts every packet even with the generics. Is there a way to only intercept one packet without hardcoding the <PacketPlayIn...> ?

wet breach
#

it would make sense to code towards that one packet

#

if all you wanted was that one packet

#

using generics goes in the opposite direction of that

winged anvil
#

im tryna make multiple classes that listen to different packets

#

and dont want to copy paste this method but i can if i really need to

wet breach
#

then make a method where you can supply the packet you are wanting?

torn shuttle
#

I am not doing this module thing right

#

urgh

tender shard
#

why not

torn shuttle
#

the quick answer to that is that I have no idea of how to use modules correctly

#

I need something that will allow me to use mappings and also reobfuscate them per module

quiet ice
#

JPMS?

#

Ah no

tender shard
#

take a look at this: https://github.com/JEFF-Media-GbR/JeffLib

the "core" module defines an interface AbstractNMSHandler.
the "spigot-1.19.X" modules implement that.
"core" also has a method to create the matching implementation through reflection.
the "dist" module then depends on core and each implementaiton and shades it into one jar

remote swallow
#

imagine needing a dist module

tender shard
#

it's not needed but this way you don't have to add all the specific versions to your pom

remote swallow
#

i should port jefflib to gradle

icy beacon
#

alex will kill you

tender shard
#

good luck

torn shuttle
#

can you even do that in gradle

remote swallow
#

yes

wet breach
#

I should make a maven plugin out of jefflib

remote swallow
#

i do it

tender shard
remote swallow
#

i could do it in a few hours now

icy beacon
torn shuttle
#

I thought you couldn't even run the mappings on gradle

icy beacon
#

text wall

tender shard
remote swallow
icy beacon
#

?paste

undone axleBOT
torn shuttle
#

christ

remote swallow
torn shuttle
#

this is just a nightmare

icy beacon
#

please either create a discord thread or upload your code to the paste

wet breach
#

I see they like making things null

young knoll
#

You got your multimodule stuff from me @remote swallow

#

Smh

remote swallow
#

i got it from minetweaks first

#

then blueprints

young knoll
#

So me

remote swallow
#

yea

wet breach
remote swallow
#

he owns minetweaks :kekw:

haughty storm
quaint mantle
torn shuttle
#

humans are not supposed to be doing this, we are supposed to be supposed to be picking up a big wheelbarrow like full of logs and building a house

tender shard
sterile token
#

To conclude it does not seem right to me that a simple developer of 1.8, this charged more than a programmer 1.19. When the api of 1.19 is much more complete and more possibilities. So it is almost impossible to earn less in 1.19 on the contrary. They would have to earn much more

haughty storm
wet breach
torn shuttle
wet breach
tender shard
icy beacon
#

on the other hand 1.19 has a shit ton more possibilities

#

thus opening the room for more comms maybe

#

dude what the fuck are you trying to prove

torn shuttle
haughty storm
wet breach
#

no

tender shard
#

LivingEntity has no pathfinding

wet breach
quaint mantle
#

why does it bother u

haughty storm
torn shuttle
wet breach
#

but their typing makes it hard to determine

wet breach
#

then get better

torn shuttle
#

so I was right then

sterile token
#

Why 1.8 get paids More if the api Is shity compares with 1.9

#

πŸ˜‚

wet breach
#

because they market better then you do

torn shuttle
#

which a lot of people are not willing to put up with

tender shard
wet breach
#

and there is that, but really it just comes down to just doing business better. A developer for a recent version can make just as much if not more then a dev for 1.8

#

but the opposite is true too

torn shuttle
#

it's almost like asking someone to do something harder to do costs more money than asking someone to do something easy to do

sterile token
wet breach
#

really it just comes down to the developer knowing business

torn shuttle
wet breach
sterile token
wet breach
#

because it doesn't have to

#

spigot doesn't have an army of developers to maintain all the various versions and variants of code

tender shard
#

imagine doing apt-get upgrade then being upset that it uses the latest version from the repo, instead of an 9 year old version lol

wet breach
#

lol

sterile token
#

Right, but people doesn't have too, they should always stick to newer Versions. Is the same using oAuth 1.0 and complaining to Google that the versiΓ³n 1.0 has issues, while latest Is 2.0

torn shuttle
#

verano is single-handedly lowering the room IQ down into the single digits

tardy delta
#

πŸ€”

wet breach
#

not sure if that makes sense or not

#

literally if md_5 decided he wanted to start supporting old versions, that would be the thing with spigot from then on

#

its no different then other people who run servers choosing to use what they want because it is them that foots the bill

tender shard
wet breach
#

I am still unsure what exactly is your point or what is your argument other then you being upset that 1.8 developers get paid more

remote swallow
#

jefflib hurts

tender shard
#

and key is not Something

sterile token
#

So you are not being clarify at all, so far spigot comm wants to support 1.19 only, but they don want to remove legacy sources. So that doesnt make Sense at all. Cruz ppl Will Co tinues using legacy versions

young knoll
#

If spigot removes them people will still get them

#

Better to provide an official source

wet breach
sterile token
#

Oh ok

wet breach
#

if you wanted spigot 1.6 you can still get it

sterile token
#

Lol

#

Rally?

#

I didn't realize thats posible

tender shard
#

have you never heard of buildtools? o0

wet breach
#

buildtools won't build 1.6 spigot πŸ˜›

#

however you can do it yourself since you have the entire git history

torn shuttle
#

Guys just stop, there is nothing to understand. Verano is just mad because other people are making more money than him and he thinks it's unfair because they are doing support for legacy versions when spigot does not, so he can't get the help he would need to figure out how to do these services. His solution is to just remove old versions, because if he can't make money programming for them, then they just shouldn't exist. There is no deeper meaning or discussion here, it's been ongoing for the last hour at this point.

wet breach
#

literally anyone who uses buildtools everyone has the entire history

winged anvil
#

yall are making money?

wet breach
#

of course

torn shuttle
#

dolla dolla

torn shuttle
wet breach
#

its not rude when that seems to be the truth

torn shuttle
#

if your opinion sounds rude when read back to you then maybe you have a problem, not me

sterile token
#

I just wondering yo get a real explanaciΓ³n of why sources are there, but they dont want to sipport them?

#

That's my question

#

I just having some english issues

torn shuttle
wet breach
#

sources are there because you are allowed to use them, just because spigot stopped providing support doesn't mean sources need to disappear too. This would literally be counter intuitive to open source philosophy

sterile token
#

Oh ok i understand the reason with tour text frost

wet breach
#

however when you decide to use old code, its is up to you to handle any problems you encounter, spigot won't provide the support if you do. That is the only catch

sterile token
#

Okay that's what i was wondering yo Heard

#

Just the reason of why they dont support them

#

Thanks to all, and sorry for being so ashole

tender shard
#

imagine someone comes to you and is angry because there's a bug in version beta 1.3 of your software. Would you now fix the bug in version beta 1.3 that's 15 years old, or would you tell them "it has been fixed in version 1.6 10 years ago"?

wet breach
#

and if they were smart enough, and it was open source

#

they could back port the code themselves

sterile token
ancient plank
#

I dropped my last brain cell help

torn shuttle
#

we're going to have to create a containment zone to stop this intellectual disaster from spreading

mighty pier
#
    public final void toggle() {
        if (toggled){
            enable();
        } else {
            disable();
        }
    }``` it feels wrong
torn shuttle
#

the way you're supposed to structure packages inside of modules is eluding me

mighty pier
#

dark magic wtf

#

how you know

#

ok maybe its obvious

torn shuttle
#

so each module gets its own package directory, and the core also gets its own package directory, and you also make the pom that handles all of the modules and that pom is at the top level of packages? Does it still need a package because I seem to be having a hard time linking the modules together when it doesn't

mighty pier
#

rong

pseudo hazel
#

what do you even mean by module

mighty pier
#

you click button

#

osmething enabled

#

enables

tardy delta
#

id rather call it a feature

mighty pier
#

uh

#

sure

#

ill rename

tender shard
mighty pier
livid dove
young knoll
#

Doesn't need to be open source for that

mighty pier
#

when github get suspended cause you gave kids a ram eater πŸ’€

livid dove
mighty pier
#

how do i do the thing where i can send different strings based on a boolean?

alpine swan
#

in onCommand, what is contained in the label?

remote swallow
#
if (boolean) {
    sendMessage(1);
} else {
    sendMessage(2);
}
young knoll
#

Or

mighty pier
#

no there was another way

young knoll
#

String message = boolean ? "a" : "b"

mighty pier
#

in a single string

#

thnks

remote swallow
#

ternary operator

ancient plank
#

Ternary

young knoll
#

I'll tern your ary

tender shard
alpine swan
#

so what i need is args[0] i guess

young knoll
#

It's whatever alias is used basically

mighty pier
#
public class FeatureManager {

    private static List<Feature> features = new ArrayList<>();

    static {
        Feature fly = new FlyFeature();
        features.add(fly);
        KeyBindManager.initKeyBind(fly);
    }

    public static List<Feature> getFeatures() {
        return features;
    }
}``` good feature manager?
#

or bad very naughty

#

i heard not use static if you create object or something

#

but i forgor

pseudo hazel
#

you shouldnt make the manager static like this I think

#

it will limit your options

#

if you really want only 1 instance of it, just create it in your plugin class and create a getter for it

#

but if for some cursed reason you need multiple feature managers you cant make it static

torn shuttle
tender shard
#

i am not sure what you mean with "package"

torn shuttle
#

groupid

tender shard
#

i use the same groupid for all modules

#

but it doesn't matter what you use as groupid and artifactid, as long as you use the same thing in your modules to declare the parent

echo basalt
young knoll
#

Just ternary everything

torn shuttle
#

I keep getting these pom.xml files to tell me that they are referencing themselves or trying to get the parent from remote instead of getting it from the one that is meant to be managing the modules

tender shard
#

then you must have done something wrong lol

#

show your dist pom

tardy delta
#

and no thats not my screen

young knoll
#

sureeee

tender shard
#

MyLib-parent:

groupId: me.username
artifact: mylib-parent

dependencies: none
packaging: pom

MyLib-dist (or just MyLib):

groupId: me.username
artifact: mylib-dist (or just mylib)
parent:
  groupId: me.username
  artifactId: mylib-parent
dependencies:
  me.username.mylib-core (compile)
  me.username.mylib-1.19.4 (compile)
  me.username.mylib.1.19.3 etc...
plugins: maven-shade

MyLib-core:

groupId: me.username
artifact: mylib-core
parent: same as above
dependencies: spigot-api

MyLib-1.19.4:

groupId: me.username
artifact: mylib-1.19.4
pΓΌarent: same as above
depencencies: core, spigot
plugins: specialsource (for remapping)
remote swallow
#

please dont take that as versions are 1.19.1 for package

#

use 1_19_R1

tender shard
#

nah that causes problems

#

1.19.2 and 1.19.3 have different mappings but the same package R1 version thing

#

for example

#

or was it 1.19.1 and 1.19.2? whatever

amber vale
#

How can I cast Block into Switch?

remote swallow
#

1.19.3 is R2

tender shard
tardy delta
#

damn convention

tender shard
tardy delta
#

something you can switch on and off

remote swallow
#

1.19.4 is R3

amber vale
remote swallow
#

i checked it

amber vale
#

Yeah

#

It has the fancy property where I can check if it's switched on

tardy delta
#

cast blockdata

tender shard
#

ok then it was 1.19.1 and 1.19.2

#

both have R1

#

yet the mappings are different

#

that's why just using the R1, R2 thing is not reliable

#

they are the same in 99% of cases, but not 100%

young knoll
#

I was told .1 is R1, .2 and .3 are R2, and .4 is R4

tardy delta
remote swallow
tender shard
#

both 1.19.1 and 1.19.2 are R1

young knoll
#

I was lied too

#

D:

amber vale
tender shard
#

what even is a "switch type block"

young knoll
#

Levers

tender shard
#

ah

#

why is it called switch and not lever o0

amber vale
#

Cause

#

It switches

#

On and Off

#

Duh

tender shard
#

why doesn't it just use BlockFaces, like ItemFrames do

amber vale
#

Uhh

#

Why is a lever

#

When pulled one way

#

A Material.LEVER

#

And the other way it just simply isn't

#

When you pull a lever down, and check if it is of Material.LEVER, it isn't

#

But when pulled up (off) it is Material.LEVER

tender shard
#

what is it when it's pulled down?

worldly ingot
#

Previously levers were able to be placed on ceilings, walls, and floors. Buttons could not be. They were only placeable on walls

#

So the Switch.Face property was for levers exclusively

amber vale
tender shard
#

print it out

remote swallow
#

on

worldly ingot
#

If you're using < 1.13, they were different blocks types iirc

tender shard
#

did anything big change in 1.13? Materials were added a looong time prior

worldly ingot
#

Everything was flattened. It's when byte data was removed

amber vale
#

Uhh

tender shard
#

yeah but the byte shit was deprecated since at least 1.9

amber vale
#

I have no fucking clue

worldly ingot
#

Or, more accurately, hidden by implementation

torpid blaze
#

Hey,
Has anyone any Idea on how to let players enchant an item multiple times in an enchanting table?

worldly ingot
#

Bukkit deprecated it because they were magic numbers

amber vale
#

It is of lever

worldly ingot
#

Its replacement in Bukkit was an abstraction layer, MaterialData

amber vale
#

But I guess it doesn't want to be a lever when checking it on one way

#

Lmao

#

It is a lever both ways, but only on way way does it want to be a lever in an if statement

tardy delta
worldly ingot
#

It just was never complete lol

#

You can!

#

With Fabric or Forge!

young knoll
#

Can we fix server side ones

tardy delta
#

if you want to fix bugs, use minestom

tawdry parcel
tardy delta
#

lookin good

young knoll
#

Because the chat event doesn't support components

tender shard
tawdry parcel
tender shard
#

TextCOmponent.toLegacyText turns a BaseComponent[]into a string, but not sure if that'd work with click events and such

#

yeah sure, what else would it do

#

to properlly turn an array into a string, you'd use Arrays.toString

tawdry parcel
tender shard
#

to properly print out an array normally, one would use Arrays.toString(), e.g.

public class Test {

    private static class MyClass {
        private final String name;

        private MyClass(String name) {
            this.name = name;
        }

        @Override
        public String toString() {
            return "MyClass{" +
                    "name='" + name + '\'' +
                    '}';
        }
    }

    public static void main(String[] args) {
        MyClass[] myClasses = new MyClass[] {
                new MyClass("a"),
                new MyClass("b")
        };
        System.out.println("" + myClasses);
        System.out.println("" + Arrays.toString(myClasses));
    }
}

first sout prints [LTest$MyClass;@7229724f, second one prints [MyClass{name='a'}, MyClass{name='b'}]

#

no, I just wrote that

#

if you really need to use components, the easiest way is probably to cancel the chat event, then loop over all players and send it through Player.Spigot#sendMessage(ChatMessageType, UUID, BaseComponent...)

young knoll
#

Pretty much the only way

twilit roost
#

Im using this load function before joining in players into the game, yet they get stuck on loading screen, any clues why?

tender shard
tardy delta
twilit roost
tender shard
twilit roost
#

and this event happens when player queues via cmd

#

nope, my own

#

yee πŸ˜„

tardy delta
#

where getter naming conventions

#

chatgpt believes java has operator overloading bruh

twilit roost
#

im unloading those worlds btw
when I generate them, bcs they we're taking like 90% of my CPU.
I have 87 of them at once, so it isn't very perfomance effective

tardy delta
#

ill teach ir rawrr

twilit roost
#

but now it sticks to 7%, just players can't load the world

#

lags the crap of other players

#

thats why I pool those worlds at boot

#

thats why im instantly unloading them and loading them as I need them

#

thats what im trying to do

#

just players can't join into them.
Even tho it says the world has been loaded

#

yep
just after I tried to join the world, tp'd myself back via console

#

not when joining

#

I'm probably setting players gamemodes tho
lemme check

#

nope i'm not
but even with creative, nothing changes

#

and ik that its safe to tp there
worked before I tried to spare that CPU

tawdry parcel
tawdry parcel
#

Ok thank you i'll try that

tawdry parcel
young knoll
#

Player.Spigot#sendMessage

tender shard
#

why didnt you use the method I mentioned?

#

more context

#

for example, this is ambiguous and won't compile:

public class MyClass {

    public void doSomething(String string) {
        System.out.println("Simple parameter");
    }

    public void doSomething(String... strings) {
        System.out.println("varargs parameter");
    }

    public static void main(String[] args) {
        new MyClass().doSomething(null);
    }

}
#

does the main method call the varargs, or simple parameter method? nobody knows

young knoll
#

Because varargs can take a single string

tender shard
#

java isn't kotlin, you need to clarify it

young knoll
#

And so can the other method

tender shard
#

because it could be a boolean array I guess

#

someone might do update("someString", true, true, true, true)

#

is this now the String, Object... method, or the String, boolean, Object method?

worldly ingot
#

lol, this is part of the reason why Object varargs are sketchy

tender shard
#

or just use Object[]

#

I never really understood why I sometimes need @SafeVarargs

tardy delta
#

the moment you pass in a byte array where it expected an object varargs go brr

worldly ingot
#

It's a fancy SuppressWarnings for generic varargs

tender shard
#

yeah but I don't understand what heap pollution is supposed to be lol

tardy delta
#

whats SafeVarargs

#

i usually suppress any warning

tender shard
worldly ingot
tardy delta
#

well any warning that makes sense

tender shard
#

you suppress all warnings that make sense?

tardy delta
#

that make sense that they appear

#

cmon man

tender shard
#

howis this always false? I annotated T[]with NotNull, not the array contents

tardy delta
#

you already threw an exception if the length is 0

tender shard
#

yeah but t[0] might be 0

twin mason
#

T @NotNull [] t I think

tender shard
#

I could do this

    public static void main(String[] args) {
        new Test<String>().doSomething(new String[] { null});
    }
tardy delta
#

cmon dont code like that

tender shard
#

I want to allow null elements, I just don't want to allow passing null as the whole array

twin mason
#

the @NotNull would apply to the array in this case

tardy delta
#

(@NotNull T @NotNull [] t) :(

tender shard
#

that is the opposite of what I want

quaint mantle
tardy delta
#

shouldnt tell me

tender shard
#

basically I want to do this: tell java that

  1. new Test<String>().doSomething(new String[] { null}); is ALLOWED, but
  2. new Test<String>().doSomething(null); is NOT ALLOWED
#

actually I don't need it, I'm just bored and tried whether it's possible

quaint mantle
#

lmao

#

Weird

tender shard
#

which annotation is that? jetbrains?

twin mason
#

jetbrains, but I suppose any NotNull annotation will work

tender shard
#

weird that it works like this, I would assume the "Object" is to be annotated with NotNull instead of the [] thing

#

on the other hand, it makes sense, as the [] ARRAY is NotNull so that's where the annotaiton belongs to

#

so yeah this is what I was looking for:

public T doSomething(@Nullable T @NotNull [] t) {
#

Nulalble refers to the elements, NotNull refers to the array itself

#

I would have thought it must be the other way around, but thinking about that [] is the array itself, it makes sense

twin mason
#

yeah it's weird, the first @Nullable applies to both the array component and the method parameter

torn shuttle
#

man I sort of regret starting this

atomic swift
#

wait can a config have something like this

sound:
  group: "e"
    soundid:"e"
quiet ice
#

How noone fixed that blunder is beyond me

#

Heck, even eclipse knows better

atomic swift
#

ok

quiet ice
#

Hm, I might want to use eclipse's annots in the future.

atomic swift
#

ik that

tardy delta
#

do you guys use gpg keys on github?

#

somehow i need to enter a key while i only configured it for my other gh acc lol

tender shard
#

I only use gpg on macOS

tardy delta
#

i picked a 78 char key and it looks like it doesnt accept it

quiet ice
tardy delta
#

im kinda fucked then

quiet ice
#

These days SSH keys are used for signing (at least for me)

tender shard
#

is there actually any benefit in signing commits, given that you need write permission on github anyway?

tardy delta
#

ig im better with just removing that key cuz entering 78 characters every time goes brr

#

not like i can remember it so i gotta save it somewhere

quiet ice
tender shard
#

yeah sure, but I meant for repos that I own myself, anyway

#

I guess it's pretty useless then

quiet ice
#

But honestly it is a marginal difference outside of the verified badge

tardy delta
#

hmmh

quiet ice
#

Or at least git will. Did you complete the setup of the key?

#

Unless you say that the passphrase is 78 chars long at which point I just have to shake my head

tardy delta
#

uhh not sure what completing the setup would mean

#

ig so

#

removed that key anyways, copying it every time doesnt really improve security ℒ️

tardy delta
#

ye i followed that

#

had to type it every time tho

quiet ice
#

Though I must say if you are on windows you might get mixed results

remote swallow
#

i managed to set it up easily

tardy delta
#

its not about that

quiet ice
#

Hm. I think I had a similar case back then

tardy delta
#

the good ol' times on windows

#

i wish i was on linux rn

quiet ice
#

But ever since openssh is used for entering teh passphrase it remembers the key

#

before there used to be something different that required me to copy the key as you mentioned. That is if my memory serves me right: That should be over two years ago

tardy delta
#

alr

quiet ice
#

It's been ages since I all set it up^^

tardy delta
#

is there a big difference between gpg and ssh keys anyways?

quiet ice
#

SSH are far more useful

shadow gazelle
#

Are there any examples for defining what a config should have with a class?

#

Not sure if YAML or Spigot have anything built in for it or if I'd need to do it another way

quiet ice
#

They allow SSH access and also allow to sign commits since Fall 2022

#

GPG is only really useful for sending signed or encrypted messages in a well-accepted manner

tardy delta
shadow gazelle
#

Defining what should be in a yaml file

tardy delta
#

your choice ig

shadow gazelle
#

With an annotation or something instead of the mess that Spigot has for plugin yamls

torn shuttle
#

so if I'm doing a multimodule project for NMS I use reflections to select which module will be used, correct?

quiet ice
#

Ordinarily yes

eternal oxide
#

not really required

torn shuttle
#

I guess I'm sort of looking for the best approach here, or at least the one I'm likely to regret doing the least

quiet ice
#

Not truely but reflection is the easiest way to find the NMS version currently used

young knoll
#
public class NMSManager {
    private static final String PACKAGE = "me.jishuna.blueprints.nms.";

    private static NMSAdapter adapter;

    public static void initAdapater(Plugin plugin) {
        String version = getServerVersion();

        try {
            adapter = (NMSAdapter) Class.forName(PACKAGE + version + ".NMSAdapter").getDeclaredConstructor()
                    .newInstance();
            plugin.getLogger().log(Level.INFO, "Supported server version detected: {0}", version);
        } catch (ReflectiveOperationException e) {
            plugin.getLogger().log(Level.SEVERE, "Server version \"{0}\" is unsupported! Please check for updates!",
                    version);
            Bukkit.getPluginManager().disablePlugin(plugin);
        }
    }

    public static NMSAdapter getAdapter() {
        return adapter;
    }

    private static String getServerVersion() {
        return Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
    }
}```
#

Tis what I use atm

torn shuttle
#

ah a fellow blueprint package enjoyer

remote swallow
#

imagine needing to init it

toxic lion
#

Hi, im pretty new to spigot programming anyone have some idea's for plugins i can code to get practise?

quiet ice
toxic lion
#

like a gui with quests??

tardy delta
#

that smells advanced lol

quiet ice
torn shuttle
young knoll
#

Yeah quests are usually quite dynamic

quiet ice
#

I'm talking about like really small

remote swallow
#

interface

tardy delta
#

i probably did a homes plugin

remote swallow
#

with all the methods that require nms

toxic lion
quiet ice
#

And the quests were global and there is only a single quest at the same time

young knoll
#

Yeah the adapter is an interface

#

And in the NMS modules it is implemented

torn shuttle
#

my first plugin was implementing the just cause 2/3 flying system in mc

sick edge
#

Hi, I'm trying to use classes from one of my plugins in another one. Do I have to make a maven dependency or can I achieve it without it as I have it as a local jar (I've already set the plugin as a plugin dependency)

tardy delta
#

can probably use jitpack to pull from github, local jar would probably work too

quiet ice
# toxic lion what kind of quests?

Basically the entire server had to contribute towards working a certain goal (at the start it was just donating wheat) and then those that contributed got a reward

quiet ice
#

You can expand the idea of server-wise collaboration pretty far.
unfortunately that idea didn't grew popular for whatever reason

#

Heck, none of my plugin ideas gained any traction

toxic lion
tardy delta
#

marxism intensifies

torn shuttle
quiet ice
#

Used on more than 10 servers

#

(To be fair the cause of it failing to gain traction is due to me mandating paper - which meant that it was literally unfindable unless you knew the repository of the plugin)

torn shuttle
#

that really is not a very high bar lol

remote swallow
#

im ratio-ing you hard

#

i have 9 servers

torn shuttle
#

I was going to say I think I could make that same plugin concept get 1k downloads in under a month

remote swallow
#

thats totally harder

#

harder?

#

higher

#

i cant enlgihs

tardy delta
#

that calls himself bri'ish

remote swallow
#

i have 33 concurrent people so that counts to something

quiet ice
#

I mean I have a plugin with 45k combined downloads accumulated over 2.5 years ... but it is a fork of another plugin

remote swallow
#

name it

young knoll
#

I think I’ve hit near 100 servers when 1.18 dropped

#

It’s much lower now since most of them have died

quiet ice
remote swallow
young knoll
#

Close enough

remote swallow
#

but this sasys you have had 203

torn shuttle
#

I'm sort of idling between 750 to 1k right now

young knoll
#

200

#

Heck yeah

quiet ice
remote swallow
#

who hurt you

young knoll
#

I wonder what plugin has the most active servers

remote swallow
#

rainbow slam fucking sucks

young knoll
#

Probably something like worldedit

#

Tf is rainbow slam

remote swallow
torn shuttle
young knoll
#

Spigot isn’t a plugin

torn shuttle
#

then worldedit

remote swallow
young knoll
#

Does it make anyone nearby the slam gay?

torn shuttle
#

then vault, protocollib, worldrguard, placeholderapi, mv-core, essentialsxspawn, coreprotect

quiet ice
#

Also I fail to understand how downloads are made up. devbukkit is only responsible for 1/3 of downloads and still has 2/3 of running installs

remote swallow
young knoll
#

Lame

quiet ice
remote swallow
#

ah

#

can you remove rainbow slam

#

thanks

young knoll
#

What does the fork do

quiet ice
#

You can disable it

remote swallow
#

no one needs it in the first place

young knoll
#

Don’t assume

#

Smh

remote swallow
#

i just saw digits of pi

#

how many do you lot know

quiet ice
# young knoll What does the fork do

Just regular maintaince.
I.e. making sure it works after 1.15.0, a very large amount of performance fixes, a few exploits being patched and also a few extras here and there (such as colourable lasers)

young knoll
#

Laser beamz

remote swallow
#

3.14159265489

#

i think

#

i deffo didint listen to 100 digits of pi for 9 hours

quiet ice
#

Also trident and crossbow support - but I think that change is stuck on the repo unpushed for a good year now

young knoll
#

lol

quiet ice
#

With unpushed I mean unpushed to a release. It's still pushed to the public source repo

remote swallow
#

oh how do you keep track of where the download comes from

#

do you just have a field you change per site

young knoll
#

Robots in peoples walls

tardy delta
quiet ice
#

Yeah I had to be drunk or something while choosing the names of the classes and packages

tardy delta
#

sounds like me on a friday afternoon

quiet ice
#

Though to be fair on me I had like 1 1/2 years of experience when doing that change

young knoll
#

Oh no static plugin

#

Everyone panic

quiet ice
#

Well I will NEVER change that

#

That would be like 20 hours of work at my normal working speed

young knoll
#

Proof that static getter is good

#

Don’t @ me

young knoll
#

I think one of the spigot tutorials shows you both di and a static getter

#

?scheduling maybe

undone axleBOT
quiet ice
#

The issue here is that it is a static-final field

#

?di DI is kinda hard

undone axleBOT
tardy delta
#

πŸ’€

remote swallow
#

look at that snake cas