#help-development

1 messages · Page 556 of 1

remote swallow
#

i do both

river oracle
#

only thing annoying abt paper is they deprecate all legacy things

#

otherwise the api is fine

remote swallow
#

kinda forgot to save the paste

wary topaz
young knoll
#

The api that never comes upstream

young knoll
#

😔

wary topaz
#

wdym how

remote swallow
#

how does buildtools not work for you

#

you still arent saving the pastes

#

fun

river oracle
#

its fun

young knoll
#

Because the api isn’t I N F I N I T E

#

Sadly

river oracle
wary topaz
#

this is how you do it?>

remote swallow
#

correct

wary topaz
#

holly shit

#

should I use nms in my plugin?

young knoll
#

Do you need it

wary topaz
#

yes

#

kindof

young knoll
#

Then sure

#

If you need it you kinda have no choice

remote swallow
#

?paste ur plugin.yml

undone axleBOT
river oracle
#

looks like your command name isn't in your plugin.yml

wary topaz
#

i need to edit nbt data

young knoll
#

Well

remote swallow
#

use nbt api

young knoll
#

Vanilla NBT data is exposed with the api

river oracle
#

1.8 needs to touch Nms a ton but newer versions less and less every version

remote swallow
#

you really dont want to make nms modules for every version with 1.8 to 1.20

young knoll
#

Kek

wary topaz
#

true

#

also is there really a big difference between spigot api and bukkit?

river oracle
#

code?

#

yes

wary topaz
#

name one

young knoll
#

Spigot api is mostly just the chat component stuff

remote swallow
#

we have components

wary topaz
#

true but you cna just make a simple function to do chat stuff

remote swallow
#

go add components to item lore

#

its very fun

wary topaz
#

o lol

river oracle
#

which line is line 25

young knoll
#

Quick someone ping choco

wary topaz
#

lmfao

#

createLobbyCommand code?

river oracle
#

mm

#

thats not the issue

#

do you have anything to read the inside of a jar file

#

check the plugin.yml inside the jar

wary topaz
#

damnn

#

whats your plugin.yml saying

river oracle
#

java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "com.CTF.src.CTFPlugin.getCommand(String)" is null according to this your command is null

young knoll
#

Man bought a winrar license

wary topaz
#

yeah its free if you just reinstall it

young knoll
#

Do people not just use 7zip

wary topaz
#

winrar is faster

river oracle
#

try recompiling it and putting it back in

wary topaz
#

I tested it unzipping java 8

river oracle
#

you may have just not updated it or something

young knoll
#

Who unzips a java

wary topaz
#

like JAVA

young knoll
#

That’s what decompilers are for

wary topaz
#

well you gotta unzip the file

young knoll
#

No you don’t

wary topaz
#

ya

young knoll
#

What

vagrant stratus
#

You can decompile it

young knoll
#

Just shove the jar in the decompiler

wary topaz
#

openjdk-10_src

#

5 gigabytes XD

young knoll
#

What about the other 11 months

wary topaz
rough ibex
#

I may be stupid

vagrant stratus
#

In other news:

I'm trying to figure out a good way to handle database and realtime cache updating.
Currently it's handled via multiple HashMaps (Caching) and loading from an SQLite database (multiple tables, 1 for each HashMap) x amount of hours. This is not ideal for something that should be real-time.

wary topaz
#

why are you calling "this" if you dont even use it just use new Command();

rough ibex
#

"This post may contain erotic or adult imagery."

wary topaz
#

lmfao

#

its fine lol

#

"I checked" lmfao

young knoll
#

Yeah Imgur is wack

vagrant stratus
#

The DB will be updated. I'm not too sure you can update it via third-party means

wary topaz
#

I made this meme lol

young knoll
#

Oh no you log a custom message when it enables

#

Burn it

vagrant stratus
#

On start - Load database. This is simple

On database update - Get the table & value and then update the correct hashmap

zenith gate
#

?paste

undone axleBOT
wary topaz
#

lul

zenith gate
#

no thats for me

#

lol sorry

vagrant stratus
brave sparrow
#

Let me take a look see

vagrant stratus
#

I would still need a way to listen for and pull updates w/o just reading the entire DB again. Although I can see if that's possible

wary topaz
#

chatgpt lol

vagrant stratus
#

Which I'd prefer not doing since it would be costly with a large amount of entries, no?

young knoll
#

If it exists it’s a language

brave sparrow
#

@vagrant stratus why are you trying to load the entire thing into memory

brave sparrow
#

This is the exact use case of a database pretty much

young knoll
#

I can’t imagine it’ll always put the entire db in memory

#

What if the db is bigger than the heap

brave sparrow
#

By default it does not load the entire database in memory no

#

You can specify to have SQLite use an exclusively in memory database if you want

#

But that then has to be written to disk

#

I would not recommend using M$SQL lol

vagrant stratus
#

I did say "currently", never said I was against something better

brave sparrow
#

Use MySQL or MariaDB or PostgreSQL or something

orchid trout
#

sqlite

tender shard
#

so you got a nullpointerexception when registering your command executor, and you also got the "usage" message (by default /<command>) when entering the command

vagrant stratus
brave sparrow
#

@vagrant stratus it doesn’t matter if it’s SQLite, that will still be able to handle queries of a large amount of data just fine

echo basalt
#

microsoft access

young knoll
#

Ah yes

brave sparrow
#

@vagrant stratus the main trade off with caching is that you have to accept serving some level of stale data, you can’t really get around that unless you’re going to use a centralized service to handle the caching and the database interaction

young knoll
#

Excel, the best database

remote swallow
#

excel, the best csv viewer

tender shard
#

but you did get a NPE although you said you didn't get any errors and refused to send your log

remote swallow
#

i store all my data in csv

wary topaz
#

phpmyadmin lol

tender shard
#

maybe you did after 20 minutes

wary topaz
#

damn

vagrant stratus
remote swallow
rough ibex
#

wait what is the top right

echo basalt
wary topaz
#

lmfao

vagrant stratus
#

Lmao, updating my Anti-Malware by making it remote

rough ibex
#

oh its not a programming language

#

fucking kek

brave sparrow
vagrant stratus
#

You clearly don't know Spigot's malware scene kek

brave sparrow
#

There’s nothing inherently wrong with caching

wary topaz
#

just use ch mod

vagrant stratus
brave sparrow
#

You would just only expire the key when the data is updated

#

I haven’t seen your error

#

Send it

#

You don’t want to put a TTL on it if you want a persistent cache

#

No you don’t

onyx fjord
#

command isnt in plugin.yml likely

wary topaz
brave sparrow
#

@analog basin optic wants the cache value to stay in the cache until the database gets updated

#

It should never be changed by an external source

onyx fjord
#

and code?

brave sparrow
#

That would not be a persistent cache, that would be an expiring cache

wary topaz
#

what is your plugin.yml

onyx fjord
#

dont use onLoad

brave sparrow
#

That’s the exact opposite of what optic wants

onyx fjord
#

use onEnable

echo basalt
#

lmao imagine not having a proper gui lib that makes you actually enjoy the process of making guis

wary topaz
#

I n eed one so badly

brave sparrow
#

It’s not a stale cache because whenever the database is updated, the cache values affected are expired

vagrant stratus
tender shard
#

Yikes it took slimefun 4 months to merge my pull request

wary topaz
#

for f**** sake my friend has a button class for gui making

young knoll
#

What did you pr

brave sparrow
#

In which case it’s no longer a persistent cache lmao

tender shard
onyx fjord
#

my caching system is the best

#

it has ttl and all that shit

brave sparrow
#

The trade off is that if you’re only going to write rarely, it makes sense to leave it in the cache indefinitely

echo basalt
#

that's the basics

wary topaz
#

anyone have a gui lib I can steal now that illusion brought up the topic

echo basalt
#

I have an interface instead

wary topaz
#

wait really

brave sparrow
#

There’s no need to self refresh because the data will only be written a few times

wary topaz
#

WTF

wary topaz
#

it would be a waste of time as my guis are already hard coded

brave sparrow
#

Yes, if your reads are substantially more frequent than your writes

vagrant stratus
onyx fjord
#

why

wary topaz
#

bro was using onLoad instead of onEnable

onyx fjord
#

less than 30

wary topaz
#

🧠 :fart:

onyx fjord
#

i had to open a browser

#

and load the link

young knoll
#

I forget onLoad exists most of the time

onyx fjord
#

so thats minus 5 secs

fervent robin
#

Hey do you think there is any improvements I could make to my project structure?

wary topaz
#

only use onLoad for like mysql

onyx fjord
#

utils are generally classes with no public constructor that have static methods

opal carbon
#

damn never even heard of onload

fervent robin
#

True

#

ill fix that anything else?

onyx fjord
#

i would rename events to listeners

#

because they are listeners right?

#

np

young knoll
#

Isn’t it better to have packages names be singular

fervent robin
#

wym

#

like manager instead of managers?

onyx fjord
#

these names are pretty confusing

young knoll
onyx fjord
#

because you dont know what they do

#

without looking at package

chrome beacon
opal carbon
#

events i would assume they define their own events

young knoll
#

Fair enough

onyx fjord
#

i'd rename to like PVPListener, RegionCheckListener, SQLLIstener

fervent robin
#

Alright

onyx fjord
#

if they are listeners ofc

#

but they are correct?

fervent robin
fervent robin
onyx fjord
#

then rename package

#

listeners arent events

#

listeners listen for events

young knoll
#

Police police police police

onyx fjord
#

i would include to the class names what the class really does

#

for example

#

HelpCommand

#

ToggleArenaCommand

#

or at least Cmd

#

also what does GetLB mean?

fervent robin
#

lb = leaderboard

young knoll
#

Lemon balls

fervent robin
#

💀

onyx fjord
#

GetLeaderboardCmd then

#

thats what i would call it

vagrant stratus
#

@brave sparrow as for rough specifics for DB content

~7 tables, with 821 being the current highest column count in a single table.
The new DB once finished will have 10s of thousands of entries in a single table

fervent robin
#

i mean that kinda specifies what they do

fervent robin
#

alright

onyx fjord
#

you have to look at imports

#

and sometimes theres a lot of them

brave sparrow
onyx fjord
#

its always a good idea to specify what class does

#

in its name

#

or what it is

fervent robin
#

Ok I have fixed all the mistakes listed so far here is current structure:

vagrant stratus
onyx fjord
#

looks much better already

#

i personally add word Util to all my utils

#

so its easier for ide to find

#

or Utils

#

but stick to one naming scheme

fervent robin
#

alright

#

thanks for the help

onyx fjord
#

np

echo basalt
#

I put my lib stuff on my utils package

#

and have like individual folders

#

so I can copypaste them across projects

vagrant stratus
eternal oxide
#

be careful using the same package names for utils across packages

echo basalt
#

I don't do that

#

it's always me.illusion.project.utils

eternal oxide
#

good. I got hit by that one in the past

echo basalt
#

I've been doing java for long enough

#

trust me on this one

vagrant stratus
opal carbon
#

got lucky though

remote swallow
echo basalt
#

I still want to buy illusion.dev

#

and I can

#

but I don't want to fork over 150$

remote swallow
#

ask ur boss for a bonus

echo basalt
#

last time he gave me a bonus it was 7 grand in crypto

#

that got stolen while I was playing apex

young knoll
#

It’s now worth $10.57 anyway

echo basalt
#

I sent him a goofy figurine a couple months ago and he just sent me a video of him at disneyland pointing at goofy and asking "is your name <my real name>"

echo basalt
#

it started at 400$

#

went to 7k in like 2 days

#

and now it's chilling

#

dude's fine getting us all any kind of subscriptions we want

#

I asked for a 1 year copy of yourkit and he just paid no questions asked

#

but a domain name?

young knoll
#

Weird man

echo basalt
#

he just has a ton of cash and wants to leave something for the community to enjoy

#

and by a ton I mean like

#

he offered to buy me a kitted out macbook just because

young knoll
#

What’s he leaving

echo basalt
#

a minecraft server borpaPointLaff

#

that's been in the works for over a year

young knoll
#

I see

#

Is it hypixel 2

echo basalt
#

nope

#

I do want to expand into minigames but like

#

can't bother writing countdown logic

young knoll
#

I like how that’s the limiting factor

#

Just a countdown

echo basalt
#

it's just

#

braindead code

#

unlike what I do in the day-to-day

#

my task for this week was to write uhh

cold pawn
#

Anyone know how I can fix this Cannot invoke "net.minecraft.core.Holder.a()" because "var0" is null error? I'm trying to create a respawn packet using protocolLib, to change a players skin, using it to refresh the player. I've tried various methods but it seems that I always get this issue. Any thoughts? Also im using 1.18, in-case you were wondering.

echo basalt
#

player housing with furniture

remote swallow
#

im braindead

young knoll
#

Interesting

echo basalt
#

did it in like an hour

young knoll
#

I’m curious what this never before seen tech is

remote swallow
#

illusion what server is it

echo basalt
#

something to do with the ability to place images on maps with any block offset

#

or the ability to play passpartout in minecraft and start painting shit

#

or maybe the concept of having a spray can and doing grafitti on any wall

brave sparrow
remote swallow
#

oh alex, now that someone bought mineplex do you still work there or are you not in it

echo basalt
#

or how we use subdomains to track players

echo basalt
fading bear
#

Anyone knows how to create placeholder players like in the adventurelib tablist example? MCC Island did the same too, do I need to use Protocollib?

brave sparrow
echo basalt
#

true

#

but the code's ass

#

so did you guys keep the tech debt or did y'all nuke most of it

brave sparrow
#

Most of the code in that leak is no longer used or even present in the repo

echo basalt
#

because it was quite a big project

remote swallow
brave sparrow
#

It’s still a rather large project but it’s been pretty substantially redone

fading bear
echo basalt
#

bet

#

I remember applying a few years ago when I was a clown and never getting a response

#

I wonder if y'all still looking

brave sparrow
#

Well we’re still getting back up and running at the moment

echo basalt
#

and if y'all pay more than 15$/hr

hybrid spoke
#

they are looking for good devs

young knoll
#

Gottem

echo basalt
young knoll
#

I remember playing bedrock mineplex

#

Mob arena is really easy when the mobs move at 1 block per miniute

echo basalt
#

It's alright I'm still in time to become competition

brave sparrow
#

When I was a starter dev several years ago I think our hourly rate for that was around $20/hour

fading bear
young knoll
#

Then why did you circle the header and footer

fading bear
young knoll
#

I see

#

Well yes you need to use packets

fading bear
#

Is there even docs for that?

echo basalt
#

lol no

hybrid spoke
#

insert a screaming md5 here

vagrant stratus
#

tbf I don't think there's proper API for it

fading bear
#

Wiki.vg is such a great resource for so many things but there's a lot of errors as i recall

hybrid spoke
#

that is indeed all

fading bear
#

Well, i guess I'll do that one day... When i have time

vagrant stratus
fading bear
#

Also, again if anoyone knows, I'd be really interested to know how to create my own plugin APIs. Like a plugin that manage chat, another one for queuing system, etc... So when I create a new project i just have to add the ones I need and I have already half the work done

echo basalt
#

It's called

#

writing good code

young knoll
#

I just have a standard library that I shade into everything

echo basalt
#

I have a bunch of folders I copypaste

young knoll
#

It’s not meant for specifics like chat tho

vagrant stratus
young knoll
#

Ew copy and paste is effort

echo basalt
#

just select the folder

vagrant stratus
#

Yea, do a python script you nerd

young knoll
#

Effort

#

Just shade

fading bear
#

lmao, I don't know how to do all this

vagrant stratus
#

Learn assembly just to copy folders to a specified directory

fading bear
#

Not worth it

young knoll
#

I feel there are at least 20 better ways to do that Xd

fading bear
whole stirrup
#

When making a plugin is there any reason to use the Paper API instead of the normal Spigot API as a maven dependency?

glad prawn
#

Is there a way to retrieve the uuid from the no-player event?

young knoll
#

If you use the paper api it won’t run on spigot

vagrant stratus
#

And a decent-ish sized chunk still used spigot

whole stirrup
#

Does the Paper API have stuff the regular Spigot API doesn't

young knoll
#

Yes

glad prawn
vagrant stratus
#

But they're also stupid and make dumb choices

young knoll
#

What event

echo basalt
#

wdym no-player event

#

PlayerQuit?

young knoll
#

PlayerNotExistEvent

echo basalt
#

PlayerThanosSnapEvent

vagrant stratus
#

16 servers use Yatopia, tf

young knoll
#

Lol

glad prawn
#

i mean from events not have getPlayer or getEntity option.

echo basalt
#

probably the devs making more malware

vagrant stratus
echo basalt
young knoll
#

Damn cat server is close to Bukkit

#

Idk which is worse

vagrant stratus
young knoll
#

Fair but at least that is lower

vagrant stratus
#

Getting there

quiet ice
#

Mohist? Isn't that age-old technology?

vagrant stratus
#

yes

#

735 servers are using it though kek

quiet ice
#

Same with catserver. Is that even maintained these days?

vagrant stratus
#

1426 for catserver

quiet ice
#

Though I guess bukkit isn't maintained either

vagrant stratus
#

I think it's updated though

#

Yea, it's got a 1.19.4 branch

young knoll
#

Isn’t magma the more active one

#

Idfk

vagrant stratus
#

The 1.16.5 branch was last updated 2 weeks ago

glad prawn
young knoll
#

What event

#

What generator

#

What

vagrant stratus
#

Still no proper 1.19.4 or 1.20 branch for CatServer

glad prawn
#

CustomOregen plugin lmao

young knoll
#

Purpur is a fork of paper

#

That does… idfk actually

vagrant stratus
#

no idea either lmao

quiet ice
#

Sponge will support 1.19.4 via SpongeForge though as it seems like

vagrant stratus
#

it just.... exists

young knoll
#

Good for sponge

#

I wish bStats wasn’t dead :(

vagrant stratus
#

what

young knoll
#

Idk seems pretty inactive

#

Afaik you still can’t make bar graphs or remove default graphs

vagrant stratus
#

I mean.. it's still up, unless you mean the repo

remote swallow
#

we still dont have bar graphs

young knoll
#

Okay well

#

Inactive

vagrant stratus
#

well

#

get rekt nerds

young knoll
#

We need bStats 2

remote swallow
#

bar graphs would be great be feature lists

young knoll
#

cStats

vagrant stratus
#

Yea, a lot of stuff is just a fork of paper

remote swallow
#

you can do it

young knoll
#

No thanks I don’t have the money for the servers

vagrant stratus
#

Even I'm doing a paper fork kek

young knoll
#

There’s like 19484737374 forks of paper and spigot

remote swallow
vagrant stratus
#

*I don't want too, but it's the most popular server software lmao

young knoll
#

Ah yes one oracle VM for all that traffic and storage

young knoll
#

You see what you do is remove a bunch of vanilla features

#

Then advertise that it’s faster

vagrant stratus
young knoll
#

0/10

#

Won’t buy

vagrant stratus
#

It'll be free kek

remote swallow
#

wont download

vagrant stratus
#

Paper: 78,602 servers
Spigot: 36,600 servers

#

If I want the highest chance of it being adopted, forking paper is the way to go lol

young knoll
#

We need md_5 with a gun

vagrant stratus
#

It goes from Oh fuck, API is missing to Oh hey, extra security AND it's drag & drop?

#

Third-Party stuff related to running the server, easier to just make a paper fork than fuck around w/ it

remote swallow
vagrant stratus
#

The problems I'm having? Yes, for what I'm trying to do specifically. It happens to be that the easiest route is just forking paper instead of figuring out how to do the same thing but third-party

#

bytebuddy fucking sucks

young knoll
#

Add mixins and I’ll use it

#

Kek

vagrant stratus
#

but why lmao

young knoll
#

Yes

vagrant stratus
young knoll
#

Just learn raw asm

vagrant stratus
#

That wouldn't help

#

I have to make changes at arbitrary points within methods... in multiple classes

#

Easiest to just fork paper

young knoll
#

Mixins can do that

#

Heh

vagrant stratus
#

I'd still need a paper fork + mixins, might as well just make a paper patch that others can use

young knoll
#

Shh

#

Not the point

vagrant stratus
#

You ain't getting mixins kek

young knoll
#

Fine I’ll just use ignite

#

Or PR things like a peasant

vagrant stratus
#

It's just not worth it lmao

young knoll
#

Fair

#

I mean uhh

#

Back in my day we made entire games in assembly

vagrant stratus
# young knoll Fair

Yea. If Paper wasn't so easy to fork, I'd deal with it buut it's not worth it lmao

#

Some will use it, I highly doubt it'll be mainstream. It's just meant to give extra protection while still supporting the most common server software

young knoll
#

Call it condom

vagrant stratus
merry viper
#

{"type":"minecraft:diamond_sword","item-meta":{"enchants":["DAMAGE_ALL:5"]}}

lusty forum
#

What's the best way to connect Minecraft with discord? Want to create a "connect" command which sends a link to the plater and he can click on autorisize on the discord website (oauth I think) but I don't understand it...

#

And than a mySQL table with the Minecraft uid and the discord id

#

Or is there a better way?

tender pond
#

Anyone know the best way to detect whether a Sign is waxed or not? I can't see any new additions to the API to check whether a sign is waxed or not in 1.20

young knoll
#

Should be isEditable

robust zenith
#

Good evening everybody. I am trying to do a throwable axe or something like that but i do not want any help from the internet, i just want to understand what's going wrong

tender pond
opal carbon
#

so you do /link on mc, it gives you a code, and you dm it to the bot or do a command on the discord bot and then yay

echo basalt
#

.

#

bruhz

copper scaffold
#

This is the code from the enchantment:

Enchantment TELEPATHY = new EnchantmentWrapper("telepathy", "Telepathy", 1);

Enchantment Table code

@EventHandler
    public void onEnchant(PrepareItemEnchantEvent e){

        if(e.getItem().getType() == Material.NETHERITE_SHOVEL){
            if(Math.random() < 0.2){
                e.getOffers()[1] = new EnchantmentOffer(CustomEnchants.TELEPATHY, 10, 1);
            }
        }

    }
young knoll
#

Okay

#

And

copper scaffold
#

How can i make it work that it is shown in the enchanting table?

young knoll
#

You can’t

#

Custom enchantments won’t display properly

#

Because the client doesn’t understand them

copper scaffold
#

oh okaz

#

thx

sharp bough
#

is there any way to save an inventory to sql other than serializing each item and saving it into a row with a slot id? if im not mistaken i remember seeing a serializer that would take a full inventory and convert it to base64 by converting each item to byte array

public static byte[] serialize(ItemStack itemStack) throws IOException {
        itemStack = NBTIManager.cleanItemOfGuiTag(itemStack);

        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream);
        dataOutput.writeObject(itemStack);
        dataOutput.close();
        return outputStream.toByteArray();
    }

    public static ItemStack deserialize(byte[] data) throws IOException, ClassNotFoundException {
        ByteArrayInputStream inputStream = new ByteArrayInputStream(data);
        BukkitObjectInputStream dataInput = new BukkitObjectInputStream(inputStream);
        ItemStack itemStack = (ItemStack) dataInput.readObject();
        dataInput.close();
        return itemStack;
    }
#

thats what i have, but im looking for a better option

#

i need to save the items in a sql database that only accepts primitive types

#

using sqlite

drowsy helm
#

Then serialize the array

sharp bough
#

thats what i already have

#

and i want something better if theres anything

noble lantern
#

advocate for mongodb and pojo classes here

drowsy helm
#

Whats better then that?

noble lantern
#

pojo is

young knoll
#

But my host doesn’t offer free mongodb server

noble lantern
#

atlas does

young knoll
#

:(

noble lantern
drowsy helm
#

Idk why you wanna improve something that already works

noble lantern
#

sounds complex

young knoll
#

I mean you could cheat

noble lantern
young knoll
#

And just turn it all into bytes

#

But at that point why use sql

noble lantern
#

wtf

drowsy helm
#

Download it from the java website same way you would on windows

young knoll
#

JREs got twitter canceled

noble lantern
#

back in my day we had to install jre and jdk's seperatly 👴

#

i remember that being a thing when i first launched a pc

#

couldnt get it working for like 3 hours and i was crying my eyes out

young knoll
#

I remember when java 8 was the modern java :(

#

And 1.8 was the modern mc

noble lantern
#

1.7 was a bangar i wish i was old enough to know how to mod back then

drowsy helm
#

Python superior? Lmao

noble lantern
#

who remembers Flying Squid JS

#

i think its still in dev too

worldly ingot
#

There are a bunch of those

noble lantern
#

i literally just linked one

#

oh

worldly ingot
#

You're wanting Glowstone

#

Glowstone is the only other ground-up, no Mojang code server that implements the Bukkit API

hardy comet
#

hi, i'm just starting out and i'm using the "Creating a blank Spigot plugin in Eclipse" guide. however after step 5, i get the error "The type org.bukkit.plugin.java.JavaPlugin is not accessible"
i've already tried searching online for a fix, and i made sure to include the spigot api shaded file in the project (it's in "Referenced Libraries" if that helps)

young knoll
#

Is glowstone still active

worldly ingot
#

I want to say they're still stuck on 1.12

vagrant stratus
#

Probably are

young knoll
#

Sad

worldly ingot
#

Active, yes, but not up to date

vagrant stratus
drowsy helm
young knoll
#

1.19 is so 4 days ago

vagrant stratus
#

They're just super slow lmao

#

Not even datapacks, just everything in general. e.g. entities, packets, inventory, modding api, etc, etc, etc

drowsy helm
#

Show your proj setup

vagrant stratus
#

It'll be multiple version before everything is fully implemented

worldly ingot
#

It's also a very incomplete project. I don't believe everything is done

vagrant stratus
#

It's not

worldly ingot
#

There may be some non-functioning blocks, entities, or other features

vagrant stratus
#

Glowstone is not finished. Nothing is guaranteed to work, though many things are likely to. If in doubt, file an issue.

hardy comet
young knoll
#

Nah it’s coming in 1.73

hardy comet
#

(for sharing images)

worldly ingot
#

I mean keeping up with Mojang is very difficult. It's not easy to write a server from the ground up, and not only that, keep up with Bukkit which commits practically daily

young knoll
#

?img

undone axleBOT
drowsy helm
#

Yep

vagrant stratus
#

Plugin API i.e. modding the server to impl things

sullen marlin
#

java edition discontinued when

coarse finch
#

so i forked a discontinued repository and updated the namespace (from ac.grim.grimac to me.alecjensen.grumm) and now im getting this error. org.bukkit.plugin.InvalidPluginException: Cannot find main class 'me.alecjensen.grumm'
i have combed through the code and i cant see anything that would be causing this

noble lantern
sullen marlin
#

need to edit plugin.yml

vagrant stratus
young knoll
#

If they cancel java edition I’ll have to learn cpp

#

Well not really behaviour packs are pretty good

noble lantern
#

is bedrock on cpp? or c#?

young knoll
#

cpp

sullen marlin
#

c++

noble lantern
#

nooo r_baby_cry why not c# fawk

sullen marlin
#

ridiculously fragile as a result

vagrant stratus
#

You have to implement the entire protocol for it to be complete 😄

sullen marlin
#

look at it wrong and the whole thing crashes

coarse finch
vagrant stratus
#

no

noble lantern
#

but 64 render distance no fps drops11!!!!!!1!

vagrant stratus
#

ban

coarse finch
#

no

vagrant stratus
#

Choco, we need another kick

young knoll
#

Man everyone is a hoe for rust these days

sullen marlin
#

microsoft not porting java to console/mobile was their biggest mistake

noble lantern
#

minecraft needs LODs soooo bad

sullen marlin
#

having two versions of the game is ridiculous

worldly ingot
#

Possible? Yeah absolutely. But you're going to be working around the clock for at least a year or two before you even reach parity with 1.20, and by that point they'll have released 1.22

#

And that's also assuming you're writing perfect code with no bugs

young knoll
#

Which I always am

hardy comet
vagrant stratus
#

but you'd still need to impl base MC stuff kek

#

You still have to impl a fuck ton of stuff 😄

vagrant stratus
#

That's the fun part, packets change

#

In newer versions, yes

#

Some get dropped, renamed, modified, etc, etc

#

hell even the world format changes

sullen marlin
#

what are we even arguing

#

yes it is possible to make a custom server; no it is not possible without huge amount of time and effort

worldly ingot
#

It's not an argument. It's a hypothetical. Glowstone 2.0 lol

young knoll
#

Just use the existing server but write a better api

vagrant stratus
#

You'd have the most luck going server version to server version and re-implementing everything lmao

young knoll
#

We’ll call it faucet

livid dove
vagrant stratus
#

You can't

#

It has to be 1:1 to the client

sullen marlin
#

I still dont understand what we are arguing

livid dove
vagrant stratus
#

pügge here wants to make yet another from the ground up server

young knoll
livid dove
vagrant stratus
young knoll
livid dove
# sullen marlin I still dont understand what we are arguing

Don't wanna bring it up again here btw, but if what I've heard is true and u were the one who added snapshot functionality to inventory.getHolder, would you mind if we had a discussion about it as it has fascinated me and I'd love to hear more of the low-level side.

#

Dns maybe

#

*dms

sullen marlin
#

BlockStates are always snapshots and the only block that can hold an inventory is a BlockState

#

there's not really much more to discuss, I didn't design that part of the API, it's at least a decade old

young knoll
#

So we need to contact dinnerbone

#

Or maybe Grumm

noble lantern
#
  • it was always reccomended not to use it for many years now (but we still do tbf)
drowsy helm
#

because you cant achieve some things without nms

young knoll
#

In a perfect world people would PR everything

#

Although even then not everything would be accepted

#

No

drowsy helm
#

we have remapped

livid dove
young knoll
#

Api is meant to abstract packets

drowsy helm
#

someone has to maintain the api for that

#

remapped is easier

#

as well as docs

vagrant stratus
sullen marlin
vagrant stratus
young knoll
#

Convince MD :p

noble lantern
#

they are using getHolder() as a means to identify the inventory, not for anything related to the block (i think)

livid dove
young knoll
#

That’s what protocollib is for

#

Or packet wrapper

#

Yes

drowsy helm
#

ProtocolLib sucks

sullen marlin
#

only optionally

livid dove
sullen marlin
#

by default protocollib makes you read the packet structure yourself

young knoll
#

A janky raw packet api is not good api design

livid dove
#

Oh right sorry mb

#

Thought u meant my bit haha

sullen marlin
#

will never be added because you cant do that in a version independent way and the point of the API is version independence

#

it undermines the entire API

vagrant stratus
#

That still goes against the point of the API

drowsy helm
#

more in the sense of api upkeep

young knoll
#

Just add mixins! Problem solved

vagrant stratus
#

NO

young knoll
#

||/s||

sullen marlin
#

aka ProtocolLib

drowsy helm
#

so protocol lib?

noble lantern
#

you arent touching the nms tho

livid dove
# sullen marlin what are you trying to do, by calling getHolder presumably you are wanting the b...

As a minimum, it'd be nice tk have in the documentation a big thumping warning to use it with care.

I say this as on investigating it does legit seem to be a decentlyncommon resource sink that's led to the idea custom items are universally bad for performance.

In reality half the plugins out there make snapshots every single click of an inventory, so if that inventory has lots of lore custom items.

vagrant stratus
# sullen marlin aka ProtocolLib

I guess it makes some sense... but I'm not sure how you'd translate every packet received to a generic enough API class 🤔

drowsy helm
#

so what if it does?

#

the spigot api would use nms either way whats the difference between putting behind a facade

noble lantern
#

custom items plugins are laggy because of theyre listeners and how much SHIT they handle for every damn event that happens on the server

glad prawn
#
Generator generator;

    @EventHandler
    public void onBlockBreak(BlockBreakEvent e) {
        if (e.getBlock().getType() != Material.COBBLESTONE && getFromBlock(e.getBlock()) == null
                && getToBlock(e.getBlock()) == null)
            return;

        if (generator == null)
            generator = DATA.get(e.getPlayer().getUniqueId());
    }

    @EventHandler
    public void onBlockForm(BlockFormEvent e) {
        if (e.getNewState().getType() == Material.COBBLESTONE) {
            e.setCancelled(true);
            e.getBlock().setType(generator.next());
        }
    }

If there is any performance problem when I checks between 2 events like this?.

noble lantern
livid dove
#

I was legit shocked it was thst dumb

noble lantern
#

so then make a spigot post and jira post about it? people are gonna use getHolder either way

young knoll
#

Not with getHolder

#

Get that AuthorNagException out

livid dove
noble lantern
#

thats fine for the items its innevitable

But for inventories a hashmap of uuid, inventory is likely fine for checking inventories

young knoll
#

Or inventory view

#

Yes those are the correct ways to do it

livid dove
noble lantern
#

IGNORE WHAT I SAID

#

im tarded

young knoll
#

The bottom line is

noble lantern
young knoll
#

Don’t use getHolder to identify inventories

noble lantern
#

idk why this debate has been going on for so long

livid dove
noble lantern
#

someone should just make a spigot post about it

sullen marlin
livid dove
sullen marlin
#

the docs already tell you not to implement InventoryHolder

#

yet guess what plugins devs do all the time?

#

If they followed that part of the docs then they wouldnt be having this issue in the first place

livid dove
sullen marlin
#

just because its an easy to implement interface with 1 method, doesn't mean that it's free real estate

noble lantern
sullen marlin
livid dove
#

Because ngl my man I've got devs I'm trying to convince this is even the problem

sullen marlin
#
     * Gets the block or entity belonging to the open inventory
     *
     * @return The holder of the inventory; null if it has no holder.
     */```
noble lantern
#

nope, i even said this yesterday when it was brought up that everyones always said to not use the getHolder() methods

sullen marlin
#

that hardly looks like "he stored InventoryHolder from the created inventory " to me

noble lantern
#

posts going back for many many years of it

#

dot

livid dove
sullen marlin
#

open a PR with the doc changes you want and they can be discussed there

noble lantern
#

make a pr for getInventoryHolder Troll

coarse finch
#

ok so i mentioned earlier i am continuing a discontinued project, and theres something that i dont understand. basically, the old namespace was ac.grim.grimac, but the new one is me.alecjensen.grumm. what i dont get, is that after changing the namespace, some imports still reference the old one, but the plugin works fine?

livid dove
noble lantern
#

tldr: performance issues because of unintended uses

livid dove
coarse finch
livid dove
#

Hurts my soul it was that big of a jump 😅

sullen marlin
#

still hardly an API issue but a custom item plugin developer issue

livid dove
#

I mean tell that to @rain cypress

#

Core protect does it too

coarse finch
noble lantern
#

idk tbh nor care too much since I've been using maps to differentiate inventories for a long time now

sullen marlin
#

presumably coreprotect actually wants the holder, because again "Gets the block or entity belonging to the open inventory"

livid dove
#

But it's done very early on

#

And in on click events

#

Tbh that's the biggest issue

noble lantern
#

make a PSA then

young knoll
#

They should cache it then

noble lantern
#

or a pr to return cached holder

or if you dont wanna, use reflection Shrug

livid dove
#

Anyone with half a brain can make a lag machine with an inventory, coloured text and a n auto clicker

sullen marlin
livid dove
#

Is there a way to sanity check if the inventory about to be snapshottednisnt just the one the player is in

#

As this is only a problem in legit just player click event

#

And move etc

noble lantern
livid dove
#

This isnonly ever a problem on scenarios where the inventory is already 100% sure

#

What's that code rule number 1? Never do the same check twice?

sullen marlin
livid dove
sullen marlin
#

you can't cache a snapshot of a chest in the world in the inventory because you don't know when the chest is going to be invalidated

#

yes, where the inventory is a block in the world

noble lantern
#

inventory instance*

#

theyre using the holder to tell what inventory is what when the player clicks on it in InventoryClickEvent

livid dove
#

Just think it'd be nice to include some sortnof sanity check or id or something to bypass snapshottijg the items in the inventory somehow.

As said this is a problem due scenario's like this:

Player has chest full of gradient lore lined custom items.

They move all 27 to a shulker...

The inventory get golder was used for some custom check.

Those 27 custom items are reconstructed 27 times due to snapshot creation

#

I know it's against the grain.

But I genuinely just have a gut feeling a sanity check is in order for the events that already have the items 1000% guaranteed

noble lantern
#

bruh

noble lantern
#

that would only get the players inventory name

#

if that last method even exists

livid dove
river oracle
#

You shouldn't even ever need the Inventory Name ever anyways

noble lantern
#

its more like getView()getDisplayName() iirc

#

just use the view/inventory and a hashmap

river oracle
noble lantern
river oracle
#

not really? What is hard with using th Events API

noble lantern
#

that is REVLUTIONARY

#

however tf its spelled

river oracle
#

lol

noble lantern
#

discord aint telling me its wrong but ik damn well it is

river oracle
#

REVOLUTIONARY

noble lantern
#

hashmap 3x

livid dove
#

How u mean with the events api?

river oracle
#

lol your a funny guy

river oracle
#

because adding 1 if statement was too hard

#

introducing RightClickEvent

noble lantern
#

anyways

How sloppy is this for doing 2x block drops (taking the entire list copying it and adding it to itself)

livid dove
river oracle
#

no too performance

#
while(true){
   Thread.sleep(19231923)
}
livid dove
#

Lmao

#

But yeah it made me realise just how screwed a rep custom items have got from this for non devs

river oracle
#

CustomItems?

sullen marlin
#

?

river oracle
#

what Custom Items

livid dove
#

As due to CP and other plugijs having this problem a lot of servers assume its the norm

noble lantern
#

why would getHolder make custom items performance bad....

sullen marlin
#

its still an issue with the custom items being badly programmed lol

livid dove
#

*items with metadata

#

Specifically gradient lorenlines

sullen marlin
#

so they still deserver the reputation

river oracle
noble lantern
livid dove
#

Ffs

livid dove
river oracle
#

@analog basin why do you delete responses so often

#

I get like .1 seconds to read it

noble lantern
livid dove
#

It is bad either way

#

But more meta data

#

Worse issue

river oracle
#

wait are we recreating core protect?

#

guys I've got an idea

noble lantern
#

either way thats not gonna show up on the custom items plugins load

river oracle
#

Download CorePortect :s

noble lantern
#

its gonna come up on the plugin calling getHolder()

rain cypress
#

PR

livid dove
#

No we are ssaying custom items srnt even 1/4 as bad as they currently are if this issue in plugons are resolved

livid dove
noble lantern
#

idk i doubt getHolder() magically makes all custom items plugins work like crud

Most are very poorly made or have code bases ranging from 6+ years without any major rewrites/bases

livid dove
#

I know it's a bit odd to say but imagine ur not a dev for a min.

Ur Johnny server owner.

Custom items added to ur server caused ur server to shit the bed.

Are u ever ginna think "gosh darn that fuckijg core protect get holder"

#

The issue isn't the actual problem itself, it's the fact it's such a subtle problem that's missable that it's caused a community stigma for the wrong reasons

sullen marlin
#

you're really dramatic lol

noble lantern
livid dove
young knoll
#

I think little Johnny should also open an issue on coreprotect

noble lantern
#

shi

#

i might do it for free spigot clout

livid dove
#

Ladies and gentlemen, the point made manifest 🤣

naive loom
#

It's been a while since I've made a cross-version solution for a Minecraft Plugin and I was wondering if the JDK is upwards or downwards compat, e.g. if I wanted to use Java 17 as my JDK and ran it on a 1.8 server would it recognize my record and still run?

noble lantern
#

2% is bad for a single event

#

2% for an entire plugin is fine (with everything firing)

But a 2% tps increase from simply clicking is the cause for a major lag machine

chrome ferry
naive loom
livid dove
naive loom
#

That's what I thought it's just been a while, thanks 🙂

sullen marlin
#

1.8 doesnt work very well on anything other than java 8

young knoll
#

If you compile with java 8 support it’ll run on java 17

#

Minus janky reflection hacks*

livid dove
#

Because as I hope you can sympathise after dealing with my ass, it was me saying it 🤣

noble lantern
#

were the 200 players developers though

sullen marlin
#

ok now go sell this java verison on mcmarket for $200

#

people will buy it

livid dove
#

Real

noble lantern
#

people buy anything on mcmarket

#

i know because ive bought shit from there before kek

young knoll
#

Uhh it’s BuiltByBit

#

Smh

livid dove
noble lantern
#

point then to the source code method

young knoll
#

Show them a profiler

#

But dumbed down

noble lantern
#

generally minecraft players arent the brightest

So its to be expected you got those results

livid dove
#

It's more the fact it's me saying it, which I hope u all understand considering how pissed I got everyone yesterday

#

I need someone else to say it 😅

noble lantern
#

why do they gotta know anyways arent you deving the plugin theyre using?

#

or patching/fixing

livid dove
#

It is one of those where unless admins give the bkg cheff kiss of approval it ain't getting changed.

noble lantern
#

If they cant approve a performance improvement i would leave in a heartbeat

#

especially such a simple one

#

would take maybe 30-60 mins to rewrite a decent sized plugin to use maps instead of holders

livid dove
#

It goes back to the rep vs common sense thing

#

E.g: coreprotect has this problem

#

You are trying to convince Johnny server owner that there is an issue thst core protect, a plugin almost every other big server uses, has.

noble lantern
#

make an issue on theyre github

livid dove
#

And hasn't fixed even though its a simple issue

#

I thibk we are privileged as coders sometimes to knownjust how rubber band and glue stick even reputable companies code is

#

Most folk genuinely can't fathom shit like core protect being the cause of a problem with custom brews yknow?

young knoll
#

The world runs on jank

livid dove
#

And most folkndont realise it

noble lantern
#

javas JVM is holding on by a thread at this point (literally)

livid dove
#

Lmao

noble lantern
#

goofy ahh

livid dove
#

This is my point.

We forget... most folk don't know this

noble lantern
#

those are the folk that dont need to run a server

young knoll
#

You’ll be happy to know when people ask about gui in here we usually send smiles guide

#

Which does not use holders

noble lantern
#

if anyone serious about running a server they need to be able to keep an open mind to a whole plethora of issues

#

?inventory

#

whats smiles guide

young knoll
#

Idk if we have a command

livid dove
#

I sympathise with them as I agreem.im an engineering lecturer and preach this very message every day.

But due to that I know most folk don't see what we see.

E.g before java I didn't even consider things being bugged a lot of the time and figurd I was an idiot.

Now I see em everywhere and realise its cause some pillock pushed something without reviewing lol

noble lantern
livid dove
#

I do legit think we forget just how much more we see of the jank than everyone else

noble lantern
#

our nuclear missiles are ran on pre 80's software btw

#

floppy discs

#

worlds fucked

livid dove
#

...I'm an aerospace engineer , preaching to the choir haha

noble lantern
#

i remembe hearing about this nuclear plant that had a computer that it relied on for cooling and when some tech came out to work on it it was just caked in dust

#

lemme see if i can find the vid

livid dove
#

Before we get too off the point from before. I would highly highly appreciate someone writing this all out in a neat format.

Hell I'd be infinitely grateful.if it was md_5 as it'd hold weight.

#

But I'd understand if not

#

But worst can be said is no

#

Because legit all I'd need is someone else to say this, fully.and clearly and I'd hope that'd be enough

#

I.e. the get holder issue and why it effects custom items hard

noble lantern
#

just tell your boss to hop in this discord channel and we all call him dumb for not listening to his dev, ez /s

livid dove
#

🤣

#

This is why I love and hate coders

young knoll
#

Inb4 boss is like

#

12

noble lantern
#

i wouldnt be surprised tbh

livid dove
#

Ur my people. Blunt, honest, to the point.

noble lantern
#

but if they pay they pay

livid dove
#

It's more a shit tonne of politics

noble lantern
#

idk why you couldnt just make the change and push it

#

like whats reallystopping you

livid dove
#

The way they do their releases 🤣

Nice shiny git hub don't mean they gonna grab and release server side

vagrant stratus
#

kek

noble lantern
#

but, if the change is there, next time they want something it will be there 😉

livid dove
#

Plus once again its the thing where let's say core protect. I could fix that in an afternoon

noble lantern
#

you dont need to fix others just make issue requests

livid dove
#

U gonna trust me when I say I changed a well known plugon to "fix it"

pseudo hazel
#

hang the fuck on

#

are you still talking about the get holder thing?

noble lantern
#

why not

sullen marlin
#

^ was just gonna say

noble lantern
#

no one else is talkin bout anything else

pseudo hazel
#

man needs to chill

livid dove
pseudo hazel
#

rightfully so might I add

livid dove
#

Aye

pseudo hazel
#

but thats enough of me

#

its way to late where I am

livid dove
#

Md was in chat and he is literally thenmost qualified to discuss it. Got some good stuff out the convo lol

hybrid spoke
astral scroll
#

!help

#

!unverify

#

!verify

undone axleBOT
#

Usage: !verify <forums username>

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.

astral scroll
#

lemme verify rlly quick

#

!verify 1src

undone axleBOT
#

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

astral scroll
#

k now

#

literally is a huge error

river oracle
#

idk much about IJ but what java version you using

astral scroll
#

1.8

#

?pastes

#

?paste

undone axleBOT
astral scroll
#

wait

#

that's not the pom.xml i use normally

river oracle
#

your pom is targetin java 7

astral scroll
#

this

#

lemme reload

#

yes that was

astral scroll
#

Someone that knows Kotlin would like to explain this to me?

 companion object {
        var config: Configuration? = null
    }```
river oracle
#

Kotlin + maven?

#

thats interesting

grave kayak
#
        unbreakingPoints.put(3, plugin.getConfig().getInt("enchantments.DURABILITY.3"));
        unbreakingPoints.put(4, plugin.getConfig().getInt("enchantments.DURABILITY.4"));
        unbreakingPoints.put(5, plugin.getConfig().getInt("enchantments.DURABILITY.5"));
        unbreakingPoints.put(6, plugin.getConfig().getInt("enchantments.DURABILITY.6"));

        enchantmentPoints.put(Enchantment.DURABILITY, unbreakingPoints);``` i have this code trying to load the points from my enchantment_points.yml but it will not load the values into my gui. everything worked fine when i had just the number value in the points section. it is loading the file into the plugin folder too
noble lantern
astral scroll
#

just a code i was looking in github

thorny trout
#

i need a spawner plugin like donutsmp

river oracle
#

you'll need to pay a developer for that

thorny trout
#

how and where

river oracle
#

idk

#

thats for you to figure out

#

?services is a place to start

undone axleBOT
shadow night
#

Is there a universal method to check for entities on a certain area, like from -4, 0, -4 to 4, 4, 4 or do I have to loop through each location in-between of those to do that?

green prism
#

Hello everyone, just a quick question: Do I have to set the position of the Lode Stone of the compass to create a player tracker compass?

#

I would like to make it so that only that specific compass points to a specific player

true perch
#

If I wanted to program a network based marketplace system, would it be acceptable to use the bungee server as the place each server requests whether or not an item has been purchased? I was thinking each request could be processed within a queue and mark the item as purchased for the first request in the queue to purchase said item. OR is there a better alternative? I'm not sure how standard it is to program a system like this on the bungee server it's self.

green prism
#

md_5 solving a problem for me, what an honor!

#

Thank you md

sullen marlin
#

Rather than try and make bungee a database

true perch
# sullen marlin Usually you'd just use a database or something?

I was thinking that, but I was afraid that if Server A requested to purchase an item, it goes through then sends a request to the database to update it's availability, maybe Server B also checked the item's availability at the same time and returned that the item is available before Server A was able to update the availability

vocal cloud
#

That's not how DB's work. If you could do that you'd be able to withdraw money from the bank twice if you clicked the button fast enough

true perch
vocal cloud
#

Yes?

true perch
#

what sql command would do that?

#

I suppose I'll google it actually, thank you!

vocal cloud
#

Why not just delete the item from the DB when it's purchased?

#

You can check the result to see if it actually was deleted and if it wasn't then just send an error message

true perch