#help-development

1 messages ¡ Page 1152 of 1

chrome beacon
#

Intercepting and hiding messages will break them

dull python
#

Because my other plug-in is implemented by sending content in the player chat bar, but because it will push the player's message, I need to capture the message sent by the player and resend it to this player so that he can see the previous message again.

chrome beacon
#

You'd have to disable it entierly

dull python
#

If you operate on the information, it will destroy them, but I just save them temporarily. When he stops operating my plug-in, I send him out as he is, without doing any other operations.

dull python
chrome beacon
#

Yes set it to false

sly topaz
#

you would rather just avoid making system that depend on chat at all tbh

#

at some point chat reporting might not even be capable of being disabled, so I wouldn't be surprised if functionality that depends on chat gets more broken than it already is

chrome beacon
dull python
chrome beacon
#

Try removing the validation data from the packet

dull python
dull python
chrome beacon
chrome beacon
dull python
#

No modification is done, only storage and reading

chrome beacon
#

Yes

#

I know

#

You can just get around the issue by using api send message methods

#

They will send as a system message

#

Rather than a player one

grim hound
#

Then how the hell do I run it?

eternal night
#

./gradlew jmh

#

cc @grim hound

grim hound
eternal night
#

in your projects root dir

slate siren
#

I am interested in a coding kit system but I am confused about something, now there are 6 groups in Luckperms

A total of 6 permissions, the kit system I have set up always gives the player the highest weight, Now if a player has the highest weight then the other lower ranks are also visible, what if he chooses another kit despite being the highest weight after he die How do I get him to give me that kit?

slate siren
#

:D..

chrome beacon
#

Just track which kit the player has selected??

slate siren
#

I have been sleepless for exactly 30 hours.

slate siren
#

For example, if the player has a high rank and has chosen a low rank at that moment, he should automatically be brought down to the lowest rank when the high rank period ends.

north nova
#

what

slate siren
#

😂

slate siren
#

WHAT

north nova
#

can u give an actual example

#

what you're saying doesn't make sense

slate siren
#

I really have no idea what to say

#

Think about it this way

grim hound
#

You buy mvp for 30 days

#

And after that you get vip back

north nova
#

are you using luckperms?

slate siren
#

There is a kit system, there are 6 kits and each kit has a special permission,

I created 6 Ranks with Luckperms and added a permission to each one, now will I be able to choose the kit I want with a gui?

slate siren
#

Luckperms + my plugin

#

My plugin is BlocksinKit

north nova
#

so you're having trouble with expiring ranks?

#

or with actually claiming the kit based on their rank

slate siren
#

Manages kits, creates, and manages things like death-drips, self-drops, and respawns.

#

@north nova Actually I can explain it in more detail, 1 minute.

ornate remnant
#

set a min weight for each kit, if the players rank weight exceeds or equals they can claim the kit

slate siren
#

@north nova

#

?paste

undone axleBOT
slate siren
#

When the player respawns after dying, he chooses the kit of the rank with the highest weight.

#

I want the ability to select this manually.

#

Yea

north nova
#

so you want to allow the player to choose the kit?

ornate remnant
#

do you want them to be able to choose which kit they get when respawning?

slate siren
north nova
chrome beacon
#

Oh that could lag the server quite badly

ornate remnant
north nova
#

you should probably cache your kits lol

#

not load from file every time you give a kit

#

and

ornate remnant
#

well, make a gui or a command, allow them to set

#

save somewhere

#

on load

#

save which kit

#

when they die

#

check if there is a set value

#

if not

#

get highest

#

public void setKit(player, chosenKit)
      saveToConfigAndCache(player, chosenKit)


public Kit getPlayerKit(player) 
      return getKitFromCacheOrConfig(player)

public void OnPlayerDeath(player) 
      givePlayerKit(player, getPlayerKit)
slate siren
#

I have made a much more complicated system now, to summarize it briefly, if you have a kit and you have the permission for that kit, that kit appears in the gui. and when you click on that kit, only the commands work

#

?paste

undone axleBOT
slate siren
#

xdd

#

very complicated xdd

ornate remnant
#

not really

north nova
#

ewgh

ornate remnant
#

just have a place to store if they have a chosen kit

chrome beacon
#

Doesn't sound complicated

ornate remnant
#

if they dont

#

get highest

#

not that hard

#

Also you should really break down your methods

#

instead if letting the give method find the kit make another method to find it

#

etc

slate siren
#

The system here works like this; now there are 2 types of permissions defined, one allows the kits to be seen, the other permission determines which kit will be given after death

XD

north nova
#

so what is your issue exactly?

ornate remnant
#

lol

#

what

#

ive told you what to do

slate siren
#

1m

#

https://imgur.com/a/CuzsJ3C

Generally, when I create a kit, a special YML is created and installed for each kit without any problems, and a special name + permission is set for each kit. This permission determines which kit will be given to the player after they die. Now, there is only one thing I want to do, there are 6 kits and 6 weight levels. The player with weight 2 should also see the kit at weight 1. All I want is a gui that opens with a command and the chance to easily select kits in the gui

#

yea

slate siren
ornate remnant
# slate siren I'm confused xd

Whenever a player sets a specific kit to be chosen on their death, save what kit they want. If they do not have a stored kit give highest kit available otherwise give the kit they saved

slate siren
#

So, let's say the player's chosen kit weight is 3, when the player's weight rank of 6 expires, when hes respawn, hes chose 3 again. He will not choose the default kit, what will we do about this?

ornate remnant
slate siren
alpine plover
#

Hi everyone,
I've had this bug for a couple of days now, and I just can't seem to solve it.
The bug happens between 2 different versions. The model is the same and the way it is spawned is the same, what changes is the version: one in 1.19.4 and the other in 1.21.1.
https://imgur.com/a/pUTvVAD

#

The model is mirrored in 1.21.1

#

I tried running the command “/summon minecraft:item_display ~ ~ {item:{id: ‘iron_sword’,Count:1},item_display: ‘fixed’}” in singleplayer in both versions and it would appear that the model is swept into a different yaw. I don't understand why Minecraft changed this.

vital ridge
#

I'm having a weird issue:

@EventHandler
    public void onPlayerJoin(PlayerJoinEvent e) {

        Hotbar.initializeHotbar(e.getPlayer());

    }

If I try using sysout under the onPlayerJoin method, nothing happens, its like the event was never registered (even though it is), but whenever I run my sysout code inside the initializeHotbar function, it successfully prints to the console

sly topaz
#

that doesn't make sense

#

that said, you should use your plugin's Logger instance for logging, not sysout

rough drift
sly topaz
#

well, not solving but circumventing it, though I can see that happening

rough drift
#

but yeah it was very funny

#

me and my uncle wrecked our brains figuring it out

sly topaz
#

data races are hard but at least when working in the JVM, there's a bunch of nice tools that can help you figure them out so it isn't too bad

rough drift
vital ridge
#

idk what was wrong

vague topaz
#

Is there any event, that calls when player inventory is cleared(Using Creative clear button or command)?

rough drift
#

nop

#

usually what happens is a bunch of quick clicks on the entire invneotry

ornate remnant
#

?mappings

undone axleBOT
ornate remnant
#

You could in theory check if that method is called and if they’re in creative etc

#

Wouldn’t be reliable though

young knoll
#

Creative mode is client side

#

It’s basically magic to the server

ornate remnant
#

Damn

#

Typical mojang

surreal loom
#

or it may be bukkit that does that idk

lilac dagger
#

but i guess it makes sense

#

just say, if i'm creative, just give me item x

surreal loom
#

player.getGameMode() == (GameMode.CREATIVE)

lilac dagger
#

and the server is like, yeah, you're in creative, there you go

ornate remnant
ornate remnant
#

Ty

surreal loom
#

yep

young knoll
#

The way it works is
Survival: player picks up item -> item is moved to their cursor “slot”, player places item -> item is moved from cursor to the new slot
Creative: Player picks up item -> item is destroyed on server, player places item -> item is created on server

ornate remnant
#

Crazy

#

Anyways for caching data that needs to be the same on every server would yall cache on the proxy or use a redis srv

surreal loom
#

redis

#

also allows for multiple proxies

ornate remnant
surreal loom
#

i figured

lilac dagger
#

a bunch of events didn't trigger for me while in creative

young knoll
#

There’s a reason we often tell people to test in survival

sage patio
#

Hey, I'm trying to load my Kotlin Plugins and I get this error:
https://pastes.dev/rwVSVGH7Ra
GCore is not using kotlin-stdlib and GGangs is using kotlin-stdlib
I've tried to relocate kotlin using this:

tasks {
    shadowJar {
        relocate("kotlin", "me.xii69.kotlin")
    }
}

And this happened:
https://pastes.dev/5XfC4XYxhO
Any idea?

remote swallow
#

no point in shading kotlin, library it

sage patio
#

i'm using kotlin-stdlib because it doesn't shade kotlin anymore and the plugin size in not 2mb

remote swallow
#

dont shade the std lib

#

library it

sage patio
#

does compileOnly shade it?

remote swallow
#

no

sage patio
#

so why this is happening

blazing ocean
remote swallow
#

put both of your full build.gradle.kts on a paste

sage patio
blazing ocean
#

Then you're not shading it

sage patio
#

I've Kotlin in GCore

#

so i just compileOnly(kotlin("stdlib") in my other plugins

#

it was working till today

remote swallow
#

run a clean build of both projects and make sure the jars get updated, im not seeing gcore shading kotlin and if gcore provides kotlin somewhere you shouldnt need to compileOnly the std lib

#

when i have my kotlin plugins i bukkit library the stdlib and it avoids any issues with shading or transitive deps

dull python
sage patio
sage patio
remote swallow
#

the libraries section on here

surreal loom
#
package me.inloadings.particles;

import me.inloadings.particles.command.EffectRun;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Objects;

public final class Particles extends JavaPlugin {
    private static Particles instance;

    @Override
    public void onEnable() {
        instance = this;
        Objects.requireNonNull(getCommand("EffectRun")).setExecutor(new EffectRun());
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
    public static Particles getInstance(){
        return instance;
    }
}
package me.inloadings.particles.command;

import me.inloadings.particles.effect.SpiralEffect;
import org.bukkit.Effect;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

public class EffectRun implements CommandExecutor {

    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
        if (!(sender instanceof Player player)) {sender.sendMessage("Only players can run this command"); return true;}
        if (args.length != 1) return false;
        if (args[0].equalsIgnoreCase("spiral")) {
            new SpiralEffect(player.getLocation(), Effect.SMOKE);
            return true;
        }
        return false;
    }
}
#

i keep getting this error when using this plugin:

java.lang.NullPointerException: null
        at java.base/java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
        at particles-1.0-SNAPSHOT.jar/me.inloadings.particles.Particles.onEnable(Particles.java:16) ~[particles-1.0-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:640) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:589) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:754) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:516) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:331) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1215) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[pufferfish-1.21.1.jar:1.21.1-18-63ce67d]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[14:35:25 INFO]: [Particles] Disabling Particles v1.0-SNA```
vast ledge
#

?paste

undone axleBOT
vast ledge
#

^

#

Use iot

#

it*

surreal loom
#

for all or just error

vast ledge
#

Create 1 for error and 1 wit code snipets

ornate remnant
#

did you register the command in the plugin.yml

surreal loom
#
version: '1.0-SNAPSHOT'
main: me.inloadings.particles.Particles
api-version: '1.21'
commands:
  EffectRun:
    description: Runs an effect
    usage: /effectrun <effect>```
#

yep.

remote swallow
#

commands should be all lowercase

#

if you remove the requireNonNull you'd get a more descript error afaik

surreal loom
#

doesnt change anything.

remote swallow
#

make sure you've ran a clean package/build after adding the command to plugin.yml

surreal loom
#

i think my intellij is just fucked

remote swallow
#

your build system is probably using an outdated file

surreal loom
#

made this plugin 2 seconds ago

remote swallow
#

run a clean package/build anyway

surreal loom
#

yep nothin

#

im compiling with just base maven

remote swallow
#

decompile the jar file and check the plugin.yml contains the command

surreal loom
#

it does

remote swallow
#

double check your server has an updated jar file

surreal loom
#

im using pufferfish

#

should i try base paper

remote swallow
#

as this is the spigot server, spigot

surreal loom
#

.

#

ok

#

nothing

bold plume
#

Does anyone know of a good plugin that manages mobs to spawn across the map without blocks like grass being needed for a cow to be spawned, for example?

chrome beacon
junior pewter
#

i'm trying to get Enchantment from Material.POTION, what should i add there?

ornate remnant
#

get potionmeta

quaint mantle
#

what's the packet of action-bar?

#

i mean how is it called

obtuse hedge
#

i think its a chat message? with a special type?

blazing ocean
quaint mantle
#

okayokay thanks

#

it's because im in a server and i have a packet canceller mod

obtuse hedge
#

packet id 0x4C

quaint mantle
#

and action bar is annoying me

obtuse hedge
#
Displays a message above the hotbar. Equivalent to System Chat Message with Overlay set to true, except that chat message blocking isn't performed. Used by the Notchian server only to implement the /title command.

Packet ID    State    Bound To    Field Name    Field Type    Notes
0x4C         Play     Client   Action bar text    Text Component
blazing ocean
#

exists too ig

quaint mantle
#

it's S2C right?

blazing ocean
#

yes

quaint mantle
#

found it

#

is there a way to like, send actionbar in negative position?

#

to send it like down

#

i saw a plugin that does that but i don't have the code

blazing ocean
#

fonts

quaint mantle
#

with fonts you mean literally fonts ?

blazing ocean
#

yes

quaint mantle
#

or like unicode chars?

blazing ocean
#

resource packs

quaint mantle
#

aw men 😭

quaint mantle
#

Is there a way i can do a event for packets?

#

Oh wait i know what i can set a packet handler of the packet i wanna listen and call my event

young knoll
#

That’s basically what PacketEvents/ProtocolLib do

blazing ocean
#

PE > Plib fr

quaint mantle
#

Is this okay to cast NMS itemstack to bukkit itemstack?

net.minecraft.world.item.ItemStack nmsItemStack = clientboundContainerSetSlotPacket.getItemStack();
ItemStack bukkitItemStack = CraftItemStack.asBukkitCopy(nmsItemStack);```
remote swallow
#

cast no, calling that method yes

quaint mantle
#

Oh okay but will that work?

#

Will it keep the meta and everything?

remote swallow
#

should do

quaint mantle
#

Okay thanks

#

And other question, will it keep the PDC?

#

Yeah right?

remote swallow
#

probably

quaint mantle
#

okay thanks

worldly ingot
#

It does, yes

quaint mantle
#

thank you god choco

worldly ingot
#

I think just "Choco" is good, but I appreciate the enthusiasm!

quaint mantle
#

Lol

worthy yarrow
#

Is choco good at physics? Kek

worldly ingot
#

I was never amazing at it

#

But I understand it

worthy yarrow
#

I’ve been doing so much math for the past 5 days

#

And I still haven’t gotten it right

quaint mantle
#

Math is awesome, is literally the answer to everything

#

(not literally)

#

but almost

worthy yarrow
#

Math is cool but also fuck math I hate it so much

remote swallow
#

e can be the answer to everything

#

12+84?

#

e

quaint mantle
#

Yeah bro i was going to say that

remote swallow
#

or egg

quaint mantle
#

;v

worthy yarrow
#

Fuckkkkkkkkkkkk

#

I just remembered I have to do bouncing physics too

#

I'm thinking the algo is gonna have to be based on the velocity of the disc at the time of the first detected collision... but how in the hell am I going to figure the actual "bouncing" or "skipping" mechanic of disc golf throws...

ornate remnant
young knoll
#

Does that count as being “good” at it

remote swallow
worthy yarrow
ornate remnant
remote swallow
#

500+1902951=egg

deep herald
#

how do i check if a player is moving too far from a location?

worthy yarrow
#

playerMoveEvent has a from and to method

#

Just check the to location against whatever location

deep herald
#

if they move more than 20 blocks they cant go farther

worldly ingot
#

Yeah, you want a distance check

#

I take it survivalLocationMap is a map of locations. In which case, event.getTo().distanceSquared(survivalLocationMap.get(event.getPlayer())) >= 400

#

(400 = 20 squared)

deep herald
#

oh

worldly ingot
#

Yeah, that looks fine to me

deep herald
#

alr thx man

worthy yarrow
deep herald
#

cant let that happen fr

worthy yarrow
#

Minor thing but yk

deep herald
#

fr

wraith delta
#

How do you ignore the inventory clicks and only listen for chest clicks?

lilac dagger
#

player get inventory != clicked inventory

#

but there's more to it

lost matrix
#

Check if the clicked inventory is the top one and do nothing otherwise

lilac dagger
#

yeah, i forgot which method had the top bottom view

pure dagger
#

what do you use for making guis? any libraries or what? because normally its so annoying: itemstacks, item metas, setting the items, detecting properly the clicks etc

lost matrix
#

?gui

lost matrix
#

If you want to write your own gui library you can follow this

pure dagger
#

mkay

glossy laurel
lost matrix
deep herald
#

how do i set the world to day without resetting the day counter?

remote swallow
deep herald
remote swallow
#

it shouldnt

#

read the javadoc

deep herald
#

so if i set it to 0 itll go to the next day

quiet ice
#

hm, the see alsos are a bit whack in that class

quaint mantle
deep herald
#

if anything use 1.8

#

its not as good as new versions but its better than 1.7

quaint mantle
#

The spigot I'm making is for 1.8.9 pvp servers, with support for 1.7.10, but for some reason this happens, to follow an idea that not even older servers like Minemanclub

honest verge
#

does anyone know how I could fix the following error: https://mclo.gs/5OpmEzU ?
i'm learning how to create plugins, and am just trying to detect when a player jumps & send them a message; the plugin is in Kotlin, using Maven

sullen marlin
#

?whereami

honest verge
#

oops

#

sorry

quaint mantle
quaint mantle
deep herald
#

W edit

quaint mantle
# deep herald W edit

But do you have any idea what that problem is? I've been thinking for a while about how to solve it

deep herald
#

i dont make practice servers 24/7

quaint mantle
quaint mantle
#

?1.8

undone axleBOT
deep herald
#

how do i drop an item at a location

eternal night
#

World#dropItem

deep herald
ashen agate
#

Hey all! Does anyone know why when I call org,bukkit.block.Chest#close(), the chest stays open and doesn't close? But when I use #open() it opens just fine?

lost matrix
#

chest.close();
chest.update(true);

ashen agate
#

Tried that, they remain open

viral mirage
#

guys, i need help with the scoreboard and tablist/nametag prefix.

The scorreboard work, the tablist prefix is set, but the nametag prefix dont work.
does anybody has an idea, what could be wrong?

ashen agate
viral mirage
#

i use teams, the player joins and the player team created (like 0000Enty) with prefix etc. The Nametag prefix works, if i disable the scoreboard. But i need both :/

sly topaz
sly topaz
viral mirage
deep herald
sullen marlin
#

seems ok

deep herald
#

i tried that

sullen marlin
#

modded discord 💀

deep herald
#

yeah?

worldly ingot
#

player.isSleeping() won't be true at that point

deep herald
worldly ingot
#

Events are generally fired just before an event actually occurs, but if that event is called, it's gonna happen (unless it's cancelled)

#

So you can listen on HIGHEST priority and ignore cancelled events, should work fine

deep herald
#

alright

worldly ingot
#

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)

deep herald
#

so event priority does matter

worldly ingot
#

You never edit an event in the monitor priority. It's meant to monitor the result of it. Though you probably want to cancel the event, so highest is where you should be

blazing ocean
#

Event is listened to purely for monitoring the outcome of an event.

No modifications to the event should be made under this priority

deep herald
#

oh

worldly ingot
#

Only reason I'm suggesting HIGHEST is so you can ignore other plugins cancelling entering the bed

slender elbow
#

honestly the server should just stop the vm if an event is modifier in monitor priority

worldly ingot
#

Just nuke the whole server

blazing ocean
#

kernel panic

worldly ingot
#

Delete root

worldly ingot
#

You can do it on normal priority if you really want

worldly ingot
#

Then your world doesn't exist (or you didn't remove the isSleeping() call). Though you don't need to get the world by name. You have the player. Get their world

#
@EventHandler(ignoreCancelled = true)
private void onSleep(PlayerEnterBedEvent event) {
    Player player = event.getPlayer();
    this.setWorldToMorning(player.getWorld())
    Bukkit.broadcastMessage(player.getDisplayName() + "&owent to sleep. Sweet Dreams!");
    event.setCancelled(true):
}
#

That should work fine

#

If that doesn't work, you haven't registered your listeners

deep herald
#

i might just delete the whole machine

#

ok im just gonna delay the wakeup thing

#

for run task later is it done in ticks?

worldly ingot
#

Yes

remote swallow
worldly ingot
#

It would require having every single event override hashCode() and equals()

#

I absolutely do not want to do that

remote swallow
#

Miles or coll can

deep herald
#

i wanna check if they are in bed

worldly ingot
#

In that event, they're going to be in the bed

#

That's why that event is being called

deep herald
#

mmm

lapis mulch
#

Hello, i have a bug in my maven Dependency , i don't understand why it don't import Apache

#

I need to use Mojang api to get skin signatures, i don't want to use craftBukkit, why simple Libs don't works ?

worldly ingot
#

Bukkit doesn't bundle Apache Commons IO

#

Eh I guess you have it defined in your pom. I guess just make sure you refresh the project. Artifact looks fine

echo basalt
#

that property import 👀

echo basalt
#

just make a wrapper class and do something fucky

#

or inject a proxy method that throws an exception

worldly ingot
#

Yes let's add more ASM hacks into CraftBukkit. It's not nearly slow enough

young knoll
#

Okay!

river oracle
#

How does everyone do their project icons I legit don't know any good resources to do this shit with, but also I don't want terrible looking icons. Ideally I want to avoid AI because its cringe as fuck

echo basalt
#

hm how the fuck can I just use every variable like usual without a ()

slender elbow
#

idk I just paid lax

echo basalt
#

sounds cringe

subtle folio
wet breach
river oracle
river oracle
young knoll
slender elbow
#

I mean gimp is probably fine, it gets a lot of crap for its ux; personally anything that isn't gimp is good lol, krita, paintdotnet, paint tool sai, clip art studio, ...

river oracle
#

the linux conundrum :<

slender elbow
#

krita

river oracle
#

never heard of krita

slender elbow
#

chefskiss

river oracle
#

i'll check that one out

echo basalt
#

oh god krita

slender elbow
#

obviously no tool is gonna make you draw better than your skill level

#

but yeah

echo basalt
#

I tried making a 10000x10000 image and it just tracks it as a bitmap internally

#

ram go boom

river oracle
#

I find it hard to navigate and use

subtle folio
#

photopea!!

wet breach
#

my pfp was made using MS Paint just fyi

river oracle
#

yeah I really do I just like don't feel motivated to ever actually open gimp and fuck around with it because I find it annoying to use

#

I'll prob end up checking out krita and photopea and see how that works

#

my GF just needs to setup her PC she is actually a talented artist It'd be great to have her throw together something beautiful for my sorry ass

wet breach
#

but as others have said, the tool isn't going to make you actually better at doing art though. If anything it will let you make it shinier or some other effects more easily, but not actually creating the image itself depending on what it is.

river oracle
wet breach
#

I personally don't like doing art even though I am good at it. I have a pen pad specifically for art in storage somewhere

river oracle
#

I generally dislike doing art and I'm particularly bad at it, but its a useful skill to actually hone and become decent at

wet breach
#

I always pay someone else to do art for me 😛

#

except for stuff I personally use like my pfp

river oracle
#

being a poor college student sucks :P

wet breach
#

and my background on my profile I also created

wet breach
river oracle
wet breach
#

Reason I am actually good is due to my mother actually having taken formal art classes in college and teaching me at home and me watching her. So I don't only know how to draw on computer, I can actually draw on paper as well and do shading and the sorts

river oracle
#

its kinda rough

wet breach
#

lol

river oracle
#

granted I'm the only one actually good at math or coding so goes both ways I suppose

#

sometimes my mom calls me to do math for her 😭

wet breach
#

if you want to get better just watch some youtube stuff on art

worthy yarrow
#

Real art pros use ms paint

wet breach
worthy yarrow
#

I'm so good at ms paint I can basically use it on paper... with colored pencils and markers kek

river oracle
#

converting my library to kotlin tonight woohoo pain and agony

#

nothing but rewriting my buildSrc

#

again

worthy yarrow
#

Better than physics manipulation

echo basalt
#

yo y2k checkout this incredibly cringe pattern

river oracle
echo basalt
#

because I need () -> Int

#

and I don't want to make getters or whatever the fuck

#

or open ()'s because it's cringe

river oracle
#

💀

#

to each their own I suppose

echo basalt
#

I could open getters but it looks weird

subtle folio
echo basalt
#

kotlin

subtle folio
#

checks out

wet breach
#

seems pretty dumb

echo basalt
river oracle
echo basalt
wet breach
#

ok, but couldn't you have just set the type to int?

river oracle
#

like what's wrong with

val settings = ZombieSpawnSettingsFactory.generate()
settings.idealZombieCount()
echo basalt
echo basalt
wet breach
#

oh kotlin no wonder it was dumb looking

river oracle
echo basalt
#

it still looks cringe

#

I originally had them inlined in the class but we're spicing things up and different maps can have different spawn settings so wtv

#

tbf this class could be an object

#

I could also rework it to take the map as a field and inline these

#

imagine if I could : T by t

#

or whatever

inner mulch
#

why do values in lambdas have to be "effectively final"?

river oracle
carmine mica
#

there are no guarantees the lambdas will be run while the local var still exists

inner mulch
#

okay

strange tangle
#

Hi, i'm looking for recommendations for open src plugins to review. I'd like to learn best practices for efficient/high-performance coding and reducing resource consumption. any suggestions ?

worthy yarrow
#

Experience is the best teacher

strange tangle
#

reading also could be helpful

subtle folio
worthy yarrow
# strange tangle reading also could be helpful

Idk how much knowledge you have but as a beginner it's usually not in the sense of looking at other people's projects, that being said, yes it can be helpful but you'd probably want to read about the concepts rather than raw code

strange tangle
#

i am not a beginner and yes i want to read about the concepts

worthy yarrow
#

The concepts are really just a google search away, this is why I say experience. You'll end up learning more (at least in my plugin dev career) from doing and figuring things out yourself than trying to copy what someone else has done. I like to research topics that are currently relevant to a project I'm working on because then not only did I do some research, I also practiced the application of what I researched which ultimately leads to a better understanding of what you're actually doing, not only that but then you have reusable code

river oracle
worthy yarrow
strange tangle
river oracle
#

CompletableFuture

#

💯

strange tangle
subtle folio
#

buddy asked in paper

echo basalt
#

For snapshotting I just use a "blockaccess" interface that lets you read blocks at a given xyz

#

and then my impl manages snapshots and stuff

astral scroll
#

hi

#

im trying to serialize

#

a

#

HashMap<World, MutableSet<Region>> where Region is a datatype made by me that consists on
String, Cuboid, Boolean, RegionType (enum). But the result in my .json with gson is this:

#

supposedly where the cursor is there should be my region's contents?

#

i dont really know why is not serializing even nulls (i got serializeNulls enabled).

#

What can i do?

fading drift
#

is there a way to make arrows instantly disappear after they hit a block

#

any event ran when an arrow hits a block or something

lilac dagger
kind hatch
fading drift
#

ill have a look

#

works thank u

fading drift
#

is there a way to make arrows able to go through players that are on the same team as them?

lilac dagger
#

i did it using nms ^

glossy laurel
#

How can I saved animations into files? Im thinking of saving Player Consumers but I dont evem know if I can do it

fading drift
lilac dagger
fading drift
#

thank you so much

lilac dagger
#

hope it helps 😄

nova rock
#

Hi everyone

#

Does anyone know how to put npc dialog with the shopkeepers plugin

#

Or any other free plugin

chrome beacon
nova rock
#

Oh ok

amber plinth
#

hi everyone! how do i place a structure while a chunk is generating using ChunkGenerator? can't really find a solution but basically when i'm trying to do structure.place it just freezes the server. the structure is valid (i've checked structure.size() and it is stored in the plugin's resources

young knoll
#

You should probably do that in a block populator

amber plinth
clever lantern
#

how can i format foreign characters (ą) in item names so they wont be bugged out

amber plinth
young knoll
#

And any files you may be loading text from are also UTF8

amber plinth
chrome beacon
amber plinth
chrome beacon
#

Yes

amber plinth
#

question #3: why is there the error "Requested chunk unavailable during world generation"? how am i supposed to place structures while the chunk is generating?

#

sorry if i'm being too annoying, this is like my third plugin ever

#
public void populate(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion) {
        Structure structure = getStructureManager().getStructure(structures[random.nextInt(structures.length)]);
        structure.place(
                limitedRegion,
                new BlockVector(0, 16, 0),
                false,
                StructureRotation.NONE,
                Mirror.NONE,
                0,
                1,
                random
        );
    }
amber plinth
grim hound
#

can proxies somehow make the player resend all of their packets?

#

like when transitioning from one server to another

shadow night
#

well you could prob force your proxy to transition the player to the server they're already in or something?

grim hound
#

internally

shadow night
#

Prob just a dimension change

grim hound
#

but won't that break a lot of things?

shadow night
#

you should prob just read the proxies code ¯_(ツ)_/¯

grim hound
#

also, then what is TRANSFER for in the player's handshake?

sly topaz
grim hound
sly topaz
#

there's also a transfer packet for the configuration phase

grim hound
sly topaz
#

essentially

grim hound
#

and this was added in like 1.20.5?

sly topaz
#

more or less, yeah

grim hound
#

kinda sad it wasn't added before

sly topaz
#

md can probably answer how transfering worked before the packet existed, since they develop both the server and a proxy

sly topaz
young knoll
#

I’m pretty sure a server switch was just a fancy world change before

#

At least as far as the client knew

sly topaz
#

that makes sense

astral scroll
novel frost
#

Has anyone seen any debugging tooling that can allow me to run a debugable spigot server from gradle?

eternal oxide
chrome beacon
#

Gives easy access to all you need

#

Though you should head over to their discord if you plan on using it

#

It will also make the api be paper instead of Spigot, so extra care is required if you want to keep Spigot compatability

novel frost
#

I'm already using it, looking for a solution that I can use to test spigot in the same manner. Doesn't necessarially need to be a decomp env though, just getting the jar and using it will suit

#

It's useful for knowing if behavior differs between spigot and paper, for submitting bugs

novel frost
crystal goblet
#

Hi, does anyone know how to create custom logos or custom achievement categories? I mean when you press the L key and the achievements and their categories are displayed, is this not possible?

sly topaz
#

you probably have to make a resource pack

sly topaz
novel frost
sly topaz
#

you'd have to create a task that executes BuildTools to get the spigot jar, if not just get it from a defined directory

#

then just create a RunServer task

novel frost
sly topaz
#

wonder if there is a plugin to get a spigot dev bundle

#

considering spigot tooling is more centered around maven, I guess not

bold plume
#

How do I benchmark a Minecraft server?

blazing ocean
#

wdym by benchmark

#

you can use something like spark for profiling

bold plume
#

put 50 people for example on a server

#

50 bots

sly topaz
#

what would that even achieve

#

minecraft servers are entire platforms, not just a deterministic algorithm, therefore you got to limit the scope in order to benchmark anything

bold plume
sly topaz
bold plume
sly topaz
#

you can bot a minecraft server up to ddosing it, that however isn't going to show anything

#

instead of worrying whether it can, you have to continously profile your server in order to optimize your settings for your use case

bold plume
sly topaz
#

again, that isn't going to achieve anything

#

just make sure to profile your server with tools like spark and figure out the appropriate settings you want to go for from there

bold plume
#

so a server with 2 people is the same as 50

sly topaz
#

it isn't, however you can't worry about players that you don't have

sacred mountain
#

hi i arrive with a general java question, the SpinnerNumberModel's superclass is SpinnerModel but there is no explicit constructor for JSpinner<init>(SpinnerNumberModel)

Is there a way to get that constructor

bold plume
sly topaz
#

what settings are the best for that kind of setup ultimately depends on what you are doing on what the players are doing, and that is ultimately not something you can replicate with bots

bold plume
sly topaz
#

again, you're going about this the wrong way

sacred mountain
bold plume
#

Don't you know any program to put bots?

sacred mountain
#

params is an Object[]

alpine urchin
sacred mountain
sly topaz
#

instead of botting the server, just make sure to setup automatic profiling on heavy load instead, that way you can know what is going wrong at scale

echo basalt
#

Bots let you do a BS test run before shit hits the fan

alpine urchin
#

ill ignore the weirdness, the constructor you’re calling just doesn’t exist

sly topaz
#

a bot isn't going to build a mob farm

echo basalt
#

They don't really do much but they might be able to pinpoint any weird memo leaks / exceptions at scale which is ok

alpine urchin
#

just hard code the constructor

#

idk why ur doing it like that

#

type in what it is man

bold plume
alpine urchin
#

as in, hard code its types with reflection

#

also

#

?xy

undone axleBOT
sly topaz
bold plume
echo basalt
#

but if you really don't trust your code like that I think you have bigger issues

novel frost
#

unless you want to routinely do this

echo basalt
#

only other scenario that bots might be useful on is testing some crazy sharded system

bold plume
#

I want to do more of a test on my anti-bot/velocity than the server itself.

sly topaz
echo basalt
#

like minigame matchmaking or some skyblock network

sly topaz
#

first google result, don't know how well it works

bold plume
novel frost
sly topaz
#

but it probably does fine

tall dragon
#

Well MineFlayer exists. u can program bots in JavaScript or python

echo basalt
#

I've made bots in C# in the past

sacred mountain
echo basalt
#

years and years ago

sly topaz
#

blud wants trait impls in Java

sacred mountain
#

YEA

blazing ocean
sly topaz
#

if you reach to that conclusion, you're doing oop wrong

#

either that or use kotlin and live in hell like rad

sacred mountain
#

hey i was never doing things right

blazing ocean
sacred mountain
blazing ocean
#

the only thing that's hell in kotlin is fir

sacred mountain
#

I shall cook something up and kill someone with it when they see later

#

:)

blazing ocean
novel frost
sacred mountain
#

some object stream its not really though, its a group project and this isn't exactly part of it just something im messing around with

novel frost
#

oh god serialization

#

Yeah I figured it was homework of some kind

echo basalt
#

kotlin serialization is an actual joke

blazing ocean
#

youre an actual joke

echo basalt
#

I made a toml -> "ConfigurationSection" converter

sacred mountain
#

i swear kotlin is better serialization than java

#

has

echo basalt
blazing ocean
#

fym codec

echo basalt
#

or to make it sealed with like 12 impls in a single file

sacred mountain
#

i dont use kotlin and i dont plan on it

novel frost
#

Java Serialization is basically going to be under review for a total rework like a version 2.0, because of how screwed it is, and the bugs and security nightmares it causes

echo basalt
#

It's just quite crap but so is java serialization

novel frost
#

at least that's the impression that Brian Goetz gives

echo basalt
#

I'm the kind of guy who likes to use the whole factory-registry pattern for decoding data and kotlin doesn't like it

echo basalt
#

ah yes me and my P14<A, B, C, D, E, F, G, H, I, J, K, L, M, N>

sly topaz
sacred mountain
novel frost
#

I just googled to see what the maximum was, 254 apparently

#

my memory thought it was around 23, but maybe that's .net

brittle geyser
sly topaz
sly topaz
# brittle geyser wtf

yeah, the dude at mojang writing DFU went on some hard drugs while working on it. Wrote papers on it and everything and it still sucks, it's hilarious

blazing ocean
#

real

novel frost
#

I wouldn't say it sucks

#

just poorly documented

quaint mantle
#

What's a "DFU"

sly topaz
#

it works, however it has huge performance issues

novel frost
#

Data ~Fu~Fixer Upper

sly topaz
quaint mantle
#

Oh

novel frost
sacred mountain
#

datafixerupper is my kind of project name

sly topaz
novel frost
#

hadn't heard of that

sly topaz
novel frost
sly topaz
#

don't yell at me for Paper, it used to be just leaf's project before he got in the team

bold plume
#

It would be even better if app did map captchas

quaint mantle
#

If your server have online mode enabled, you should be fine.

bold plume
#

How do I set skin on skulls and if the player's name is a cracked user, it doesn't give me an exception?

pseudo hazel
#

offline mode isnt supported afaik

bold plume
novel frost
# sacred mountain hi i arrive with a general java question, the SpinnerNumberModel's superclass is...

This is why I went "Oh God Serialization" https://youtu.be/fbqAyRJoQO0 just realized new vid just dropped

Almost three decades have passed since the creation of Java Serialization—a feature which is widely frowned upon—and application requirements for externalization of objects have changed significantly.

_In this presentation we will explore how a changed set of requirements and constraints, paired with recent enhancements of the Java Language, ...

▶ Play video
sacred mountain
tidal kettle
#

Hey i just have 1 question, you can't set a worldBorder on the PlayerJoinEvent?

#

?paste

undone axleBOT
sly topaz
tidal kettle
#

Cause this is my code : https://paste.md-5.net/homifaseza.cs
and when i send the worldBorder center to the player, i got this Location{world=null,x=0.0,y=0.0,z=0.0,pitch=0.0,yaw=0.0}

sly topaz
#

I'm not all that convinced in the new serialization way, however anything is better than the security nightmare we currently have

sly topaz
worthy yarrow
novel frost
worthy yarrow
tidal kettle
worthy yarrow
#

and it's incorrect spelling at that

worthy yarrow
#

The world might be null onPlayerJoin for a short time

sly topaz
#

well, I still got it right lol

worthy yarrow
#

Apparently kek

tidal kettle
sly topaz
#

just put your code inside BukkitScheduler#runTask

tidal kettle
#

okay

novel frost
#

is joining completely sync? could it not take a couple of ticks for the player to join?

worthy yarrow
#

I like to do runTaskLater so i can give it a bit more of a delay maybe 1 tick isn't enough 🤷

sly topaz
#

1 tick must be enough for join

worthy yarrow
#

probably

#

It doesn't hurt tho

sly topaz
#

if it is taking any more than that, you're blocking somewhere else which isn't good anyway

sly topaz
#

actually joining the world equates spawning an entity, which means world interaction, so I doubt they'd do anything async

novel frost
#

if 1 tick is enough, schedule it for 0 ticks

tidal kettle
novel frost
#

it'll be as soon as the scheduler is checked next

tidal kettle
#

and after some test it work thx 😄

sly topaz
#

I don't like 0 tick tasks

#

the chance of things being executed mid tick causing funny behavior doesn't sit right with me

worthy yarrow
sly topaz
#

it has either got to be at the start or end of the tick

novel frost
#

I don't like room for other plugins to make my things inconsistent that I'm changing, whenever a 'schedule for zero tick' thing comes up, it gives me chills.

#

FWIW, PlayerJoinEvent world is defined for me...

#
[04:26:56 INFO]: UUID of player ryan_the_leach is 46b22bc4-a356-3973-a850-db441059fb0c
CraftWorld{name=world}
    @EventHandler(ignoreCancelled = true)
    public void onPlayerJoin(PlayerJoinEvent event) {
        event.getPlayer().getWorld();
    }
#

but that was running under paper, so YMMV

sly topaz
#

it is probably not consistent depending on latency or some bullshit

novel frost
#

if join is sync, there shouldn't be any latency bs

worthy yarrow
#

Latency issues can always happen can it not?

novel frost
#

I'm just going to chalk it down to either paper patches, and they are running raw spigot, or that their world wasn't named "world"

worthy yarrow
#

He shoulda capitalized w

novel frost
#

nah

#

it also might be that he was joining before the server was up

#

like while it was still loading

#

so there wern't any worlds yet

worthy yarrow
#

I mean that was a joke

#

Maybe it wasnt very clear

novel frost
#

just curious

tidal kettle
#

Paper and running for like 10/20 min

#
  • a lot of reload
#

cause i'm lazy (i know this is bad)

novel frost
#

If you can reliably reproduce it, and you know 100% it's not your setup, I'd report it as a bug to the paper team

tidal kettle
#

imma try

tidal kettle
novel frost
#

that patch is ancient, so i doubt it would make a difference unless there was a bug fix in that time

#

I wouldn't make a bug report before trying though

tidal kettle
#

i try on 1.21.1 and if it don't work i try on 1.20.6

wet breach
#

there are some things you can not do in the same tick when the event is fired

novel frost
#

even under paper?

wet breach
#

even under paper. Not everything is initialized when a player joins thus when you try to do stuff in the very same tick as the event some things can end up being null or just have wrong data

sly topaz
#

I mean, if that patch above is worth anything, at the very least the location should be initialized so it shouldn't happen

wet breach
#

they do a lot of stuff to the internals so who knows

quaint mantle
#

whats the easiest way to do this

wet breach
#

however we are in spigot discord

quaint mantle
#

i have no money and i really need it

wet breach
#

easiest way to create an anti-cheat?

hazy parrot
#

To build it I would assume

wet breach
#

I mean it depends what exactly you are trying to stop or what you actually care about

quaint mantle
shadow night
wet breach
quaint mantle
slender elbow
#

aren't the actual checks not in the source code?

shadow night
wet breach
#

install git for windows, and get maven. Use git to pull the source code, maven to compile

quaint mantle
novel frost
#

@tidal kettle lets continue this conversation in the paper discord if you are in it

slender elbow
#

yeah the actual checks aren't there so you're gonna have an anticheat that does nothing

hazy parrot
#

Tf lol

quaint mantle
kind hatch
#

I bet it downloads the checks and patches itself at runtime.

slender elbow
#

nah, the source code just doesn't include the checks

wet breach
slender elbow
#

that's what the paid binary is for

quaint mantle
wet breach
#

idk, I am telling you how to compile a project

#

which is what you wanted

slender elbow
#

you'll have an anticheat that doesn't check for anything

#

the dream

quaint mantle
wet breach
#

I have no clue about these anticheats and what exactly they do or don't do lol but as far as compling a project its virtually the same across them usually

sly topaz
#

are the checks separate modules or what

#

that's ass, but understandable

quaint mantle
#

uhmm asking for a friend? is piracy not allowed here, right?

hazy parrot
#

Lol

sly topaz
#

no, it is not

#

what did you think the answer would be

#

also I wouldn't recommend getting it from these infamous piracy plugin repositories, they're infected with malware most of the time

slender elbow
quaint mantle
slender elbow
#

they are integrated in the plugin jar when you buy it however

sly topaz
#

if it isn't yours then why do you even care about getting an anticheat

#

just use a free one and you're good

slender elbow
#

I mean, you can do whatever you want, pirate it if you want to, you just won't receive any support for doing so

quaint mantle
quaint mantle
wet breach
#

nocheat++ is still alright

quaint mantle
#

either using all server resources or just flagging everything

sly topaz
#

and you think an infected anti-cheat would be better than an ass anti-cheat

wet breach
sly topaz
quaint mantle
chrome beacon
quaint mantle
hazy parrot
#

Not all premium plugins are open source

rough ibex
#

you can only compile stuff you have the source code for

sacred mountain
#

if (e.getPlayer().isCheating()) { /* Kick */ }

rough ibex
#

The majority of premium plugins are not source available

sly topaz
#

and even the open source ones might have caveats like this one where it has non-OSS resources which are ultimately required for it to work the way it is marketed

quaint mantle
#

dam

#

well thanks anyway

sly topaz
#

Oraxen does a similar thing I believe

rough ibex
#

Yeah spartan here gives you the framework

sly topaz
#

people try to get their hand on premium plugins just because they're paid anyway, often times if you look hard enough you can probably find a decent replacement out of the free ones

rough ibex
#

You still have to write the check logic yourself

sly topaz
#

it may just not be as convenient

quaint mantle
brittle geyser
#

Hello, why when i trying to get simple command map with reflection it returns null?

private SimpleCommandMap getCommandMap() {
        return (SimpleCommandMap) ReflectionUtil.getFieldValue(Bukkit.getServer(), FIELD_COMMAND_MAP);
    }
sly topaz
#

I prefer the inconvenience of searching free alternatives than pirating plugins from dubious sources any day of the week

brittle geyser
rough ibex
#

Mate what are you doing and why

shadow night
sly topaz
#

you can't get the command map without reflection

brittle geyser
shadow night
rough ibex
#

you can register commands without reflection

sly topaz
brittle geyser
sly topaz
#

I would honestly recommend just using a command framework otherwise

#

commands are a solved problem, yet people always find it in their hearts to recreate them. Wonders of being young I guess

rough ibex
#

I use lamp and its great

sly topaz
#

I do not have the patience or passion to reimplement anything of that level of complexity

brittle geyser
#

i dont like other command implementations

quaint mantle
#

this got my hopes up

#

4 years ago

rough ibex
#

Many plugins release the source for free but support is paid

#

or additional required resources are paid

#

many people dont know how to compile

low field
#

guys, quick question, how can i reconfigure the player for them to get autocompletions for a new enchantment

novel frost
#

spigots stance against piracy has a lot less to do with what's legal, and more with, what's morally right.

novel frost
# quaint mantle this got my hopes up

Also you mention not caring about malware. common minecraft malware is just OPing hackers, letting them take over the server, or lagging you out while it mines crypto

#

so you might find you do actually care

kind hatch
#

Question for the spigot contributors here.

I'm looking at fixing SPIGOT-6967. (An issue with unloading worlds via the api.)
The issue references a paper patch that fixes the issue. So, me being curious, I went and hunted it down to see how they approached it.
The paper patch in question is a simple one-liner that flips one boolean value.

I've already check on stash to see if there has been any previous attempt at fixing this issue and I found nothing.

I know that when contributing, we agree to submit our own code. Although, I'm curious about cases like these where the fixes are simple 1-3 liners.
Would it be fine to contribute this change? Would it be best to give credit to the original author? Am I even allowed to submit the same change? Should I submit a different change?

Where is the line drawn for these small changes? Is it super strict and this one change can't be accepted because it's technically someone else's code or is there room to work in?

river oracle
river oracle
#

This is why i just don't look at paper even if they send the fixed patch or code it's up to you to figure it out yourself

slender elbow
#

i mean, you can't really "own" flipping a boolean

undone axleBOT
wet breach
#

in general modifications like these couldn't be called yours to begin with. The best that can be done is acknowledgement of contribution

#

anyways, in order to contribute you need to sign the CLA where you give up rights to code contributed so the question is in most cases moot

kind hatch
#

Frost, I've already read and signed the CLA.

#

The code in question is from paper which they don't have/need a CLA for.

#

That being said, the code in question is flipping a boolean for one of the internal minecraft methods.

wet breach
kind hatch
#

Modified existing

wet breach
#

then its not theirs

#

you can't claim rights to something you didn't create to begin with. I don't know other countries rules around copyright, however in the US modifications like these you can't claim rights to.

#

so in terms of US standards you are ok with using it 😉

eternal skiff
#

hi
is there any API to generate random nicks?

torn shuttle
#

by that logic if I ever work for a business making videogames as a programmer and I then ever go out and make my own game virtually anything I could ever write would be some kind of theft

#

used a for loop? you'll be hearing from my lawyer

wet breach
#

Lol, you can't sue for api provided from the language in question

torn shuttle
#

that's what you think

wet breach
#

Oracle lost that battle in the US supreme court

torn shuttle
#

that's fine I heard the US supreme court is into reverting old judgements these days

#

if we try hard enough we can get there

#

besides I don't think portuguese courts ruled on this one

wet breach
#

yeah couldn't tell you on that last one

#

I am not in the habit of watching other countries laws/courts etc

torn shuttle
#

big money

#

imagine all the money I will get from suing all the 1 and a half game studios in this country

#

since I have one I'll have to hunt down whoever has half

wet breach
#

lol

torn shuttle
#

this code is starting to annoy me

worthy yarrow
#

Frost I gotta clip one of the throws I made in game lol

torn shuttle
#

I keep rewriting how it works

#

somehow it's now reverting 4 million chunks in a couple of minutes and then crashing

#

which is an interesting choice

#

oh you know what it's probably overflowing

wet breach
torn shuttle
#

wave function collapse but for some reason it's not currently recognizing anything as being a valid border

#

so it's just basically looping in on itself

#

not sure if it's the new code for border validation messing up or initialization messing up but I do know I messed up by changing both at the same time making it exponentially harder to test

wet breach
#

lol

#

I would recommend using file memory mapping. Not sure about the border thing

#

with 1-2GB dedicated to memory mapping you should be able to handle that much

#

also a nice advantage of memory mapping is that if the application crashes, the OS will take care of closing out the file gracefully

torn shuttle
#

this is definitely something I was considering doing though I was wondering if I was going to do it via database for faster access, wasn't really sure

#

there's, uh, a lot of chunks

#

the small generations are fine but it can quickly get into low millions if people push it

wet breach
#

memory mapping works as long as you have extra ram to accommodate it.

torn shuttle
#

yeah problem is that at a scale I'll never have the memory

wet breach
#

at a certain point, but ideally you will be removing stuff out of the mapping when you don't need it anymore

torn shuttle
#

is that any better than a database?

#

I've never really looked into that

wet breach
#

it depends. I know with memory mapping with 1-2GB you can handle something like 10-20mil blocks

torn shuttle
#

that's nothing

#

let me check

wet breach
#

and a test of that was back around 1.7-1.8. Given the updates to java it should be more efficient

#

you could even combine a DB and memory mapping too, if you want to have a queue that works over time 🙂

torn shuttle
#

well ok it's not nothing, really I am not dealing with blocks it's chunks

#

so 20 mil chunks is actually quite a bit

#

yeah that's the thing I probably do need to keep the data long term which is why I was considering a db

#

either that or I need to jank it up with some pdc on chunks or something

#

which might be possible, not sure

#

not that far in yet

wet breach
#

if I was making what you were, I probably would redefine how large a chunk is

torn shuttle
#

16x16x16 is already a size unit we tested and are going to move forward with, we already started making the content for it

wet breach
#

ah

torn shuttle
#

the priority is how well it works for the modular builds, not performance, though it's not the worst for performance either

wet breach
#

well, then the other thing you could do is redefine how large a region file is

torn shuttle
#

turns out 16x base is pretty neat

wet breach
#

to lessen how many files need to load/unload

#

currently I think a region file holds 1024 chunks

torn shuttle
#

some of the modules we've been working on

wet breach
#

nice, those look great

torn shuttle
#

yeah and they're all base 16 but also modular within themselves

#

we have multiple different inner modules for them

#

same modular room, different inner modules

#

I can't believe this is also all going to be free

#

I don't know why I keep doing this to myself

worthy yarrow
#

Hmm magma I wonder if you’d be able to give me some advice on your random generation stuff, I’m wanting to do some similar stuff for disc golf course generation

wraith delta
#

Is there a alternative to OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(targetName) because this seems deprecated

smoky anchor
#

probably the UUID version ?

wraith delta
#

but id need to get their uuid by name

river oracle
smoky anchor
hardy anchor
#

Hey! I'm trying to start up my plugin on a paper server but it doesn't seem to work.
I haven't had this issue with a spigot plugin i made before.

[22:38:40 ERROR] Could not load plugin 'localcrystal.jar' in folder 'plugins'

[22:38:40 INFO] org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.20.1

[22:38:40 INFO] at org.bukkit.craftbukkit.v1_20_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:380) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:119) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:39) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.loadPlugins(CraftServer.java:510) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:273) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1100) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]

[22:38:40 INFO] at java.lang.Thread.run(Thread.java:1583) ~[?:?]
wraith delta
chrome beacon
#

I'm not sure when api version started accepting "minor" versions

wet breach
#

but I am pretty sure that method does that if it can't find the player locally

chrome beacon
wet breach
#

it is deprecated not because you shouldn't use it, but because it uses a string name which names can change and should just be aware of that

hardy anchor
chrome beacon
#

Then ask Paper for help

#

This is the Spigot discord

#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

hardy anchor
#

Plugin is spigot.