#help-development

1 messages · Page 1028 of 1

young knoll
#

I saw 330 in the announcements

#

But I guess that proves modern versions can still handle massive player counts if done right

slender elbow
#

that was probably just the first one, there was a second one with shy over 1k players

young knoll
#

Ah

wet breach
#

I was told folia handled 1k, but I can't give specifics on like how well it did so

slender elbow
#

networking was 🔥

wet breach
#

So it seems stuff was still not optimal

slender elbow
#

well, it was only the second test, there were a lot of unknowns and lots of tuning to do

wet breach
#

the only way you can probably get an ideal setup without so much resource consumption would be to split up the main pieces in the server to be in their own applications

young knoll
#

Still 1000 is overkill

slender elbow
#

GC was a big concern but it ended up not being that big of a problem in the end

young knoll
#

Idk what server would actually want that many concurrent players

#

Imagine the chat spam

slender elbow
#

networking was the biggest bottleneck due to underallocating netty threads

wet breach
#

if there was anything to compare against it would be that gaming servers have always been able to handle 1k players in the past since like 2005 or so. But all the servers that have done this have one thing in common, the components are all split up even if ran on the same machine. That is, there is a login server, chat server, world server etc

small valve
#

Fixed my problem using jank

sullen marlin
#

DamageCause?

#

well if you used a source then yeah it wont be custom

#

but people wanted a method with a source exactly so plugins wouldnt be able to tell the difference lol

young knoll
#

Mission accomplished

#

It is now

grand flint
#

Can I send packets to hide the entity that is riding the player?

young knoll
#

Try it

#

It’s just Player#hideEntity

fleet imp
#

do inventories have handles that can identify them even if they have identical item data

livid tundra
#

can you save arrays to yaml files or do they have to be lists

lilac dagger
#

convert them to lists

#

no loss in doing it

wraith delta
lilac dagger
#

or just config set path Arrays.asList(array);

lament tree
#

java 17 or 21 for 1.20.4 plugin development?

young knoll
#

17

lilac dagger
#

but you might wanna upgrade

#

so you might as well make it 21

young knoll
#

I mean you can use 17 for 1.20.6 too

#

As long as you aren’t using NMS

lilac dagger
#

you can sure

wet breach
wise mulch
#

I already tried this

young knoll
#

The api shouldn’t be

lilac dagger
#

i don't think the api is java 21 either

wise mulch
# young knoll The api shouldn’t be
Error: LinkageError occurred while loading main class org.bukkit.craftbukkit.bootstrap.Main
        java.lang.UnsupportedClassVersionError: org/bukkit/craftbukkit/bootstrap/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
lilac dagger
#

but that's craftbukkit

#

🤔

#

oh

#

you're using java 17 to load up spigot?

young knoll
#

Yeah that won’t work

wise mulch
#

Yeah. I also tried to merely load a Spigot IJ workspace in 17, that failed too

young knoll
#

The api is still 17, I checked

wise mulch
#

Material uses Java 21 features that additionally required me to update IntelliJ

young knoll
#

<maven.compiler.release>17</maven.compiler.release>

#

Heck the fact it’s 17 is kinda crazy

#

Up until recently it was 8

wise mulch
#

Literally how

lilac dagger
#

the api probably can still be java 8

#

it's not doing anything fancy

#

just a bunch of interfaces

young knoll
#

Nah it needs at least 9

lilac dagger
#

why is that?

livid tundra
lilac dagger
#

i forgot what they added din 9

young knoll
#

Private methods in interfaces iirc

lilac dagger
#

ah

#

wait, what are those for?

young knoll
#

We had a bunch of PRs that needed that and bumped it to 9, but MD decided to just go to 17

#

ItemType and BlockType have private static methods for example

lilac dagger
#

i see

#

well, it makes sense then

wet breach
# wise mulch Literally how

what you compile against doesn't need to be same on the jvm used to load the server. You can compile on 17 if all you are depending against is the api. However, it may still be necessary for someone to use a higher version of java to run the server.

#

lower versions of java generally can be loaded by higher versions

wise mulch
#

Compile an API using Java 1 Troll

lilac dagger
#

no way there are still links for it available

slender elbow
#

yep

wet breach
#

it should be possible

#

just have to modify their permissions

#

probably shouldn't add them as a contributor

#

interesting, this is probably one of the reasons I run my own git repos usually

#

well there is a variety of ways of doing it. You shouldn't assume that all big servers do it the same way

#

what big servers have that smaller servers don't is the fact they can have a dedicated developer or two

#

depends what is required, but anything that requires messing with NMS its going to cost you one way or another

#

you either comission for someone to make something or you have a dedicated developer you pay

#

there is however the exception if the server owner happens to be a developer 😛

#

but the cost then is your time

#

the problem you might encounter is controlling the enemies to inflict damage where you want them to. Other then that, everything else could be accomplished via api

#

this here, you can't control entity targeting as that is a goal selection

#

unless api has been updated to change it

#

but if api lets you control that, then sure may be possible via api only

#

and that should make things easier 🙂

#

also if this is for your own server

#

just remember this

#

you always have the option to modify the source 😉

fierce salmon
#

🤓

wet breach
#

this is what large servers do as well. Need something to be provided by the server, they just go ahead and modify the source where necessary

fierce salmon
#

He he he ha

wet breach
#

to include just incorporating the feature into the source

fierce salmon
#

@quaint mantle ur pfp looks ai generated

wet breach
#

configuration is only applicable if you need it to be first off and you want someone else to be able to control it

#

this makes sense to be configurable not because its sensitive information but that it can change later

#

well idk for items, but that is usually not necessary for other stuff lol

#

yeah probably best to not hard code that

#

makes it difficult to change params where necessary like if something is a bit op or whatever lol

#

I would just make a command to update the values from config

#

maybe sometimes this month I can update one of my plugins now that there is display entities and blocks

fierce salmon
#

What does display entities and blocks mean?

wet breach
#

with display entities and blocks, it would just add to the features in how you could display tutorials

wise mulch
#

Does setting a block in a LimitedRegion trigger block updates?

sullen marlin
#

probably

#

why does it matter

wise mulch
#

I don't want to fire block updates when placing blocks

#

I could set a block in a World instance without it by supplying an update arg as false. But BlockPopulator advises NOT to get the world instance from it

#

But ever since populators now use LimitedRegion the option to not trigger a block update is gone, so I need to know if it does this before I rewrite my codebase.

#

Because if it can't I'm going to have to get the World anyways regardless of what the populator is telling me to do.

sullen marlin
wise mulch
#

It's not present in LimitedRegion's block setter, that's what I've been saying

sullen marlin
#

maybe there are no physics in LimitedRegion then

wise mulch
#

I'm gonna have to hope so

#

I'm just gonna wing it and do it anyways.

#

If it does end up triggering physics, where can I submit a feature request to give this boolean to LimitedRegion so it doesn't?

#

I'll be back in a little bit to report the results, I have to rewrite a lot of code to test this

lone jacinth
#

LimitedRegion in BlockPopulator does not apply physics. If it for some reason does then that is a bug.

slender elbow
#

java

tender shard
#

kotlin

wise mulch
marble hearth
#

do you guys know how to make a portal tp you to somewhere else for example in my skyblock server i want a portal to tp the person to their island

tender shard
#

PlayerTeleportEvent, then check the TeleportCause - or maybe PlayerPortalEvent

#

then change the setTo location

marble hearth
#

is that a command

tender shard
#

no. This channel is for coding related questions

echo holly
#

hey i have a question for using event calls between 2 different plugins. Im not fully understand what im ment to call. Im also not the most knowledgeable when it comes to java and/or plugin things

sullen marlin
#

Can you try explaining a different way please

#

I don't understand

echo holly
# sullen marlin Can you try explaining a different way please

ok im using zEssentials as my "core" plugin and it handles everything in events for updating things. so im trying to call the team money for BetterTeams and Ive been looking for the event call in the src code and have no idea I thought i was close but what i thought was going to work didnt.

sullen marlin
#

Maybe ask zessentials? Do they have documentation?

drowsy helm
#

so im trying to call the team money for BetterTeams what does this mean?

#

like you're trying to get the amount of money a team has?

wise mulch
#

How would I get the sky light exposure and temperature values from a specific coordinate in a LimitedRegion

echo holly
#

yea ive looked through it they give this as example

  • line: 2
    text: "&7Balance: &a%zessentials_user_formatted_balance_money%"
    event: "fr.maxlego08.essentials.api.event.events.user.UserEconomyPostUpdateEvent"
    then tell you it has to be a player event and send me to bukkit docs and ive looked through them
drowsy helm
#

that is a placeholder not sure what that has to do with Events

#

can you send a link to the betterteams plugin

echo holly
drowsy helm
#

this?

drowsy helm
#

so where does your plugin come into this?

#
      text: "&7Balance: &a%zessentials_user_formatted_balance_money%"
      event: "fr.maxlego08.essentials.api.event.events.user.UserEconomyPostUpdateEvent"

is just some plugin config using placeholder api

echo holly
#

yea im just having issues with the event line to update the placeholder part

#

I figure it was better to ask dev than server because this is based around a coding issue

echo holly
#

wait whats the event i call?

#

i have the placeholder part
text: '&7Team Balance: &a%betterteams_money%'
event: com.booksaw.betterTeams.team.storage.team.StoredTeamValue.money

drowsy helm
#

i really have no clue what that config is asking for

#

that package is some random enum

echo holly
#

this is from wiki
Events
To update your scoreboard, you can use the event system. This system allows you to avoid using tasks for updating placeholders. Traditional plugins often use tasks unnecessarily, which updates data continuously for all players. zEssentials aims to be as optimized as possible, making the event system the most efficient option. When a player performs an action on your server, an event is triggered (whether by Spigot, Paper, Folia, or even zEssentials). The configuration listens for the event you specified for the line and updates only that line.

In the default configuration we have the use of the event UserEconomyPostUpdateEvent to update line 2 and 3. When the player’s money is going to be changed, his scoreboard will be updated automatically.

Your event must be a player event (with some exceptions). You can find the list of events here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/package-summary.html

drowsy helm
#

thats a list of all the better teams events

#

none of them really have to do with the money

echo holly
#

yea thats the issue

drowsy helm
#

does zessentials not provide an alternative to using an event

#

seems like a bit of a flawed system

echo holly
#

but would it be this?
com.booksaw.betterTeams.team.storage.team.TeamStorageType.DOUBLE

#

i dont think so

drowsy helm
#

no

#

you can just not provide an event

echo holly
#

it wont up update until plugin is reloaded

drowsy helm
#

thats a really stupid design lol

echo holly
#

yea real

drowsy helm
#

you can just use some arbitrary event then

#

player move or smth

echo holly
#

yk that might work

drowsy helm
#

but obviously if they afk, it won't update

echo holly
#

I only need it to up the placeholder

#

yea well that should be fine

#

they afk after all

vital sandal
#

I'm using ItemDisplay to showing a head

#

but the head is looking in the opposit direction

#

how should I rotate it back

#

It got the Billboard.CENTER as well

#

in fact it rotate in all opposit direction

wet breach
#

?nocode

undone axleBOT
#

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

rough drift
#

hey chat rq, what's the diff between SPELL_MOB and SPELL_MOB_AMBIENT

tender shard
#

why don't you /playsound it

#

huh what even is SPELL_MOB supposed to be? it's neither in Particle nor in Sound enum

tender shard
#

lol

#

in 1.20.6, SPELL_MOB is "entity_effect" and SPELL_MOB_AMBIENT doesnt exist

umbral ridge
#

how would you place a villager and allow it to look to the direction based on the closest player, if they're close enough? but prevent it from moving from its spot

#

do I need to do some hacky stuff to achieve this

#

packets, etc.?

#

AI should be false right? AI is what is allowing the villager to walk around

eternal oxide
#

With no AI it will do nothing

sleek estuary
#

how i set the new position of armorstand with nms?

eternal oxide
#

why nms?

warm vapor
# umbral ridge how would you place a villager and allow it to look to the direction based on th...

First, you'll want to keep track of where the closest player is in relation to the villager. Then, figure out which way the villager needs to look based on where the player is. Next, Any events or commands to perform that action. Yes indeed AI should be off.

import org.bukkit.Bukkit;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Villager;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

public class VillagerLookAtPlayer extends JavaPlugin {

    @Override
    public void onEnable() {

        new BukkitRunnable() {
            @Override
            public void run() {
                for (Entity entity : Bukkit.getWorlds().get(0).getEntities()) {
                    if (entity instanceof Villager) {
                        Villager villager = (Villager) entity;
                        villager.setAI(false);
                        Player closestPlayer = getClosestPlayer(villager);
                        if (closestPlayer != null) {
                            lookAtPlayer(villager, closestPlayer);
                        }
                    }
                }
            }
        }.runTaskTimer(this, 0L, 20L); 
    }

    private Player getClosestPlayer(Entity entity) {
        double closestDistanceSquared = Double.MAX_VALUE;
        Player closestPlayer = null;
        for (Player player : Bukkit.getOnlinePlayers()) {
            double distanceSquared = player.getLocation().distanceSquared(entity.getLocation());
            if (distanceSquared < closestDistanceSquared) {
                closestDistanceSquared = distanceSquared;
                closestPlayer = player;
            }
        }
        return closestPlayer;
    }

    private void lookAtPlayer(Villager villager, Player player) {
        villager.faceLocation(player.getLocation());
    }
}```
sleek estuary
warm vapor
warm vapor
sleek estuary
#

im not receiving the message when the armorstand collides with blocks

umbral ridge
#

Vehicle can be a boat

sleek estuary
umbral ridge
#

Armorstand is an entity

#

it's not a vehicle

sleek estuary
#

OHH

#

ok

#

thx

#

so how i get the collission event?

umbral ridge
#

You can try

#

VehicleEntityCollisionEvent

#

Or not.. not sure

#

That's probably not it

sleek estuary
#

if not, i have that verify the location on movement

#

if is a solid

#

or not

umbral ridge
#

you are on 1.8.9?

sleek estuary
#

yes

sleek estuary
#

i have that verify the location on omvement

#

I wanted to know why the armorstand doesn't fall either, since I set gravity

upper hazel
#

YamlConfiguration.load vs section.load?

#

or this

#

oh

#

this is same i gess

astral pilot
#

how do you generate a void only world

lilac dagger
#

i have a plugin for that

undone yarrow
#

Is it possible to make a fallingblock stop at a certain y level? Im trying to levitate a block then let it fall down back to its original position, even if theres air under that original position or smth else

eternal oxide
#

just a world gen and populator

lilac dagger
#

then set gravity false

undone yarrow
#

wdym tick it

lilac dagger
#

with a scheduler

eternal oxide
#

Best to use a BlockDisplay with translation for smoothness over a FallingBlock

lilac dagger
#

oh yeah, block displays are amazing

undone yarrow
#

Im using that for levitating up but not for falling down. Then I'd also need to add logic for a display block falling on your head and dealing dmg

#

would make falling back easier ig

lilac dagger
#

it's probably a bad idea but you can consider nms

#

you can set no gravity to true and then edit the ticking in there

#

modify it's location internally

astral pilot
lilac dagger
#

it'll be really smooth

#

well, you need to set up nms maven projects

undone yarrow
#

yeah maybe not

#

Ill just try it with the block display, thanks guys

eternal oxide
#
public class VoidGenerator extends ChunkGenerator {

    @Override
    public void generateSurface(WorldInfo info, Random random, int x, int z, ChunkData data) {}

    @Override
    public boolean shouldGenerateNoise() {
        return false;
    }
 
    @Override
    public boolean shouldGenerateBedrock() {
        return false;
    }
 
    @Override
    public boolean shouldGenerateCaves() {
        return false;
    }
}```
#
        WorldCreator wc = new WorldCreator(name);
        wc.generator(new VoidGenerator());
        wc.generateStructures(false);
        wc.type(WorldType.FLAT);
        world = wc.createWorld();```
astral pilot
#

thanks

#

where do you learn these kinds of stuff in minecraft btw

lilac dagger
#

he's familiar with the api

#

javadocs is a good place to start

#

it has all the api classes

astral pilot
#

but you have to be atleast be knowledgeable on how minecraft works

#

is there a place to learn how mc acc works

eternal oxide
#

no

#

Its mostly reading, Javadocs, experimenting and basically playing around once you find somethign interesting

lilac dagger
#

ask around, search the forums

#

javadocs

#

it's all you really need

astral pilot
#

oh, so you dont really need to learn how mc actually works?

eternal oxide
#

No, but it does help

lilac dagger
#

well, you need to have played some mc to know about what you're doing kinda

wet breach
eternal oxide
#

^

astral pilot
#

oh so you guys have been deving for a long time

nova notch
sleek estuary
#

returns true for this?

#

or only returns true for this? spigot 1.8.8

astral pilot
nova notch
#

You learn a lot of obscure and mostly useless shit but it actually helps sometimes

#

I've found a lot of cool tricks to use for plugins that only work because of minecraft quirks that you stumble across

#

Things like hiding the health bar without needing a resource pack

grim hound
astral pilot
#

anyways is it possible to create world in specified location

eternal oxide
#

add path to the world name

astral pilot
astral pilot
lusty cipher
#

uh so I have a player with a korean username I think, and when I try to do Bukkit.getServer().createPlayerProfile using that info it generates an exception about invalid characters in the name

#

but I thought those names were supported?

chrome beacon
#

offline mode?

lusty cipher
#

nope

eternal oxide
#

must be utf8

lusty cipher
#

I mean it shows up correctly in the debugger so it must be UTF-8 no?

eternal oxide
#

be sure your IDE/maven is set to utf8

chrome beacon
lusty cipher
#

what difference would the source encoding make

chrome beacon
lusty cipher
#

I know exactly what that does and I don't see how it's relevant?

lusty cipher
#

hmm I can't find it on NameMC

chrome beacon
#

yeah

#

that account doesn't exist

lusty cipher
#

hmm interesting...

chrome beacon
#

offline mode moment

#

or some hacky npc/fake user

lusty cipher
#

I got this server data dumped from a user

#

all other nearly 8000 users seem legit

eternal night
#

v2 uuids iirc are commonly used for npcs NODDERS

lusty cipher
#

huh interesting yeah

chrome beacon
#

v3 is offline mode

#

v4 is used for online mode

umbral ridge
#

v1?

#

xd

chrome beacon
#

I've never seen v1 in use

umbral ridge
#

😂

harsh ruin
#

What's giving me the error here? (I've showed everything that uses plugin in pictures)

chrome beacon
#

plugin is null

lusty cipher
#

dont return plugin, return this

#

you never assigned plugin so its null

chrome beacon
#

the metod is static

lusty cipher
#

oh yeah true mb

chrome beacon
#

you need to assign plugin

vital sandal
#

how to get the block infront of player

#

it should always be the green and not the red one

drowsy helm
#

just get the player's block position and add in the directon they are facing

chrome beacon
#

getTargetBlock

vital sandal
#

that will get the red one not the green one

remote swallow
#

thats a block in front not the block infront

vital sandal
drowsy helm
#

do you want the block the player is looking at or a block relative to the player's position?

vital sandal
drowsy helm
#

and what if they are facing diagonal?

vital sandal
#

it will base on the formula to see

drowsy helm
#

you can just get the direciton they are facing and normalise it

sleek estuary
#

how i verify if block is a slab??

vital sandal
#

and eventually I just got the solution by just clone the location and set the pitch to 0

chrome beacon
sleek estuary
#

how i verify if is a top step???

#

step.isinverted not works

chrome beacon
#

what version are you on

mystic meteor
#

can someone help me about getting source code from any jar?

#

what tool can i use

eternal night
#

that would be called a decompiler, however it will not produce the exact source code

mystic meteor
#

because i want add something

eternal night
#

Then kindly ask the jar author for the source code

mystic meteor
#

Is there any other way?

#

because i dont think i can contact with the author

eternal night
#

you can use recaf to edit a jar without having to recompile it

#

however, take that with a grain of salt

mystic meteor
#

i want to add some class

#

its hard to build and add to zip

eternal night
#

yes, see recaf then

chrome beacon
#

Have you considered just making another plugin that hooks to the plugin api

mystic meteor
#

its would easy to get changes on ide

eternal night
#

that too KEKW what plugin are you talking about lol

mystic meteor
#

let me tell what i want to do

#

i want to get a spigot source

#

i cant use normal because

#

it changed

eternal night
#

A spigot source? eyes_sus

#

so you are using a paid spigot fork

mystic meteor
#

no no

#

how can i tell you

#

like added some class for

#

items

#

etc

rough drift
#

what

#

explain yourself more

eternal night
#

what is the source jar here? Is it a plugin? Is it a server?

mystic meteor
#

its a server jar

#

spigot.jar i mean

#

i want to get spigot.jar's source code

#

and put to ide

#

to made changes

#

and create new classes

eternal night
#

okay, but its not "normal" spigot

#

its some derivative work

mystic meteor
#

some changes made yeah

eternal night
#

by whom?

mystic meteor
rough drift
#

?whereami

eternal night
#

Well you are running their code eyeshake what is the name of the fork

mystic meteor
#

im asking for

#

how get any jars source

#

code

rough drift
#

you can't

#

simple.

eternal night
#

pretty much yea

rough drift
#

Some jars sure, most of them aren't re-compilable, most of the times you can't edit them

eternal night
#

especially wiith a server jar, the dependency setup would be abysmal

mystic meteor
#

this is ridiculous

eternal night
#

How so o.O

rough drift
#

how so

eternal night
#

🥷

mystic meteor
#

why there is no tool to make that

rough drift
#

well, possible but very limited

mystic meteor
#

why impossible you can see jars inside with recaf

eternal night
#

yea you can also decompile it

#

the output just isn't the source code

mystic meteor
#

then why you cant dowland

eternal night
#

and you cannot usually recompile it

rough drift
#

editing it is just not feasible

mystic meteor
#

owh

#

thanks for help then

eternal night
#

recaf works by editing the jar's bytecode directly.
It cannot offer you all IDE features because it only knows the jars content

#

Which, as discussed, is not the full source code but the compiled bytecode

eternal night
#

eons now Sadge (2 weeks?)

icy beacon
#

damn

halcyon hemlock
#

in rust or some better lang

tardy delta
#

hmm

blazing ocean
tardy delta
#

anyone knows what this maven warning means:
system modules path not set in conjunction with -source 17

rough drift
#

also make sure you're compiling with java 17 at least

tardy delta
#

java version is 17

rough drift
#

it's fine

tardy delta
#

was wondering what on earth it means

rough drift
#

the path to your modules is not the same path as your jdk

#

it's perfectly fine to ignore if you're in intelli

silk mirage
#

Hey, are there any upto date and good plugin framework/helper libraries similar to lucko's helper?

blazing ocean
#

what do you need

late sonnet
blazing ocean
#

bukkit is a plugin framework no?

silk mirage
tardy delta
silk mirage
#

I just need like more friendly thing

#

where I can just hop on and start working

blazing ocean
#

...

silk mirage
#

and will make my life easier

#

idk how to explain

late sonnet
blazing ocean
#

idt that exists

#

just use bukkit and write your own..?

silk mirage
tardy delta
#

should be backwards compatible either way 🤷‍♂️

blazing ocean
silk mirage
#

Let me name what I want

#

Uhh injection based command

blazing ocean
#

use a command framework

silk mirage
#

runtime dependency management

blazing ocean
silk mirage
#

event injection stuffs

silk mirage
blazing ocean
silk mirage
#

and a lot of other utilities

#

and

blazing ocean
#

lol

silk mirage
#

Like some alternative to let's say lucko's helper library

blazing ocean
silk mirage
blazing ocean
#

it's literally dead simple lol

silk mirage
#

So basically

#

Just take it as an example okay?

#
@Command
public void function(...) {
  Event.asyncWait(AsyncPlayerChatEvent.class, (event) -> {
    ...
  });
}
blazing ocean
#

what??

#

for commands it looks like you want acf or cloud

blazing ocean
silk mirage
#

lets say you're making some kind of ban gui based plugin..

vital sandal
#

is there anyway to change the length of the gap between object and its name ?

silk mirage
#

I'd want them to be combinable into a single command along with gui

vital sandal
vital sandal
#

ItemDisplay

blazing ocean
#

how is that relazed to that example

blazing ocean
silk mirage
# blazing ocean yeah and?
@Command("/ban")
public void ban() {
  alert("enter name");
  Events.awaitChatFrom(user, (text) -> {
    // use it over here
  })
}
vital sandal
zealous osprey
silk mirage
silk mirage
blazing ocean
zealous osprey
blazing ocean
zealous osprey
#

Then add have a text display with a transform ig. What mc version is this for btw?
Also, looks really cool the bot

blazing ocean
#

ig you could have a font with ascent tho

silk mirage
#

Shhh, I really didn't want to create my own tho

blazing ocean
silk mirage
#

Life is but a game of fate

sleek estuary
light surge
#

What is the best way of storing and requesting large amounts of player data?
As in how do large servers handle it? Because querying things every time you need something is not the best way ig. 😂

blazing ocean
#

databases and just have a custom player object

#

just upsert the new object on change

icy beacon
#

is there a maven command to check all files for compile errors but not compile
i've bumped up multiple libs' versions and i'm wondering if there are some breaking changes but my compile time is stupidly slow so i was wondering if there was a command for this case

#

welp im compiling let's see how this goes

blazing ocean
#

cargo check ftw

icy beacon
#

yeah i knew there was something for rust

#

but maven...

#

idk

icy beacon
#

ok no breaking changes yay

warm vapor
icy beacon
#

nope, gave me a build success after i intentionally left an error

blazing ocean
quaint mantle
#

I have never made a Minecraft plugin before. Where should I begin? I want to make a plugin for my Purpur server.

icy beacon
icy beacon
twin venture
#

Hello there , i have a weird bug with my cache , mysql system

#

i get diffrent stats in 1 server , and in the second server i get diffrent stats too

icy beacon
twin venture
#

like in lobby server: 0 kills
in sw-0 server : 2kills

quaint mantle
twin venture
#

syncing data bettwen server's how i can do that?

icy beacon
#

and don't be afraid to ask questions

quaint mantle
#

Yeah

pseudo hazel
#

the most important part is just knowing how to program

quaint mantle
#

Thanks

pseudo hazel
#

everything else follows

icy beacon
eternal night
#

where is the image

blazing ocean
#

no

shadow night
twin venture
#

but i have a system (custom plugin with database support)

#

in sw-0 server were i kill a player , i get 1 solo kills , it increase and saved in sw-0 server but in lobby server it does not update

#

it show 0

inner mulch
#

is it possible to make a nametag grayed out, like when sneaking?

wary harness
#

any good site to compear spigot and mojang mappings

lean arrow
#

not my fault

#

i was in London

blazing ocean
#

lmao

wary harness
#

I am getting this error

onyx fjord
#

do async events have their own thread per event call or just a single thread/thread poll for all async events? (asking because i will have to do potentially blocking operations on one of async events)

slender elbow
#

it depends on the event

#

e.g. async chat happens on the chat thread pool

#

async pre login happens on the login thread pool

#

async worldgen events happen on the worldgen threads etc

eternal night
#

Size and makeup of said thread pool are also up for grabs

#

Could be limited to a max size, could not be

onyx fjord
#

alr so blocking on async pre login shouldnt cause much harm?

blazing ocean
#

no

onyx fjord
#

epic

eternal night
tender shard
blazing ocean
#

then don't take that long :p

onyx fjord
#

then we have a bigger problem

#

db operation shouldnt take 30 secs

blazing ocean
#

wait, you use dbs? i'm still on carrier pigeons

eternal oxide
#

postal

#

I remember playing games by post 🙂

slender elbow
tender shard
#

my father played chess over phone but he was always cheating

misty ingot
#

guys is this the correct server for help with bungee or is there a diff discord server

blazing ocean
#

yes

eternal night
#

(its the right one)

misty ingot
#

right so

how would i go about doing the following: (i have no experience with bungee plugins, only with spigot)
say i have 2 servers, server 1 and server 2

i run a command on either server and all players from both servers are sent to my server, and then a function in a plugin on my server (spigot/paper) is run.

#

the function in that plugin will then do whatever it wants

eternal oxide
#

is "my server" "server1", "server2" or some other server thats not behind Bungee?

misty ingot
#

both servers are connected to one bungee proxy

#

"my server" is either server 1 or server 2

eternal oxide
#

?pmc yes you can do all that using PMC

misty ingot
#

also btw is PMC one-sided or can messages be sent both ways

eternal oxide
#

the PMC is to send a message to the spigot server "my server" to trigger the code to run

#

PMC is both ways, but a player must be on a server for it to receive a message

#

So you need a Bungee plugin and a spigot plugin

misty ingot
#

um im not seeing any options here to prompt the spigot plugin to run a function in its code

eternal oxide
#

Bungee plugin listens for the command to transfer all players, then send the PMC message to spigot

#

spigot plugin is listening for the PMC to do whatever you want

misty ingot
#

ah i see

tardy delta
#

such a good thing to see

blazing ocean
#

damn

eternal oxide
#

I can do that, ?a ==a

#

lots of times

tardy delta
#

gotta write more tests

slender elbow
#

assertTrue(true)

eternal oxide
#

or if you work for Google Tests run: 0

shadow night
#

do google not test code

eternal oxide
#

I'm sure some of it gets tested

shadow night
#

well, I never write tests either so I can't complain lol

eternal oxide
#

its all designed and written by committee

twin venture
#

i need help with syncing data from 1 server to another , when i change the user data , i save it to mysql database, and when player leave i remove him from cache , and when the player join the lobby server i load the data from mysql .

#

but the data is diffrent

inner mulch
#

the data is being loaded before its being stored

#

when using a proxy, you join connect to the other server before leaving the previous oen

twin venture
#

that's wrong , because i save it when its changed

#

aka when i kill a player i save it to mysql instantly

eternal oxide
#

salvation is correct

inner mulch
twin venture
#

they are both have the same database connected to

eternal oxide
#

I'm going to bet you are saving on player quit

twin venture
#

yes and when the user change data

eternal oxide
#

on player quit is too late

twin venture
#

i mean kill a player , win a game

#

i do it in 3 diffrent sinerao

#
  • kill player (save)
  • win a game (save)
  • quit (save)
#

i have a custom system built in , where i use a Cache :

#

not sure if iam doing it wrongly here , i mean the sql code looks fine

#

in the Lobby plugin instance :

eternal oxide
#

if your cache has an entry (old) for that UUID, it never refreshes it

twin venture
#

when ever he leave the current server he is in

#

this is how iam saving it when a player quit

#

is it wrong?

silent slate
#

When i have a inventoryClickevent, how do i test if the player has just put an item inside the chest or just moved items within his own inventory. I wanna detect the item he moves into the chest and not the item he moves throughout his inventory

eternal oxide
# twin venture

the quit is going to run after the player is already in the lobby

#

If hes already in teh lobby he will have a cache data

#

so it never gets pulled from sql

inner mulch
#

does some1 have a picture of what DisplaySlot.PLAYER_LIST is? (scoreboards)

celest notch
#

I'm making an rpg server and i want to make a randomly generated dungeon there are tons of guides online but how would I implement that as a plugin?

blazing ocean
#

there's that one algo

#

how's it called

#

wave function collapse

tardy delta
pseudo hazel
#

oh yeah wave function collapse may look very cool with minecraft builds

tardy delta
#

you chache things in there?

twin venture
#

firstly i have :

  • sql
  • mongodb
  • flat file (for settings)
    .. etc
#

its like a backbone of the system

inner mulch
#

how can i remove a score from a scoreboard?

blazing ocean
blazing ocean
twin venture
#

and this is how i use it

pseudo hazel
#

as for how to actually put that into the game there are about 100 steps probably

celest notch
#

Oh i searched that and i didnt see how quantum mechanics relates to what im trying to do

blazing ocean
pseudo hazel
#

thats where software architecture and general game development skills would be useful

blazing ocean
pseudo hazel
#

look up wave function collapse for generation in video games

celest notch
#

What is usually used to save groups of blocks and spawn them when needed, my dungeon will be a 9x9 grid filled with rooms of various sizes

pseudo hazel
#

structures I would think

#

but maybe there is a better way

twin venture
#

1- from sw-0 server
2- from lobby server after i was teleported back

#

i use this method when a player is killed & killer

prisma jolt
#

Hey, so I created a plugin that when you do [item] it shows up in the chat and it doesn't support HEX Codes for some reason and I have never figured it out and I've tried most solutions but no luck.

#
        if (originalMessage.contains("[item]")) {
            ItemStack item = player.getInventory().getItemInMainHand();
            String itemName = item.getType().name();
            List<String> itemLore = null;

            if (item.hasItemMeta()) {
                ItemMeta itemMeta = item.getItemMeta();
                if (itemMeta.hasDisplayName()) {
                    itemName = itemMeta.getDisplayName();
                }
                if (itemMeta.hasLore()) {
                    itemLore = itemMeta.getLore();
                }
            }

            // Replace [item] with the item name
            String parsedMessage = ColorUtil.colorize(originalMessage.replace("[item]", itemName));

            // Format the chat message nvm
            String chatMessage = ColorUtil.colorize(String.format(format, player.getDisplayName(), parsedMessage));


            // Apply hover event to the parsed item name
            TextComponent messageComponent = new TextComponent(chatMessage);
            messageComponent.setHoverEvent(hoverEvent);

            // Send the formatted message to all players
            for (Player recipient : Bukkit.getOnlinePlayers()) {
                recipient.spigot().sendMessage(messageComponent);
            }

            // Cancel the original chat event
            event.setCancelled(true);

        }
    }
#
public class ColorUtil {
    private static final Pattern HEX_PATTERN = Pattern.compile("#[a-fA-F-0-9]{6}");
    private static final String MINECRAFT_VERSION = Bukkit.getServer().getBukkitVersion().split("-")[0];
    private static final List<String> ACCEPTED_VERSIONS = Arrays.asList("1.16", "1.17", "1.18", "1.19", "1.20");

    public static String colorize(final String msg) {
        return ChatColor.translateAlternateColorCodes('&', ColorUtil.translateHex(msg));
    }

    public static List<String> colorizeList(final List<String> messages) {
        for (int i = 0; i < messages.size(); ++i) {
            messages.set(i, ColorUtil.colorize(messages.get(i)));
        }
        return messages;
    }



    public static void tell(final CommandSender sender, final String msg) {
        sender.sendMessage(ColorUtil.colorize(msg));
    }

    public static void tellList(final CommandSender sender, final List<String> messages) {
        for (final String msg : ColorUtil.colorizeList(messages)) {
            sender.sendMessage(msg);
        }
    }

    public static String translateHex(String s) {
        final Pattern hexPattern = Pattern.compile("#[a-fA-F0-9]{6}");

        Matcher match = hexPattern.matcher(s);

        while(match.find()) {
            String c = s.substring(match.start(), match.end());
            s = s.replace(c, net.md_5.bungee.api.ChatColor.of(c) + "");
            match = hexPattern.matcher(s);
        }

        return s;
    }
}
#

If someone could help me figure it out, that would be great

celest notch
#

?paste

undone axleBOT
prisma jolt
worldly ice
pseudo hazel
#

is there a good way to convert a bungee chat component to an adventure chat component

#

that isnt like reserializing the json into the other side

chrome beacon
#

BungeeComponentSerializer

pseudo hazel
#

they all take an array of basecomponents

#

do I just put it into an array on its own

chrome beacon
#

if you only have one then yes

broken nacelle
eternal oxide
pseudo hazel
#

hmm, if I use packetevents, which uses adventure components for everything, do I need to add adventure as a dependency as well? i get class not found on bungeecomponentserializerimpl

blazing ocean
#

it's not bundled

#

in fact i can't even find it in the docs

broken nacelle
pseudo hazel
#

wdym

blazing ocean
#

ngl just use adventure itself

pseudo hazel
#

well I got the same issue with the json serializer

blazing ocean
#

then include it

pseudo hazel
#

but yeah seems like there is no other way

eternal oxide
blazing ocean
#

or try gson

pseudo hazel
#

I had hoped packetevents just used bungee components xD

broken nacelle
eternal oxide
pseudo hazel
#

yeah I mean this works , but 🤮 GsonComponentSerializer.gson().deserialize(ComponentSerializer.toJson(team.getColoredName()).toString())

blazing ocean
#

deal with it

#

with adventure you will have to write long lines

pseudo hazel
#

I didnt sign up for this 😦

blazing ocean
#

you kinda did

pseudo hazel
#

I mean

blazing ocean
#

just use kotlin and use my dsl

#

much better

pseudo hazel
#

the only other way is to not use packetevents

#

wtf is dsl

blazing ocean
#

domain specific language

pseudo hazel
#

to do what

#

what is kotlin gonna help me

blazing ocean
#

components

#

look at this beauty

pseudo hazel
#

i dont need more components

#

i just need to send packets to the client and listen for them

#

but i guess if you want something done right, you gotta do it yourself

#

for since I wanna finish this update in this lifetime ill just stick with the serialer-deserialize method

river oracle
pseudo hazel
#

idont have a choice

#

its what packevents requires

river oracle
#

Are you using adventure?

pseudo hazel
#

no

river oracle
#

Bungee??

#

There are plenty of ways to get stuff into components

pseudo hazel
#

yeah im using bungee components

#

because it came with spigot

#

and that decision was made 2 years ago

river oracle
#

You shouldn't need to touch Gson spigot should have methods

pseudo hazel
#

for what

river oracle
#

To get the json

#

As a string

pseudo hazel
#

yes thats what I showed

pseudo hazel
#

componentserializer is from bungee

#

team.coloredName returns the component

#

and gsoncomponentserializer is something from packetevents

river oracle
#

Ig all the actual good methods ik of are from craftbukkit

#

That sucks

#

ComponentSerializer.toString(component);

#

Is this really not exposed??

blazing ocean
#

minimessage is adventure

river oracle
#

I'm aware

#

Believe it or not my iq exceeds single digits

blazing ocean
#

you are the genius behind cabernetmc

#

i will believe that every day of the week

pseudo hazel
#

atleast in 1.20.4 it breaks the unicode

blazing ocean
#

bungee moment

pseudo hazel
#

because it doesnt insert a second \ to escape the unicode

#

and then minecraft does a poopoo because it cant parse the json

#

but the magic fix for that is just .repace("\u", "\\")

#

so I guess its usable

#

but its probably not much better than toJson.tostring

#

but who knows

wet breach
blazing ocean
#

o true

wet breach
#

or still wanting to wait the 90 days? lol

#

or 60 days rather

tardy delta
blazing ocean
tardy delta
#

"works locally moment"

marble hearth
#

Do you guys know how to set up a portal either nether or specifically end portal to not send you to the end but instead to send you to your island on skyblock or run playercommand island

twin venture
#

on my pc

#

it was not saving the stats database users

#

🙂

#

should i do Direct Access to mysql data?

#

i mean save it directly?

#

i mean this

#

it save both target and killer 🙂 i bet i can do something better maybe get the current users in this arena , and save them all?

#

that's better than save 1 user at a time right?

pseudo hazel
#

im trying to think of a somewhat efficient way to show player teams using packets so it doesnt interfere with the scoreboard. Right now I am sending createTeam packets every time someone joins or leaves a team, which only leaves me with the issue that players that have left dont update correctly, but apart from that I think its pretty ugly to just keep creating teams, even though the client seems fine with it

#

the way I wanted to fix the no team issue is by removing all teams from the player with packets, but that requires 1 packet per team

#

so idk what the best way is

sleek estuary
#

how i convert to packetevents this

tardy delta
#

exactly what happens in college

sleek estuary
#

how i sent entity_status packet with packetevents?

fierce salmon
#

?dependencyinjection

wet breach
#

?di

undone axleBOT
fierce salmon
#

ty

sleek estuary
wise mulch
#

How do I get the teperature and sky light level from a block location in a LimitedRegion?

#

You can't get it from the block location, nor BlockState, nor BlockData

#

The only way I've found it getting a World instance by getting the BlockState, retrieving the Location instance from it, and using the World instance from that, but that's spaghetti and feels very very wrong

river oracle
wet breach
river oracle
wet breach
#

oh, well by then 60 days will almost be up then

#

sure are taking a long vacation. Didn't like the weather?

river oracle
wet breach
#

thought you are on vacation till july?

#

or are you leaving for vacation next week? lol

marble hearth
#

Do you guys know how to set up a portal either nether or specifically end portal to not send you to the end but instead to send you to your island on skyblock or run playercommand island

tardy delta
#

portal enter event?

wet breach
#

use a plugin, but you are in the development channel

sour mountain
#

anyone know where I can learn how to make custom worldedit brushes?

marble hearth
#

Only plug-in will work? Like multiverse ?

sour mountain
#

@marble hearth are you saying you want to find a plugin to teleport you places using portals or you want help making a plugin that does that?

wet breach
#

unless they want to make use of command blocks or whatever lol

sour mountain
#

omg

#

i remember those days

wet breach
#

but that would be a lot of portals

sour mountain
#

back when I knew nothing about plugins and I would use command blocks

#

plugins are soo much better

river oracle
wet breach
#

ah the typical school schedule

sour mountain
#
    public void onPlayerEnterPortal(PlayerPortalEvent e){

        Player p = e.getPlayer();

        Location islandPortal;
        Location playerIsland;

        if (e.getFrom().distance(islandPortal) <= 4){
            p.teleport(playerIsland);
        }

    }```
#

@marble hearth maybe something like this?

#

idk im not very good at plugins yet but this seems like it would work

blazing ocean
#

you need to initalise them

sour mountain
#

I know I was just showing them that so they could plug in their values

#

I just made that as an example

blazing ocean
#

ah

marble hearth
#

Just not sure

sour mountain
#

try the code I provided

#

it'll prob work

#

and if not then theres definitely a way

celest notch
#

@blazing ocean can wave function collapse support tiles that are larger than 1x1?

#

From what ive seen they always use 1x1s

blazing ocean
#

idk never used it

tardy delta
#

in what context?

#

what data

worthy yarrow
#

I mean that sounds like you're not saving data correctly or you're not querying correctly, it's quite hard for us to say what you should do given the query fails, we don't have enough information

blazing ocean
#

if your db operation fails it likely means you're doing something wrong

worthy yarrow
#

^ more information, perhaps some code and describe the operation you're trying to accomplish (start -> finish)

misty ingot
#

hey um im really very confused regarding how to work with PMC

I want to recieve a message on a channel on my bungeecord plugin, and then do whatever when i receive it
but i seriously just cant wrap my brain around how to receive a message (and how to send said message from spigot)

tardy delta
blazing ocean
worthy yarrow
#

kek

oak mica
#

how could i have multiple plugins in one project

vast ledge
#

as dependecies?

oak mica
#

e.g.

build.gradle
src
-> my_plugin_1
- -> src
- - -> java
- - -> resources
- - - -> plugin.yml
-> my_plugin_2
- -> src
- - -> java
- - -> resources
- - - -> plugin.yml

-> my_main_plugin
- -> src
- - -> java
- - -> resources
- - - -> plugin.yml

where each plugin would be its own JavaPlugin and initialise separately but my_main_plugin would initialise at the end and use the other ones as dependencies

#

preferably compile into one central plugin but even if it doesnt thats fine

tardy delta
#

why having three plugins in one project

oak mica
#

cuz the other two are basically just subplugins for the first one

#

each specialised to do one part of the main plugin

#

and having a separate project for each seems rather dumb

tardy delta
#

just make one plugin?

eternal oxide
#

go look at essentialsx on github they do it with gradle

sullen marlin
#

In maven it's just modules

eternal oxide
#

maven you just set each module to jar not pom

oak mica
#

i hate maven 🤷

tardy delta
#

oh boy it will only get worse

quick beacon
#

Guys, please tell me, I install some construction (blocks), and then I remove it, but I always save it to the database to return it if the server shuts down, but I do not save the blocks of chests, or rather their contents, how to save BlockState?

tardy delta
#

what weird kind of google translate is that

quick beacon
#

yes

#

how save blockState in database

rough ibex
#

and like maven

oak mica
rough ibex
#

gradle is so much less brain cells

#

maven isn't much more effort anyway

#

as long as you understand XML which is already a standard format

oak mica
#

i dont

rough ibex
#

gradles syntax is uh, its own

eternal night
#

I don't think the argument for maven is that it is less effort KEKW

oak mica
#

ive used gradle forl ike 3-4 years

eternal night
#

it just isn't as powerful as gradle at the gain that it is more robust/changes less

celest notch
#

Does anyone know how to make a certain structure guaranteed to spawn once, i am using structure blocks to generate rooms for a custom dungeon

vast ledge
#

keep track if its been spawned, and if it hasnt, force the spawn

#

there might also be a way with the spawning algorithm

remote swallow
#

@eternal night uve worked on gradle plugins how would @river oracle add a dependecy to a project inside a task

celest notch
#

Structure blocks have to be the most complicated thing ive seen while working on my server

chrome beacon
#

I don't think you can guarantee that with structure blocks

#

assuming you want a random dungeon and not the same one everytime

vast ledge
#

yea

celest notch
#

I honestly might just put an armor stand in the rooms and once its done overwrite one with the boss room

#

Basically what im trying to do is something similar to hypixels dungeons for the generation and layout

#

Tf is unknown.bin

#

WHAT

eternal oxide
#

add an externsion

#

jpg

celest notch
#

My images keep getting turned into binary files

vast ledge
#

tuesdays

eternal oxide
celest notch
#

Thx

#

Wouldnt let me send that

#

Mobile app buggin ig

vast ledge
#

Why is there

#

like 50

#

"""""

chrome beacon
#

That's how you do text blocks?

vast ledge
#

really?

#

that looks like it would yeet errors all over the place

#

Mysql ig

celest notch
# eternal oxide

Yeah so basically what i was trying to do was use structure blocks to generate a dungeon out from a start room, but i need every door between the start and end rooms to be locked

chrome beacon
#

It appears you have an extra " in the first sql statement

#

other than that

#

try it and see

celest notch
#

And end room needs to be guaranteed to spawn

vast ledge
#

test it

#

I mean it works, what more would you want

chrome beacon
eternal night
#

Why would you want to add a dependency inside a task

remote swallow
#

@river oracle answer him

river oracle
#

or writing some script to edit a gradle file itself

eternal night
#

Well no you'd just dynamically compute the nms dependency notation

celest notch
#

Is there a structure blocks discord or smth i kinda feel like im comitting crimes asking about it here

vast ledge
#

Thats like default minecraft or smth

#

datapacks

#

there should be a discord for that

river oracle
chrome beacon
#

minecraft commands or minecraft worldgen

#

🤷‍♂️ not aware of any good places to ask

eternal night
#

E.g. define the MC version in the modules gradle.properties

#

Have a task that just updates that value when it creates a new copy

river oracle
#

how tf does sculptor do it then

#

I didn't notice anything in the properties or gradle properties there so I figured ya'll dynamically added them too

#

wait nvm I had a good idea that isn't a task

eternal night
river oracle
#

do they generate dependencies into the gradle.properties at runtime?

eternal night
#

When it migrates from one version to another, it copies the current one and does a find for the MC version in the build.gradle

#

No we keep the ver in the build.gtadle.kts

#

But same concept

#

MigrateVersion isn't a runtime thing

#

It's checked into git

#

Sculptur straight just does what you'd do, which is copy the old folder, find the Minecraft version like in the new folders build.gtadle.kts, bump it to where it wants it and off it goes

#

Nothing funky happens at actual grade runtime/compilation

river oracle
#

hmmm okay

celest notch
wise mulch
#

What code do I need to put in a chunk generator to actually make structures spawn? I set the structure Boolean the true, but it only spawns the bounding box and no blocks from the actual structure. I know the bounding box is there at least because /locate is able to find it, and if I go to a stronghold for example I will get the eye spy achievement.

I realize this behavior even occurs when I have no code in the chunk generator at all, so rather than me doing something that causes them to fail to spawn, it is rather something I am missing which placees the blocks that make up the structure.

The Boolean for enabling structures didn't say anything about extra code that's needed in the chunk generator to place them, but it seems like they're actually is something that is needed. I just don't know what it is because there's no other mention of structures anywhere in chunk generator.

#

As mentioned this happens even when there is no code in the chunk generator, just a blank world with structures turned on. Ordinarily avoid world would still be able to spawn some structures, like floating strongholds. But in this case I only get the bounding boxes for said strongholds and other structures

vast ledge
#

dayum

#

tldr?

wise mulch
#

tl;dr vanilla structure no appear in custom chunkgenerator, only bounding box
happens even when I don't actually override the gen functions, so it means I am missing something rather than breaking something

vast ledge
#

okay thanks

inner mulch
#

i heard that since 1.20.3 the numbers can be removed from the scoreboard, how can this be achieved?

knotty aspen
#

by setting the number format of the objective to blank. Paper has API for that, which Spigot seems to be still missing. So either use Paper, NMS, or the vanilla scoreboard commands

inner mulch
#

okay

#

thank you

muted otter
#

how do i hotswap with jetbrains runtime?

wet breach
#

when you have columns tthat can't be null, when possible provide a default

#

for said column in the query when making it

#

this way, if you need to put data into the row, you don't explicitly have to specify if it isn't really necessary to specify

#

when creating tables, MySQL has a variable called DEFAULT

#

you tack it on to the end of your column creation part

#

I will give an example

#
gold bigint NOT NULL,
gold bigint NOT NULL DEFAULT '0',
#

you can also go in and use alter if you want to set defaults too

#
ALTER TABLE player_data
ALTER gold SET DEFAULT '0';
#

even so, something to be aware about. If a default is set for columns, you can explicitly remove them from your query when adding new players for example

#

as the mysql table will add the defaults for you

#

postgre is just enterprise mysql

#

there may be some slight differences but otherwise its mostly the same if you were using mysql 😛

#

if its a number I don't think it does, but I usually do just out of habit

#

less to worry about going wrong that way

zenith saddle
#

How should you access the plugin's logger?

#

is it this?
public Logger log = this.getLogger();

#

And what if I want to use it in other classes

elfin mesa
#

I'm currently making a plugin, what should the minimum version that it supports be? Is there a standard? I currently support 1.17-latest, I'm wondering if I should go lower (perhaps to 1.13?) or just cut off 1.17 and move to 1.18? Is there any benefit for doing so?

river oracle
#

I only support latest

#

usually I'll do last 3 versions

#

no more than that ever though

river oracle
dense bronze
elfin mesa
#

Alright, thanks

wet breach
knotty aspen
quaint mantle
#
java.lang.NullPointerException: null
        at com.onarandombox.MultiverseCore.utils.WorldManager.cloneWorld(WorldManager.java:144) ~[?:?]
        at vn.giakhanhvn.skysim.entity.dungeons.boss.sadan.SadanBossManager.startFloor(SadanBossManager.java:40) ~[?:?]
        at vn.giakhanhvn.skysim.util.Sputnik.lambda$startRoom$6(Sputnik.java:1138) ~[?:?]
        at vn.giakhanhvn.skysim.util.SUtil$9.run(SUtil.java:969) ~[?:?]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59) ~[patched_1.8.8.jar:git-PaperSpigot-445]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:352) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:783) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [patched_1.8.8.jar:git-PaperSpigot-445]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [patched_1.8.8.jar:git-PaperSpigot-445]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_411]```
What even is the null nulling at?
drowsy helm
#

Show your code

quaint mantle
#

Holdon give me a minute

#
vn.giakhanhvn.skysim.entity.dungeons.boss.sadan.SadanBossManager.startFloor(SadanBossManager.java:40) ~[?:?]
        at vn.giakhanhvn.skysim.util.Sputnik.lambda$startRoom$6(Sputnik.java:1138) ~[?:?]
        at vn.giakhanhvn.skysim.util.SUtil$9.run(SUtil.java:969) ~[?:?]``` I'm guessing these two?
drowsy helm
#

Show your code

#

Line 40

quaint mantle
#

?paste

undone axleBOT
quaint mantle
dim frost
#

I have direction of an entity (vector) and taking this as thrust i need a direction perpendicular towards Y axis clockwise to act as lift

#

Is there a viable algorithm for this?

#

Right now I am aware infinite perpendiculars are possible in a 3D graph whilst in case of 2D only 1 or 2

#

So I was thinking what if I take Z as non changing and from (x, y, z) I make it (y, -x, z) ?

quaint mantle
#

But it's duplicated a world with the name f6

spice burrow
#

is there a better way to give blocks a glow effect (the entity glow effect) besides having an invisible glowing shulker in the block you want to make glow?

quaint mantle
#

A world with that name does exist

#

worldManager.cloneWorld("f6", worldname, "flat");
Hmm

#

How about if I try to load the world paste the schematic?

mental moon
#

Does anyone know how to make a Smithing recipe without a template?
Before 1.20.5 I was able to pass Air with no side effect, but null and Air are prohibited now.
I have a Listener that sets the Result, but without all the pieces of the recipe, the table won't release the item.

analog lantern
#

if i wanna get a spigot jar with the mojang mappings i just build tool with --remapped and shade that into my plugin right?

analog lantern
analog lantern