#help-development

1 messages · Page 1230 of 1

sullen marlin
#

Because you code it to use the methods you want it to use

sour mountain
#

so lets say I write a method called doSomething() in the main plugin class of a plugin called TestAPI

#

I load that plugin into my server

#

then

#

I make another plugin called TestPlugin

slender elbow
#

md5 will i get admin

sour mountain
#

if I do PluginManager#getPlugin and get the TestAPI, how would TestPlugin know what TestAPI does?

lost matrix
sullen marlin
#

Because you code it to do API plugin.doSomething()

sour mountain
#

like how do I import TestAPI into my TestPlugin?

#

I can't just create a TestAPI object from nothing, right?

sullen marlin
#

Add it as a dependency and use the code 7smile put above

sour mountain
#

how do I do that

sullen marlin
#

You get the object the server made

lost matrix
sullen marlin
#

Using the code above

#

Same way your plugin gets the spigot api

sour mountain
sullen marlin
#

Well how did you get spigot api

lost matrix
sour mountain
sullen marlin
#

Copy that but change spigot to testplugin

sour mountain
sour mountain
sour mountain
thorn isle
#

lost matrix
# sour mountain maven

Do you need this API to be accessible publicly, or is it okay if its only present in you local maven repository?

sour mountain
#

I was assuming I need to do something on github or maybe some other website idk

sullen marlin
azure zealot
flint coyote
#

What's spigot?

sour mountain
blazing ocean
#

never heard of it

#

he did

sour mountain
#

if you made spigot how are you so bad at explaining things 💀

sullen marlin
#

Just doing my best bro

sour mountain
#

well ty for trying

#

now I understand since you probably know a ton more than me it's hard for you to know what I don't know and I didn't explain that well

lost matrix
# sour mountain I would like it to be accessible publicly

Yes, this is not trivial, depending on which approach you select for hosting your dependency.
One way would be to use JitPack. It compiles your projects directly from github.
This can cause problems in a lot of cases, for example if you want to use NMS.
For a plugin which just uses the spigot api, you can simply push it to github and make it accessible via JitPack:
https://www.jitpack.io/

sour mountain
#

also

#

oh

#

i can't post a picture

blazing ocean
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

sour mountain
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

sour mountain
#

uh

#

anwyays

#

I found this random image uploading site

#

hopefully that works

#

that's my plugin rn

lost matrix
azure zealot
sour mountain
#

I need to be able to create instances of AbstractGuiPage and AbstractGuiItem

sour mountain
#

theres a less scarry link

#

i think

#

same picture

azure zealot
#

yes

sour mountain
azure zealot
#

so whats the problem?

sour mountain
thorn isle
#

no, what you are trying to figure out is how to deploy your api artifact for other people to build against

#

that is a completely different problem and this is why you got bogus answers

azure zealot
#

You need to add one plugin as the others plugin dependency, than you can access it with for exaple a static getApi method or using the bukkit api mentioned before

lost matrix
sour mountain
thorn isle
#

i'm not hostile, i'm helping

#

now you know what to ask

#

you may now thank me

sour mountain
#

Could've said it nicer

#

I would be more thankful if you did

#

But thank you regardless

blazing ocean
sour mountain
chrome beacon
#

What he said is correct

sour mountain
chrome beacon
#

You know what also doesn't help being rude to people for no reason instead of asking more questions

sour mountain
#

There was a reason that I already stated multiple times

#

this is a channel for help developing stuff not continuing a pointless argument just drop it

grand flint
sour mountain
grand flint
#

u lucky i aint own the server wouldve banned ur ass 🙏

sour mountain
#

bro what

#

In the past I've had people give me advice when they had no idea what they were talking about

#

since he wasn't being very descriptive I thought this was one of those times

grand flint
#

still woudlve banned u

sour mountain
#

aight bro didn't ask

grand flint
#

come join my server just so i can ban u

sour mountain
#

ew why would I want to join your server

#

you join mine so I can ban you

grand flint
#

banned by id 508354320274685953 L

sour mountain
#

anyways

warm mica
eternal night
#

least useful discussion on the planet

#

just drop it lol

sour mountain
#

I am in the wrong I know and am sorry

#

discussion over

#

anways

#

back to old discussion

#

the one that matters

sour mountain
#

When I have my dependencies local like this do I need to have the API plugin on the server?

eternal night
#

Yes (usually an API abstracts a plugins internals tho, so, yea. Or it is a utlity, then you'd shade it)

thorn isle
#

whether they are local or not, unless you are shading the into the plugin in which you depend on them, yes

lost matrix
# sour mountain I got it working locally

The server needs all classes provided on runtime. Either you shade your API into your plugin, or you need to add the API as well as your Plugin to the plugins folder.

thorn isle
#

just because the plugin was built against something like the api doesn't mean that it can be absent at runtime

#

building against it only means that the compiler can check for compile time errors and emit correct bytecode

#

if the stuff the bytecode is trying to reference doesn't exist at run time, it explodes

sour mountain
#

How do I shade it? And can I now go to using JitPack so others can use it too?

thorn isle
#

you typically don't shade in an api

sour mountain
#

It's a pretty small API so I don't want to have little stuff like this cluttering my server

thorn isle
#

is this a library or an api?

sour mountain
#

uh

thorn isle
#

what does it do?

sour mountain
#

dont know

#

so

#

what it is

#

some classes I can extend to make GUIs easier

thorn isle
#

does it have a javaplugin class?

sour mountain
#

and also a listener that listens for any custom guis clicked

sour mountain
thorn isle
#

then you don't want to shade it in

#

you will want that plugin on the server

#

the plugin will then implement the api against which you build your other plugins

sour mountain
#

Is there a way to make it not have a JavaPlugin class?

#
public final class LazyGui extends JavaPlugin {

    @Override
    public void onEnable() {
        new GuiManager(this); // init gui pages

        getServer().getPluginManager().registerEvents(new GuiListener(), this);
    }
}
#

that's literally my whole javaplugin class

thorn isle
#

well yes, if you want to make it into a library, you could have the plugin using it register the gui listener

#

this way it doesn't need to be a plugin of its own, but it becomes a "part of" the plugin using it

sour mountain
#
public final class LazyGui {

    void init(JavaPlugin plugin)
    {
        new GuiManager(plugin); // init gui pages

        plugin.getServer().getPluginManager().registerEvents(new GuiListener(), plugin);
    }
}
#

would this work?

thorn isle
#

remove the LazyGui class from it and replace it with a comment telling the developer to include

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

in their plugin

#

that would also work

sour mountain
#

nice ty

#

oh wait but

#

oh nvm

thorn isle
#

that said if you want other people to be able to use this library (in this case by shading it in as it's a library now), you still want to deploy the artifact somewhere like jitpack for people to build against it

sour mountain
#

yeah I do want to do that

#

idk how tho

thorn isle
#

me either, i only do private github repositories and jitpack doesn't like them

sour mountain
#

alr

#

ty for helping

thorn isle
#

maybe spam ping smile a bunch so he helps you instead

#

he won't mind it

sour mountain
#

lol

thorn isle
#

alternatively just like pore through the jitpack documentation, i vaguely remember looking at it and it wasn't complicated at all

sour mountain
#

I suck at using github so I gave up on jitpack

#

how do I shade it?

#

nvm figured it out

thorn isle
#

that's the spirit

novel lagoon
#

There isn't anything similar to: import org.bukkit.event.server.ServerShutdownEvent; ?

#

for 1.20

chrome beacon
#

What do you need it for?

#

Your onDisable will trigger when your plugin shutsdown

novel lagoon
chrome beacon
#

If the server crashes your code won't be called

#

Or at least that's what you should assume

novel lagoon
#

Well, how do I save the contents of the trunk if the server crashes?

chrome beacon
#

Save things on a regular interval with the scheduler

chrome beacon
#

For example power is lost to the machine

#

No power means no code can run

novel lagoon
#

Ha

chrome beacon
#

or someone using the kill button on a panel like pterodactyl

#

Just like vanilla you should save things every couple minutes

novel lagoon
chrome beacon
#

hm? why did you copy paste that message

novel lagoon
#

I translate into French

chrome beacon
#

I just mentioned a senario that would cause data loss

chrome beacon
novel lagoon
#

Yes but a Minecraft server can crash for no reason, right?

chrome beacon
#

Anything can

novel lagoon
chrome beacon
#

That would just be a bad idea

novel lagoon
chrome beacon
#

I/O isn't free

#

You'll slow things down for little to no benefit

#

You usually don't need to save things more frequently than the server saves the world

novel lagoon
#

OK, I see

#

Every 5 minutes is perfect?

chrome beacon
#

Yeah that's fine

novel lagoon
tardy inlet
#

im having an issue on my server when chunks unload minions are turning into normal armorstands but when i come back minion does come back but that broken armorstand which supposed to be a minion are there too..

how should i fix that in code?

mortal vortex
#

Because you aren’t giving much detail about how you’re implementing them. Are you using PDC?

fallow violet
#

general minecraft enchantment question: When i say enchantment A is exclusive with B, do i have to say B is exclusive to A or does A handle everything?

worldly ingot
#

Does it hurt to do both?

#

It would depend on the instance being invoked. If you check both then it doesn't matter, but if you're only checking one, then that's a problem

tranquil pecan
#

How do i give absorption heart to player without potion effect?

slim wigeon
#

I trying to make a fast hopper plugin. How can I program the hopper to output to below and target direction if there is a item in its inventory?

smoky anchor
#

Hoppers have internal cooldown, I'd suggest just changing that to make the hoppers faster.
Leave all the item logic to vanilla.

slim wigeon
#

EpicHoppers from Songoda, I making that but my version. Don't tell me that I not allowed to edit the speed of hoppers. Cobblestone Generater with a hopper auto block break

smoky anchor
#

Actually, there is a spigot server setting that allows you to change the global speed of all hoppers.

slim wigeon
#

I don't want to change all hoppers

#

Just adding a custom one with features. Currently it only goes one direction, not downwards

smoky anchor
smoky anchor
slim wigeon
#

Sent to ChatGPTI have something like this set but this only goes at the pointed direction, not downwards like normal hoppers do

tranquil pecan
#

oh its capped at max_absorption

#

so like if i give 2 absorption heart to player and the player gets damaged then the max_absorption attribute decreases?

smoky anchor
smoky anchor
#

?tas

undone axleBOT
slim wigeon
#

No global editing required

smoky anchor
#

I am not talking about global editing here. You can do that per-block.
If spigot has API for that.

slim wigeon
#

Per-Block?

#

Is this really true information?

#

Wait, let me rephase this. I trying to edit the stack sizes. 1 for normal hoppers and 8 for fast hoppers

tranquil pecan
#

I have a plugin that uses ProtocolLib to summon packet based armor stands written for Minecraft 1.20. However, my server also runs ViaBackwards and ViaVersion. When I try to join with 1.8.9, I get an entity metadata error. Any suggestions on how to fix this?
https://paste.md-5.net/baxogihaji.bash

chrome beacon
tranquil pecan
#

You want to see code?

chrome beacon
#

I'm talking about the log

tranquil pecan
#

yes

#

that's all what i can see in the console

chrome beacon
tranquil pecan
tranquil pecan
#

but why you need it as i said its written for 1.20

chrome beacon
tranquil pecan
#

yep

#

no response they just told me wrong metadata

sullen marlin
#

Why do the armor stands need to be packet based

tranquil pecan
#

Cause i use it for my pets plugin

#

Those flying heads

chrome beacon
#

You don't need packet based armor stands for that?

young knoll
#

The api allows for entities only visible to certain players

chrome beacon
#

It would be easier to just use display entities

young knoll
#

Those would be even worse with viabackwards

#

:p

chrome beacon
chrome beacon
young knoll
#

Iirc it just converts them all to armorstands

tranquil pecan
#

Uh well my plugin has options for hiding pets etc soo

tranquil pecan
#

The codes works well for 1.16.5 and above

thorn isle
#

The only argument for making this packet based I can see is the entity tracker performing somewhat poorly with thousands of extra entities to track

young knoll
#

How many pets you spawning?

thorn isle
#

But this probably shouldn't be an issue with small pets

tranquil pecan
#

means 1 armor stamd

thorn isle
#

No point in overcomplicating it with protocol fucknuggetry then

smoky anchor
#

Easy solution, don't support versions that are over a decade old
If PvP mechanics are of concern, you can emulate them really well with latest versions
And as stated before, this can be done with API

tranquil pecan
#

ok but what about hide pet feature

#

I don't think i can do that with api?

chrome beacon
#

You can

#

as we've said

#

hideEntity/showEntity and setVisibleByDefault depending on what you want

tranquil pecan
#

oh

tranquil pecan
#

okay

smoky oak
#

is there a way to figure out the remaining Δt or do you have to guess?

blazing ocean
#

what delta t

thorn isle
#

isn't that a client thing

blazing ocean
#

tick delta is a rendering thing

thorn isle
#

you can guess it by taking a millis/nanos timestamp in a bukkit scheduler task at the start of the tick and then comparing to it in your other logic, but you'll have to assume that ticks take 50ms

#

and by the time you guess it and do anything with it the player is probably like 70ms behind

#

so it isn't of much use

#

the client also processes packets sent by the server (except for very few specific ones like pingpong) on the main thread at the start of the tick

#

so whatever delta t you end up sending is going to happen at the start of the tick on the client, so you might as well not bother

blazing ocean
#

don't they just get processed immediately

thorn isle
#

processed as in polled and read from the bytebuffers, maybe, i'm not sure

#

but as in applied to the game world? start of the tick

#

conversely pingpong gets processed and responded to immediately

buoyant viper
#

man i wish mc didnt send ping every 2 seconds

#

send every second like a real man

thorn isle
#

or no, i have it backwards, pingpong gets synchronized to main before response

#

keepalive is what gets responded to immediately

#

that being practically the only difference between the two

smoky oak
#

im not trying to do shit to the client lol
im trying to see how much processing time i have left; some of my code requires the modification of potentially hundreds of thousands of blocks

#

so i figured id dodge the lag and distribute the load over time

thorn isle
#

but afaik on spigot you can't get your logic to run at the end of the tick

#

on paper you have ontickend event

#

knowing how much time you have left doesn't help if you don't know how much ticking work the server has left

#

on tick end you can assume it's zero

smoky oak
#

im writing my plugins for spigot bc almost every server ever that can run plugins is a spigot fork of some sort, so it works more or less everywhere

eternal oxide
#

?workdistro

smoky oak
#

yes that gave me this idea

thorn isle
#

paper's market share is like 90% of recent versions

#

the easiest way to go about this is to just split it into 20-30ms chunks

#

adapting to mspt is neat but not really something that you'll die without

spring sequoia
#

Trying to setup a spigot plugin, but its saying it cant find the dependency, i have it as org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT

chrome beacon
#

Did you add the repo

spring sequoia
chrome beacon
#

Could you send you build.gradle

mortal hare
#

bruh

#

Matrix multiplication (without SIMD, gpu etc)

#

1st row vs 2nd column based one

#

that's why CPU L1/L2/L3 cache matters

#

tldr always multiply by row when you can folks

slender elbow
#

yes, CPUs love contiguous arrays of data

tranquil pecan
#

what just got deleted

#

heh?

#

how is that possible lol

#

You mean prefix or something?

chrome beacon
#

Yeah that's not a good idea

#

If people want to change the plugin name they can just do so in the plugin.yml

#

Some real trickery would be required otherwise and it's not worth the effort

tribal quarry
#

hello

tranquil pecan
#

Do you want the plugin name to dynamically update based on the value set in the config?

#

Well, I don't know how to do that or if it's even possible. Maybe someone else can help you

tribal quarry
#

nvm fixed

spring sequoia
pseudo hazel
#

pls dont remove the question after you fix it, looks like a very one sided conversation

#

xD

quaint mantle
#

How to send a packet so that the player's effect is to display Speed in 1.21.4

spring sequoia
#

i just packaged my plugin into a jar file with intellij maven, but the server wont run it, it doesnt recognise it when i do /plugins and it doesnt load

eternal night
#

you should have an error in your console then

spring sequoia
#

it doesnt print anything at all

warm mica
thorn isle
#

does it have a plugin.yml

spring sequoia
#

it does have plugin.yml but console says it doesnt

thorn isle
#

you're probably not including your resources in the jar

eternal night
spring sequoia
#

thought it would be nearer the bottom

eternal night
#

yea, then presumably your plugin.yml is not in src/main/resources

spring sequoia
#

ah, its just in src

thorn isle
#

or in whatever location you have set as your resources root in your build config

spring sequoia
#

should config and plugin be in main

eternal night
#

no

thorn isle
#

source code goes into src/main

eternal night
#

both in src/main/resources

#

src code goes in src/main/java

thorn isle
#

other things you want included in the jar go in src/main/resources

spring sequoia
#

i think i mightve structured everything wrong, should EVERYTHING be under src/main? everything currently is just under src

thorn isle
#

kind of depends what you're building it with and how you've configured it

eternal night
#

the only thing in src rn should be the folder main

spring sequoia
#

not everything, but the java components

thorn isle
#

maven uses src/main resources and java by default

eternal night
#

and in main you have java and resources

thorn isle
#

other build systems may use other directories

spring sequoia
#

okok got it thanks

thorn isle
#

and even with maven they can be assigned arbitrarily

spring sequoia
#

all my classes/java components are currently in a package called duels, can i just drag this folder into main/java and not have to change any of my package defenitons, so they stil; say duels.commands ?

#

or do i include main and so its main.java.classicduels.commands

eternal night
#

no, package starts inside the 'java` dir so

#

no need to change stuff

spring sequoia
#

ok luv

cinder abyss
#

@blazing ocean Hi, can I add an external file to the resource pack that I want to generate using packed directly in the pack object ?

spring sequoia
thorn isle
#

you don't include "java" in the package name

#

your package names (and the class contents, with the package declaration on the first line) stay the same

#

you just move the classes to the correct sources root

#

i would send a screenshot as an example but i'm not allowed to embed media

thorn isle
#

let's see what it says specifically and where

#

copy the error in whole

#

i'm guessing your sources root was set to that directory like i alluded to earlier

#

if you're using mavan with intellij, you can right click on src/main/java and select mark directory as... > sources root

#

then right click src/min/resources and mark it as resources root

#

but again this advice is based on like 8 different assumptions like that you're using maven and the specifics of the error

#

so let's hear some more details

rare ether
#

that's the answer i was looking for, thanks!

spring sequoia
#

basically says package doesnt exist for everything i try to import like:
import org.bukkit.entity.Player;

this only happened since i moved the stuff into main/java, im using the api.jar in a libs package which is under the same parent as src. Should this lib be put under src or main maybe

spring sequoia
thorn isle
#

🤡

#

That is the resources root

#

Sources root is src/main/java

spring sequoia
thorn isle
#

Are you building with maven

spring sequoia
#

yeah

#

within intellaj

thorn isle
#

You don't want an api jar then

spring sequoia
#

yeah i have one under libs

thorn isle
#

As a maven dependency?

spring sequoia
#

i clicked add as library

#

on the jar file

thorn isle
#

You don't want to do that

spring sequoia
#

ah okay

thorn isle
#

With maven, you add the api as a dependency in pom.xml

spring sequoia
#

i tried to do that but it wasnt working, i can try again tho

thorn isle
#

Adding libraries like how you did it is for building with just the ide without maven

spring sequoia
#
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>your.plugin</groupId>
    <artifactId>MyPlugin</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
       
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

  
</project>

#

thats my pom.xml

spring sequoia
young knoll
#

You didn’t add the spigot repository

#

Also 1.8

spring sequoia
#

is 1.8 a issue

chrome beacon
#

That was the first thing I asked and you said you did

spring sequoia
#

thought you meant the api

chrome beacon
#

And yeah don't add jars manually use maven or gradle

spring sequoia
#

i added the repo it still says the dependency not found

#
 <repositories>
     
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>
chrome beacon
spring sequoia
#

idk if thats right

chrome beacon
#

You can do that in modern versions

#

Anyways if you're using Intellij make sure to reload the pom

#

Should be a button for that in the top right or in the maven tab

spring sequoia
#

means that pvp texturepacks arent compatible, and newer versions need more hardware ability to run smooth

#

ah amazing thanks the package has worked now

#

see if it loads properly

chrome beacon
#

You don't need any crazy hardware to run modern versions

spring sequoia
#

mainly more ram but it still makes it not worth it for me

#

the referance for the main class goes from java right? console saying it cant find the main class

young knoll
#

It’s just the fully qualified class name

#

Aka package + class name

spring sequoia
#

path is main/java/classicduels/utils/classicduels.java

#

so id just write utils.classicduels

#

leave out the classicduels package

young knoll
spring sequoia
#

ill take that as a yes

#

nevermind still cant find it

pseudo hazel
#

is that the full class path?

spring sequoia
#

full cclass path is src/main/java/classicduels/utils/classicduels.java

pseudo hazel
#

oh right

#

I guess you have too much

#

try removing everything up to classicduels

spring sequoia
#

idk where im meant to referance it from

pseudo hazel
#

from inside the java directory

#

thats the working dir

spring sequoia
#

ive tried that it js says it cant find main class

pseudo hazel
#

so its from the java dir to your class

#

can you show screenshot from the ide?

spring sequoia
#

wont let me post media in here

pseudo hazel
#

oh then you gotta verify

#

?verify

#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

spring sequoia
#

ah

#

jesus i need to change this name

#

this is how i have it rn and console says it cant find the mainclass

pseudo hazel
#

oh

#

you have a main folder outside of your java folder

#

and then anotehr java folder in it

#

everything should be in the green java folder

eternal night
#

casesensitive

#

no

chrome beacon
#

The class name is lowercase on the plugin yml

pseudo hazel
#

oh that too

eternal night
#

that layout is correct they just fucked up their folder definitions omegaroll

pseudo hazel
#

oh

#

yeah you righ mb

spring sequoia
#

so its just case sensitive

pseudo hazel
#

I assumed the green folder was correct

spring sequoia
#

thats fucked 😭

eternal night
#

how is case sensitivity fucked?

#

huh

pseudo hazel
#

no, windows is fucked for not giving a shit about case sensitivity

spring sequoia
#

if this acc works im gunna bash my toes against my bed willingly

#

ok now its spitting out a different error

chrome beacon
#

Progress has been made

spring sequoia
#
[20:50:35 ERROR]: Error occurred while enabling DuelsPlugin v1.0.0 (Is it up to date?)
java.lang.NullPointerException: null
        at classicduels.utils.ClassicDuels.onEnable(ClassicDuels.java:28) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:408) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:372) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:327) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:267) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched_1.8.8.jar:git-PaperSpigot-445]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
[20:50:35 INFO]: [DuelsPlugin] Disabling DuelsPlugin v1.0.0
#

progress has indeed been made

chrome beacon
#

Looks like a nullpointer

young knoll
#

Something is null

spring sequoia
#

i may know what it is holdup

tawdry echo
#

ClassicDuels.java:28

spring sequoia
eternal night
#

(passive agressive note, both paper and spigot for 1.8.8 have an exploit count probably reaching 100, you should be running a maintained fork)

spring sequoia
#

exactly the same as the one above it

chrome beacon
#

You didn't define the stats command

#

In the plugin yml

spring sequoia
#

oh shiz

#

i literally had it defined before but i deleted it by accident im gunna kms

#

thank god its finally working

#

got a few things getting spat out in console but ill fix that myself

#

thanks guys

thorn isle
#

java.lang.NullPointerException: null

#

ah yes

#

back before helpful NPE's

#

only took oracle a good 20 years to get that in

spring sequoia
#

i was using a system where it clones a arena world then teleports the players to it, but turns out multiverse for 1.8.8 is possibly fucked, does anyone know any alternative plugins for this, or any alternative methods of doing this?

#

without bungee

young knoll
#

Just clone the world yourself

thorn isle
#

it's been like 10 years since i last touched the 1.8 api but there is maybe probably a WorldBuilder or some other api method to load a world

#

copy over the world files manually and then use that to load it

#

you don't need multiverse to have multiple worlds, multiverse is just a popular way of setting it up, and comes with many convenience features and utilities like loading/unloading shit at runtime

spring sequoia
#

im just using multiverse as a way to clone the world

#

i was thinking about creating a copy of the world then hard deleting it after but idk how easy that would be

#

like js coding it into the plugin

thorn isle
#

Files.copy

#

or that might not exist on java 8

#

🤡 got to for loop your directory tree recursively

spring sequoia
#

rn it works by cloning it, then putting the 2 players names on the end of the world, teleporting them to it, then deleting it once the games over

#

but its doing that all through multivers

thorn isle
#

do it with plain old java and the bukkit api instead if you don't want to rely on multiverse

rough drift
#

change the folder name and delete uid.dat

#

you can load it in using new WorldCreator(folderName).createWorld()

thorn isle
#

remember to copy it first or it'll be single-use

#

if you want to be fancy you could zip it as a resource in the jar and extract it at runtime

spring sequoia
#

nah ill just have the arenas as worlds within the server folders then make copies

blazing ocean
young knoll
#

Keep a template world without the uuid data file and just copy that

#

I tend to use a uuid as the name for my temporary worlds

slim wigeon
#

How do I get the direction of the hopper?

sullen marlin
#

getBlockData

#

cast to Directional

slim wigeon
#

Its not detecting it if( !direction.getFacing().equals(BlockFace.DOWN) ) { event.getDestination().addItem(new ItemStack(Material.BONE,1)); }

remote swallow
#

== on enums

slim wigeon
#

BlockFace is a enum?

remote swallow
slim wigeon
remote swallow
#

add a debug statement before you return printing the blockface

slim wigeon
#

No player for InventoryMoveItemEvent

remote swallow
#

because its not an event for a player

slim wigeon
#

Without using EpicHoppers (Made by Songoda)

#

That is my goal

remote swallow
#

sysout or broadcast or logger before isValid,

fast jasper
#

in a plugin I'm experimenting with, I'm trying to detect when a right click air/block by a player has occured when the client attempts to place a block, even when the block being click is a "ghost block" or "lag block", by that I mean a block that is only client sided and isn't really there on the server. however, my event doesn't get triggered at all when it's a ghost block. although I can tell that the server is receiving data from the client, since on testing, I see that the block my client places against a ghost block gets removed. could anyone explain or help me understand why this doesn't fire my event at all in that situation? I don't even get the event fired for the real block that should be there. also what are some ways I can detect when this happens? I just need to set a value, or trigger a method, or really anything of that sort when the event takes place. right now I'm unsure of a way to access that incoming data from my players even though I see my server is recieving and responding to it. I also do not need to get the player, the block position, or any special event data at all, just need to know that it has happened.

chrome beacon
#

I usually just ProtocolLib to handle that

slim wigeon
#

So how can that be done?

thorn isle
#

inventorymoveitemevent::getdestination

#

cast/instanceof to blockinventory

slim wigeon
thorn isle
#

the inventory is a block inventory

#

what do you mean "target block"

#

where the item is going?

slim wigeon
#

You know how hoppers work?

chrome beacon
#

You can get the location of the inventory then get the block, blockdata and rotation from that

thorn isle
#

yes. they take items from a source inventory and put them in a destination inventory

#

destination here being equivalent to your target

chrome beacon
thorn isle
#

a complicating factor is the fact that the destination inventory can be the hopper itself when it's pulling items

#

what are you trying to do again?

slim wigeon
#

The reason I need the direction of the target block is because the hopper can be pointed SOUTH or WEST and it can still drop to below block

#

I trying to create a plugin like EpicHoppers (Songoda)

thorn isle
#

what

slim wigeon
#

I cannot use their plugins, alot of bugs

#

So I trying to create my own

thorn isle
#

what is it supposed to do

slim wigeon
#

Search it

thorn isle
#

no

#

explain it

#

you're in a help channel trying to get help for what you're trying to do

#

you best at least explain what it is that you're trying to do if you want help for it

slim wigeon
#

You correct, I in the help channel. But I do better to show what I trying to do then trying to explain it

wet breach
eternal oxide
#

you only have to use the hopper.getRelative(direction of blockData)

thorn isle
#

he says he wants the direction of the target block

#

which is simple enough

eternal oxide
#

gives you the block where the hopper is targeting

thorn isle
#

but i'm a little bit doubtful that we're not talking about the same "target"

smoky anchor
eternal oxide
#

block.getRelative( ((Directional) block.getBlockData() ).getFacing() )

#

gives you the target Block

wet breach
#

we need to overcomplicate it unnecessarily

fast jasper
# fast jasper in a plugin I'm experimenting with, I'm trying to detect when a right click air/...

update. I discovered I don't need any libraries for this it seems. apperently, the issue is that, right clicking on a client side/ghost block, counts as a LEFT click, and I was checking for right clicks. anyone know why this might be? just want to understand this better. if I right click on real blocks, it says right click, but it specifically says left click in my console, each time I right click a ghost block in-game

slim wigeon
#

event.isLeftClick() and event.isRightClick()

fast jasper
#

what about it? I'm asking why placing a block on my client would be detected as a left click?

#

I'm also using " e.getAction()" in my console output message so it should be exactly what type of action it's detecting

karmic mural
#

Hey! Trying to compile CoreProtect but I'm not sure where I am going wrong. First I tried compiling with java 17, but in build.gradle they've set the sourceCompatibility to 21, so then I tried that. Each time I get errors. For java 21 I keep getting missing dependencies but no matter how far down the rabbit hole I go I can't manage to build successfully

#

Ok so after using my brain I know I should use java 21, I'll go at it once more and see if I can resolve the missing dependencies

thorn isle
#

they're open source now?

slim wigeon
#

This is so annoying

#

From the Start, I place STONE.
Before STONE goes into End 1, the filters gets checked then allows STONE to go into End 1 due to being on the whitelist
The rest goes into End 2

But somehow, everything goes to End 2 like filters is impossible to make

#

But if Songoda did it, its possible

karmic mural
#

I just can't figure out why it isn't compiling because it seems I need java 21 but also one of the dependencies seems to require java 17?

thorn isle
#

Which dependencies are missing?

#

It's not unusual for folks like them to use locally provided deps that others can't get

slim wigeon
#

I refuse to pay for another filter hopper plugin

karmic mural
# thorn isle Which dependencies are missing?

These were missing

    implementation 'com.github.oshi:oshi-core:6.1.0'

    // Add Log4j dependency
    implementation 'org.apache.logging.log4j:log4j-core:2.20.0' // Use the latest stable version
    implementation 'org.apache.logging.log4j:log4j-api:2.20.0' // Include the API as well``` 

after adding them I am getting the error "Unsupported class file major version 65
thorn isle
#

The hopper below pulls before the hopper on top has a chance to push

young knoll
#

^

#

Hoppers always pull before pushing

thorn isle
#

No clue what oshi is but log4j is publicly available

slim wigeon
#

I just need a example if a filter hopper working and I look at how to put it into my plugin. Because at this point, I really close to just give up and I cannot rely on people not fixing stuff

mortal vortex
slim wigeon
#

Its annoying and unprofessional

#

Talking about Songoda if you can tell

thorn isle
#

Push the filtered items manually on pull

mortal vortex
slim wigeon
#

Yes

thorn isle
#

Arguably

mortal vortex
#

Didn’t they have hella controversy. change ownership. Change name. And they are back???

thorn isle
#

Roaches are hard to stomp on for good

mortal vortex
#

I rmemeber hearing something about the founder, being a questionable individual. Never sure if it was true.

slim wigeon
#

I don't know what happened but I heard they might be banned from here so I recommend not going in detail about the case

mortal vortex
#

Damn

thorn isle
slim wigeon
#

Yes, I keep bringing them up. That is because I have one goal in mind, that is to create a filter hopper plugin. The block breaking and suction is working

thorn isle
#

That or maybe your gradle process is running on j17

karmic mural
karmic mural
mortal vortex
karmic mural
slim wigeon
#

I just wait until this talk is done since my task is not complete

karmic mural
#

I'm asking because earlier you said I just need a example if a filter hopper working and I look at how to put it into my plugin. Because at this point, I really close to just give up and I cannot rely on people not fixing stuff

slim wigeon
#

I don't always expect people to make it for me but I tried everything possible. But if someone does not want to make it, I won't beg them. I might end up paying for another plugin that has this feature I guess since I cannot do it

#

I don't have the money for it

karmic mural
#

It could be useful to take a break from the project and let your mind work through it as you do other things. Alternatively try rubberducking, explaining the issue to something or someone else, in the simplest terms possible, and it might unlock something for you

remote swallow
karmic mural
#

Or that ^^

remote swallow
#

(can also look at source for inspo for ur own)

slim wigeon
#

I also need BlockBreak feature

remote swallow
#

fork it and add it, or us it as inspo for ur own

slim wigeon
#

I might look at the code and try to add it to my plugin. Thanks

karmic mural
thorn isle
#

i always did prefer prism

#

coreprotect feels profoundly lacklustre after having to switch back to it from prism

#

i'll update it to 1.21.4 one of these days

remote swallow
slim wigeon
karmic mural
remote swallow
#

having both is scuffed af

karmic mural
#

Indeed

slim wigeon
#

...

slim wigeon
#

No error, its just not working the way I want it to be

slim wigeon
#

Posted in #general

worthy yarrow
#

Yeah that's general

#

not help dev

#

The channel you're currently in is help dev

slim wigeon
#

I not getting help here

worthy yarrow
#

be patient

slim wigeon
#

I been at it for hours and hours

worthy yarrow
#

Well we're not gonna write the code for you and from what it seems you want to do nothing to try and figure out the issue

karmic mural
slim wigeon
#

I trying to create EpicHoppers but I don't need help with that plugin, just mine

karmic mural
#

Why not just clone EpicHoppers and adapt it to what you need it to do?

worthy yarrow
#

^

slim wigeon
worthy yarrow
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

slim wigeon
thorn isle
#

Let's see the code and an actual explanation on what you want to happen vs what does happen

worthy yarrow
thorn isle
#

🤡

karmic mural
#

Sounds like you have a few options, the one vcs2 suggested, where you fix the issues with what you've made, or you can try fix the bugs with the EpicHoppers plugin

thorn isle
#

if( hopper.getBlackList().size() != 0 ? hopper.getBlackList().contains(invItem.getType()) : false ) { continue; }

karmic mural
#

-# if I speak I am in big trouble

thorn isle
#

Now, I don't mean to be harsh but maybe try something simpler before trying to do whatever it is that you are trying to do now

sullen marlin
#

It's an optimisation bro

#

Gotta go fast

karmic mural
#

Good news though I managed to compile CoreProtect for 1.21.4

#

😎

thorn isle
#

💪

karmic mural
#

Man that was a headache

#

At least I've learned a bit

sullen marlin
#

Nice job

slim wigeon
#

Now you see what I trying to do

remote swallow
#

have you added debug statements to figure out what code is happening and where its triggering stuff

thorn isle
#

Like I said an hour ago, the hopper below is pulling before the one on top can push

#

Either prevent the hopper below from pulling filtered items, or push filtered items manually on pull

karmic mural
#

Have you blacklisted stone from the hopper below

kind hatch
#

Ah hopper logic. Fun

worthy yarrow
#

?pdc (For reference)

thorn isle
#

He barely knows java syntax, I think generics are reaching a little high for now

slim wigeon
#

I going to attempt something

remote swallow
worthy yarrow
#

There's a fairly simple explanation / example

#

And he would need a primitive in this case anyway

slim wigeon
#

I wrote my inventory system for my farming rod and the gps compass by myself. So that said @thorn isle has been blocked

thorn isle
#

Not like you've read a single thing I've said so far (and I know you just clicked on this to read this message)

jagged thicket
#

@slim wigeon trust me bro, it might sound weird but try replacing ternary operator with && and ||

karmic mural
#

in && and || we trust 🙏

chrome beacon
#

There are a couple comments in general as well

karmic mural
#

I recommend keeping a discussion in a single place to avoid loss of information

jagged thicket
#

&& and || is jus easy to debug also

chrome beacon
ashen crane
#

Hey im trying not to use AnvilGUI, and use NMS to implement a function that returns the name of the typed in name for anvil GUI but i cant seem to access it, ive gotten as far as accessing the AnvilMenu container, but i cant seem to access the name in any way.. any ideas?

        val craftPlayer = player as CraftPlayer
        val nmsPlayer = craftPlayer.handle as ServerPlayer

        val craftContainer = nmsPlayer.containerMenu

        val delegateField = craftContainer.javaClass.getDeclaredField("delegate")
        delegateField.isAccessible = true
        val container = delegateField.get(craftContainer) as net.minecraft.world.inventory.AnvilMenu

        println("Container Class: ${container::class.qualifiedName}")

        if (container is net.minecraft.world.inventory.AnvilMenu) {
            try {
                val itemNameField = container.javaClass.getDeclaredField("itemName")
                itemNameField.isAccessible = true
                val itemName = itemNameField.get(container) as String
                println("Renamed Text: $itemName")
                return itemName
            } catch (e: NoSuchFieldException) {
                println("No itemName field found in the container!")
            }
        }

        return null
    }```
mortal vortex
#

container.getSlot(0).item.hoverName

ashen crane
#

that looks familiar, i may have tried it earlier on today and get met with null, i've been through so many different variations that i dont remember, im taking a break rn and ill confirm in a bit but i believe i had tried that but with getSlot(2) as thats the return item, though that item seems to be a phantom item

slim wigeon
slim wigeon
#

I got a feeling I going to get banned from here

mortal vortex
slim wigeon
#

I getting annoyed and I might say something extremely rude

visual laurel
#

is there an easy way to get the total number of blocks a player has mined?

smoky oak
#

loop stats

mortal vortex
#

Yep, its going to be a lot easier to just query stats than internally keep track of it yourself.

smoky oak
#

huh. the stats arent exposed individually

#

its just getStats(mined)

mortal vortex
smoky oak
#

ah wasnt referring to that

#

ingame the stats show the blocks individually, but the api doesnt seem to expose that

#

it just has MINE_BLOCK

#

oooh

visual laurel
#

isnt MINE_BLOCK individual for materials?

mortal vortex
#

Yeah

smoky oak
#

i found it, its a overload methodd

mortal vortex
#

Statistic.MINE_BLOCK, Material.DIAMOND_ORE

smoky oak
#

yep

visual laurel
#

yeah

#

dont really want to iterate over every material

smoky oak
#

well, if you just use getStatistic(MINE_BLOCK) i believe it just spits out the total

visual laurel
#

nope it gives 0 iirc

smoky oak
#

rly?

visual laurel
#

ill check but i believe so

mortal vortex
#

Yeah really??

#

That seems wrong.

visual laurel
#

nvm it gives java.lang.IllegalArgumentException: Must supply additional parameter for this statistic

#

i was just giving 0 for the stat if it errored

smoky oak
#

well then

mortal vortex
slim wigeon
#

Its working now. I guess it fixed its self

smoky oak
#
long total = 0;

for(Material material : Material.getEntries()) //or whatever gets all enums
{
  if(material.isBlock())
    total += player.getStatistics(Statistic.MINE_BLOCK, Material);
}

dis then

mortal vortex
#

GOD NO PLEASE NO

visual laurel
#

i did that.. it crashed the server instantly

remote swallow
#

not the md format

smoky oak
#

?

remote swallow
#

brace on a new line

smoky oak
#

thats me being too lazy to press the left arrow key coz i wrote the comment first

#

i swear i normally dont code like this :kek:

visual laurel
#

😂

smoky oak
#

though youre giving me ideas

visual laurel
#

yeah iterating over every material crashes the server in seconds

smoky oak
#

it shouldnt

#

like it really really shouldnt

#

error if present, and code please?

slim wigeon
visual laurel
#

im running it for every player for a leaderboard so its executing for ~300 players

smoky oak
# smoky oak though youre giving me ideas
long total = 0; for(Material material : Material.getEntries()) /*or whatever gets all enums*/ {if(material.isBlock()) total += player.getStatistics(Statistic.MINE_BLOCK, Material);}``` did you know? java doesnt need newlines
visual laurel
#

yeah its awesome

smoky oak
visual laurel
#
private double getStatistic(OfflinePlayer player) {
        if (statistic.isBlock()) {
            int total = 0;
            for (Material material : Material.values()) {
                if (material.isBlock()) total += player.getStatistic(Statistic.MINE_BLOCK, material);
            }
            return total/scale;
        }
        return player.getStatistic(statistic) / scale;
    }```
#

probably shouldnt have that as an int now that i think about it

smoky oak
#

can you elaborate what that statistic.isBlock() is for

visual laurel
#

if the statistic type is a block

smoky oak
#

are you doing stuff with globals you really shouldnt?

visual laurel
#
    public boolean isBlock() {
        return this.type == Statistic.Type.BLOCK;
    }``` is what the Statistic enum has
slim wigeon
#

So there is no way to add filters to hoppers? That is what it feels like

visual laurel
#

its part of org.bukkit.Statistic

remote swallow
visual laurel
smoky oak
slim wigeon
#

I did but they don't really show how a custom item is done. I won't want filters on all hoppers

remote swallow
#

use pdc

smoky oak
# visual laurel

yes. MINE_BLOCK type is Type.BLOCK
but Type.BLOCK would also be in blocks placed

slim wigeon
smoky oak
#

if you want the count of blocks broken, you only want to loop the block materials, and query the block broken statistic

visual laurel
#

there is no stat for placed

#

it comes under USED

smoky oak
#

wot

visual laurel
#

yeahhh

#

stats are odd

smoky oak
#

anyway, point being there very likely are other type.BLOCK stats

#

interactions possibly

visual laurel
#

mine block is the only stat that uses that type in the entire enum

#

it has 1 usage

smoky oak
#

did they shove that into untyped then?

visual laurel
#

for what?

#

interactions with furnaces etc?

smoky oak
#

yea

visual laurel
#

thats its own stat 😭

smoky oak
#

yea its a separate statistic but im talking abt the type

visual laurel
#

oh yeah its untyped

#

the only typed ones are:

DROP
PICKUP
MINE_BLOCK
USE_ITEM
BREAK_ITEM
CRAFT_ITEM
KILL_ENTITY
ENTITY_KILLED_BY```
#

other than that everything is untyped

smoky oak
#

hm
anyway, as for your issue, i think its potentially an issue with you doing something using globals

#

coz i dont see what else it could be

#

or the recursion

#

if that is one, i cant tell

visual laurel
#

its called here:

List<OfflinePlayer> topPlayers = Arrays.stream(Bukkit.getOfflinePlayers())
                .filter(player -> player.hasPlayedBefore() || player.isOnline())
                .sorted(Comparator.comparingDouble(this::getStatistic).reversed())
                .limit(10)
                .collect(Collectors.toList());```
smoky oak
#

how the hell do you not err on a method that requires an arg lol

#

does this refer to the object in which the stream is executed? i guess that works

smoky oak
visual laurel
#

i do :)

if (material.isBlock())

#

i might try running it off the main thread and using BlockType instead of Material

smoky oak
#

i clearly am too tired for this, and i can't see any reason for this to fail in that case bar divide by zero nonsense

#

Material should be fine. my recommendation is to step through with a debugger and see when it fails / crashes

#

good luck i guess?

slim wigeon
#

I guess its impossible to set filters for hoppers. This is my 3rd day of trying. PaperMC won't help me

slim wigeon
smoky oak
#

yea im missing context here lol
do you know why its not working?

slim wigeon
#

No, I don't. I tried every possible way. ChatGPT returned useless code

#

I tried but not working stillif( event.getInitiator() != event.getSource() ) { return; }

smoky oak
#

if those two equal something has seriously gone wrong lol

#

query. does this work for hopper chains, and fail to block it when picking up items?

#

thats the only case i can think of where those might equal

slim wigeon
#

That part is not working

smoky oak
#

im pretty sure moving down hopper towers when the facing direction is sideways is done by the hopper below

#

that might be the problem if thats not accounted for. you either need to do it via the hopper below, or move the item manually

slim wigeon
#

I don't know how this can be done but I like if it just work. Given the amount of time trying to get this to work, I like to see a example code otherwise I might have no choice but to end the project

remote swallow
#

The best advice i can give is start from scratch and think what needs to happen for it to work, eg item is grabbed by hopper, decide if it being moved out of normal order then deal with that

#

And also take a break and come back to it after sleeping on it

slim wigeon
#

I not re-writing the whole code. I not waiting for months for a functional plugin

remote swallow
#

You do know epic hoppers is open source too right

slim wigeon
#

I not using them either. I tried reading their code and its unreadable, I cannot tell what it does

kind hatch
#

Well, it's written by songoda so it's not that surprising.

remote swallow
#

From a quick scan it doesn't look hard to understand

#

If I get a chance tomorrow ill make an mvp of what I gather that you want

slim wigeon
#

I don't want to use nms as well, I did see that

lime pulsar
#

anyone know what ItemDisplay.ItemDisplayTransform.GROUND does?

worthy yarrow
#

There’s an event you can listen to and filter the target inventory from there

sullen marlin
slim wigeon
#

I cannot seem to get this hopper filter system working

#

Do I do this with InventoryMoveItemEvent?

#

Anyone here?

broken flume
#

ServerCommonPacketListenerImpl & ClientInformation is changed to what in 1.20 & 1.20.1

slim wigeon
#

@jagged thicket You still there?

jagged thicket
slim wigeon
#

I cannot get the filter system working. Since no one wants to help me with it, that is why I asked for that plugin

#

I tried InventoryMoveItemEvent

#

Just now InventoryPickupItemEvent

#

Nothing works

#

@jagged thicket

valid burrow
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

valid burrow
#

can you form a proper sentence

lime pulsar
valid burrow
#

not you

#

mb

#

the guy above

lime pulsar
#

Is there an event thats called when a sign breaks because the block it was attached to breaks? Or do I just need to check BlockBreakEvent and see if my sign is attached to it?

broken flume
eternal oxide
#

?mappings

undone axleBOT
mortal vortex
#

How's it possible to enroll custom advancements into the client? I've seen plugins like Advanced Achievements by LucidAPs, but these aren't really advancements, and are more so "milestones" with affects, but they don't actually invoke the Advancements Toast on the client.

Recently I saw a video in Spanish(?) showcasing a plugin but I'm curious how this is achieved. How in code are you able to do this?

https://youtu.be/J3ZkW2zt_aI?t=548

En este tutorial les enseño a utilizar el plugin Custom Advancements que permite agregar logros en tu servidor y modificar completamente el sistema de progresos de Minecraft. Los usuarios, al completar los logros, podran ganar diversas recompensas que puedes especificar utilizando comandos por consola de otros plugins.

El sistema de progresos d...

▶ Play video
mortal vortex
#

Wow, you're amazing @blazing ocean

mortal vortex
blazing ocean
#

probably so

#

I'd just not bother tho

mortal vortex
blazing ocean
#

Nah but I know the person who made it

mortal vortex
blazing ocean
#

Being active in discords like spigot and fabric really helps you lol

wet breach
mortal vortex
wet breach
#

I like md used to be a bukkit dev staff member long time ago. I also helped bring the first hologram plugin to minecraft servers 🙂

lime pulsar
#

hologram hmm...

#

can you make a hologram of an item sitting on a chest?

eternal oxide
#

yes

broken flume
#

i cant find

blazing ocean
#

¯_(ツ)_/¯

#

can't even find that in older versions

broken flume
#

uh

eternal oxide
#

it was probably part of the PlayerConnection

blazing ocean
#

actually that exists in recent versions

#

introduced in 1.20.2

eternal oxide
#

yes

broken flume
#

i want to modify player's latency using the latency field of ServerCommonPacketListenerImpl, but it doesn't exist in older versions. how can I modify latency in older versions? 😭

young knoll
#

Ddos the player

broken flume
lime pulsar
#

how can I keep an Item from moving?

young knoll
#

An item entity?

mortal vortex
lime pulsar
#

ahhhh i was trying to use bubble gum, silly me

mortal vortex
#

sadly it doesnt have enough tension, thats where u went wrong :(

young knoll
#

If you mean an item entity

#

Disable gravity

smoky anchor
#

If you want it to stop from spinning and moving, use Item Display Entity

broken flume
#

serverplayer got latency field

#

yeye

#

oh yes

#

it was moved to ServerCommonPacketListenerImpl in newer versions

young knoll
#

What does that field even get used for

broken flume
#

for changing ping/latency

lime pulsar
smoky anchor
lime pulsar
eternal oxide
lime pulsar
#

ItemDisplay just sits there though, I want the bob and the pivot

eternal oxide
#

yes, you do that yourself

#

one sec I have an example

hardy cairn
#

hey i wanted some help, can anyone give me a example code to check if a player has armour with specific trim on it like Vex trim or any other

#

ill really appreciate it

eternal oxide
#

?paste for me

undone axleBOT
lime pulsar
hardy cairn
#

oh

#

uh ok i will try

young knoll
#

I believe it’s ArmorMeta you need to cast to

broken flume
young knoll
#

Isn’t that just a field in the packet

lime pulsar
#

Thank you ElgarL but it may be overkill for a dinky chestshop

eternal oxide
#

just have a single runnable to process each display

smoky anchor
#

You can make the item entity ride some display entity
It will stop it from moving & display entity is the most efficient

young knoll
#

Smort

eternal oxide
#

That code I supplied is very simple and the minimum to simulate a dropped item

lime pulsar
#

hmm so i would need to keep track of all the display items in one spot, i guess i could do that

#

is there an easy way to see if they are loaded or not though?

eternal oxide
#

store teh UUID and if it exists its loaded

young knoll
#

I wonder what happens if you make something ride a marker entity

#

Since markers aren’t sent to the client

lime pulsar
#

ok, storing the uuid already in persistent data

smoky anchor
young knoll
#

Yay desync

smoky anchor
#

You got there buddy

pliant topaz
#

Afaik or atleast how they've been described they are basically non-existent

#

Not really even an entity except for basic data and position

#

on the other hand, it's still an entity

#

Okay, mc wiki says this:

They cannot support passengers (even when summoned with a Passengers tag, the passengers are not created).

umbral ridge
#

how do you upgrade project dependencies in intellij?

#

there is no gson in pom.xml

blazing ocean
#

?whereami

blazing ocean
#

and that can be safely ignored

lime pulsar
#

ahhhh

fossil cypress
#

How can I change nametags on players that are client side with packets? I want for example that only my teammates can see my HP and enemies cannot. How would I do this?

blazing ocean
#

teams and scoreboards

dense falcon
#

I would like to know, if it is possible, how to apply a texture to an item? Like we have the resource pack put on the server, the players must put it on the game (we have an interface that opens in this case, done directly by the game) and they must put it to see the custom textures, except that the textures inside are not necessarily on items that exist but that we will want to make the illusion that they are in the game, as if we added a water pistol but on a stick for example. But if I want to call it "water pistol" is it possible or am I necessarily obliged to put the name of the texture to "stick"?

blazing ocean
#

custom model data / custom models (1.21.4+)

urban cloak
# umbral ridge

gson is a dependency of bungeecord chat which is a dependency of paper api

#

thats why its nested

astral cloud
#

hi i am looking for a server dev can anyone help ?

blazing ocean
#

?services or check pins in #general

undone axleBOT
daring maple
#

Hi Guys, just a quick question. What is the go to way for handling subcommands with tab completion. I've gotten quite used to bigger plugins like LuckPerms having tab completion for all main commands but it doesn't seem like the spigot api has some prebuilt methods/abstractions for this.

chrome beacon
#

The Spigot API has the TabCompleter interface you implement

#

though it is a bit less powerful than what LuckPerms does

#

as it's older than Brigadier

#

I can recommend using Cloud or ACF for commands

blazing ocean
#

cloud 🫶

daring maple
#

Yeah its just gonna be a very small QoL plugin for a server me and my gf use. Don't think I need a feature complete solution, but I'll take a look at the ease of implementation

chrome beacon
#

then the tab completer is probably enough

daring maple
#

Damn as someone who enjoys software quality, and comes from the c# world, cloud looks like a well built option

chrome beacon
#

Yeah

pseudo hazel
#

I would just have your command implement TabExecutor

chrome beacon
#

LuckPerms is also well built

tranquil pecan
#

How do i solve this 3 years old asked question i am getting the same issue

winter jungle
#

I'm currently working on a plugin that displays the items you're looking for in the boss bar. I have a tool that goes through every texture in the item/ and block/ directory and creates a unicode for the resourcepack. But how do I do this with slabs, for example, because slabs are created with the model and the texture is defined in the model, so it is not a separate texture

thorn isle
#

there's this if you just want vanilla items/blocks

#

if you have custom blocks or have custom textures for them, you'll have to render them yourself probably

#

the game essentially computes the item icon on the fly from the model

winter jungle
#

thank you so much

#

thats exactly what i need

tranquil pecan
chrome beacon
lime pulsar
chrome beacon
lime pulsar
#

yea i didnt even notice i hit a reply lol

chrome beacon
#

Using packets isn't the only option clamping the the attribute and then ensuring that the absorption hearts don't go down is also an option ofc

#

That's how the scaled health api works

lime pulsar
#

long time ago i made a guild plugin that let you get more health the higher you advanced, just had to do all the math in the plugin, same number of hearts it just took more for them to go down

fallow violet
#

How to force a resource pack? So when denied, then kick

blazing ocean
#

check in the PlayerResourcePackStatusEvent

#

can't 100% force it

fallow violet
#

How can i re ask to download it once i declined it? I have an infinite kick loop now...

#

xd

blazing ocean
#

edit the server list entry

fallow violet
#

whats that? :p

blazing ocean
#

the server list entry in your game

fallow violet
#

ooh

#

cant i just tell with a plugin to reask?

blazing ocean
#

no

#

once the player has denied, it will set the setting to reject all packs

fallow violet
#

alright thanks for your help

fallow violet
#

Hey, i created 2 item stacks with custom model data 10 and custom model data 20 but both items are looking like the custom model data 10? Why is that? Version 1.21.1

tight compass
#

?paste

undone axleBOT
tight compass
#

Howcome my nms mappings aren't working, I've got this here for my pom.xml https://paste.md-5.net/iqototarom.xml, but to get, for example, the playerConnection from EntityPlayer, I need to do entityPlayer.f, which is obviously not correct, right? And I have ran build tools with the correct flags, because I've had this working before

blazing ocean
blazing ocean
#

generally looks fine to me

low field
#

how to make it appear to the player that theyre freezing

fallow violet
blazing ocean
#

but you are setting the CMD to 1 and 2

low field
#

setFreezeTicks and setIsInPowderedSnow does nothing

blazing ocean
#

instead of 10 and 20

fallow violet
#

wait

#

what the f

#

So i removed the override for 10, reloaded the texture pack and added it back and reloaded it again