#help-development

1 messages · Page 575 of 1

silent steeple
#

i guess

loud steeple
#

id wanna use vscode but no tutorias

#

and i wanted to try kotlin

river oracle
#

kotlin 💀

#

just stick with java and vsc buddy

loud steeple
#

nah

noble lantern
#

2 new things at once? sounds like a recipe for failure

loud steeple
#

java makes me want to kms

river oracle
#

kotlin is just spicy java

#

you won't have much more fun

sacred berry
remote swallow
noble lantern
#

ide wanna kms too if i had to learn a IDE and a new language syntax at the same time

#

sounds painfull

tender shard
#

you can use kotlin for spigot without problems

young knoll
#

fun

tender shard
#

you can also use VSC without problems

noble lantern
#

were having fun with kotlin guys i promise

loud steeple
#

is there a way to reload a plugin?

young knoll
#

They could have at least used func

#

Smh

river oracle
tender shard
river oracle
#

kotlin is pretty much exclusive to IDEA

tender shard
flint coyote
chrome beacon
loud steeple
#

test a plugin without restarting the server

#

oh?

young knoll
#

Reload will reload all plugins

tender shard
#

/reload confirm works on both spigot and paper

young knoll
#

Be aware that it can break things

loud steeple
#

it worked! can i ask why it genereted paper-plugin.yml isntead of plugin.yml? should i worry on why i had to rename it?

remote swallow
#

you had the paper option under bukkit selected

young knoll
#

Because you selected a paper plugin

remote swallow
#

its jank with the new gui

flint coyote
river oracle
# tender shard huh didnt know

theirs a syntax highlights pluygin last time I checked, but its obvious why there isn't a VSC plugin, one of the biggest IDE companies in the game makes a language, ofcourse they aren't going to officially support anything outside of their platform.

young knoll
#

Yeah worldedit doesn’t like reloading

tender shard
echo basalt
young knoll
#

Causes a lot of memory leaks

loud steeple
echo basalt
remote swallow
#

why are you complainign here then

echo basalt
#

if you have rgb lights on your headphones or mouse or anything

#

their controller leaks

young knoll
#

Then you need to run it on a paper server

remote swallow
#

like i said spigot plugins work on paper, paper plugins do not work on spigot

tender shard
loud steeple
echo basalt
#

I've had rgb lights consume 12gb ram

remote swallow
young knoll
#

Mmm yes

#

Rgb ram

tender shard
#

or my bad, I misread

loud steeple
remote swallow
#

?whereami

flint coyote
young knoll
#

?whereami

echo basalt
young knoll
#

Damn

tender shard
#

anyway, is that plugin supposed to be public plugin, or just for yourself?

echo basalt
#

like a true person

#

one's a team group

#

one's a crucial ballistix

loud steeple
#

for myself

echo basalt
#

both overclocked to 3600mhz (they're 3200mhz sticks)

tender shard
#

then why are you running your paper plugin on spigot?

loud steeple
#

i swear i have a paper server?

echo basalt
#

mor elike

#

Then why are you asking here?

#

go bother the paper people

tender shard
#

well but then you're running an old version

loud steeple
#

i thought this was the sever for spigot and paper

remote swallow
#

nope, were spigot

#

paper is a downstream for of us

loud steeple
#

isnt it just spigot < paper

echo basalt
#

no

#

Paper is a heavily modified fork of spigot

#

with a completely different culture

sacred berry
#

craftbukkit>?

loud steeple
#

oh its a fork, i thought it was built as a replacement for spigot from ground up

tender shard
remote swallow
tender shard
echo basalt
#

and they ban people for random reasons

#

as I said, different culture and view on how minecraft should be ran

sacred berry
echo basalt
#

It's an industry

#

It's my day job

sacred berry
#

damn

flint coyote
echo basalt
#

also minecraft

young knoll
#

Murder

echo basalt
#

but the bad part

#

where I cleanup disgusting projects for 50$

timid hedge
#

I am trying to male a command with a cooldown, and the cooldown can be set in a config file
(Config.get().getInt("Cooldown")) = is what you have set tre cooldown to in the config file

If i am sending (Config.get().getInt("Cooldown"))to the player it sends what is inside the fil but in the class when im trying to set the cooldown its not working

Here is the line:
cooldown.setCooldown(player, (Config.get().getInt("Cooldown")) * 60 * 1000, TimeUnit.MILLISECONDS);

Here is the most importens from the class

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (sender instanceof Player) {
            Player player = (Player) sender;
            if (player.hasPermission((Config.get().getString("Permission")))) {
                if (!cooldown.hasCooldown(player)) {
                    cooldown.setCooldown(player, (Config.get().getInt("Cooldown")) * 60 * 1000, TimeUnit.MILLISECONDS);
                    player.setFoodLevel(20);
                    player.sendMessage("§7Du blev mættet.");
                    player.sendMessage(Config.get().getString("Cooldown"));
                } else {
                    if (cooldown.getCooldownRemaining(player, TimeUnit.MINUTES) >= 1){
                        player.sendMessage("§7Du skal vente §f" + cooldown.getCooldownRemaining(player, TimeUnit.MINUTES) + " §7minutter og §f" + (cooldown.getCooldownRemaining(player, TimeUnit.SECONDS) - (cooldown.getCooldownRemaining(player, TimeUnit.MINUTES) * 60)) + " §7sekunder.");
                    }
                    if (cooldown.getCooldownRemaining(player, TimeUnit.MINUTES) == 0) {
                        player.sendMessage("§7Du skal vente §f" + (cooldown.getCooldownRemaining(player, TimeUnit.SECONDS) - (cooldown.getCooldownRemaining(player, TimeUnit.MINUTES) * 60)) + " §7sekunder.");
                    }
young knoll
#

I mean

#

Worth it? Maybe

flint coyote
remote swallow
#

in the day he writes cool stuff, in the night he saves servers from skript

young knoll
tender shard
flint coyote
loud steeple
#

quick question, if i wanna make a 1.8 plugin do i still use like 1.20 spigot/paper

flint coyote
echo basalt
#

Here's a fun one I've been doing

tender shard
echo basalt
#

thank me later

loud steeple
#

can i just change

remote swallow
#

yes

loud steeple
#

my yml file

#

i mean xml

remote swallow
#

1.12 is the farest back mcdev supports

#

you can go further

flint coyote
loud steeple
#

<version>1.20-R0.1-SNAPSHOT</version> do i change this? and itll work like magic?

remote swallow
#

reload it and change api-verison but yeah

echo basalt
#

they use strings instead of data objects

#

or enums

flint coyote
#

not even used an autoformatter pepe_shock

echo basalt
#

just a big ol if(tier.equals("highest")) coefficient = 1.2

#

else if

#

else if

#

no pdc no nothing, raw lore checks

#

and some other fucked stuff

flint coyote
#

yikes. I wouldn't touch that for 50€

echo basalt
#

pity price

#

I like reminding myself of my outstanding quality

#

by forcing myself to work for the equivalent of minimum wage in vietnam

flint coyote
#

that code is horrible

#

and I only looked at one class

young knoll
#

You can always send the better paying ones to me then

flint coyote
young knoll
#

If you don’t want them

echo basalt
#

saving to travel to the states

quaint mantle
#

After setting the base value of a players Attribute do you need to do anything else to save it?

echo basalt
#

also just bought a new phone and I gotta go to the dentist for some pricy stuff

#

So like

#

I need the cash money

#

customer feels bad for making me touch this

young knoll
#

Lul

clever musk
#

How to resend block updates?

flint coyote
remote swallow
#

calling it now'

#

this plugin was made as a first plugin with barely knowing java witht he mc dev plugi

flint coyote
#

till this day I never used that plugin

remote swallow
#

its meh

quaint mantle
remote swallow
#

kinda useful for gradle, if you use maven just use an archetype

quaint mantle
#

you don’t come in knowing it all

trail coral
#

how would i enable a player to move items from their inventory to my gui but not the other way around lol

#

like i want to be able to move stuff around in my inventory

#

but not in the gui

#

i just dont know how i would detect if the inventory is a players inventory

young knoll
flint coyote
flint coyote
flint coyote
#

maven magic 🪄

trail coral
#

bruh

orchid trout
#

the clicked inventory type

trail coral
#
if(e.getClickedInventory().getType() == InventoryType.PLAYER) {return;}
#

thanks

undone axleBOT
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.

opaque scarab
trail coral
#

nah they should be able to move their items inside the gui aswell i just explained it bad there

#

but thanks

timid hedge
trail coral
hallow jackal
#

Currently trying to make a method that opens the sign gui using ProtocolLib (so no sign is needed to be really placed). Does anybody know why the gui is closed immediatly in any other version that's not 1.20/1.20.1 or simply another way to achieve that?

    public void openSignGui(BlockPlaceEvent event) throws InterruptedException {
        ProtocolManager manager = ProtocolLibrary.getProtocolManager();
        Location playerLocation = event.getPlayer().getLocation();

        PacketContainer createSignPacket = manager.createPacket(PacketType.Play.Server.BLOCK_CHANGE);
        createSignPacket.getBlockData().write(0, WrappedBlockData.createData(Material.OAK_SIGN));

        PacketContainer openSignPacket = manager.createPacket(PacketType.Play.Server.OPEN_SIGN_EDITOR);
        openSignPacket.getBlockPositionModifier().write(0,
                new BlockPosition(playerLocation.getBlockX(), playerLocation.getBlockY(), playerLocation.getBlockZ()));

        manager.sendServerPacket(event.getPlayer(), createSignPacket);
        manager.sendServerPacket(event.getPlayer(), openSignPacket);
    }```
trail coral
#

probably different packets in older versions or something

sacred berry
hallow jackal
#

Yeah, Open Sign Editor takes a new argument in 1.20 that controls the side you write on, but i'm not providing it in the first place and i'm starting to believe my approach is just wrong

chrome beacon
#

Paper is a fork

terse bough
#

I have a question about the newer versions is there a way to send e.g. the ItemDisplay by packet or so that only special players see them. because I can only do it with the EntityItemDisplay classes but this does not exist.
maybe someone could dm me

tender shard
worldly ingot
#

Player#sendBlockChange(), Player#openSign()

timid hedge
terse bough
# tender shard the class is called Display.ItemDisplay

Yes I already tested also but without result? The ItemDisplay did not spawn


        PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(itemDisplay);
        ((CraftPlayer)player).getHandle().c.a(packetPlayOutSpawnEntity);```

Is only an example are the methods at all correct and how do I have to change here the item like the location?
tender shard
#

no idea how it works in obfuscated mappings

#

is there a reason why you don't use mojang mapped names?

chrome beacon
#

They probably don't know how

#

?nms

tender shard
#

then you would have methods like "player.getConnection().send(Packet)" instead of player.c.a(...)

hallow jackal
flint coyote
#

the commit message warcrime

worldly ingot
#

Yeah, they're "real signs", only on the client, not on the server

worldly ingot
#

OH WAIT THAT ACTUALLY IS THE MESSAGE

#

lol I was making a suggestion

flint coyote
#

xD

#

I hid it well

young knoll
#

Small refactor

flint coyote
#

"some small adjustments"

#

now my 13 hour coding session comes to an end.

young knoll
#

I’m also bad at that

#

Doing a full session as 1 commit

echo basalt
flint coyote
#

Well to be fair it was all one big refactor

#

and 1 or 2 small bugfixes

#

Swapped all my "Map<String, Object>" to ConfigurationSerializables

trail coral
hallow jackal
# worldly ingot "Minor changes"

I must be missing something then, because they are pretty real right now. I can interact with them from a different mc instance.

    public void openSignGuiNoLib(BlockPlaceEvent event) throws InterruptedException {
        ProtocolManager manager = ProtocolLibrary.getProtocolManager();
        Location playerLocation = event.getPlayer().getLocation();
        Block imaginarySign = playerLocation.getBlock();
        imaginarySign.setType(Material.OAK_SIGN);
            
        event.getPlayer().sendBlockChange(playerLocation, imaginarySign.getBlockData());
        event.getPlayer().openSign((Sign) imaginarySign);
    }```
#

wrong reply btw

young knoll
#

Well yeah

#

You called setType…

tender shard
#

i stopped writing commit messages completely

young knoll
#

Use Material.OAK_SIGN.createBlockData

flint coyote
tender shard
#

usually I just write "1.20 support" or the new version name, e.g. "12.3.1" and that's it lol

flint coyote
#

Well ya if there's no new features added that makes sense

#

I haven't released yet

tender shard
flint coyote
#

And I still have a lot of (unfun) stuff to do before doing so. Documentation, language files, javadoc - and figuring out how to push it into some maven repo

tender shard
#

i love writing javadocs

flint coyote
tender shard
flint coyote
tender shard
flint coyote
#

how does it know which version to push? Does it just take the one from the pom? I'll probably forget changing that every time lol

deft thistle
#

Taking a moment to apprenciate the beautiful Spigot API
Having lots of fun creating my own custom events 🙂

tender shard
tender shard
#

mvn deploy is like mvn install + upload it

flint coyote
#

oh so deploy is another stage, did not know

tender shard
#

yep

flint coyote
#

Guess I can keep in mind to change the version when running deploy

tender shard
#

i usually do mvn install and see if it works, if yes I do mvn deploy and that's it

hallow jackal
flint coyote
#

how do you deploy with javadoc though? Or is that automatic?

#

I've seen some plugin for it

tender shard
#

then it automatically gets uploaded on deploy too

flint coyote
#

well first of all I need the javadoc plugin lol

#

the links you provided - what do those do? Since spigot isn't compiled into the jar

tender shard
tender shard
flint coyote
#

oh that's cool

tender shard
#

There are links there to the spigot docs

flint coyote
#

The worst part before release will probably be to think through all the update processes. To not enforce breaking changes for new features

#

Therefore I'll probably not be done before end of 2023

deft thistle
#

How do I pass an object to bukkitRunnable?

#

I know I can still use the class that created the BukkitRunnable atributes, but I don't know how to reference the class that created the BukkitRunnable itself

flint coyote
#

You can create a variable beforehand and access that variable from inside the runnable

deft thistle
#

OO nice workaround thank you

tender shard
deft thistle
#

or I can create my own runnable

#

would it be more correct?

#

it's just a runnable for a timer

tender shard
deft thistle
#

Yeah I saw it

timid berry
#

where one dot 8

remote swallow
#

it only goes as far back as 1.12

#

you have to manually change it to go to 1.8

noble lantern
#

chad intellij plugin

timid berry
#

i need one dot 8

noble lantern
#

why specifically 1.8.8 before i tell you how to do it

remote swallow
noble lantern
#

why cant 1.13 work?

timid berry
river oracle
#

I feel like someone needs forcefully destroy the version 1.8

timid berry
#

why do u guys hate it lmao

noble lantern
tender shard
#

i wish md wouldn't have fixed log4j on all the old versions

noble lantern
#

ikr

river oracle
timid berry
#

my player base is 1.8

timid berry
#

no one has a valid reason to hate 1.8 other then its old

noble lantern
timid berry
#

ok

#

so i just select 1.12.2

river oracle
timid berry
#

and edit it to 1.8

noble lantern
tender shard
#

are you really using 1.8? not even 1.8.8?

timid berry
river oracle
noble lantern
#

wtf

#

its not lmao

timid berry
#

yah i ment 1.8.8

noble lantern
#

even using 1.13 is godsend

timid berry
#

i like minecraft version 1.8

#

whats the problem

river oracle
#

more features, and they are even starting to improve performance 😭

noble lantern
#

api is the problem

#

try to get a glass pane on 1.8

#

go ahead

#

how about ink sacks

#

need to edit anvils? no anvil events

#

its SO limited its insane

tender shard
#

the problem is people who download a plugin that says "1.19+" and then writing a one star review because "why no works on 1.8.3"

noble lantern
#

i cant believe we even coded like that back then and thought it was alright

timid berry
#

anyone actually wanna tell me how to make a plugin for 1.8.8 since its not in the list

river oracle
#

learn how to edit maven and gradle files

timid berry
#

im fine with 1.12.2

river oracle
#

🤷‍♂️

timid berry
#

if i have to

tender shard
#

you change the version of the spigot-api dependency in your pom.xml

timid berry
#

but most of my players will be using 1.8 clients

#

with via version to join

noble lantern
#

then they can use any version

timid berry
#

no

#

they cant

noble lantern
#

can

timid berry
#

they really cant

noble lantern
#

you can make your server support all versions lol

timid berry
#

if most of my players are 1.8, isnt it better to make my server run on 1.8 then 1.12.2 with via version

noble lantern
timid berry
#

yes

#

but wouldnt they have a better experience if the server was 1.8

#

instead of 1.12.2 with via

noble lantern
#

they will always have a better experience using whatever version the server is on yeah

noble lantern
tender shard
timid berry
#

they wont have that

#

they are 1.8

#

clients

noble lantern
tender shard
#

are they all using illegally downloaded 1.8 versions or why can't they just click on "update" lmao

tender shard
noble lantern
#

i make all my plugins in 1.19 rn but i emphasize for 1.13+

timid berry
#

wait lemme show u why

tender shard
#

technically 1.16, but actual world gen below 0 was 1.17 IIRC

#

or maybe it was 1.17/1.18

noble lantern
#

not suer tbh

tender shard
#

i remember that World#getMinHeight() was added in 1.16.5

noble lantern
#

i barely kept track of updates past 1.16 lol

#

wtf why does via backwards have an api

tender shard
#

okay so
1.17 added the technical possibility for y<0
1.16.5 already added the method World#getMinHeight() (which was later moved to WorldInfo)
1.18 added actual world generation below 0

noble lantern
#

might as well just develop on 1.19 then

timid berry
#

ok one sec guys

river oracle
#

no

noble lantern
#

only on more than 1.18

river oracle
#

develop on 1.20 guys

noble lantern
#

imma wait

#

yall do ur bug shit so i dont gotta deal with it

#

ill come when the fires over

river oracle
#

there is not enough people on 1.20 yet I think 1.19.4 is a good start

tender shard
#

tomorrow I'll play 1.20, never played it before

noble lantern
#

armor trims do seem cool

#

but yeah i never launched it myself either

tender shard
#

25% of bstats servers are 1.20+

noble lantern
#

wow

#

awesome tbh

#

im glad were finally ditching older

timid berry
noble lantern
#

naw wtf

tender shard
#

46,6% are still on 1.19.X

timid berry
#

and so

#

my clients are 1.8

#

so i need to make 1.8 plugins

tender shard
# timid berry

why would anyone play the game in the browser instead of downloading it lol

noble lantern
#

minecraft in a web browser ive seen it come full circle now r_baby_cry

timid berry
#

believe it or not

#

it runs very well on chromebooks

noble lantern
#

cracked?

timid berry
#

its actually just a bungee plugin

silent steeple
#

do permissions have to be registered

timid berry
#

so any java server can support it

noble lantern
#

i aint adding that to my server for damn sure

kind hatch
noble lantern
#

oh

timid berry
#

lol no

#

thats adiff thing

#

yes its techinically on crack

noble lantern
#

the domain just makes it look sketch

#

"minecraft very epic"

timid berry
#

anyone can host the client

tender shard
timid berry
#

i own that domain

noble lantern
#

oh

timid berry
#

this one will tho

silent steeple
#

do permissions have to be registered

#

hpw

tender shard
silent steeple
#

whats the way to register

#

huh

tender shard
#

you don't have to register any permissions

timid berry
#

any ways

#

how doi make 1.8 plugins if i cant select 1.8

#

do i just edit the pom.xml and continue like normal

noble lantern
#

you type 1.8.8-SNAPSHOT in replace of the current version

timid berry
#

where

kind hatch
timid berry
#

aight bet

tender shard
timid berry
#

it wont run on school chromebooks tho

#

most of the players are on school chromebooks

kind hatch
timid berry
#

or ones with playstore and stuff blocked

timid berry
#

ima shut down the site for now

noble lantern
#

nah lemme try it rq

#

jkjk

timid berry
#

aight

#

its open souce

#

its java compiled to javascript or something

#

teamvm

noble lantern
#

jesus christ

timid berry
#

aight

noble lantern
#

java was originally designed for browsers CH_Kek

timid berry
#

yah lmao

silent steeple
#
  40:
    slot: 39
    item: "PISTON_BASE"
    name: "&f&lBuilder Kit"
    permission: ""
    enchanted: true
    lore:
      - "&7A kit that gives you a selection of"
      - "&7blocks and decorations to build your base."
if (!(p.hasPermission(eachItem.getString("permission")))) {
                                coloredLore.add("");
                                coloredLore.add(ChatColor.translateAlternateColorCodes('&', "&cYou do not have access to use this kit!"));
                            } else {
                                coloredLore.add("");
                                coloredLore.add(ChatColor.translateAlternateColorCodes('&', "&aYou have access to use this kit!"));
                            }

it always adds the lore You do not have access to use this kit! even though there is no permission

timid berry
#

its not a remake or whatever

#

its litterally the whole 1.8 client

#

lmao

#

it can join any server

#

shutting down the web server now

tender shard
silent steeple
#

oh yeah right

tender shard
#

Check if the string is null or empty before checking if they have that permission

timid berry
#

man java seems complicated as hell

noble lantern
#

it sucks

timid berry
#

should i learn java first and then try to make spigot plugins or do both at the same time

tender shard
#

Learn at least basic java

#

?learnjava

undone axleBOT
tender shard
#

Third link is good

timid berry
#

idk about java

#

i know javascript tho

tender shard
timid berry
#

i know

noble lantern
timid berry
#

i am javascript pro

noble lantern
#

the offsprings so good

river oracle
#

I only really like You're gonna go far kid

noble lantern
# timid berry i am javascript pro

if you do know javascript really well, transitioning to java shouldnt be realtively complicated, just needing to get a handle on OOP

And of course java is a compiled language so your gonna need to learn about that too

noble lantern
#

its the only song i know tbh i kinda just assumed the were one hit wonders maybe

#

sum41 is rly good tho

river oracle
#

no :((((((

#

not eagler craft

silent steeple
#

minecraft on the browser

#

wha

noble lantern
#

ty for that idea

timid berry
#

yes add epic aosid asioeaoeia

timid berry
noble lantern
#

wait thats a server

#

thought that was yours lmao

timid berry
#

no its a single player world

#

eaglercraft v 1.5;2 had single player

#

1.8 has no single player

#

this is v 1.8

#

i dont own the server

noble lantern
timid berry
#

i am staff on it tho

noble lantern
#

"i like tall building so i can leap off of em" 💀

#

bangar

river oracle
#

What's up danger

timid berry
#

nothing much

noble lantern
#

oh its from the spiderman movie

#

can defo add that then

timid berry
#

blud didnt see the cover art

noble lantern
#

copyright incoming

river oracle
#

they'll never find you

timid berry
#

does it actually play the song

noble lantern
#

yes

timid berry
#

?

river oracle
#

you're not the one distributing the song

timid berry
#

does it convert it to note blocks or whatever

river oracle
#

you're downloading it from a source

noble lantern
#

it converts youtube links to a resource pack that plays with a gui and a queue

timid berry
#

woah im gonna steal that idea

noble lantern
#

its HARD

timid berry
#

but first i need to figure out how to make 1.8 plugins

noble lantern
#

took me 1.4k+ lines of code just to get something functioning

#

on top of the 1.1k that was there for the music playing tiself

#

shits aids

#

did a bunch of refactoring tho, cut a bunch of code out

timid berry
#

i would personally outsource development of it to unprivildged java programmers in southern asia

#

cheap work

#

ez plugin

noble lantern
timid berry
#

no payment until they are done

tender shard
timid berry
#

aint aids from monkeys

noble lantern
timid berry
#

or gay ones

noble lantern
#

timings from my plugin

timid berry
#

or is that a diff thing

noble lantern
river oracle
#

wonder what happens if 100 players were to play music at once

noble lantern
#

idk but i can spam the fuck out of playNextSong without any drops

river oracle
#

wtf is MMOItems doing lol

noble lantern
#

LOL

#

who fuckin knows

timid berry
#

oof i can imagine the plugin creating the resource pack being the most

#

hard part?

river oracle
#

I have code in PlayerMoveEvent that is more performant

noble lantern
timid berry
#

why did they specify object oriented/

noble lantern
#

converting to resource pack was straight forwardish

timid berry
#

does java have a functional part to it

river oracle
#

kinda

timid berry
#

bruh wth

#

can i use both

noble lantern
#

FunctionalInterfaces

timid berry
#

so like javascript

river oracle
#

FunctionalInterfaces and Functions

timid berry
#

ok guys i am pro java dev now

river oracle
#

but only if you are in a good java version

timid berry
#

8

atomic brook
#

buildtools caused by: difflib.patchfailedexception: incorrect chunk: the chunk content does n't match the target. Help please

remote swallow
timid berry
#

im gonna take the webserver down now

noble lantern
#

ugh can i force it?

remote swallow
#

yuck timings

#

spark better

timid berry
#

make 500 spigot servers make a timmings report at the same time

#

ez

noble lantern
atomic brook
noble lantern
timid berry
#

rate limit what

#

500 differnt spigot servers

#

at the same time

#

ez

noble lantern
#

unless you have 500 machines theyre all gonna be the same ip

#

sooo

remote swallow
timid berry
#

proxy

#

too easy

timid berry
#

yah that too

tender shard
#

(If they even have an aaaa record)

atomic brook
timid berry
#

yes

noble lantern
#

20 tps = 1500% of tick

make sense

timid berry
#

naw

#

tf

#

what is museplus

#

is that the plugin

noble lantern
#

its async so it doesnt actually hurt performance unless you dont have extra cores

#

and thats just for resource pack download, ffmpeg download, and resource pack creation

noble lantern
timid berry
#

make it send a request to a vps or something that handels all that

timid berry
#

and make it send it back to the plugin

#

which sends it back to the player

#

ez

#

( i have no idea what im saying)

timid berry
#

no use 2 dollar vps

noble lantern
#

haha

timid berry
#

wait

#

i have cheap vps link

noble lantern
#

those vps's couldnt handle this

#

shit would bottneck and take forever

timid berry
#

here

#

cheap vps

noble lantern
#

wtf

river oracle
#

aikar timings is having an anurism

#

try spark

noble lantern
#

yah downloading that now

#

i wouldnt doubt if that 1500% is on other threads but to say 52% tps loss when servers 20 tpsis whack lmao

noble lantern
#

wtf

timid berry
#

bro its the best

noble lantern
#

whats worse

#

this is sme guy that actually owns all this

#

those are his pictures lmfao

#

theyre discord is 10x better holy fuck

#

they post status updates 💀

silent steeple
noble lantern
#

its a meme

silent steeple
#

who took the time to do allat 😭

noble lantern
#

but its so good of a meme it legitmatly looks like some 12 is trying to make a hosting company lmao

#

they even have a trustpilot

silent steeple
#

Ok Burchard thirty seven

noble lantern
river oracle
#

aikar timings literally halucinating

noble lantern
#

i tried this without async one time

#

💀

#

poor server went down to like 15 tps when generating

noble lantern
#

"Master of Science in Physical Therapy" thanks google

silent steeple
#

milliseconds per tick

tender shard
#

ms/t would make more sense imho

noble lantern
#

ah yeah that definatly makes more sense

#

tyty

silent steeple
#

Ok Burchard thirty seven

noble lantern
#

?

silent steeple
#

?

tender shard
#

womp

noble lantern
#

womp

tender shard
#

finally being verified has a purpose

#

womp club member

silent steeple
#

mfnalex you are so zesty

noble lantern
#

wtf operagx has built in chatgpt

tender shard
silent steeple
#

Real (im at my lowest rn)

timid berry
tender shard
timid berry
#

OH NAW

tender shard
#

Debian 5 lol

river oracle
#

they;re out of stock :(

tender shard
#

back in 2008 or so, I had my first ever VPS there

minor aurora
#

wild question: is using spring a bad idea? really I just want to use something like spring data jpa to save stuff..
Actually, what is good practice to save player data?

river oracle
#

You could use spring though that seems overkill

#

Plus it would bloat the jar file like crazy

minor aurora
#

I thought so too...

#

I really don't want to make sql queries myself :,v is there a good way to do this?

eternal oxide
#

depends on the data

minor aurora
#

Player uuids/names + numbers, potentially relational data, too

eternal oxide
#

the amount of data and if it needs to be accessible offline would decide

minor aurora
#

~ 150 rows on one (player data) and could be 10ks on another table (if I were to save logs on a database instead of a *.log). It would only need to be accessible on the local computer the server is running at

eternal oxide
#

10k total for all players?

minor aurora
#

For now, the basics, just 150 rows on a table

eternal oxide
#

I'd probably consider using the player PDC and the world PDC

#

so long as you can keep the amount of data down

#

player PDC is only available when the player is logged in

#

world PDC is always available

minor aurora
#

Ooo I might need offline player data

eternal oxide
#

saves to the world files so is deleted when a world is deleted

#

yeah player pdc not available when offline

#

is great for player specific persistent data though

minor aurora
#

I'll go that way first then, and perhaps cry about it if/when I have to change it

#

Thanks!

#

.. I could make an interface and make it easy to change... yeah I'll do that

eternal oxide
#

there isd also chunk pdc

#

all entities have PDC, world and chunks

young knoll
#

And items

#

PDC could be available for offline players if I could figure out how to design this api

eternal oxide
#

I'd suggest identical to online Player

tender shard
#

I just use a Future for offline PDCs

young knoll
#

The problem is that player extends offline player

tender shard
#
public class OfflinePlayer {
  public CompletableFuture<PersistentDataContainer> getPersistentDataContainerFromDatFile();

or sth like that

young knoll
#

Yes but then that has to exist in player

#

And sure you could just make it instantly return their in memory pdc

#

But it’s kind of ugly

tender shard
#

player could override that and return the online PDC with an instantly completed future

golden warren
#

Where’s the best place to go to hire someone to develop a plugin for me?

tender shard
#

?services

undone axleBOT
golden warren
#

Gotcha thank you

young knoll
#

Someone suggested a new interface that only applies to offline players

#

And that’s all well and good but you’d need to check and cast to get an instance of it

#

Which is meh

eternal oxide
#

the getpdc in player woudl return the current pdc as normal, The offline player getpdc would return a future. I see no issue there.

young knoll
#

Don’t think those return types are compatible

eternal oxide
#

in getpdc in offline player it shoudl check if there is a player object, if there is return its pdc

young knoll
#

Either way this isn’t just about pdc

#

It’s all the offline players data

#

Currently it only adds 3 new methods, loadData, saveData, and isDataLoaded

#

But of course those methods don’t really belong in Player

#

But they have to be

tender shard
#

LoadedPlayer - an offline player whose .dat file is loaded lol

#

so it's like an online player (pdc, can check health, potions etc) but you can't send packets or anything

young knoll
#

Mhm

#

But then how do you obtain an instance of one

tender shard
#
// in Bukkit.class
public static CompletableFutuer<LoadedPlayer> loadOfflinePlayer(UUID);
eternal oxide
#

Bukkit.loadOfflinePlayer

tender shard
#

or LoadedOfflinePlayer

#

whatever

young knoll
#

Hmm

#

Not a bad idea

tender shard
#

would be quite easy to do, just get the .dat file, throw it into NBTIO or however it's called, then throw that into a compound tag

young knoll
#

That’s what it does currently

#

But it caches the values to variables

#

I guess technically I could just leave it as the compound, it shouldn’t be that much of an overhead

#

That’s the draft PR for reference

sacred berry
#

Is there a way to use custom colors in minecraft or just the default ones?

young knoll
#

What version

#

Also where, in chat?

jagged monolith
#

Use hex colours if 1.16+

young knoll
#

On wool?

sacred berry
young knoll
#

Yes 1.16+ supports full RGB chat

#

And pretty much anywhere else that uses text

sacred berry
#

Damn, I didn’t know

jagged monolith
#

Apart from above head names

#

unless you mess with packets

ivory sleet
#

which may end up affecting more behavior than what you initially think about

#

I mean ofc u can use NIO api

young knoll
#

It should only be written when someone calls save on said data

ivory sleet
#

yes but that is enough to require concurrent locking mechanisms

young knoll
#

But yeah you’d have to stop multiple save calls from running at once

#

Which is annoying

ivory sleet
#

Best way is probably a stamped lock

#

But else reentrant read write

#

Altho that does lose the optimistic read and upgradable lock part

young knoll
#

I’m not even sure what would be best

#

Should calls to save while it’s already saving block or just be discarded

ivory sleet
#

Well since u have to avoid concurrent writes

#

They’d need to be synced

#

Altho necessarily not on the server thread

#

But more like each coming write awaits the current write

young knoll
#

Hmm

ivory sleet
#

I mean you could if you wanna be simple:
ReadWriteLock lock = new StampedLock().readWriteLock();

//read (this is in a CF)
lock.readLock().lock();
try{
//file read
} catch (…){
} finally{
lock.readLock().unlock();
}

#

and the same for writing

#

Think this is what LuckPerms is doing iirc

young knoll
#

Seems easy enough

ivory sleet
#

Yeaaa, :)

young knoll
#

Idk what thread it should be run on

#

I don’t think mc has a dedicated io threaf

eternal oxide
#

OfflinePlayerData

ivory sleet
somber hearth
#

Hey how do I use the MOUNT packet for protocollib? I tried setting it like this:

passengerPacket.integers.write(1, 1)
passengerPacket.modifier.write(0, IntArrayList(botId))

But it crashes with an index out of bounds exception

young knoll
#

I believe so

#

Ah crap I also have to worry about minecraft trying to access the file, not just plugins

ivory sleet
#

Ahh shit, I forgot about that also

#

U got this tho :3

young knoll
#

Plus I need to decide what to do if the player joins while their data is loaded

ivory sleet
#

U block it

#

Like in apple

#

(At that stage I think?)

remote swallow
#

if the join you just like force run any tasks that are queued or whatever then load their data

ivory sleet
#

Or wait let me ask

#

Does the OfflineData thing represent the .dat file?

#

or does it represent the player data

young knoll
#

It represents the contents of the file

ivory sleet
#

Ah, then you don’t have to care right?

#

Just read the file, and map it to the object regardless

#

Cuz then you only worry about writes

young knoll
#

Yeah

#

My first idea was to block them joining and force a write first

#

So nothing is lost

ivory sleet
#

force a write?

young knoll
#

Force anything that’s been modified in OfflinePlayerData to be saved so it isn’t lost

#

And then let minecraft read it

ivory sleet
#

Oh yeah, well that’s just a write right

#

Myea

#

I think that works, when does mc decide read it btw?

#

in terms of spigot events

young knoll
#

Good question

#

Lemme check

#

I believe it’s after the prelogin event and before the login event

#

Also minecraft doesn’t write to the data file directly

#
File file = File.createTempFile(id + "-", ".dat", this.playerDir);       NBTCompressedStreamTools.writeCompressed(compound, file);
File file1 = new File(this.playerDir, id + ".dat");
File file2 = new File(this.playerDir, id + ".dat_old");
SystemUtils.safeReplaceFile(file1, file, file2);```
ivory sleet
#

Ahh

#

Just what does safeReplaceFile do? I assume thats a mc util class

#

And is this async? (If u can find it out, what thread 😅)

young knoll
#

Reading is done from netty

#

I’m not sure about writing

river oracle
#
        if (this.scheduledTask == null || this.scheduledTask.isCancelled()) {
            return;
        }
``` this won't error right once I reember combining a nullcheck in an or statement and it erroring until I sepparated them
young knoll
#

It should fail fast

#

And therefor be fine

worldly ingot
#

Yeah if the first condition is true it won't evaluate the second

young knoll
#

So it appears safeReplaceFile does the following:

  • Remove the old backup
  • Create a new backup
  • Remove the old data file
  • Rename the temp data file
  • Restore from the backup if above fails
#

Each one is attempted 10 times

#

Which I suppose is one way to make sure it gets saved

real fable
#

I'm trying to simulate blocks particles that spawns when a player run on a block but
MaterialData is deprecated.. anyone know how can I do that ?

worldly ingot
#

BlockData is the replacement for MaterialData as of 1.13

real fable
worldly ingot
#

Gonna have to narrow that down a bit, chief

#

There are a few getColors()

#

Though as far as we're aware, yes, they should all work

#

setColor() I meant

#

What are you trying to call it on?

#

Oh, you need to cast the meta to LeatherArmorMeta

young knoll
#

Smh generics when

river oracle
#

frfr smh generics when

#

I'm sure that won't make anything annoying

worldly ingot
#

LeatherArmorMeta meta = (LeatherArmorMeta) chestplate.getItemMeta();

strong niche
#

is this were id ask for help with running certain cmds with plugins

worldly ingot
strong niche
#

ok ty

noble lantern
#

Is this method: https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html#getHostAddress--

For getting the IP of the currently running machine consistent across windows, Mac and Linux? Would it ever return something other than the external IP address if i do something like:

Basically just not sure if it would return something funky in an environment like pterodactyl/docker where networking might be done differently

try {
  final InetAddress address = InetAddress.getLocalHost();
  return "http://%s:%s/%s.zip".formatted(address.getHostAddress(), this.resourcePackServerPort, fileUUID);
} catch (UnknownHostException e) {
  throw new RuntimeException(e);
}
minor aurora
#

can spigot run paper plugins?

remote swallow
#

if they have a normal plugin.yml and dont use any paper api yeah

#

if they use any paper methods they wont run anymore

minor aurora
#

So, essentially, no. Thanks~

swift shell
noble lantern
#

would there be a way to always ensure you can receive the external IP address? Thats how i was doing it before with a config file but im trying to go for a near-seamless install where the user only needs to open a port for setup

#

guess i could always add an option that if the ip address received is 127.0.0.1 i could retrieve the config value as a fallback

#

yee imm a do that ty

noble lantern
#

good idea thanks :))

sour folio
#

some people were telling me to add hidden item data how do i do that?

kind hatch
#

?pdc

sour folio
small holly
#

Sooooo I am having the weirdest issue ever.
my @EventHandler isn't wanting to work.
I have registered the listeners in the onEnable(), I have made sure that the class is implimenting Listener. I have added a PlayerMoveEvent listener as a test to be sure this event just wan't firing. I can't think of why this isn't working

#

Tried putting in the same class because idk maybe broken but nope

#

no errors but no debug messages

#

if I put a debug in the checkFishingTimes() method it prints

remote swallow
#

are you moving your head around or actually walking

#

oh wait

small holly
#

all of the above

remote swallow
#

you have 2 instances of the class

small holly
#

Tried with just the one

#

same issue

remote swallow
#

add (ignoreCancelled = false) to the event handler

vital yacht
#

I think they would notice if the event was cancelled lol

small holly
#

If it was canceled I wouldn't be able to move

vital yacht
#

Can you send your full main and listener class in a paste?

small holly
#

Uhhh its a really old project so don't judge the poor code XD

#

one sec brb

vital yacht
#

Can you send your logs?

#

Also what server jar are you using

small holly
#

no errors so log kinda pointless

wet breach
small holly
small holly
wet breach
#

Thats the issue try in survival

vital yacht
#

For PlayerMoveEvent?

small holly
#

No events are being triggered

vital yacht
#

Try control + f your plugin name in the logs

wet breach
#

Well test the events in survival not in creative

vital yacht
#

Including startup logs

wet breach
#

Because some events dont fire in creative or have their own specifically for creative

vital yacht
small holly
#

Yes only a select few though

kind hatch
#

Maybe try adding @Override to your #onEnable() and #onDisable() methods.

vital yacht
#

That won’t change anything

wet breach
vital yacht
small holly
wet breach
#

Anyways i told you what to try

vital yacht
#

And make sure your paper fork isn’t removing System.out for some reason

#

Try using Bukkit.broadcast

small holly
#

works fine

wet breach
#

Alright you both can keep trying to figure out other causes i guess. Not sure why its an issue to test it in survival lol

small holly
#

Oh I see the issues now

#

Plugin GlitchMCLootLake v2.0.0 has failed to register events for class dev.selena.glitchmc.lootlake.FishingEventListener because com/mewin/WGRegionEvents/events/RegionLeaveEvent does not exist. forgot to add the WGRegionEvents plugin lmao

vital yacht
#

See there was an error

#

Control + f always wins

wet breach
#

That would do it, but for future reference though, test in survival

vital yacht
#

That’s not necessary for the events being tested

kind hatch
#

^

wet breach
#

Because as i said not all events fire in creative

vital yacht
#

Almost all of them do

wet breach
#

No

small holly
vital yacht
#

Besides damage events what else doesn’t trigger?

wet breach
#

Inventory events, some move events wont. Other stuff

kind hatch
#

Most inventory events. There are some events for creative mode, but they are lacking.

vital yacht
#

Inventory events trigger, just not well

remote swallow
#

is there a way to get the default damage of an item without nms

vital yacht
#

The client just doesn’t send info when in creative

remote swallow
#

but what part of it

#

if i do ```java
AttributeModifier damageModifier = new AttributeModifier(attributeModifierUUID, "damage adding", newValue * 0.5, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlot.HAND);
meta.removeAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier(attributeModifierUUID, "", 0, AttributeModifier.Operation.ADD_NUMBER));
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, damageModifier);

wet breach
#

So i looked and it doesnt appear there is api for getting item attributes like damage

#

Attack damage is the damage from entity not sure if that also includes if it uses an item

remote swallow
#

a normal item without any changes is like this so

tropic lark
#

can someone help me. I had a eco plugin downloaded but deleted it since it had a loud and annoying notification so i downloaded another one and it keeps telling me i dont have perms to do /money or anything ive already /eco reload but nothing is working

#

dont even know if this is the right chat

wet breach
tropic lark
#

any suggestions ?

wet breach
#

Get a permissions plugin. Luck perms seems the be the go to. i personally use group manager but others will yell about it being outdated or something even though it is still maintained lol

tropic lark
#

dang, well thank you i dont even know if this kind of issue is supposed to even be posted here or under server

wet breach
#

It more of a server problem then it is development

#

But its fine, you didnt need extensive help and no one is here chatting lol

tropic lark
#

@wet breach im sorry but i downloaded it and its already hurting my head

#

im new to plugins and stuff so i hope you can forgive the ping

wet breach
#

Np. But i dont know luck perms. They should have a wiki on how to set it up and use it though

#

There might be someone here who knows it better then me

tropic lark
#

i downloaded group manager im on a spigot server

kind hatch
#

LP is easy dawg

wet breach
#

Oh Gm

#

Gm is super easy. Just open up the permissions yaml file. And either create a group or use the existing ones and add the perms you want

#

The plugin in question you are having issues with earlier it should have on its resource page the relevent permission nodes

tropic lark
wet breach
#

Then once you finish adding perms to the group you can then use a command to add yourself to said group in gm

tropic lark
#

im running my server on sharkbite

wet breach
#

Dont know that host

#

But

tropic lark
#

sharkbyte**

wet breach
#

First op yourself, and then using gms resource page you can from within the server add perms to the group you want and add yourself to said group

tropic lark
#

.. how do i find it in the server

somber scarab
#

@wet breach yooo frost

#

how u doin :))))))

#

sooo uuuuuhhhhh.. I am using World Edit's api in my minigame.

wet breach
shadow night
#

Is there a way to check if a block was placed by a player or generated naturally?

remote swallow
somber scarab
#

and compare aftrer

tropic lark
#

ya ...

remote swallow
kind hatch
tropic lark
#

when i was downloading it it didnt have a spigot option

remote swallow
#

bukkit is spigot

somber scarab
shadow night
#

I wonder if I can use block PDC to make stuff like modded

tropic lark
#

im lost ...

shadow night
somber scarab
kind hatch
tropic lark
#

im currenly running a spingot server so i can use gyseer plugin

somber scarab
tropic lark
#

and that doesnt support buket servers i believe

remote swallow
#

if there isnt a spigot option, use the bukkit one, it'll work

kind hatch
#

Spigot servers can run bukkit plugins as they are compatible.

somber scarab
#

better yet, host yourself

shadow night
#

I bet if you changed one lil line in the pom.xml of most spigot plugins it'd run on bukkit and I bet it work the opposite way too

tropic lark
#

the gyseer plugins to run crossplatform and thats a main one for my server even tho its really just for my group of friends that have bedrock

remote swallow
#

on the luckperms download you can use the bukkit version, you dont need to change the server version

kind hatch
#

^

wet breach
#

Gm doesnt have a specific version and is typically labeled bukkit but it will work on spigot or paper and most other forks that implement bukkit api

kind hatch
#

It even gives examples on the website. smh

noble lantern
hallow jackal
#

Is it possible to use Player#openSign on a "fake" sign created using Player#sendBlockChange?

somber scarab
#

Guys an open-ended question about design choise of my plugin:

Im running a minigame where people would be teleported to a 9 chunked-randomly vanilla generated terrain (so the map is never the same).

Lava slowly creeps upwards and whoever dies last, wins.

After a game, This area needs to be get rid off. and players teleported back.

I thought about using multiple worlds for multiple game lobbies, but that turned to be very resource intensive and I would like my plugin to work on an 8 gig server.

Any Ideas on how to efficiently and smoothly make lobbies of randomly generated 9 chunk terrain and use it then get rid of it?

wet breach
somber scarab
#

and frostalf. I know, I dont wanna have a convo about upgrading yet again.

kind hatch
hallow jackal
#

yes i'm on 1.20.1

wet breach
hallow jackal
#

can't find a way to open said sign's gui without placing it "for real"

kind hatch
#

I'm leaning towards no as I believe that it looks for placed signs on the server, not the client.

somber scarab
noble lantern
#

what if you placed a sign in another world and then opened that sign to the player 💀

wet breach
#

That being the case the api is probably not updated yet to handle that

#

So odds are it still wont work from the api like that

shadow night
noble lantern
#

too much can go wrong with that one

wet breach
#

Got to give some time for api to fully update to 1.20 features

#

Might take a couple of months but it will get there uwu

shadow night
#

Or you could make an algorithm that searches for the nearest air

wet breach
hallow jackal
wet breach
#

This would be cool in fact

#

As i have a game mode in mind that could use that

noble lantern
#

29mil*

somber scarab
noble lantern
#

if you got players at 29m blocks somethin wrong CH_Kek

hallow jackal
#

sending block updates to unloaded chunks is very risky afaik

shadow night
#

Doing anything within unloaded chunks is a bad idea

wet breach
noble lantern
#

and 4 is excessive

#

youll likely be breaking the signs when your done, so 1 chunks prolly plenty

somber scarab
wet breach
#

Using regions from worldguard just helps with borders automatically since it saves that info etc

#

And you will need something like that anyways to prevent players accidentally leaving said arena

somber scarab
hallow jackal
noble lantern
#

Sign extends BlockData iirc

wet breach
noble lantern
wet breach
noble lantern
#

so tbh theyre not even blocks (you can still get block data and cast it back and forth though)