#help-development

1 messages Β· Page 1138 of 1

drowsy helm
#

yes

fading drift
#

thanks

scarlet gate
#

Is there an equivalent of the gradle plugin 'run-task' for a Spigot server?

fading drift
#

I asked for ages and I believe u can set the jar file to a custom spigot jar

#

its so frustrating though and I couldn't get it to work properly with plugins so I gave up and moved to maven and just wrote my own little script

young knoll
#

I just have a gradle task that copies the jar to my server folder

scarlet gate
sage patio
#

does anyone else have this problem? i can't code anymore in IntellIj after 2024 updates duo to a memory leak which crashes the IDE

drowsy helm
sage patio
#

a spigot server? its on other terminal, not running by IntelliJ

chrome beacon
sage patio
#

no

#

actually i removed every plugin i downloaded before

#

even the color theme D:

slender elbow
#

idk i'm running it on 2GB and it works fine

sage patio
#

which version?

slender elbow
#

latest

#

2024.2.2 or smth

#

yeah

sage patio
#

maybe its time for downgrading to Eclipse

pseudo hazel
#

thats like downgrading to windows xp

sage patio
#

i've no other choice, keeps crashing each 2-5 mins

torn shuttle
#

forums staff lurkers assemble

#

I gots a problem

minor shore
#

Anyone knows a community/developer that's trustworthy and is willing to create simple custom plugins for any price?

undone axleBOT
minor shore
#

πŸ‘

hushed spindle
#

does anyone know of a way to set a player's reputation towards a villager

#

im aware that papermc allows it but i'd rather not use it, and ive looked through nms to see if it offers a solution but it doesn't seem very clear

torn shuttle
sly topaz
hushed spindle
#

im doing that but theres no way to change the reputation it looks like

#

maybe if you use reflection to make certain variables accessible but i dont know how to do that with these types of variables

#

like GossipContainer has a field called gossips and it's a Map<UUID, EntityGossips>

#

but EntityGossips is a private static class

#

even if you make it accessible your ide is gonna complain

#

and its getGossipEntries() method only returns a copy of that map and not the map itself, so you cant edit it

river oracle
#

hmmm might be room to add API there

hushed spindle
#

there is add() which seems to have all the parameters needed to change reputation, but it doesn't seem to actually change that

sly topaz
#

this is what Paper does:

getHandle().getGossips().gossips.computeIfAbsent(
                uniqueId,
                key -> new net.minecraft.world.entity.ai.gossip.GossipContainer.EntityGossips()
            );

but they do have these access transformers so, yeah you gotta use reflection it seems:

== AT ==
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
public net.minecraft.world.entity.ai.gossip.GossipContainer gossips
river oracle
#

wo wo wo my man

#

trying to prevent me from making a PR like that

#

clearly help-dev is scary place

sly topaz
#

I don't think that matters really lol

river oracle
#

CLA moment

sly topaz
#

you'd have reached to the same type of code had you not seen this anyway

#

does the CLA state you can't use borrowed code though? Or is it just some sort of secret rules spigot contributors live with?

river oracle
#

I didn't see it I averted my eyes before it was too late

river oracle
#

basically it has to be your organic work

sly topaz
#

that doesn't make sense to me, kind of defeats the purpose of open source

river oracle
#

it has to be your code because you sign it away to spigot, and for obvious reasons you can't give rights away for code you do not own

hushed spindle
#

how can you modify a map when you can't access one of the classes used in said map?

sly topaz
#

sure, blatantly contributing a patch from the paper repo would totally be out of line but just being influenced by the structure of the API wouldn't necessarily count as borrowing even

river oracle
sly topaz
river oracle
#

as Javier said tho fr

river oracle
sly topaz
#

last thing one would want is paper users thinking Spigot is stealing code from it

orchid gazelle
#

It's literally technically the opposite

river oracle
#

πŸ’€ shush child

#

do not speak of what you do not know

orchid gazelle
#

Huh?

sly topaz
#

the Spigot-Paper relationship isn't symbiotic but a one way street

#

otherwise Paper wouldn't actually exist to begin with

river oracle
#

I even run spigot servers instead of paper I'm fully committed πŸ’ͺ

orchid gazelle
#

Paper exists because it is on top of spigot's code

river oracle
#

I need to fix some issue with PlayerCommandPreProcessEvent, but I legit haven't a clue chat signing is so confusing man, I miss the good old days

orchid gazelle
#

It's like taking a premade cake and modifying it

river oracle
#

ahh yes remove chat signing from spigot πŸ’― what a great PR

#

I'm sure it'll get accepted

#

this guy should be contributing instead of me

orchid gazelle
#

Chat signing is an anti-player feature

river oracle
#

Yeah keep your ideology regarding chat signing out of my bug fixes please

orchid gazelle
#

It literally only is there for more control for micro$

eternal night
river oracle
#

I love playing with chat signing cryptography its like the best thing ever!!!

river oracle
eternal night
#

I have not yet

river oracle
eternal night
#

Is it me or does it feel off-centred

river oracle
#

tis not off center πŸ’ͺ

eternal night
#

noice

river oracle
#

probably is by a pixel or something

eternal night
#

looks cool xD

river oracle
#

lol

orchid gazelle
#

How to center a div

river oracle
#

I figured it'd be fitting

eternal night
#

imagine using forums

river oracle
#

imagine not using forums

blazing ocean
#

Imagine having forums

river oracle
#

how are you verified?

hushed spindle
#

Imagine forums

blazing ocean
river oracle
#

imagined

hushed spindle
#

im

eternal night
#

forums always get me subscribed to too many topics

#

and then I get spammed with updates

river oracle
#

stop subscribing to them automatically blud

#

its in the settings

blazing ocean
#

just don't use them

#

ez

hushed spindle
#

man the gossiping system is so convoluted wtf

#

changing someones reputation should be the easiest thing on the planet but nahhh

orchid gazelle
#

It is kind of easy

#

And also kind of random

hushed spindle
#

easy how

orchid gazelle
#

It's so easy to manipulate other people into thinking bad things about others and spreading rumors given that your own reputation is kinda high

hushed spindle
#

oh indeed manipulating people is very easy

#

im talking about minecraft villager reputation tho and they're not very easy to manipulate

orchid gazelle
#

OH

#

I thought you meant real people

hushed spindle
#

why of course

#

i need help developing a reliable system of mass manipulation so people give me money

orchid gazelle
#

People usually drop some general stuff here

#

Also, it's likely to land here without knowing you are in helpdev instead of general

hybrid spoke
hybrid spoke
hushed spindle
#

im not a minecraft youtuber

hybrid spoke
#

children are people as well

#

dont discriminate children

hushed spindle
#

ok but consider that children tend to be more poor than the typical adult

hybrid spoke
#

they have parents

hushed spindle
#

so i will manipulate them

hybrid spoke
#

manipulate them into manipulating their parents

#

triple kill

hushed spindle
#

hmmmmmmm

#

grandparents are usually wealthy

#

i can use the kids to get to the parents to get to the grandparents

floral drum
hybrid spoke
hushed spindle
#

infinite money hacks

sly topaz
hushed spindle
hybrid spoke
hushed spindle
#

im not experienced with reflection though and it seems like you need to use it a good amount to do this

floral drum
granite owl
#

is it considered bad practice to use C style structs in java? so, classes acting as containers, only holding public fields and constructors to assign those fields, but no protected/private members, and no methods?

eternal night
#

no

#

java even made that its own language features in records

granite owl
#

what are those? maybe ive missed em

river oracle
#

records are the best

granite owl
#

ah records

#

sec

river oracle
granite owl
#

i see so they are exactly what structs represent but in an oop context?

young knoll
#

They are just immutable data classes

#

with automatic hashcode and equals implementations

sly topaz
#

how does one do nms in Spigot nowadays

#

build tools add the spigot server to my maven local right? Or is that not the way anymore

hushed spindle
#

yup thats still how you do it

slender elbow
#

there are more steps

#

?nms

sly topaz
#

I mean, do I have to remap the jar

#

or is that just for convenience

slender elbow
#

runtime runs on reobf

#

so you need to remap your plugin from mojmap to reobf

sly topaz
#

what I mean is, do I need to use the remapped mojmap jar for development

#

or can I just use the reobf jar if I don't provide --remapped

#

well, I will just try it I guess

slender elbow
#

why would you not use mojang mappings lol

sly topaz
#

will the spigot remapper properly remap reflective lookups

#

if it doesn't then it is a waste of time

slender elbow
#

hahaha

eternal night
#

indeed rather funny

sly topaz
#

it was a genuine question lol, if I want to do the villager thing it will mostly be reflective lookups so the remapping won't do me any service

eternal night
#

it does not

sly topaz
#

alright

eternal night
#

does not mean that using mojmapped for everything else is a waste of time

sly topaz
#

it is been forever since I used maven, takes me back

warm musk
quaint mantle
worldly ingot
#

You made a cast to Player on line 28. You should move it below your instanceof check (around line 41)

warm musk
worldly ingot
#

Even your IDE was telling you "this can't possibly be true, you already cast it above" lol

#

In essence you've done this:

String example = null;
example.length();
if (example == null) {
    // do something
}
shadow night
#

Not very smart innit

warm musk
#

i put player variable after "is console" check

pure dagger
#

i dont get how permissions work... they are just strings right?

#

are they assigned to a player uuid or what

worthy yarrow
#

I mean yeah pretty much

pure dagger
#

what does pretty much mean?

worthy yarrow
#

It means you answered your own question

surreal loom
#

They are linked with uuid

#

Although not assigned on-top of it

worthy yarrow
#

Permissions are only useful in cases where you'd want to allow someone to do something

#

Or vice versa

pure dagger
#

how to add them to player?

worthy yarrow
#

I'd just use lp

#

The api ain't that bad and documentation is nice

surreal loom
#

Player.setPermission if I had to guess

surreal loom
river oracle
#

if you don't use LP Vault has the next best reaching Permission API

#

though I'd reccomend LP first and foremost

worthy yarrow
surreal loom
#

Yeah

#

Not with bukkit

river oracle
#

it exists, would I use it? Well that's another question

pure dagger
#

;c

river oracle
#

I'm assuming LP does its damn best to hook into that

surreal loom
river oracle
worthy yarrow
#

LP is your best choice for not reinventing the wheel

river oracle
#

LP pretty much has a permission monpoly

#

if you want to go generic just in case Vault wins

glossy laurel
#

If PlayerTeleportEvent extends PlayerMoveEvent does that mean that if the first one gets called the second one gets called oto or what

pure dagger
#

is it possible to add an element to config list or you have to get the list, add element, and override the previous one?

pseudo hazel
#

nope you have to override it like you describe

sly topaz
pure dagger
#

im wondering if its like thread safe

#

probably not

pseudo hazel
#

just as thread safe as a regular hashmap

#

which is to say, not really

pure dagger
#

umm

#

right..

#

sorry

pseudo hazel
#

but atleast its not writing to disk until you tell it to

pure dagger
#

you mean saveConfig()

pseudo hazel
#

yeah

#

fileconfirguation.save i think

#

but same thing

pure dagger
#

are player nicknames case sensitive? can there be 2 players the same nickname but different cases

granite owl
#

and have standard initializers

pseudo hazel
#

you cant

young knoll
#

Then you can't use a record

#

Just make a standard data class

pseudo hazel
#

you create a new instance if you want different values

pure dagger
granite owl
pseudo hazel
#

oh right yeah

#

thats for the config.yml file

#

I was saying more in general

#

but saveConfig is what you use for config.yml

young knoll
#

Public is generally frowned upon

#

But yes that is the idea

pure dagger
granite owl
pseudo hazel
#

yeah its valid

granite owl
#

should i still wrap it in getter and setter?

pseudo hazel
#

people are just frowning anyways

granite owl
#

πŸ˜„

pseudo hazel
#

I wouldnt bother

granite owl
#

well id like to follow best practices

#

even tho theres different opinions on what is a best practice xD

pseudo hazel
#

well best practise vs common practise

#

common practise is to slap a setter/getter on everything

#

but if its just for data classes using public fields makes sense

#

esp if its not like lists and stuff

#

just make it private as soon as you want to do other stuff with it

granite owl
#

yea its basically just a container of config info for the factory on how to create stuff

pseudo hazel
#

sounds like it could be a record

granite owl
#

but i want it to be mutabil since i want the factory to be able to return the structure modified

pseudo hazel
#

but then you need a builder for it

young knoll
#

If only we had the fancy thingy from C#

pseudo hazel
#

what thing

#

properties?

young knoll
#

yeah

#
public string FirstName { get; set; } = string.Empty;
granite owl
#

xD

rough drift
#

what

granite owl
#

wrapping a C function that in turn wrap C#

#

tbh i avoid native code at all costs not because its plattform dependend that can be fixed but because of antimalwares going ham on it

#

if its not code signed

young knoll
shadow night
#

I once worked with JNI, one time in my life and it was for an android app

pure dagger
#

why saving config deleted my comments lol

pseudo hazel
#

because comments arent stored by default

pure dagger
#

weird

#

i mean

#

my comments 😦

pseudo hazel
#

I forgot how to actually add comments too

#

because my config with comments is not saveable in game

young knoll
#

Pretty sure they are saved bu default now

pure dagger
#

i dont care

#

they dont deserve to be in my config anyway 😠

glossy laurel
#

can I somehow keep the player in the joining screen for an indefinite amount of time off main thread

river oracle
#

what's the point of a wrapper if exposing the field does the same exact thing

#

getters and setters are so pointless unless your making deep copies before you send them off. In the case of collections its always a necessity otherwise I hardly see a point

young knoll
#

@ivory sleet can fight you over it

#

I’ll get popcorn

#

<3

ivory sleet
#

what?

#

yea getters and setters sucks

#

but what else can u do to protect urself when coding in OO langs

river oracle
ivory sleet
#

I'd rather not get ran through by using java's measely final fields

#

eh its mostly in case u wna keep compatibility w the future, allow mockability, etc

#

like OOP stuff :c

river oracle
#

oh so stuff idc about xD

ivory sleet
#

:,)

#

precisely

river oracle
#

mock this dumby

ivory sleet
#

kotlin is nieche w its property semantics, unsure how ugly the impl is tho under the hood

river oracle
ivory sleet
#

true!!

river oracle
#

I pretty much stopped using java

#

once I got used to kotlin

ivory sleet
#

same

#

oh

#

understandable partially

young knoll
#

Conclube uses superior languages now

#

Like skript

river oracle
#

I want to learn a non JVM language like C or Zig

#

I really want to learn C, but CMake has got me regretting life

ivory sleet
young knoll
#

CUnmake amirite?

ivory sleet
#

dont tell them

ivory sleet
river oracle
#

prolog?

ivory sleet
#

yea

river oracle
#

what's that

young knoll
#

Epilogue?

ivory sleet
slender elbow
#

as a language C is very simple, but it's simplicity hinders the ability to make good dev UX when making a library and such

rough drift
#

what 😭

river oracle
#

having to make macros for that stuff is rough

blazing ocean
#

macros my beloved

slender elbow
#

oh no, not these kinds of macros

river oracle
#

well idk if its called macros in C

slender elbow
#

C macros πŸ’€

river oracle
#

whatever those # things are

rough drift
#

that is Rust

blazing ocean
#

rust macros ❀️

young knoll
#

Excel macros?

slender elbow
river oracle
# slender elbow C macros πŸ’€

But yeah my complaint as an early user is yeah simply syntax but the need to write macros and complex header files for a simple lost implementation is rough

hushed spindle
#

do you have to do something special to get values from final fields with reflection?

#

oh wait

slender elbow
#

I'm waiting

blazing ocean
#

be more patient

hushed spindle
#

yeah i was just silly, i got it from the villager instead of their gossipcontainer

#

but i haves another problem

#

forgive my possibly sloppy code as i am new to reflection, but here im trying to get the private gossips information from the villager's GossipContainer, which is a Map<UUID, EntityGossip>
EntityGossip however is a private nested class, so I can't use it in my IDE without it freaking out, and the map can often just not contain the gossip information for the player and so I need to add it to the map

#

but its expecting a "capture of ?" in the map

#

you know what scratch that i can just use Object instead of ?

#

i should really give this thinking thing a try

#

oh wow i got it to work, can edit villager reputation now

glossy laurel
#

So guys

#

what is nms

blazing ocean
#

net.minecraft.server

glossy laurel
#

you receive some packet and you gotta pull out from somewhere how its supposed to look

#

or

#

is it like reflection and doing some magic with your jar

#

AKA not normal java stuff

blazing ocean
#

what

glossy laurel
#

😭

#

?nms

blazing ocean
#

You just interact with the servers internals

glossy laurel
#

hold up

#

mojang mappings?

#

what that

blazing ocean
#

Mojangs names for classes and stuff

glossy laurel
#

right..

cedar saffron
#

mojangs name for math class

glossy laurel
#

so you basically just switch your spigot smth to mojang mappings

cedar saffron
glossy laurel
#

and everything magically works?

blazing ocean
hushed spindle
#

basically nms is the minecraft server's base code, but it's obfuscated

#

mojang mappings make it better readable

glossy laurel
cedar saffron
blazing ocean
#

You gotta depend on the server itself

cedar saffron
blazing ocean
#

instead of the spigot API

glossy laurel
blazing ocean
#

what what

#

?nms tells you how

glossy laurel
#

okay

#

well

#

makes sense actually

#

ig

hushed spindle
#

nms is really useful at times but its biggest downside is a lack of documentation

glossy laurel
#

:/

#

cant someone just document it

blazing ocean
#

Not just that

hushed spindle
#

gotta experiment a lot just figuring out if certain methods do what you think they do

glossy laurel
#

fr

blazing ocean
#

it's the fact that it's just shit

hushed spindle
#

thats a lot to document bro

blazing ocean
#

Parchment tries to do that

glossy laurel
#

whos parchment

hushed spindle
#

its a type of paper

blazing ocean
glossy laurel
#

rightttt

#

im using packet events

#

πŸ’€

blazing ocean
#

Doesn't work for plugins afaik tho

river oracle
blazing ocean
hushed spindle
#

nuh uh

cedar saffron
river oracle
#

You'd just need to make your own tool

blazing ocean
#

If you're already using PE then why do you need to use NMS

glossy laurel
hushed spindle
# river oracle It's not a type of paper It's a project on github smh

https://en.wikipedia.org/wiki/Parchment
well dont you just feel silly right now

Parchment is a writing material made from specially prepared untanned skins of animalsβ€”primarily sheep, calves, and goats. It has been used as a writing medium for over two millennia. Vellum is a finer quality parchment made from the skins of young animals such as lambs and young calves.
The generic term animal membrane is sometimes used by libr...

blazing ocean
glossy laurel
#

and the fact Im using his custom plugin isnt related to that

river oracle
glossy laurel
#

anyways

cedar saffron
#

rad, join back builders kingdom, we need you 7771ahhhh

blazing ocean
#

smh

glossy laurel
#

packetevents best

#

fr

cedar saffron
glossy laurel
#

like nms

blazing ocean
#

okay and then why do you need nms

glossy laurel
#

but you don't have to actually know anything much

#

fr

blazing ocean
#

what

hushed spindle
#

if you just wanna mess with packets then use protocollib (ew) or packet events

glossy laurel
#

good question

#

lemme ask in paper if they have one thing built in rq πŸƒβ€β™‚οΈ

hushed spindle
#

but if you dont wanna have your plugin require dependencies then you gotta go with nms

hushed spindle
#

also, certain game manipulations aren't supported by spigot api and will also probably need nms

#

why is it a stupid reason

hushed spindle
#

like me earlier today i tried to change villager reputation towards certain players, api doesnt support that

blazing ocean
hushed spindle
#

got it to work using nms

glossy laurel
blazing ocean
#

it's not that hard

#

It's a pain to use

hushed spindle
#

protocol is also a ton of bloat

glossy laurel
#

wdym by that

hushed spindle
#

a ton of stuff you wont be using

glossy laurel
#

ah

#

fair

river oracle
#

Also retrooper made packet events

#

So like W

blazing ocean
#

Also I'm a sponsor for PE

#

waittt

glossy laurel
#

what did retrooper make to deserve this fame

blazing ocean
#

@alpine urchin UPDATE MY PFP IN THE README FRFR

hushed spindle
blazing ocean
#

@river oracle

glossy laurel
hushed spindle
#

and thats fair

#

but i already have to use nms for some game edits so i dont mind using it for packets as well

cedar saffron
#

pebblehost an opp

#

(im never gonna pay my server bill on time)

glossy laurel
#

I dont use nms

hushed spindle
#

and by doing packets myself i at least know i wont be adding any more bloat to my already big plugin lol

glossy laurel
#

and never have

#

so I do mind

river oracle
glossy laurel
hushed spindle
glossy laurel
#

that's the point

hushed spindle
#

they love your money

cedar saffron
blazing ocean
cedar saffron
#

if it aint sparkedhost then it aint it

hushed spindle
#

and they'll give you a nice handful of shit in return

river oracle
cedar saffron
#

lunar hosting!!

glossy laurel
cedar saffron
#

lunar hosting is amazing!!

blazing ocean
#

fr

cedar saffron
#

the guy who was promoting it doesnt even own minecraft!

#

get lunar hosting!

#

lunar hosting is so good!

#

(their site got taken down)

blazing ocean
#

kek

river oracle
# glossy laurel lol

Obligatory plug of my new Inventory API hey check out MenuType and InventoryView derivatives!!

#

more coming soon!!

river oracle
#

ofc not

blazing ocean
#

Won't use them then

river oracle
#

why even use Spigot then

#

write your own in kotlin

blazing ocean
#

Noxcrew adds kotlin to craftbukkit

#

DockyardMC:

river oracle
#

I will tell you every time I create a class in craftbukkit

blazing ocean
river oracle
#

I almost always first accidently create a kotlin class

river oracle
#

No one can save spigot from such a great person like me

pure dagger
#

didnt know there was a "tabexecutor" interface lol

quaint mantle
#

Hi, does someone know how i can teleport my client side entity to a specific location, i have this but it does not work because the packet requires an Entity, but i want it to teleport to a location:
`FriendlyByteBuf byteBuf = new FriendlyByteBuf(Unpooled.buffer());

byteBuf.writeVarInt(this.entityId);
byteBuf.writeUUID(this.entityUUID);

byteBuf.writeDouble(this.location.getX());
byteBuf.writeDouble(this.location.getY());
byteBuf.writeDouble(this.location.getZ());

byteBuf.writeByte((byte) (location.getPitch() * 256.0F / 360.0F));
byteBuf.writeByte((byte) (location.getPitch() * 256.0F / 360.0F));

byteBuf.writeBoolean(false);

packets[0] = new ClientboundTeleportEntityPacket(byteBuf);`

echo basalt
#

What is your packets array about

#

The best approach tbh is to just create an entity and not spawn it

quaint mantle
echo basalt
#

Sounds icky

chrome beacon
#

Yeah

echo basalt
#

tbf I'm kinda thinking of making a client-sided entity system that works based off routines and operations

#

Where a routine is a list of operations πŸ€”

#

So you'd have a "display to new player" routine that's just a compiled list of operations or whatever

#

and operations could just prepare packets or update some value hm

#

I'm abstracting away methods smh

obsidian blaze
#

anyone need a plugin

#

@obsidian blazehello

#

hi

worldly ingot
echo basalt
#

bros speaking to himself

young knoll
#

Yeah can I get uhh

#

3 double cheese plugins with fries

pure dagger
#

how to write it in config?
Map<String, List<String>>
so every element has list of strings

#

like that? or that.. idk

#

confusing to me

warm musk
#
viprewards:
    examplevip:
      - "give %player% diamond 5"
      - "give %player% gold 10"
    examplevip2:
      - "give %player% diamond 15"
      - "give %player% netherite 5"

guys how to get keys

chrome beacon
#

getKeys(false) on the viprewards config section

chrome beacon
#

The second image is a list of map lists

pure dagger
#

whats map list

chrome beacon
#

I meant List<Map<String, List<String>>>

#

but worded it a bit weird

pure dagger
#

and the second one?

#

could you write it

chrome beacon
#

That was the second one

#

You mean the first one?

#

It's Map<String, List<String>>

pure dagger
#

oh

#

OOH

#

when its - a

#

its a list and it can repeat

chrome beacon
#

yeah

pure dagger
#

okay

#

thats hard to understand for me

warm musk
#
package org.xfurkanadenia.creusa.Commands;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;

import org.bukkit.command.CommandSender;
import org.bukkit.configuration.ConfigurationSection;
import org.xfurkanadenia.creusa.Creusa;

import java.util.Set;


public class Hediye implements CommandExecutor {
    private final Creusa plugin;

    public Hediye(Creusa plugin) {
        this.plugin = plugin;
    }
    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        ConfigurationSection vipRewardsSection = plugin.getConfig().getConfigurationSection("viprewards");
        sender.sendMessage("Başlıyo");
        if (vipRewardsSection != null) {
            sender.sendMessage("Başladı");
            // AnahtarlarΔ± al
            Set<String> rewardKeys = vipRewardsSection.getKeys(false);
            sender.sendMessage(rewardKeys.toString());
            // AnahtarlarΔ± yazdΔ±r
            for (String key : rewardKeys) {
                sender.sendMessage("VIP Reward Key: " + key);
            }
        } else {
            sender.sendMessage("viprewards section is missing!");
        }
        return true;
    }

}

chrome beacon
#

Maybe it'll help you understand the difference

pure dagger
#

thanks imma see that

chrome beacon
#

You want getKeys(false)

#

Not true

warm musk
#

same

#

still []

pure dagger
sly topaz
pure dagger
#

ok so in this example you cant type something like config.get("idk.a") right? because a is like an element, it has duplicates. or can you?

chrome beacon
#

That's a list

pure dagger
chrome beacon
#

So it won't work

sly topaz
#

is that even valid yaml

chrome beacon
#

dash means (element of) list/array
colon is object

chrome beacon
pure dagger
#

of a list

chrome beacon
#

yes

#

I mean element in list

pure dagger
#

still kinda confusing

chrome beacon
#

Never found it that confusing

sly topaz
chrome beacon
#

Just don't go nesting lists and you should be fine

chrome beacon
#

I use Configurate uwu

#

You'd probably have to getList and then get an entry

pure dagger
#

this is just a Map<String, String>

chrome beacon
#

yes

pure dagger
#

okay

#

i think im getting it yay

#

imma go sleep bye good night

chrome beacon
#

Good night :)

pure dagger
#

:)

chrome beacon
#

So have you reloaded the config or restarted

#

since you modified the config

warm musk
#

dude i restart the server every modifying config / plugin

chrome beacon
#

And is that the entire config you sent

warm musk
#

have a problem in config?

chrome beacon
warm musk
#

what the hell

chrome beacon
#

You have a problem somewhere else

warm musk
#

i solve

#

but

#

i dont know how

chrome beacon
#

You probably didn't load the config you sent

#

but had an empty one

warm musk
#

i load

#

and i reload server 3 times

#

whatever problem is solved

#

☺️

#

thanks dude

echo basalt
#

?spoon

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

warm musk
#

im new at java

#

its normal to ask questions

echo basalt
#

I see it as more of an attitude issue. Asking why your solution doesn't work is one thing, asking "how to fix" and expecting an immediate answer is another

warm musk
rough ibex
#

not really an ethics thing

sly topaz
#

I think they aren't native speakers so it might just have been a mistranslation

warm musk
#

my native language is turkish

#

im not good at english

#

i think illisusions words not ethical

#

asking is normal thing

echo basalt
#

Alright, minor rephrasing from my side: I don't believe the issue is asking, but rather what you're getting out of it. Coming here all the time and getting an answer to a beginner's question is a pretty big waste of time for us, comparing to just sitting down and learning the basics (either through the wiki or user guides)

#

Pro tip: google spigot <my question's topic> before asking here, for example spigot file configuration. This will skip the whole asking for help process, and get you answers a lot faster

#

If you do have a question about a problem, make sure to list out the problem, what you've tried and any errors you've faced. Simple asking "how fix?" hints that you're looking for a pattern, not an explanation

#

The same way that a kid can figure out the addition of basic numbers by just memorizing them instead of actually summing up the numbers together. That kid will have issues down the road because they memorized basic math, not learned it.

novel ridge
#

Debugging is a tedious and (sometimes) long task but does yield learning and understanding of implementations from unfamiliar libraries and APIs

echo basalt
#

^ Programming isn't a memory-oriented skill. You look things up on the fly and try to make it work to the best of your ability

#

A proper valid comparison is driving. Sure you can just memorize all the exam questions to pass it but you'll end up questioning yourself as to who goes first in practice. There's a lot of information around you, form relations and use it

novel ridge
#

An interesting perspective πŸ™‚

echo basalt
#

Constantly asking "how to fix" is like memorizing that you can overtake in the road home. You end up not paying attention to any of the signs or road design and end up not actually learning whether or not you can overtake in any given road. You just know you can overtake on that one

novel ridge
#

I completely agree but learning the techniques to efficiently work out a situation is also a skill that needs to be worked on with coding

echo basalt
#

Correct, but taking this approach won't teach you how to actually problem-solve

#

That ability mostly comes from figuring it out yourself or being not-spoon-fed

novel ridge
#

As in debugging and working through a problem to solution

echo basalt
#

Or coming up with a solution to begin with

novel ridge
#

Or when you get to higher levels (if that's your desire) to design a solution valid for the problem at hand using common techniques or a combination

echo basalt
#

For example at work we have custom death animations embedded deep within NMS. I've never done something like this before, but by just seeing how the class works I knew exactly where to hook into and how

#

I feel like the main take-away is to take things apart and learn how they work

#

If you don't know how configs work maybe just look at how it's implemented and fill in the blanks

#

unless you're using a java multithread api gl with that

sly topaz
#

yeah, no. That's a huge waste of time if you're trying to be productive. Any midly-complex task will require a library that implements a bunch of compsci concepts that are just going to be a pain in the ass to learn if you don't already know about them, the logic gets very hard to follow real fast. Luckily for beginners, Java is on the better side when it comes to documentation, specially within the JDK where pretty much everything is documented in the javadocs

#

so, if you're trying to understand it, just look at the javadocs and ultimately check out online guides on the specifics

novel ridge
#

yeah javadocs (if done right) are really handy

echo basalt
#

Basic usage guides work better for me. javadocs are quite hit-or-miss

hybrid spoke
#

try and fail it is for me

novel ridge
#

Depends on the standard imposed on the developer who created the documentation. I do find that javadocs are quite subjective on how you handle detail and what you should convey

sly topaz
novel ridge
#

Spigot is quite good for that, thankfully

echo basalt
sly topaz
#

null items should die

nova notch
echo basalt
#

gl remembering that in 2 weeks lmao

novel ridge
#

ImIllusion, are you the same dev that works on the Skyblock core etc.?

echo basalt
#

maybe yeah

#

haven't worked on that in a while

#

lot of ppl seem to know me by it

#

Lately it's been a lot of geyser + nms fuckery :)) and kotlin

novel ridge
#

Incredible how I get to communicate with an esteemed developer of the community haha

#

Surreal almost

echo basalt
#

am I esteemed?

novel ridge
#

I mean, you produce works for top end plugins so

#

I would consider you to be esteemed

hybrid spoke
#

the elite of spigot

novel ridge
#

If you produced bad work, then I doubt you would've lasted long haha πŸ˜›

echo basalt
#

πŸ˜› none of my public work is.. remarkable imo

novel ridge
#

Completely understandable, nobody offers expertise for free

echo basalt
#

I see my own code as "good" but not that much else

hybrid spoke
#
  • whats your "good"?
novel ridge
#

Yeah precisely

hybrid spoke
#

like in quality or readability and structure?

novel ridge
#

Good is very subjective

echo basalt
#

Good code and a good product are two different things

nova notch
#

my version of good is can i leave for a month and still understand the code when i come back

#

usually this is not the case

echo basalt
#

For example I can write some pretty crazy abstractions sometimes and using them is chill but it won't amaze the end customer because it's just.. backend

#

I'd say my structure is "wonky" sometimes, but any individual piece of it is easily readable

hybrid spoke
#

as a user my good is obviously quality
as a dev im a writer and architect

echo basalt
#

I'd say that where I shine is mostly at just reverse-engineering and managing to fully understand a system within a couple minutes

#

But that's no big deal in the world of "elite developers"

nova notch
echo basalt
#

I'm okay at writing proof-of-concept projects that can easily evolve into something fully-fledged without the need of a rewrite

#

What I do still need to work on is mostly just abstracting away networking and database logic

novel ridge
#

If you all had to give one tip to improve, say you understand the main OOP principles of Java etc., you have a basic/intermediate understanding of complexity associated with data structures and can impose algorithms on them to efficiently do X. next steps?

echo basalt
#

Probably try out different "niches" within the minecraft network scene

hybrid spoke
#

chase your needs

echo basalt
#

Always making sure to work on a project that allows you to learn something new while putting it to good use

#

I wanted to expand into minigame development so I took more projects around making minigames and stuff

river oracle
echo basalt
#

Then I wanted to do more proxy and infrastructure stuff so I wrote some more fucky code :p

#

Learn patterns, read books

hybrid spoke
#

always ask yourself what could be better

echo basalt
#

And rewrite your old utilities

river oracle
echo basalt
#

I still use some old 2018 code but it's being phased out :)

#

it's just placeholder stuff

novel ridge
#

I sometimes still get caught up on logically arguing with myself whether or not a protected final field within an abstract class is better than a protected/public getter. Semantics really, I've never really found an resources to give proper "rule of thumbs" to it

echo basalt
#

Why an abstract class :)

#

that's the real question

torn shuttle
#

as I become older I swear I care less and less about what I'm doing while prototyping

echo basalt
#

so your code becomes shit because you don't give a fuck

novel ridge
#

To combine fields and methods that are common to multiple classes

echo basalt
#

If yes use a getter

#

If no use protected fields

#

ezpz

torn shuttle
#

turns out I throw that shit out 80% of the time regardless because either there was a better way of doing something or I was patching a symptom and not the addressing the disease

novel ridge
#

honestly, i have never bumped into skeleton classes

#

though, reading up about them, how useful

echo basalt
novel ridge
#

i'd love better exposure to higher programming concepts

#

i'm currently at university and have breezed through most basic concepts within OOP and computational problems like data structures and algorithms

torn shuttle
#

I'm getting old man

#

I feel like I do as much HR and accounting as programming these days

#

well

#

and sales and team management

#

and I guess pr sort of

eternal oxide
#

just be richer so you can pay someone to do those jobs

torn shuttle
#

buddy

#

it's not like I don't

#

that also is a job

sly topaz
#

a year from now we'll start hearing about the greatness of haskell

torn shuttle
#

I'm actually super hyped because I am finally getting to do some programming-ass programming

#

adding a wave function collapse system to make infinite dungeons and cities in mc

sly topaz
#

I'm much more of a product manager than I've ever been a programmer tbh

#

I used to do a lot of programming when freelancing but that got boring real quick

novel ridge
#

Haskell looks painful 😱

torn shuttle
#

I like programming

sly topaz
#

you just don't get to do fun things when working for small-scale problems

novel ridge
#

i don't think that's entirely true, i still love my little tick distribution regeneration plugin

#

its like a little 3D printer haha

sly topaz
#

that isn't small-scale though, just limited scope for what's worth

#

what I mean by small-scale is a customer with a very specific demand at hand, which doesn't really care about how it is done, just that it is done fast

novel ridge
#

i suppose small scale is subjective as well then

sly topaz
#

if it is something you do yourself for fun, it might be a limited scope but you can implement it in the most complex ways if you really want, since the sky is the limit when it comes to that

novel ridge
#

i think it was the first plugin where i really achieved proper design, whenever i needed a specific addition, implementing it was so straightforward with the provided structure i created

#

that's true developer satisfaction

torn shuttle
#

the most satisfied I've been as a dev was to see people script things on systems I made where I genuinely was not able to guess how the hell they did it at a glance

novel ridge
#

that must be nice, i rarely get to do a peer project or more

#

i feel as if it is where i am lacking

torn shuttle
#

not peer projects, just a plugin that allows people to do scripting

novel ridge
#

exposure to new ideas and collaboration is nice

#

oh yeah, i get what you mean

torn shuttle
#

it's user contnet

sly topaz
#

see which one you like the most, stick to that community for a while

#

become a maintainer, get burned out by peer pressure, abadon the proj - that's just me

novel ridge
#

i'm somewhat out of touch with newer minecraft versions, still learning all the new features like persistent data containers etc.

#

i used to do a lot of packet stuff and nbt with 1.8

#

the golden years imo

river oracle
young knoll
#

Are you calling all the inventory stuff minor

torn shuttle
#

weird question but does anyone know of a program or website that will let me preview a schematic easily

#

schematic file from worldedit

#

(.schem)

viscid carbon
#

Should i be using DI for non instanced classes?

torn shuttle
young knoll
torn shuttle
young knoll
#

Well that’s all google I’ve got

hazy parrot
hybrid spoke
#

passing an interface?

drowsy helm
hazy parrot
#

Dk what is non instanced class

#

The only thing that comes to my mind is some kind of utility class

viscid carbon
# hazy parrot What does that mean

I have a static TasksFile instance
to get stuff from this by TasksFile.getInstance.method();

My TasksManager class is not an instance, doesn't have a contructor. should it be DI (Dependency Injection) instead?

hybrid spoke
drowsy helm
#

If it’s β€˜not an instance’ what is that returning

viscid carbon
#

no. My taskManager isnt an instance.

#

TasksFile is

hybrid spoke
#

im confused

drowsy helm
#

So taskmanager uses only static methods?

#

Also why is getInstance named like a function

viscid carbon
#

No taskmanager doesn't have any static methods.

 public static TasksFile getInstance() {
        if (tasksFile == null) {
            return new TasksFile();
        }
        return tasksFile;
    }```
Idk thats the way i learned a long time ago πŸ€·β€β™‚οΈ
drowsy helm
#

Oh you just didnt type it out fully

#

If it doesnt have static methods how are you accessing it?

viscid carbon
#

DI through constructors.

drowsy helm
#

I thought task manager doesnt have a constructor

viscid carbon
#

it doesn't. It just passes into my main class.

drowsy helm
#

Im still not entirely sure by what you mean with not instanced

#

If it doesnt have static methods and it’s not an instance, you cant access it

#

But either way, if it’s not a static utility class it should be passed through DI

rough ibex
#

I really don't think you should use static for this

drowsy helm
#

Im still curious on what non instanced means

novel ridge
#

surely you should instantiate the TasksFile to the field instance in a singleton?

wet breach
#

What that method does if you have everything setup correctly is ensure only a single instance of the class exists. If it doesnt exist it will create an instance

echo basalt
#

it's just a wrapper for lists

fading drift
#

what are maximum no damage ticks

sly topaz
# hybrid spoke bump

it is fine and well documented, but kinda over the top for a rather simple functionality. I would specialize the class a bit more to justify its existence

cedar flume
#

?paste

undone axleBOT
cedar flume
#

Hey,
Im trying to decrement an item in a dispenser. within the BlockDispenseEvent
and it does, but once the stack lowers to 2. it will not progress to 1.

if I only have 1 item in the dispenser, it also doesnt remove.
can anyone point me to what I might be doing wrong in this case? I feel I must be missing something simple..

Code:
https://paste.md-5.net/ayomiwalam.java

sly topaz
hybrid spoke
#

i f.e. use it for chat output

young knoll
cedar flume
sly topaz
young knoll
hybrid spoke
#

but that would destroy the generic concept

sly topaz
#

otherwise, I don't any reason to not just use something like Lists.parition(items, pageSize)

young knoll
#

so using a stack of 1 will remove one

hybrid spoke
cedar flume
young knoll
#

yes

cedar flume
#

Nice, il give it a go now

sly topaz
viscid carbon
#

Should my lang file be static?

sly topaz
viscid carbon
#

so i can just call LangHandler.instance().

hybrid spoke
hybrid spoke
#

in case anyone needs it

drowsy helm
#

theres no point implementing DI if you are just going to use a static instance getter on other things

sly topaz
#

that is fine, however since you asked for feedback I had assumed you wanted to improve on it. If you just shared it as a general utility class then, godspeed

hybrid spoke
cedar flume
# young knoll yes

Hmm, Inventory#removeItem seems to exhibit the exact same behavior it seems

young knoll
#

Delay it a tick

cedar flume
# young knoll Delay it a tick

That did the trick, thank you very much.
I wonder why?

bizarre that without a delay, it works from max stack size down to 2.
just not 2>1>0

with a delay getting the 2>1>0 to work also

drowsy helm
fading drift
#

I need to run something if a player gets below a certain y level. what would be the best approach

#

every tick check every player position (curent method)
is there a listener that plays when a player position moves or something?

hybrid spoke
#

playermoveevent or tickwise, doesnt really matter since its just arithmetic performancewise

fading drift
#

okay sweet

#

is either more safer?

drowsy helm
#

both are equally viable

#

but player move would make more sense

hybrid spoke
#

with playermove you dont need to listen for player quits Β―_(ツ)_/Β―

cedar flume
#

both are called alot
worth noting to keep operations to a minimum for performance reasons in those specific events

drowsy helm
#

a simple if statement is nothing every tick

cedar flume
hybrid spoke
cedar flume
fading drift
#

ill show code and see if its gonna be a performance issue

hybrid spoke
#

bet you would get more info by running it πŸ€”

fading drift
#

I doubt it would be anything noticeable but there just might be a better way to do things if I post it here

hybrid spoke
#

ah so we codereview, i mean yeah, go for it

fading drift
#
    public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();

        String worldName = player.getWorld().getName();
        if (BridgeUtils.isBridgeWorld(worldName)) {
            BridgeMatch match = BridgeUtils.getBridgeMatch(worldName);
            if (match == null) {
                throw new RuntimeException("Could not get bridge match.");
            }

            if (player.getLocation().getY() < VOID_LEVEL) {
                match.voidDeath(player);
            }

            double x = player.getLocation().getX();
            double z = player.getLocation().getZ();

            // if player outside the bounds of a 150 and 150 space, void death
            if (x < -150 || x > 150 || z < -150 || z > 150) {
                player.sendMessage(ChatColor.RED + "You went too far out!");
                match.voidDeath(player);
            }```
#
    public static boolean isBridgeWorld(String worldName) {
        return worldName.startsWith("matches");
    }

    public static BridgeMatch getBridgeMatch(String worldName) {
        return XinCraft.getInstance().getNewMatchManager().getMatch(worldName.substring(16));
    }```
#

utils as well for clarity

hybrid spoke
cedar saffron
#

go to help development they said, learn from peoples mistakes they said yap

cedar saffron
fading drift
#

I dont like the code either

hybrid spoke
#

probably mapping the matches to the worldname

fading drift
#

in a hashmap or a seperate object in a list

hybrid spoke
#

whatever map you desire, but yeah a hashmap

young knoll
#

I would use the world uuid instead

#

But yeah

#

You can also check if the move event is within the same block (compare from and to locations) and then skip the rest of the code if so)

hybrid spoke
#

^

fading drift
#

hows this look

#
    private final HashMap<String, BridgeMatch> matches = new HashMap<>();

    public BridgeMatch matchMake() {
        BridgeMatch match = new BridgeMatch("A");
        match.setTeamCount(2);
        match.setTeamSize(1);
        matches.put(match.getWorldName(), match);
        return match;
    }

    public BridgeMatch getMatch(String id) {
        return matches.get(id);
    }

...

    public static BridgeMatch getBridgeMatch(String worldName) {
        return XinCraft.getInstance().getNewMatchManager().getMatch(worldName);
    }

...

    @Getter private final String worldName;

    public BridgeMatch(String id_) {
        id = id_;
        players = new ArrayList<>();
        worldName = BridgeMatchManager.MATCHES_DIRECTORY + "/matches-" + id;
    }
#

should I switch from String to UUID object?

river oracle
#

not really necessary I wouldn't use a string ofr ID tho, I'd probably just have a global static integer you can increment on object creation

#

oh actually in the case where you're saving them to a file for some odd reason? I guess it'd be best to use UUID

fading drift
#

basically every match is a different world

river oracle
#

it kinda depends on your cleanup process

inner mulch
#

does somebody know a guide on annotation processors that process source annotations?

fading drift
#

havent even started writing that yet

river oracle
#

I think going with an int here is fine as long as you clean up after yourself

fading drift
#

would it be much faster? I feel like that would just be messier code

river oracle
#

because obviously if you have /matches-1 existing after your server restarts it'll cause issues

fading drift
#

yeah at server start I delete the whole matches folder

river oracle
#

you gain no extra insite by giving a string name versus an int name

fading drift
#

fair enough

#

so instead of labelling matches with A. B I should use 1, 2?

#

is that what you mean?

river oracle
fading drift
#

fair enough I just liked the look tbh

river oracle
#

the easiest way to track alphabatized names ends up being char codes anyways

young knoll
#

Clearly it needs a uuid

river oracle
#

and at that point its just an int

river oracle
#

makes little to no sense

young knoll
#

UUID is always needed

#

I give every object a uuid so i can be sure it’s unique

river oracle
#

why use UUID when you only need a temporary UID

fading drift
#

dont worlds already have a uuid

river oracle
young knoll
river oracle
young knoll
#

Fun fact, you can make a sub folder for worlds

#

By adding a / in the world name

young knoll
#

Actually probably safer to use File.seperator

fading drift
#

yeah thats what I do

young knoll
#

But still, weird way to make subfolders but I guess it works

fading drift
#

matches/match-A but now moving to matches/match-1

#

okay I've changed it to an int

#

how would I now get rid of the awful substring

#
    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();

        String worldName = player.getWorld().getName();
        if (BridgeUtils.isBridgeWorld(worldName)) {
            BridgeMatch match = BridgeUtils.getBridgeMatch(Integer.parseInt(worldName.substring(15)));```
#

I think the whole point of caching the world name string was so I don't have to substring it at all and I can just directly look it up

young knoll
#

Have a map of world uuid to BridgeMatch somewhere

fading drift
young knoll
#

Use getBlockY

fading drift
#

ty

#

whats the best way of placing and removing 10x10x10 sized structures

#

schematic lib? write my own read/load from file system?

young knoll
#

Could just use the worldedit api

#

Or the built in structure api

fading drift
#

good point

#

are there docs on the in built structure api

young knoll
#

It’s on the javadocs

#

See StructureManager

river oracle
#

Anyone know off the top of their head if any enums have been converted to interfaces yet

river oracle
#

ahhh inner enums have alr

hasty prawn
#

Does anyone perhaps know how to damage an Ender Dragon? I found this bug report, but damaging the EnderDragon instance with damage(4, DamageSource.builder(DamageType.THORNS).build()) doesn't seem to work, nor does calling damage() on the EnderDragonParts directly. The dragon just takes it like a boss and idk how to get him to not do that sadge

river oracle
#

I'll look at internals quick and see if I can find anything

river oracle
hasty prawn
#

Yeah I literally have no idea, it's super strange

#

setHealth() works so I'll just use that and play the hurt animations myself I guess

viscid carbon
#

When using DI does Bukkit.createInventory cancel it out? having this issue where its fine up till it gets to my create method and it says its null but doesn't anywhere else.

 @Override
    public Inventory createInventory() {
        int invSize = this.size;
        invSize = ((invSize / 9) + 1) * 9;

        return Bukkit.createInventory(null, invSize, color(String.format("&aTasks &7(&c%s&7)", this.size)));
    }```
#

Whole class

    private final PlayerDataManager playerDataManager;
    private final TaskManager taskManager;
    private int size;


    public TasksInventory(PlayerDataManager playerDataManager, TaskManager taskManager) {
        this.playerDataManager = playerDataManager;
        this.taskManager = taskManager;
    }

    @Override
    public void decorate() {

        int i = 0;
        size = taskManager.getTasks().size();
        System.out.println(size);
        for (Task s : taskManager.getTasks().values()) {
                Task task = taskManager.getTask(s.getName());
                InventoryButton button = new InventoryButton(taskManager.getIcon(task)) {
                    @Override
                    public void onClick(InventoryClickEvent event) {
                        Player p = (Player) event.getWhoClicked();
                        playerDataManager.startTask(p.getUniqueId(), task);
                    }
                };
                this.addButton(i++, button);
        }
        super.decorate();
    }
    /**
     * @return
     */
    @Override
    public Inventory createInventory() {
        int invSize = this.size;
        invSize = ((invSize / 9) + 1) * 9;

        return Bukkit.createInventory(null, invSize, color(String.format("&aTasks &7(&c%s&7)", this.size)));
    }```
agile anvil
#

And it seems you never define size

tiny forge
#

Looking for a web developer for a Skript code generator AI website, the pay is the Skript AI, dm me if you want more info, or ping me

undone axleBOT
nova notch
#

what does spigot have to do with skript or web development

tiny forge
#

Dunno

cedar saffron
#

skript is gonna take over

#

according to this guy

nova notch
#

i actually tried skript for like a week and that shit is worse than scratch

#

couldnt even figure out how to make a fuckin variable without like an hour of google

blazing ocean
#

Skript devs trying to make good syntax challenge (impossible)

orchid gazelle
#

Skript is garbage

quaint mantle
#

Yo

#

Player.sendActionBar

#

Is deprecated

#

What should i use

eternal oxide
#

Player.spigot().send...

pseudo hazel
#

are you on paper?

quaint mantle
#

oh yeah you right

#

im sorry

#

i recently changed

#

that's why i keep askin here

#

im so sorry

pseudo hazel
#

if something is deprecated it usually means paper wants you to do it differently

quaint mantle
#

They deprecated in favor of adventure components

vagrant stratus
#

Here's a fun challenge. What's a good way to implement item tracking for stackable items? e.g. tracking a specific item between drop, pickup, inventory movements etc. Modifying the PDC for non-stackable items is feasible, only because they're unstackable already so it doesn't matter. Gonna use this for moderation stuff, if even possible to implement lol

eternal oxide
#

it would be impossible for a stackable item as once merged it no longer exists

pseudo hazel
#

they would need to merge tracking numbers

eternal oxide
#

Player has one item, picks up a second, it stacks so only one item exists. When he drops one which did he drop?

pseudo hazel
#

but then you would need an external system keeping track of it

vagrant stratus
pseudo hazel
#

but yeah you lose that information

vagrant stratus
#

Unless I pool UUIDs and assign at random, based off player & previous UUID history

pseudo hazel
#

unless you keep track of all changes to an item stack in some kind of manager

eternal oxide
#

The only way is to have a very comprehensive tracking systme, but you'd have to decide on discard order and always use the sme

vagrant stratus
eternal oxide
#

first in first out, or last in first out

#

it gets even more complex when the player splits a stack in their inventory

pseudo hazel
#

yeah

#

or just spreads out a stack

quaint mantle
pseudo hazel
#

and what about crafting

#

or throwing an item in the void/lava

#

/despawning

vagrant stratus
#

You'd likely just do

crafted - UUID
 merged uuids:
  list

for crafting

eternal oxide
#

I'd not even attempt to write it

pseudo hazel
#

right, ids would be converging

vagrant stratus
#

I'm sure it's possible, assuming one does not try to be exact and goes off player & past history.
The issue at that point is just matching sure the UUID's history is exact, which is slightly easier than trying to get it perfect

pseudo hazel
#

and when you split a stack you would have several stacks with the same id, which doesnt make sense

#

unless you keep track of that and assign new ids

vagrant stratus
#

That would likely be feasible.
Stack ID & Item ID

pseudo hazel
#

what is an item id

#

in this case

vagrant stratus
#

Probably a randomized UUID or something along those lines. An identifier basically

pseudo hazel
#

and what is a stack id

#

like why the separate ones

chrome beacon
#

I've seen this done before

vagrant stratus
#

Could omit the stack identifier, however, it would be useful to log the stacks it's been in

vagrant stratus
chrome beacon
#

Yeah that wasn't public

#

A stack would essentially be stored with a list of item ids items in it (ordered). And whenever the stack would split you'd modify the stacks to take out the ids

pseudo hazel
#

right but you have to arbitrarily split out the ids