#help-development

1 messages · Page 1325 of 1

wet breach
#

Also, not even sure I could get all the dependencies at this point to rebuild it. Maybe I should go do that at some point before its too late.

pseudo hazel
#

I mean I think modern hologram api would just be some wrappers over Display to create and manage them easier

lost matrix
#

Im currently maintaining both, packet-based armorstands, and TextDisplays, and im thinking about dropping armorstands finally, since TextDisplays turned out to be very nice.

wet breach
#

so the 1.8 update where Mojang patched the horse bug killed it XD

#

Yeah I am quite pleased with the display stuff

lost matrix
#

Ah, i forgot that traditionally horses where used XD

wet breach
#

and ironically that was what was supposed to come out in 1.8

pseudo hazel
#

better late than never

wet breach
#

but I don't think they expected the back lash like they did when they randomly announced the patching of the horse bug XD

#

so they tossed it on the armor stand

#

Yeah, the horse bug was setting the horses age to a negative value, which caused it to turn invisible and if I am not mistaken also upside down

lost matrix
#

I am very pleased with the way mojang is currently approaching a more data-driven implementation for everything. 😄
Now they just need to tell Microsoft to fk off with their horrible, garbage, bedrock protocoll, and finally unify the versions.

pseudo hazel
#

yeah well, as long as they still keep adding different drop rates for new mobs in their updates, that aint happening

lost matrix
#

Bedrock support effectively tripples my dev time. You want to write a GUI? Better make sure you also implement it in Forms for bedrock. And the same for NPCs, Models, the entire Resourcepack needs to be maintained twice.

grim hound
#

they removed sun.misc.Unsafe in java 25
How the hell do I now allocate objects without invoking their constructor?

lost matrix
grim hound
#

yeah wtf will gson do

lost matrix
#

Better start adding no-args constructors to your classes. Can already see the casual

@ApiStatus.Internal
public void SomeClass() {
  this(null, null, null, 0, false);
}
wet breach
grim hound
#

nooooo

lost matrix
#

You could, in theory generate thos constructors via bytecode injection if there are no no-args constructors found by your serializer

wet breach
#

so, 26 or 27 will be where they may remove it

grim hound
#

lemme just fully confirm that it's gone

wet breach
grim hound
wet breach
#

you have to use that in the command line to allow access

grim hound
#

also, what's the default?

#

warn?

wet breach
#

think so

pseudo hazel
#

omg now im inspired to make something similar to this lmao

#

inspired by like computer craft, e.g you have a machine that you can add a hoe to and it will show it with like an item frame and it will rotate the frame to make it look like its working

wet breach
#

oh instead of helping you are just going to compete, seems reasonable I suppose

pseudo hazel
#

I mean are they gonna do something more with it?

robust helm
pseudo hazel
#

seems like smile said he was done with it himself

#

or are you planning on trying this out kento

robust helm
#

oh god no im good

#

im currently in a humbled state

#

ill stick to my little gamephases

pseudo hazel
#

that means you are already above average probably

wet breach
pseudo hazel
#

I guess, I havent looked at the code to see if it needs extensive rewrites

#

or idk if its still working

wet breach
#

sounds like it isn't

#

well I suppose it is, so as long as you stay at a certain mc version

pseudo hazel
#

hmm it does have quite a lot of features it would make sense to just update it I suppose

#

maybe not much needs to be done

robust helm
#

my wonderful gamephase listeners

#

btw ive been thinking about this for a while: why do we force log(1) even when its slower than the log(n) solution. like why would i use a hashmap for a registry of 10 kits when the whole hashing part takes longer than looping through every element and checking for a field?

#

like instead of map.get("some identifier") just list.find(element -> element.getIdentifier().equals("some identifier"))

pseudo hazel
#

because few people actually think about the speed instead of the complexity

#

and because its the more standard approach

#

it just "makes more sense" to use a hashmap

#

otherwise its just a microoptimization

robust helm
#

i mean replacing new HashMap() with new SecretlyAListButDontTellAnyoneMap() isnt too much effort

pseudo hazel
#

this is something that like a compiler should be able to do lol

robust helm
#

ig thatd explain it

pseudo hazel
#

I would not want to know how the map works internally to know if I should use it based on if I have 10 vs 10000 elements

#

well unless its very obvious that the map is good at some things

#

this is like an implementation detail

wet breach
robust helm
wet breach
#

the only time you worry about speed of something is because you have an issue

pseudo hazel
#

it would be slower, but it doesnt matter

robust helm
#

so its just that everyone is smart enough to not do premature optimization then?

pseudo hazel
#

its still like immeasurable

#

no

#

I think its more that you dont have to care about this sort of stuff

wet breach
pseudo hazel
#

I will use a hashmap even if I just have 5 elements if that makes the code more readable

wet breach
#

in the past like decades ago you used to have to worry about this stuff but that is because we didn't have like quad cores with speeds of 3+ghz and were still barely at 1ghz speeds XD

robust helm
robust helm
pseudo hazel
#

sure but when would you switch

robust helm
#

probably never but when the dataset is not growing by itself then it should never be large enough to be slower

wet breach
#

While hashing may be slower and am not even really sure how many orders of magnitude it is in comparison to looping and not even sure at how many elements you would need for the hashing to beat the looping either. But I prefer to use hashmaps mainly because it wouldn't be hard to change the code to be compatible with threads easily

lost matrix
#

For this case, the effective speed depends on the hashCode and euqals implementations of the objects. Those vary a lot and are details you should never concern yourself with. Java internally does a lot of optimizing for collections of smaller sizes like you described. Its generally not worth it to go for a few extra hundred nano seconds for this.

robust helm
#

fair enough

wet breach
#

now, there is one thing that I might consider in this scenario but its still really niche

#

there is a minimum size that a hashmap can be where as a list would be smaller

robust helm
#

memory-wise you mean?

wet breach
#

indeed

#

think the minimum size for a hashmap is like 10-20?

robust helm
#

would probably again not be noticeable

pseudo hazel
#

this would only really matter if you program for a gameboy or whatever

wet breach
robust helm
#

Oh wth 0% battery

#

How dare this laptop

wet breach
lost matrix
#

If i can trade memory for time, i almost always jump on it. Even if i waste like 100mb of ram.
In minecraft environments, not exceeding the 50ms tick time is much more important than whatever ram you occupy.

robust helm
#

And instead use a linked list simply because its the easiest to implememt (especially when libraries only increase binarx size)

pseudo hazel
#

yeah ofc, java is the wrong language for that kind of optimization

young knoll
robust helm
#

Customer pays dw

pseudo hazel
#

but yes I also prefer more ram over more time

wet breach
#

that reminds me, I really need to get my hands on Java OS

pseudo hazel
#

I would rather store it all in hashmaps than recompute it each time sorta thing

robust helm
wet breach
#

it used to be yes

robust helm
#

Weird

pseudo hazel
#

people write OS in any language

robust helm
#

Oraclelinux is enoguh for me

wet breach
#

in the past it really was the only way to have peak java applications

robust helm
#

I mean you could use netbsds rump kernel to run a jvm :)

wet breach
#

then once we got processors that were fast enough and ram limits significantly increased. Needing something like Java OS went out the window

robust helm
lost matrix
wet breach
#

anyways, the reason I want to get my hands on Java OS is so that I can update it. I would really like an OS specifically for java

pseudo hazel
#

your performance doesnt matter, engineers will just make better cards and cpu's

wet breach
#

even if I don't really have a use for it like at all lmao

#

I guess I could run an MC server on it

lost matrix
robust helm
lost matrix
#

Minecraft OS

robust helm
#

Theres an os made fully in lisp too

pseudo hazel
#

the people that run the world have enough money to buy that

robust helm
#

Sounds fun too but im honestlx intressted in any obscure operating system

wet breach
#

I got lucky and bought ram before the price went up by a lot

lost matrix
#

TempleOS

#

if you want obscure

robust helm
#

Its cool but hmm

lost matrix
#

640x480 as god intended

robust helm
#

Im atheist i cant do that

wet breach
robust helm
#

Ill pray to the plan9 bunny

robust helm
wet breach
lost matrix
#

Yeah, but was over a decade ago by now.

robust helm
lost matrix
#

He was mentally unwell and couldnt get enough help. Lets keep it at that.

#

Paranoid schizophrenia iirc

wet breach
robust helm
#

Oh damn

lost matrix
robust helm
#

I mean he cant really be blamed for it

wet breach
#

I find it ironic though while trying to invent 3d printing he almost set fire to his apartment with a dremel

#

of all things, a dremel to stop you

robust helm
#

He was about to invent 3d printing too?

#

Woah

wet breach
#

tried to, not sure how far into it he got

#

just know a dremel tool stopped him

robust helm
#

If i only knew what a dremel was in german

#

Cause i dont know what it means

lost matrix
#

the same

robust helm
#

Fuck

eternal oxide
#

a drill grinder

#

brand name is Dremel

wet breach
robust helm
wet breach
#

yeah it can be used for that too

robust helm
#

Oh wow

#

What an amazing tool

lost matrix
#

Its just a small Trennschleifer honestly. You maybe know it as "Flex" or Geradschleifer?

robust helm
#

Yea flex 😎

lost matrix
#

Haha, yeah flex is what we call it too

wet breach
#

but yeah, temple OS has to have been one of the wildest things he made going all the way from the early 2000's

#

and it uses HolyC

#

which of course he made

robust helm
#

Especially crazy considering he didnt have google or anything

#

Like he bought a book and wrote a 3d game engine after that????

wet breach
#

TempleOS also did not have internet and according to what he said its because he didn't want to reinvent the wheel

robust helm
#

Uhhh

#

Did he not already reinvent it by making templeos at all

lost matrix
#

Coming back to performance. I had a time where i obsessed about all the different collections in Java, doing hundreds of jmh benchmarks, and i found the worst collection, that is only good at exactly one thing. And thats LinkedList. Try to guess how you can reasonably use it.

wet breach
#

compare?

lost matrix
#

Hm? You mean compare two collections? LinkedList has a very slow intrinsic iteration speed, compared to lets say ArrayList.

pseudo hazel
#

hmm, linked lists are good if you want to stress test your setup

robust helm
#

I mean surely removing and adding right? If that counts as a use case

pseudo hazel
#

but only from front and end

#

like a deque

#

but then a tree is usually better

lost matrix
#

ArrayDeque is faster as a pure queue (If you dont take growing operations into consideration)

robust helm
#

Addding in the center is just 2 variable assignments isnt it

wet breach
#

adding in the center of a list?

pseudo hazel
#

but you have to find the center in a linked list

robust helm
#

I mean in the middle

#

Like anywhere not at the start or end

wet breach
#

to add into the center or middle of a list is not just 2 variable assignments

lost matrix
# robust helm I mean in the middle

Yeah, that it. Inserting/removing an element in the middle of the List.
Or more specific: Operations that do this in bulk, like removeIf(Predicate<T>) are very efficient.

robust helm
#

Oh wow

wet breach
#

really weird thing for linkedlist to be good at

#

I can't really say I have really had the need to do such things 🤔

robust helm
#

Does removeIf work like a filter or does it operate on a single node?

pseudo hazel
#

it would have to go across all nodes

#

to know if it should be removed

robust helm
#

And then delete all nodes that match

#

Hnm

pseudo hazel
#

for a linked list this would be done in place probably since you just reassign the pointers

lost matrix
wet breach
#

interesting

#

guess your investigation at least had some use

pseudo hazel
#

never thought of using a linkedlist ever

#

but yeah this makes sense

#

for this kinda thing I would usually default to a set or something

robust helm
#

I remember seeing a youtube video once "why you should always use a linkedlist over an arraylist in java" and then some comment pointed out an issue and the creator was like "oh nvm, true dont use linked lists then"

pseudo hazel
#

or simple list

lost matrix
robust helm
pseudo hazel
#

maybe its because of the unreliable order?

lost matrix
#

I mean... random access on LinkedList is just O(n)
So thats one reason its atrocious

wet breach
#

its fortunate most will probably never really see the differences unless they were managing significantly large arrays XD

pseudo hazel
#

yes, which is also true for a removeIf, which is always o(n) worst case by definition (unless tree bla bla) but the reason its good for linked list is because of the allocation I guess

#

that you dont need to move the whole list

#

maybe you didnt like it for a set because of having to copy it when iterating to remove stuff?

robust helm
#

Does arraylist move every elements after i to fill the hole or what?

pseudo hazel
#

iirc you can get concurrent exceptions with that

#

if you insert something into an array list, it has to move over all other elements with a higher index

#

this is why picking or adding from the front of an array list is the slowest

#

atleast thats for a classical array

#

idk how they implement array list

robust helm
#

That makes sense

#

And in the case of removal of an element anywhere in the middle, it needs to fill the hole my moving everything following it

pseudo hazel
#

yes

robust helm
#

I wonder if thats something that happens periodically or at every remove call

pseudo hazel
#

should be every call

lost matrix
ivory sleet
#

But on the contrary side of things, array list can take advantage of spatial locality

pseudo hazel
#

but if you know you are gonna remove multiple things there are better ways to do it

ivory sleet
#

which linked list cant

robust helm
#

What is it?

ivory sleet
#

for linked list its worst case n

pseudo hazel
#

actually idk if its faster

#

but basically it would be to create a new list and only add the things you wanna keep to that list

#

but then you have to reallocate if you add things to an array, so idk how it would work

#

idk how allocation works for an arraylist

ivory sleet
#

usually it grows the underlying array if it hits the size limit

pseudo hazel
#

so like a c++ vector?

robust helm
pseudo hazel
#

when it reaches limit it reallocates to like double its size ig

robust helm
#

Man i really need to learn datastructures

#

I never used a vector before

ivory sleet
#

it tells u how it scales, usually per unit (unless u also examine bit cost)

lost matrix
#

Doesnt it allocate a bunch of memory as a buffer, and only copy the entire array when it grows out of the buffer? Pretty sure thats standard behavior for all java collections.

wet breach
#

one of the main problems with ArrayList is that the memory for it must be contiguous hence why when the capacity limit for an array list is hit, it suffers greatly when it increases because it may also need to move the memory allocation to continue to be contiguous

lost matrix
#

So in most cases its not horrible

ivory sleet
#

if the underlying array hits the size limit

ivory sleet
#

but even then, system.copyarray is pretty fast

pseudo hazel
ivory sleet
#

linked list relies on a bunch of java references

#

which slows it down, ofc at a huge scale this becomes negligible as time complexity (per unit) becomes more substantial

dull python
#

@chrome beaconOh no, I tried using the new version, but it seems to be being treated as a Text component instead of a player component. It seems the previous version did the same. My code is {"object": {}, "player": "in_Shiro"} . I'm not sure if that's correct; I haven't seen any examples.

robust helm
wet breach
#

LinkedList has the most memory allocation if we are just going by defaults, however it is the most dynamic in terms of how that memory is allocated. Followed by HashMap and HashSet as those only use up memory with the more objects it holds and its load factor

ivory sleet
robust helm
#

So only optimize for amd64

#

:)

ivory sleet
#

more so, u would have to go to significant lengths to allow someone to subclass a LinkedList if that LinkedList is written in assembly

lost matrix
#

riskV go brrr

chrome beacon
ivory sleet
#

For small things, using array-backed structures in java is generally the way to go, but ofc its always smart to analyze at hand what u're dealing with and whats ur upper and lower bounds etc

lost matrix
dull python
lost matrix
#

I bet a majority of java devs never see that in their life, or know that it exists

robust helm
#

I did not

#

And i regret learning about it

wet breach
# pseudo hazel yeah big chance it just has to move the whole thing

a good way to get around this, if you know your array is going to increase beyond the capacity it has. You would just create a new array and dump everything into that new one instead. This avoids the JVM finding a new spot, allocation and then moving the array elements into it, and then removing the old allocation

#

if you must use arraylist of course and nothing else lmao

lost matrix
#

Implement List and allocate a 5k array beforehand, just to be safe ^^

wet breach
#

I suppose you could do that too lol

pseudo hazel
#

if you are filtering you would need a list atleast the size of the current one I guess that can be a starting point

pseudo hazel
dull python
pseudo hazel
#

that tree is basically describing the format the json needs to use

#

an example that would follow the format is something like { object: player, player: { name: "myName"}}

chrome beacon
#

That's close but not quite

#

ah the type was optional nvm :p

pseudo hazel
#

yeah with the object and or player tag it will assume the type is object

lost matrix
# pseudo hazel yeah with the object and or player tag it will assume the type is object
Benchmark                                        (elementCount)  Mode  Cnt     Score     Error  Units
CollectionIterationBenchmark.hashSetRemoveIf                100  avgt    6     1,127 ±   0,117  us/op
CollectionIterationBenchmark.hashSetRemoveIf               1000  avgt    6    11,884 ±   0,413  us/op
CollectionIterationBenchmark.hashSetRemoveIf              10000  avgt    6   221,779 ±  15,683  us/op
CollectionIterationBenchmark.hashSetRemoveIf             100000  avgt    6  4560,698 ± 635,483  us/op
CollectionIterationBenchmark.linkedListRemoveIf             100  avgt    6     0,287 ±   0,042  us/op
CollectionIterationBenchmark.linkedListRemoveIf            1000  avgt    6     5,921 ±   0,119  us/op
CollectionIterationBenchmark.linkedListRemoveIf           10000  avgt    6    79,055 ±   5,218  us/op
CollectionIterationBenchmark.linkedListRemoveIf          100000  avgt    6  1866,403 ± 174,731  us/op

LinkedList.removeIf() and HashSet.removeIf() both scale with O(n) as expected.
But LinkedList has an intrinsic average 2.3x-2.4x iteration speed compared to HashSet.

Graph is in log scale ofc.

pseudo hazel
#

hah, nice

lost matrix
#

Here is the code, if you see anything wrong lmk

@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Fork(value = 2, warmups = 0)
@Measurement(iterations = 3, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
@Warmup(iterations = 2)
public class CollectionIterationBenchmark {

    public static void main(String[] args) throws Exception {
        org.openjdk.jmh.Main.main(args);
    }

    private HashSet<String> hashSet;
    private LinkedList<String> linkedList;

    @Param({"100", "1000", "10000", "100000"})
    private int elementCount;
    private String centerElement;

    @Setup
    public void setup() {
        hashSet = new HashSet<>();
        linkedList = new LinkedList<>();
        for (int i = 0; i < elementCount; i++) {
            String element = UUID.randomUUID().toString();
            if (i == elementCount / 2) {
                this.centerElement = element;
            }
            hashSet.add(element);
            linkedList.add(element);
        }
    }

    @Benchmark
    public void hashSetRemoveIf(Blackhole blackhole) {
        this.hashSet.removeIf(x -> x.equals(this.centerElement));
    }

    @Benchmark
    public void linkedListRemoveIf(Blackhole blackhole) {
        this.linkedList.removeIf(x -> x.equals(this.centerElement));
    }

}
pseudo hazel
#

linkedlist ftw

dull python
pseudo hazel
#

code looks normal

ivory sleet
dull python
lost matrix
ivory sleet
#

yea just curious

lost matrix
#

I could try with using the element count as initial cpacity as well ^^

ivory sleet
#

oh well, new HashSet<>() i might be blind

pseudo hazel
dull python
robust helm
pseudo hazel
#

what original instructions are you referring to?

#

the minecraft command parser is very lenient on the json esque syntax

dull python
#

tellraw

pseudo hazel
#

yeah tellraw is more lenient compared to probably the way that the bungee is expecting

dull python
pseudo hazel
#

what do you mean by that

#

like you just see the json text in game?

dull python
#

No, it actually outputs an empty text, which is equivalent to directly using Player#sendMessage("").

pseudo hazel
#

like I said, try formatting the json correctly, maybe it will make a difference

dull python
#

I need some time to understand that, because this is my first time dealing with Minecraft's JSON. I've always used code before and haven't worked with components.

chrome beacon
#

Works just fine

#
    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        event.getPlayer().spigot().sendMessage(ComponentSerializer.parse("{\"player\":{\"name\": \"" + event.getPlayer().getName() + "\"}}"));
        event.getPlayer().spigot().sendMessage(ComponentSerializer.parse("{\"player\":\"" + event.getPlayer().getName() + "\"}"));
    }
dull python
#

That would be very strange.

chrome beacon
#

You mentioned converting it to a string array before

#

Which I've told you will remove all component data

#

and make it blank. I want you to tripple check that you are not doing that

dull python
chrome beacon
#

I see

dull python
#

Actually, it's a parameter requirement of BaseComponent..., but Kotlin doesn't allow directly passing a collection object, i.e., BaseComponent[].

#

In Java, this might work normally, but Kotlin doesn't allow it; you have to add character handling.

chrome beacon
#

That just sounds odd

dull python
#

Yes, it does sound strange, but that's his writing style, so we followed it.

buoyant viper
#

isnt there a .sendMessage that takes a single BaseComponent

dull python
#

Your actions have confirmed that it might not be a formatting issue, but rather a problem with how the library is transferred. I'll try to handle it myself within the project.

chrome beacon
dull python
#

Huh? I've noticed something, maybe it's related to him. The sub-version I'm using seems too old. The official website has version 130, but I'm still using version 115.

chrome beacon
#

version of what?

dull python
#

1.21.10-115

#

The paper I used had a final version number of 1.21.10-130.

chrome beacon
#

uhh that better not be Paper

pseudo hazel
#

i got it locked and loaded

chrome beacon
#

oh you wrote Paper while I was typing :p

#

?whereami

dull python
#

So, did the paper also modify the serialization process?

chrome beacon
#

You've been asking for help with something that isn't Spigot 😭

chrome beacon
#

You should test with Spigot when asking for help with Spigot

dull python
#

I'll try Spigot to see if it works.

pseudo hazel
#

if you use paper they expect you to just use adventure components, which is a different api

dull python
dull python
pseudo hazel
#

well sadly, thats paper for you in a nutshell, if you want to write for backwards compatibility, dont write for paper

dull python
#

The problem is clear: the paper is no longer following bungeecoord-chat, but instead using his adventure, which makes things difficult.

dull python
pseudo hazel
#

yes I think this is just one of the first things to fall apart because of the hard fork that paper made

#

if you want your plugin to still work the same on paper you'll need to add some kinda check somewhere for it, but idk how to approach that

chrome beacon
#

You'd multimodule wrapper it like you'd do for nms

dull python
#

I don't actually object to him writing a new library to handle various text content, but his code modifications are far too frequent, and they cause references to older versions to become invalid. This kind of behavior is simply unacceptable.

pseudo hazel
#

if by "him" you mean paper, the answer is simple. Dont support paper

dull python
dull python
pseudo hazel
#

paper is looking towards the future, not into the past

#

papers motto is simply to say, if your plugin does not work anymore on newer versions, make an update for the plugin

#

but this issue specifically has nothing to do with backwards compatibility on its own but more about the relationship between spigot and paper

slender elbow
#

lol

pseudo hazel
#

in which paper has expressly chosen to move away from spigot

#

please correct me if im wrong

azure zealot
#

paper stinks

dry hazel
#

plugins that don't use internals should work just fine on newer versions for the most part, it's not like paper doesn't provide any api compatibility guarantees

azure zealot
#

(paper team)

dry hazel
#

the issue is intermingling new spigot api and new paper api

pseudo hazel
#

yeah, which is the cause of this issue they are having

slender elbow
#

old plugins will still run on modern versions of paper so idk what the tantrum they're having is all about

#

"i want new api but on old versions" is never going to work even on spigot

buoyant viper
#

i want a new game 😞

#

where is Minecraft 2

buoyant viper
slender elbow
#

?

#

old plugins using all the enums still work on modern day spigot

buoyant viper
#

random potion stuff broke for me in like the 1.20.4 to 1.20.6 move

#

and particles

slender elbow
#

there were a couple of times where mojang renamed some stuff or required some extra info for some things, and the api has no choice regarding that

azure zealot
#

thats like 24 version better than minecraft 2

buoyant viper
#

i want 1.23 :(

azure zealot
buoyant viper
#

wait i skipped 1.22

#

im just like Mojank

azure zealot
#

yes

thorn isle
#

depends on the use case; i do one for some things and the other for others

#

if i had to draw a line, i'd say that if you foresee there probably won't be another use case for the listener sometime soon, you might as well unregister it

#

going with the delegation approach can devolve into writing your own event bus on top of bukkit's, which is not necessarily desirable

atomic violet
#

Im making a plugin that needs to detect if the player has made an advancement, and if anyone else in the world has made that same advancement, and i have failed to realize that new recipes count as advancements in the game, im on 1.21.11, does anyone have any ideas for how i can seperate the advancements that arent announced in chat vs the ones that are hidden? because I only want the advancements that are announced in the chat when achieved (my current method was using PlayerAdvancementDoneEvent)

eternal oxide
#

getAdvancement().getDisplay().isHidden()

#

or check the shouldShowToast.

atomic violet
eternal oxide
#

yes

atomic violet
#

wait how would i use that to filter hidden advancements? its just a modifier for advancements

#

the shouldShowToast too

eternal oxide
#

if you only want those shown in chat check shouldAnnounceChat()

#

Lots in there is check everything you need

atomic violet
#

no the issue is the event is triggering whenever new recipes are unlocked/when advancements that arent announced in chat are achieved, and i dont want it to trigger for those ones, only for advancements that are announced in chat

#

but i think what im gonna do is just check if the display name contains "recipe" or "root" and that should fix it i think

atomic violet
#

so im using this to print what advancement is triggering the event as a string

#

then using that if statement to check if it has those words in it, im watching my chat print "minecraft:recipes/....", im confused why its not filtering it out

peak bone
#

I'm looking for Java developers for a well-paid project, please DM me

young knoll
#

?services

undone axleBOT
atomic violet
# atomic violet

solved, i had to use and instead of or, cause it was never both recipes and root so it was always true

brazen stone
#

hi question is there any plugin for velocity where you can display how many players are in that server online?

#

as placeholders

chrome beacon
#

This is the development channel for Spigot and Bungeecord

#

You're in the wrong channel and discord

#

You could ask in #help-server but ideally you should head over to the Papermc discord

thorn isle
#

FR
they're probably banned on paper

buoyant viper
quasi mason
#

i want to show some text above player's name - for this i tried using text display ridden by player, but then teleportation plugins stop working as player can't be teleported

#

anyone know who to do this correctly

thorn isle
#

either switch to paper, as they recently made the RETAIN_PASSENGERS TeleportFlag present on teleport calls by default; or use protocol fucknuggetry to desync the client and server state to the client sees the entity as mounted but the server does not, allowing it to be teleported normally

#

the latter is easy to get wrong and fragile even when it does work

#

specifically, what you probably want to do is create the text entity normally, set its properties, and then delete it, but suppress the entity remove packet so it remains visible and mounted on the client end

buoyant viper
#

(im using text display entities as chat bubbles)

wet breach
onyx fjord
#

did spigot move to mojmaps?

#

or still need to obf

slender elbow
#

you still need to reobf for runtime

#

you can use Mojang mappings for development

#

all that is going to disappear when 26.1 releases anyway

#

it's all going to be Mojang mapped

vital coral
#

Hiiii, I need help with a texture problem! i cant fix it

vital coral
#

ok!

fluid gate
#

is possible remove the black background of each line of an armorstand¡?

young knoll
#

Probably with a core shader

#

Or yknow, just use a text display

opal plume
#

can i make solid plugins with javascript?

chrome beacon
#

There have been plugins for that

#

But you're probably better off just using Java

opal plume
#

im too lazy to learn java as i am already learning javascript for a backend path

wet breach
opal plume
wet breach
#

also, even if that is not an issue, you are going to run into context switching issues as well as you will need to provide the spigot API and anything else that will be needed into javascript yourself as well

#

essentially before you can even make your javascript plugin, you will need to create a javascript bridge between Java and Javascript

opal plume
#

what about paper, does it have js support?

#

ik js is mainly used for webpages and stuff but im asking because i would want to make a portfolio project in minecraft

wet breach
#

No, Oracle removed Javascript in the JDK when it removed Nashorn in JDK 14. Hence you will need to use GraalVM JDK or something similar which means stuff like spigot or paper or most any other fork will not have API methods for javascript

#

And yes you can make a javascript plugin, not saying you can't

#

as for stability, Javascript is not known for that

opal plume
#

dang.. looks like im going back to that pizza ordering site as a portfolio project

wet breach
#

Scripting languages are not exactly designed with the intent of having long running processes and at some point needs to terminate otherwise they never release resources ever lol

#

But if you want to do it, go for it. Its doable 🙂

#

Someone ported MC to PHP so if they can do that, you can run a plugin with javascript just will require work is all

opal plume
#

lol i get it, im already studying python and its h#ll when coming to BST's

#

if i ever finish this backend path i might learn java but im gonna need to find a place where it explains in a way i understand lol

wet breach
#

Java is super easy

#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

wet breach
#

if you can learn python, then Java is going to be easier

thick tundra
#

is there any way to see the default chunkgenerator for superflat worlds anywhere?

wet breach
#

?stash

undone axleBOT
wet breach
#

I guess you could just look in the buildtools directory too

#

and look at the decompiled code

#

its going to be in the NMS stuff

thick tundra
#

hmm yeah, 1.21.11 makes it a whole lot easier tho :D

wet breach
#

still needs to be decompiled, just don't need to deobfuscate

thick tundra
#

yup, thanks!

opal plume
wet breach
#

Java can do both, but ideally you would want OOP with Java lol

opal plume
#

k boss

wet breach
#

what I mean though is that the time it takes to really learn java and understand it, is just as little as 3 months and you can be making complex stuff. Where as other languages this is not really the case

opal plume
thick tundra
#

most people think java is outdated, but its still being used everywhere. learning java and really understanding the concepts of oop can land you a good paying job at a lot of companies

wet breach
#

Well, it only becomes outdated when people stop using it

thick tundra
#

i dont think thats gonna happen any time soon tho lmao

opal plume
#

why does http make me barf?

wet breach
#

most consider something outdated simply because its old

#

but ignore the fact that it still works

#

and in my opinion if it works and does what you are wanting it to, then what does it matter if its old lmao

opal plume
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

opal plume
#

which one explains the best and is free?

#

and which one is especially for mc?

wet breach
#

have no idea. Never used any of the links except the Java docs one from oracle

#

been using Java ever since it was released 🙂

opal plume
#

unc status

echo basalt
#

can't you just bundle a js engine

thick tundra
#

? explain

echo basalt
#

this guy wanted to run JS on a minecraft plugin

thick tundra
#

yeah thats possible, im doing that for one of my plugins. GraalVM is a way to do it but thats a bit confusing in the beginning.

echo basalt
#

Back in the day we used Mozilla's Rhino

#

I think for custom scripts in a dungeon or something

#

plop a couple signs around and it loads them as scripts and runs it to spawn mobs / generate loot

thick tundra
#

im using Nashorn, which is a bit older but still runs fine on java 21 even tho it was removed in java 15

young knoll
#

There’s a fork of rhino made for a minecraft mod

#

Wonder if that’s any better to use

sullen marlin
#

Also graal js

thorn isle
#

GRAAAL

glass vector
#

Hi people, if anyone needs, I can write any plugin to order. Привет люди кому нужно на заказ напишу любой плагин.

chrome beacon
#

?services

undone axleBOT
thorn isle
#

i want a cooking plugin

#

one which focuses on exotic animals

#

with maybe a bit of wardrobe on the side

#

i want them baby seal leather boots

young knoll
#

I mean a cooking plugin does sound neat

#

But Minecraft has a very simple food system so there’s not really any use for fancy foods

thorn isle
#

plus it's been done already

#

this one looks quite cool

#

you like physically dice the things on a cutting board and shit

#

supposedly it also adds some kind of a "diet" system so that the food isn't useless, but in my experience that ends up just annoying players

tender sinew
# thorn isle i want them baby seal leather boots

Hey 🙂
That’s a fun concept — combining a cooking/crafting system with exotic animals and wearable items like special boots.
A few details will matter (how you want the mechanics to work and what exactly the wardrobe does), but it’s definitely something we can build.

young knoll
#

Okay ChatGPT

quaint mantle
#

Can someone help me extract the banEntry for a banner player in PlayerLoginEvent, this API makes no sense and theres no tutorials or posts online I can find. The function for BanList.Type.NAME is apparently depracated and when using BanList.Type.PROFILE it says the type of the parameter passed should be "capture of ? target"????

thorn isle
#

you need to pass the type of ban entry you wish to retrieve

#

for Type.IP, that'd be InetAddress; for NAME, that'd be String, for PROFILE, that'd be PlayerProfile

#

the capture of ? is because the api doesn't use generics properly

#

to clarify it, you can cast the BanList to BanList<PlayerProfile> before calling anything on it

quaint mantle
#
BanEntry<PlayerProfile> profileBan = Bukkit.getBanList(BanList.Type.PROFILE).getBanEntry(playerLoginEvent.getPlayer().getPlayerProfile());```
#

Cannot resolve method 'getBanEntry(PlayerProfile)'

#

Oh

#

you have to cast the entire list?

thorn isle
#

public interface BanList<T> {

#

it's a generic class with concrete subclasses for each type of list

#

e.g.
public interface ProfileBanList extends BanList<PlayerProfile> {

quaint mantle
#

uh

thorn isle
#

paper does the generics better in this case, since the type keys like PROFILE are also generic and typed, so you won't get random ? captures

quaint mantle
#
BanList<PlayerProfile> profileBanList = Bukkit.getBanList(BanList.Type.PROFILE);
String reason = profileBanList.getBanEntry(playerLoginEvent.getPlayer().getPlayerProfile());```
#

im sorry if i seem stupid i just dont understand this 😭

thorn isle
#

you're missing the cast

quaint mantle
thorn isle
#

that's not a cast

#

that's a variable that you're assigning to

#

a cast involves a ()

#

e.g. (BanList<PlayerProfile>)

quaint mantle
#

oh

thorn isle
#

((BanList<PlayerProfile>)Bukkit.getBanList(BanList.Type.PROFILE)).getBanEntry(player.getPlayerProfile());

quaint mantle
#

okay

#

like this?

#
BanList<PlayerProfile> profileBanList = (BanList<PlayerProfile>)Bukkit.getBanList(BanList.Type.PROFILE);
thorn isle
#

yes, that seems about right

quaint mantle
#

and i assume its normal to get this warning now? Unchecked cast: 'org.bukkit.BanList<capture<?>>' to 'org.bukkit.BanList<org.bukkit.profile.PlayerProfile>'

thorn isle
#

the reason you need the cast there is that getBanList returns a BanList<?>

#

yes, this is an unchecked cast because of type erasure

thorn isle
#

since that will be casting to a non-generic type, it will be checked and "safe" at runtime despite erasure

quaint mantle
#

okay

thorn isle
#

now

#

about those baby seal leather boots

weak wasp
#

Going full on Eskimo

buoyant viper
young knoll
#

Back in my day we used punch cards

mortal hare
#

?paste

undone axleBOT
umbral ridge
#

Can you create custom enchantements with a plugin?

#

Like, being able to enchant an item with a custom enchantment via the book

thorn isle
#

strictly speaking no, but people have approximated custom enchants for years by adding gray lore to items and tying behavior to that; it looks like a custom enchant, and with enough logic for e.g. listening enchanting/grindstone/anvil events, you can make it behave like one

#

this very quickly runs into compatibility issues with other plugins, as they won't see your enchants as enchants

#

nowadays, i'd recommend either using the paper registry api to register real custom enchantments (even if you handle the behavior/effects in plugin code), or bundling a datapack with your spigot plugin that has the enchantment definitions

#

there have also historically been hacky reflective methods of programmatically inserting new entries into the enchantment registry on spigot, but imo it isn't really worth it

#

i have no idea how up to date this is, they have been changing the way how this works every version recently; your mileage may vary

mortal vortex
#

sick of seeing "paper can do this" 😢

#

never see anyone in PaperMC dickriding Spigot in return. Despite being the superior server software.

worldly ingot
#

They tend to ban for that

mortal vortex
#

not saying vcs2 was doing this, as i completely understand he was making a recommendation — but hearing from some people “this is so much easier in paper” is so fruitless because… this isn’t paper.

orchid trout
#

i think we need to deprecate half the api and replace it with a buggy mess

buoyant viper
#

i think its time for Spigot 2

tranquil pecan
#

nah it's time for Mygoat

pseudo hazel
#

fabric can also do that

buoyant viper
pseudo hazel
#

yeah true

#

NMS can do it too

#

you can add custom enchants if you work at mojang

topaz cape
#

this might be just me, but is spigot handling of potions suck atm?

#

like a potion itemstack for example

#

you can't apply it to the player using code anymore

#

you can't determine the effects durations even

#

after removal of org.bukkit.potion.Potion it's become quite annoying imo

chrome beacon
#

Sounds like you're just too used to the ancient 1.8 api

topaz cape
#

oh new 1.21 apparently yes @_@
1.20 not apparently

mental drum
#

Best server jar rn?

chrome beacon
mental drum
#

I need answer asap, stfu

#

hypocrite

remote swallow
#

spigot 👍

cloud perch
hybrid mist
#

i need help i have already created all the code for the plugin and stuff but i dont know how to download the plugin file

chrome beacon
#

What

#

You vibe coded something and need help compiling it?

hybrid mist
#

i dont know how to download it so its in a file like this

chrome beacon
#

You don't download anything, you compile it

#

And for Intellij to do that it needs the dependencies like Spigot

#

The easiest way is to setup a maven project with the Spigot API dependency info in it

#

?maven

undone axleBOT
hybrid mist
#

thank you

chrome beacon
#

Though really you should start with understanding the basics of Java first if you haven't programmed anything before

#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

thorn isle
#

For every "paper can do this" there is usually a matching "I had a pr for this but it got dropped"

hybrid mist
#

also if i fix something in the code do i need to compile it again?

young knoll
#

Yes

hybrid mist
alpine cairn
#

Hello. I am trying to update a plugin to 1.21.11.

In gradle/libs.versions.toml I have "paper-api = "io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT""

In build.gradle.kts I have "minecraftVersion("1.21.11")"

And in paper.yml I have "api-version: 1.21.11" but when I try to use the plugin I get an error message that says that 1.21.11 is not supported. Any ideas?

alpine cairn
#

Actually I don't know why anyone would use spigot instead of paper

chrome beacon
#

You're not using Spigots system at all there

slender elbow
#

something something hard fork

#

also seeing the actual error stack trace would help

alpine cairn
#

What is the the command to pull up that paste thing?

#

?paste

undone axleBOT
thorn isle
#

find it and update it to accept this new version, or disable it altogether

alpine cairn
#

Here is the error in question

thorn isle
#

is command api shaded in or how is it bundled into the project?

alpine cairn
#

I'm not sure, I can't find it atm

#

What is meant by "shaded in"?

thorn isle
#

send your build script

alpine cairn
#

uhhh

#

I've just been using the gradle UI

#

clicking "clean" then "build"

thorn isle
#

that runs the gradle build script

slender elbow
#

build script = build.gradle(.kts) file

thorn isle
#

it's a file at the root of the project named build.gradle.kts or without the kts if it's groovy or some shit

alpine cairn
thorn isle
#

for maven projects, this would be pom.xml

alpine cairn
thorn isle
#

i hate gradle

chrome beacon
#

Real

ember gulch
#

fr

chrome beacon
#

Make sure you use CommandAPI 11.1.0

alpine cairn
#

I have been told that kotlin is better than Maven

chrome beacon
#

Kotlin is a programming language, Maven is a build system

alpine cairn
#

I mean gradle kotlin

thorn isle
#

implementation(libs.commandapi.shade) find wherever the hell this is defined and make sure the version is 11.1.0

alpine cairn
#

Found it

thorn isle
#

basically what is happening is that you are bundling in a dependency (command api) into your plugin jar, but the version you're bundling in doesn't support 1.21.11

#

because of course a command api would need nms

alpine cairn
#

That makes sense

#

Moment of truth

#

I set "commandapi-shade = "dev.jorel:commandapi-paper-shade:11.1.0"" but this causes other errors now when trying to build the project

#

Cannot resolve symbol 'PlayerArgument'

#

Cannot resolve method 'failWithAdventureComponent' in 'CommandAPIBukkit'

chrome beacon
#

You're depending on the Paper version and trying to use a Bukkit/Spigot version method

#

since you're depending on Paper you should migrate your code

alpine cairn
#

Okay

thorn isle
#

honestly get rid of the whole api

#

if it's this fragile you're better off without it

mortal vortex
#

so true

thick tundra
#

heyy, im building a custom world generator. I have come across a issue i cant seem to figure out. All the chunks are populated nicely, but the spawn chunks are all grass blocks for some reason, and i cant seem to figure out how to override it

#

nvm, it seems to have something to do with ops.json

alpine cairn
echo basalt
#

commandapi's dope

#

PlayerArgument doesn't exist no more

#

seems like a migration from v10 to v11

alpine cairn
#

Dang

echo basalt
#

use EntitySelector.OnePlayer instead

alpine cairn
#

Is there new syntax?

#

Oka, I’ll try that

echo basalt
#

It'll give you @e and @p etc

alpine cairn
#

@echo basalt Any idea what I can replace "failWithAdventureComponent" with?

echo basalt
#

No idea, never used that

alpine cairn
#

To the docuemntation I go

frozen mauve
#

i've been trying to complile https://github.com/Auxilor/EcoBits but everytime i fail, if i get the jar file the server wont read it, or the jar file completely fails, any help please?

mortal vortex
#

Commands and their outputs would be helpful.

frozen mauve
#

Will give the errors once im on my pc

spare sequoia
frozen mauve
spare sequoia
cloud perch
spare sequoia
cloud perch
#

?services

undone axleBOT
frozen mauve
# mortal vortex Commands and their outputs would be helpful.

alr im home rn

Starting a Gradle Daemon, 3 incompatible and 1 stopped Daemons could not be reused, use --status for details
> Task :eco-core:core-plugin:compileKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':eco-core:core-plugin:compileKotlin'.
> Could not resolve all files for configuration ':eco-core:core-plugin:compileClasspath'.
> Could not find me.clip:placeholderapi:2.11.2.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.pom
       - file:/C:/Users/Azryx/.m2/repository/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.pom
       - https://jitpack.io/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.pom
       - https://hub.spigotmc.org/nexus/content/repositories/snapshots/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.pom
       - https://repo.codemc.org/repository/nms/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.pom
       - https://repo.codemc.io/repository/maven-public/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.pom
       - https://repo.dmulloy2.net/repository/public/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.pom
       - https://repo.extendedclip.com/content/repositories/placeholderapi/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.pom
     Required by:
         project :eco-core:core-plugin

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 45s
9 actionable tasks: 6 executed, 3 up-to-date```

compiling source from https://github.com/Auxilor/EcoBits
frozen mauve
# frozen mauve alr im home rn ```PS C:\Users\Azryx\Downloads\EcoBits-1.8.42\EcoBits-1.8.4> grad...

in ECOBITS-1.8.4 when changing compileOnly("me.clip:placeholderapi:2.11.2") to be the latest version aka compileOnly("me.clip:placeholderapi:2.11.7") the builds works perfectly, but for some reason when putting the eco-core-1.8.4.jar inside my plugins folder i get this error

java.lang.RuntimeException: java.lang.IllegalArgumentException: Directory 'plugins/.paper-remapped/eco-core-1.8.4.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
        at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:85) ~[paper-1.21.11.jar:1.21.11-72-cd445fd]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:52) ~[paper-1.21.11.jar:1.21.11-72-cd445fd]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:17) ~[paper-1.21.11.jar:1.21.11-72-cd445fd]
        at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:15) ~[paper-1.21.11.jar:1.21.11-72-cd445fd]
        at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:113) ~[paper-1.21.11.jar:1.21.11-72-cd445fd]
        at net.minecraft.server.Main.main(Main.java:108) ~[paper-1.21.11.jar:1.21.11-72-cd445fd]
        at io.papermc.paper.PaperBootstrap.boot(PaperBootstrap.java:21) ~[paper-1.21.11.jar:1.21.11-72-cd445fd]
        at org.bukkit.craftbukkit.Main.main(Main.java:242) ~[paper-1.21.11.jar:1.21.11-72-cd445fd]
        at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IllegalArgumentException: Directory 'plugins/.paper-remapped/eco-core-1.8.4.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
        ... 10 more``` 
and plugin doesnt work
chrome beacon
#

The completed plugin is in the bin folder

shadow pumice
#

Hey! i have a question regarding publishing a premium plugin on spigot, in which channel do i ask?

chrome beacon
#

You can ask here if you want

grim hound
#

is it possible to achieve a floating point error in java 17+?

#

on purpose ofc

lilac dagger
#

floating point error?

#

like 2f % 1f == 0.000001?

pseudo hazel
#

is int % using floats?

lilac dagger
#

% works for both int and floats

pseudo hazel
#

yeah ik

young knoll
#

It’s always possible

#

That’s just how floating point values work

lilac dagger
#

yeah, can't really be fixed

young knoll
#

Just like how you can’t accurately represent some numbers in base 10, you can’t accurately represent some numbers in base 2

#

A good example is 1/3

grim hound
#

since java 17 introduced strictfp by default

#

and there are no longer differences between different architectures doing the same arithmetic

woven lake
#

Hi, is there any way to set the fish arrival time in Spigot 1.8? Or do I just need to update the engine?

        Player p = e.getPlayer();
        UUID uuid = p.getUniqueId();
        ItemStack rod = p.getItemInHand();

        // Sprawdzenie czy to nasza specjalna wędka
        if (rod == null || !rod.hasItemMeta() || !rod.getItemMeta().hasDisplayName()
                || !rod.getItemMeta().getDisplayName().contains("§7§oWedka")) {
            return;
        }

        // Rzucenie wędki
        if (e.getState() == State.FISHING) {
            FishHook fishHook = e.getHook();
            if (fishHook != null) {

                setHookName(fishHook, WAIT_SECONDS);

                  if (e.getState() == State.FISHING) {
                      FishHook fishHook = e.getHook();
                      if (fishHook != null) {
          
                          setHookName(fishHook, WAIT_SECONDS);
                          hook.setMaxWaitTime(WAIT_SECONDS);
                      }
                      return;
                  }
            }
            return;
        }
}```
sullen marlin
#

not in the 1.8 API so need to update

#

might be in NMS, who knows

#

?howold 1.8

undone axleBOT
fleet ridge
#

How to I active hyperportalbreaking

sullen marlin
#

wtf is hyperportalbreaking

#

Installation Guide:
Make sure you join the Discord for update notifications and support.

Download HyperPortalBreaking.
Put the HyperPortalBreaking jar file into your server's plugins folder.
Restart your server.
If you want to configure messages, go in the HyperPortalBreaking folder, which is inside the plugins folder, open the config.yml, and set the messages to whatever you'd like.
Restart your server.
Enjoy! ❤️
rotund ravine
#

Looks like it’s just some endportal stuff maybe?

thorn isle
#

active hyperportalbreaking!

robust helm
#

It does sound cool though 😎

tranquil pecan
#

Ah yes adding hyper before anything makes it sound cool

#

For example HyperKento

mortal vortex
#

hyper ruined bolic

tender shard
#

Is there any way to check for "player entering nether portal" without checking Player/EntityMoveEvent or checking their location every tick when "allow-nether" is disabled?

#

Because PlayerPortalEvent or however its called is not fired when the nether is disabled

mortal vortex
tender shard
mortal vortex
#

Called when an entity comes into contact with a portal

This looks like a collision check.

umbral ridge
#

whats that hook class?

woven lake
onyx fjord
#

1.8 times are gone

#

You would be surprised how many 1.8 servers actually run more modern versions and just appear as 1.8

#

Even hypixel these days is prepping for an update because 1.8 is lacking

#

However not sure if it's just big back port

lilac dagger
#

1.8 is old

#

there's no way people can't run modern minecraft by now

bright spire
#

When you cant afford hardware you can compensate with software

tender shard
#

Everyone who still runs 1.8 today should be executed imho

#

it's like using Windows XP

umbral ridge
#

windows xp is still used in almost half of industrial companies

bright spire
# tender shard it's like using Windows XP

A lot of people just use linux because they cannot run Windows 11 or 10. You have to be respectful and more understanding, not everyone in the world has that amount of money, and sometimes you just have some small cash to spare. Tho if you really think we have to execute poor people, well, there are extremist political movements for that.

#

Forks of 1.8 are the same as Linux to Windows XP, is not the latest upgrade, but it's a modern and fast alternative 👍

tender shard
#

what the hack are you havering

ivory sleet
#

lol

lilac dagger
#

xp doesn't even work on any sort of modern hardware no?

ivory sleet
#

1.8 is just very outdated software

#

idk if u need to give it an analogy

young knoll
#

XP was the best though

#

Not biased

lilac dagger
#

It was

#

But it can't do anything newer

#

Does it even support x64?

bright spire
bright spire
tender shard
bright spire
ivory sleet
#

:,)

young knoll
#

It needs like 2GB of ram

slender elbow
#

hardware requirements or budget is not the reason people run 1.8 in the first place

#

like, far from it

young knoll
#

Granted RAM is like $100/GB these days

#

But still

#

Even crappy free hosts offer latest

grim ice
#

subjective opinion

fleet ridge
slender elbow
#

not a mod

#

but that's what the plugin description says, yes

tender shard
#

however latest = supported and 12 years old version = unsupported

#

are you also running your server on ubuntu 12.04?

shadow pumice
#

Question, so i made a poll plugin, under which category do i upload it? (the poll is done through a gui)

slender elbow
#

yawn

zealous scroll
#

Is it just e, or is the death protection consume effect sound not working?

        itemStack.setData(DataComponentTypes.DEATH_PROTECTION, DeathProtection.deathProtection()
                .addEffect(ConsumeEffect.playSoundConsumeEffect(Registry.SOUNDS.getKey(Sound.ITEM_BOOK_PAGE_TURN)))
                .build());
#

it just plays the default one

eager ermine
#

Can someone please help me. im trying to make a plugin that if you do /ffa in a server (lobby) that you get tpd to a other server (duels1) in a spefic world and location. Im trying so hard to make it for the last week.

chrome beacon
eager ermine
#

Sending someone in a specific location in a other server

chrome beacon
#

You'd send the player to a different server with a plugin messaging channel request to the proxy. Now moving them to a specific location in that server isn't a built in action and would require you to have your plugin on that server and then informing that plugin instance of the request

sullen marlin
#

You'll need the plugin on both servers and some way to communicate between the two

chrome beacon
#

^ There are multiple ways of going about that. You can for example make your own proxy plugin to relay that or you can use a messaging service or just do direct communication via a socket

sullen marlin
#

Even a database would be ok

chrome beacon
#

That would also work

sullen marlin
#

Or in very recent versions, a cookie

chrome beacon
#

oh yeah I forgot about those

lilac dagger
#

messaging system only works when there's at least one player online, which might be a bummer to some

sullen marlin
#

I think he meant a real message queue like RabbitMQ or whatever

lilac dagger
#

you can have cookies in minecraft?

chrome beacon
#

Yes

#

It's a pretty new feature but it can be used when sending people with the transfer packet

lilac dagger
#

i see

#

interesting

lilac dagger
buoyant viper
mortal vortex
#

To confirm, the latest release of Minecraft is deobfuscated yeah?

sullen marlin
#

there is a deobfuscated version available, but 1.21.11 is not deobfuscated

#

26.1 snapshot is

eager ermine
#

How to make a plugin that in tab you can change who you see when you crouch as a example normally I see everyone but if I crouch that sets me in a other mode where I see my friends

drowsy helm
#

somewhat complicated to get into tab packets, so if you're not familiar just use a library

eager ermine
#

Thanks

ancient mulch
#

yo im curious if anyone thinks this would be possible / already exists; any way to design a plugin that would allow players to have all chunks currently loaded on the server loaded on their client?

sullen marlin
#

Wdym

buoyant viper
#

its not like the client can really make use of a chunk 1k blocks away from them

#

and on a lower end machine this would probably not be an efficient idea

ancient mulch
#

when using a distance mod like voxy it would theoretically allow you to see entities in other players' chunks (mainly the other players being the point)

#

yeah for like a 3 person server it'd triple the load, not meant to be used for like a 200 player server

ancient mulch
#

was just trying to figure out a way to make other players visible from a long distance with voxy and that idea popped into my head

sullen marlin
#

But a player 1000 blocks away would be like 0.1 pixels

drowsy helm
#

simpleton

tender shard
#

and then check them every 20 ticks or so

#

TPS gonna die though if you got more than 100 players

lilac dagger
#

If mem won't first

granite plaza
#

hello uhh I don't even know how to say what the problem is since I only started but any idea how I can fix that issue:


    <dependencies>
        <dependency>
            <groupId>io.papermc.waterfall</groupId>
            <artifactId>waterfall-api</artifactId>
            <version>1.20-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
#

I am trying to make a waterfall plugin but these lines are always red and I can't get build success

#

any idea why?

ember gulch
#

?whereami

granite plaza
#

?

chrome beacon
#

This is the Spigot/Bungeecord discord

granite plaza
#

I know, I already tried spigot dependency and it didnt work

chrome beacon
slender elbow
#

isn't waterfall dead anyway

chrome beacon
#

I believe so

granite plaza
#

I prefer waterfall than velocity

slender elbow
#

you prefer an outdated exploitable unmaintained project than an updated and maintained one?

#

that's a strange decision

granite plaza
#

no I use waterfall forks

#

e.g. xcord, flamecord. They both are better than velocity for me

slender elbow
#

good then you can use your fork's API and seek support to your fork, or depend on bungeecord API and use bungeecord at runtime and ask about errors with it here

granite plaza
#

I'm sorry cuz I am new to minecraft plugin development?

slender elbow
#

that's okay, the gist of it is you should ask support to the people you actually use the software from

#

in any case, you should at least share the error or log

granite plaza
#

I thought they all use the same api

ember gulch
#

if you're new you should either watch some tutorials or start with spigot api

granite plaza
#

using eclipse

chrome beacon
#

Just because one is based on the other does not mean they're the same

granite plaza
slender elbow
#

idrk about eclipse, but if you run maven on a terminal that will spit out all the logs

granite plaza
#

[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< si.terona:TeronaFallBack >----------------------
[INFO] Building TeronaFallBack 1.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for io.papermc.waterfall:waterfall-api:jar:1.20-R0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.126 s
[INFO] Finished at: 2026-01-11T16:31:56+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project TeronaFallBack: Could not resolve dependencies for project si.terona:TeronaFallBack:jar:1.0
[ERROR] dependency: io.papermc.waterfall:waterfall-api:jar:1.20-R0.1-SNAPSHOT (provided)
[ERROR]     io.papermc.waterfall:waterfall-api:jar:1.20-R0.1-SNAPSHOT was not found in https://repo.papermc.io/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of papermc has elapsed or updates are forced
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
chrome beacon
#

Now get us the log when you're depending on Bungeecord

ember gulch
#

?paste

undone axleBOT
chrome beacon
#

also this ^

chrome beacon
#

Depend on Bungeecord

#

Reload maven

#

profit

#

You did say you already tried that so you should know how 🤔

granite plaza
#

tried what?

#

I am so lost right now

ember gulch
#

what are you trying to do?

slender elbow
# granite plaza I thought they all use the same api

while the java API is likely to be the same or very similar, the maven dependency artifact could have different set of requirements for your maven setup to satisfy like a java version or needing to add some or such property, repositories etc

granite plaza
# ember gulch what are you trying to do?

I am trying to make a plugin that always checks all hubs if they are offline or online so if e.g. hub1 goes down you get connected to hub2 the other way around. So if both hubs are down you get connected to limbo-wait server where you wait for any hub to come up and when e.g. hub2 comes online you automaticly get connected there

#

and also it adds loadbalance for players with a queue system so it doesnt spam servers with players

slender elbow
#

net.md_5 bungeecord-api or something idk the artifact id

granite plaza
#

I will try to do it on intellij idea

ember gulch
#

waterfall is no longer maintained, so I'd suggest choosing another proxy server

granite plaza
#

yeah I am currently using xcord but will switch to flamecord when my system admin reinstalls mounts to our nodes

granite plaza
#

welp

#

I figured it out

#

[16:32:07 INFO] [TeronaFallBack]: TeronaFallBack ENABLED

#

love that message ❤️

tender shard
#

are you stupid or "special" or sth?

#

because spigot itself will print out when it enables a plugin

eager ermine
#

?whereami

mortal hare
#

spiggot

alpine urchin
#

venerablevulnerable

thorn isle
#

1.8 is certainly venerable

#

on account of being as old as dust

alpine urchin
#

the spelling in that small section alone is quite questionable

buoyant viper
#

but only like server 1.8.8 and client 1.8.9

thorn isle
#

it did

young knoll
#

Wait

alpine urchin
#

im in ur country

#

buddy

young knoll
#

1.8 through 1.18, wasn’t log4jshell found out at like

young knoll
#

1.16.2

buoyant viper
#

i remember it making its rounds near 1.18

young knoll
#

Huh it was 1.18

buoyant viper
#

1.18 i think released with it patched, or 1.18.1 whatever

young knoll
#

Damn

buoyant viper
#

and then mojang backported fixes to each final release for older versions

young knoll
#

At least one thing in that paper is correct

#

Is that paper like google translated or something

buoyant viper
#

m yes 1.18.1 was natively patched

lethal kayak
#

hello

#

how to compile gradle plugin

#

idk how to code

#

if anyone could help

#

it's a 1.8.8 plugin and java 8

chrome beacon
#

gradle build usually

lethal kayak
chrome beacon
#

can call the gradle wrapper (gradlew)

#

if you're in Intellij you can do so in the gradle tab on the right

lethal kayak
chrome beacon
#

depends on the project

lethal kayak
chrome beacon
#

it'll probably be fine

#

give it a try

lethal kayak
thorn isle
#

the point of gradle is for it to download the dependencies for you automatically

#

but sometimes, especially for nms projects, people define "local" dependencies which have to be available locally, i.e. either built on your machine or downloaded to your machine

#

try it and see

#

looking at your particular build script, all of those dependencies should be reliably available online and probably from the defined repositories also

#

except for spigot 1.8.8, i'm not sure if that is still on the spigot repo

lethal kayak
# thorn isle except for spigot 1.8.8, i'm not sure if that is still on the spigot repo
  • What went wrong:
    Execution failed for task ':compileJava'.

Error while evaluating property 'javaCompiler' of task ':compileJava'.
Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=11, vendor=any vendor, implementation=vendor-specific} for WINDOWS on x86_64.
No locally installed toolchains match and toolchain download repositories have not been configured.

thorn isle
#

Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=11,

#

install

lethal kayak
thorn isle
#

yes

#

or higher

lethal kayak
#

Ok

thorn isle
#

you can also install it through the ide but i don't remember if gradle will see it

lethal kayak
#

no worries

#

Yo

#

It worked guys

#

Thanks for the help

#

I appriciate it

verbal crow
#

hey,
I use https://github.com/jpenilla/run-task to install and start paper server using gradle runServer.
Is there a way to start it with console? Looks like console work if try to write help or something, but gradle feels bad + autocomplete didn't work.
Or maybe there is a way to connect to paper server console from another terminal?

chrome beacon
#

?whereami

thorn isle
#

i think the console is there by default and needs to be disabled by --nogui or something

#

maybe see if the task passes that to the server by default

verbal crow
thorn isle
#

console as in a gui window with a command log, command input, a player list, and iirc a memory usage graph?

#

or as in in the terminal gradle is running in

chrome beacon
#

They're talking about the terminal inside Intellij

#

It does not have autocompletion and stuff like it when running from a gradle task

thorn isle
#

in addition to that there is a gui window with the noted widgets

#

but it's suppressed by --nogui

#

though i don't remember if that has autocomplete either; iirc it does

verbal crow
verbal crow
thorn isle
#

there might be an option to disable that being passed, better ask in the paper discord about it

#

i know you can add flags to be passed for runserver

#

not so sure about omitting flags passed by default, you'd think so though

chrome beacon
#

Pretty sure they just want the terminal to work

#

not the GUI

thorn isle
#

don't know about that

young knoll
#

I mean the gui kinda sucks

#

It’s just the terminal with a crappy ram graph that doesn’t tell you much, especially with xmx and xms set the same

thorn isle
#

but hey if it has autocomplete, it still sucks less than gradle, which sucks also and sucks more

#

you're better off with ant

young knoll
#

The terminal console has autocomplete iirc

#

No idea about the gui

buoyant viper
quaint mantle
#

What's the standard or common practice for making a plugin that supports a wide range of versions?

#

like 1.16.5-1.21

vast ledge
#

Have reflections of the code for each version and call the reflection from a version independent class

quaint mantle
#

is there no cleaner way?

vast ledge
#

Not afaik

buoyant viper
quaint mantle
buoyant viper
#

yes

quaint mantle
#

i cannot find any tutorial

#

written article

#

forum

#

or any kind of thing

#

to help me do that bro 😭

#

ive been searching

buoyant viper
#

if version == another then
adapter = adapterForThatVersion();

idk

#

alternatively: only support latest 😈🔥

#

server owners fault for not updating

quaint mantle
#

and the spigot API for different versions too, how would you import the correct API

#

i cant find any tutorial wrtitten or video to explain me how to setup a system like that 😭

vast ledge
#

Compile on oldest Java version required

mental drum
sullen marlin
#

Can you please ask in more channels

mortal vortex
#

LOL

lilac dagger
#

it won't stress test chunk loading for example but it can run commands and such

#

i use it to test my minigames

mental drum
lilac dagger
#

i'd listen to md if i were you

quaint mantle
cloud perch
#

You can see how bedwars1058 does it

quaint mantle
#

oh, okay, thank you

mortal vortex
quaint mantle