#help-development

1 messages · Page 1266 of 1

drowsy helm
#

Show your pom

#

Or gradle file

languid otter
drowsy helm
#

Read the tutorial

languid otter
#

Same problem

chrome beacon
somber scarab
#

is there an easy way to dynamically update a gui that a player is looking at? (like updating a list of player heads or removing a specific item)

rotund ravine
#

I mean it’s just an inventory

#

Just change the contents

grim hound
#

is there a way to check if the server is running on a localhost?

thorn isle
#

every server is running on a localhost

#

are you asking whether the server listens to connections on the loopback address?

grim hound
#

yeah

drowsy helm
#

you want to check whether its not public

thorn isle
#

there's Bukkit.getIp() but i have no clue what that actually returns as it's a string

grim hound
drowsy helm
#

you'll have to use an external server to ping it

#

theres apis for that

young knoll
grim hound
#

ipify?

young knoll
#

Which is usually blank

thorn isle
#

just checking whether it's listening on 127.0.0.0 or whatever is probably enough

grim hound
drowsy helm
grim hound
grim hound
#

harsh

young knoll
#

My public servers all leave server ip blank

#

Pretty sure most do

grim hound
languid otter
chrome beacon
grim hound
#

self-hosting a resource pack url server

#

need it to work on both local and public

chrome beacon
#

?nms

chrome beacon
#

For most cases you can use that

#

Do add a config override ofc

#

Other than that I believe aws has an api that returns the ip of the caller

#

You already mentioned ipify so use that ig

grand flint
#

Where can I find the ID for an attribute?

#

Specifically generic.scale

grim hound
#

on my localhost it returns my ip

#

but my client cannot connect to it?

grand flint
#
for (Player target : Bukkit.getOnlinePlayers()) {
            if (target.equals(viewer)) continue;

            List<EntityData> metadata = new ArrayList<>();
            metadata.add(new EntityData(15, EntityDataTypes.FLOAT, scale));

            PacketEvents.getAPI().getPlayerManager().sendPacket(
                    viewer,
                    new WrapperPlayServerEntityMetadata(target.getEntityId(), metadata)
            );
        }

is this wrong for making other players scale to the scale for my client?

grim hound
#

or something

#

I don know

chrome beacon
#

Mine for example does not allow that

#

That means I cannot connect using my public ip but others can

young knoll
#

That’s what I do

#

Amazon to grab public ip, override in config

chrome beacon
grand flint
#
private void setScale(Player viewer, float scale) {
        viewer.sendMessage("§aStarting set scale");
        for (Player target : Bukkit.getOnlinePlayers()) {
            if (!target.equals(viewer)) {
                viewer.showPlayer(plugin, target);
            }
        }
        viewer.sendMessage("§aPlayers are visible");

        for (Player target : Bukkit.getOnlinePlayers()) {
            viewer.sendMessage("§aStarting players packets");
            if (target.equals(viewer)) continue;

            List<EntityData> metadata = new ArrayList<>();
            metadata.add(new EntityData(15, EntityDataTypes.FLOAT, scale));

            viewer.sendMessage("§aAdded entity data of 15 as " + scale);

            PacketEvents.getAPI().getPlayerManager().sendPacket(
                    viewer,
                    new WrapperPlayServerEntityMetadata(target.getEntityId(), metadata)
            );
            viewer.sendMessage("§aSent packet to the player");
        }
    }

it prints all the things so i assume my packet thing is wrong

slate siren
#

👀

grand flint
#

tbh i think the packet id is wrong ill ask in packetevents

grand flint
#

oh wtf where did i get 15 from

#

can i even do this with generic.scale??

grim hound
grand flint
#

can you send me that page

grim hound
grand flint
#

ohh it merged didnt it

grim hound
#

sure did

grim hound
grand flint
grand flint
#

how am i supposed to send it to the player

grand flint
#

Would you mind giving me an example?

grim hound
#

yes

#

I'm going to sleep now

#

good luck, its simple

grand flint
#

:3

#

I think it is a client limitation icl it's still not working

languid otter
tall furnace
#

Boats, when given a boosted velocity, will move faster until the boost stops being applied. They then go from full speed to 0 in a single tick, instantly halting without any collision or anything unusual. This is infuriating. Is there another way to give a speed boost to a boat without causing it to then lost 100% of momentum to nothing?

fervent matrix
#

Motion is usually handled client-side

tall furnace
#

I know that input is handled client-side. The boat has to sync with the server though, and I know boats have issues with syncing. Makes me wonder if it has anything to do with that, but the server doesn't at any point run behind, and there's no "moved too fast" issues in the console.

fervent matrix
#

Was just wondering if maybe whatever was causing it to stop could be client-sided?

#

Oh, wait a minute

fervent matrix
#

If so, are you certain that there’s nothing in your code that would set the boat’s velocity to zero?

#

Also are you sure it’s not friction with the ground causing the slowdown?

wraith dagger
#

?mappings

undone axleBOT
somber scarab
#

If someone came to you and said "why don't we make an API for guis that functions like standard markup langs, as close as we can to simulating such a system we can then create sub sections in a gui and style it how we want, for instance we can make a header object and reuse it all over the plugin"
what adjective would you use to describe that person?

daring light
#

Is there a way to serialize and deserialize a Sign in one go without having to store it's location and lines manually?

#

I need to store it in a SQL database

drifting bluff
#

whats the best way to make an variable that stores how many players have joined my server? and how do I make it so it will still be there after an restart?

drowsy helm
drowsy helm
#

Pretty sure theres an inbuilt thing for that tho

somber scarab
#

abstract GUIElement

abstract container extends GUIElement
abstract button extends GUIElement

drowsy helm
#

Thought you meant an actual markup interpreter

#

It’s just not really practical to have layout elements like that since it’s a tiny grid

somber scarab
drowsy helm
#

Plus Thats another level of abstraction which might be annoying for users

somber scarab
#

only necessary abstractions

#

hmmm

#

I still want to reuse layouts around my plugin tho

#

I cant imagine placing each button individually for each menu

hushed spindle
#

does spigot offer a way to show the progress bar of a custom merchant interface or do i have to use nms for that

wet breach
drifting bluff
drowsy helm
#

Not sure how efficient that is thi

eternal oxide
#

So long as you don;t wipe the cache yourself offline player count is accurate. They expire in teh cache but are still counted

drifting bluff
#

hm but will the offline player count add 2 when someone joins, leaves and joins again?

#

and I get this error when trying to join

In my join listener file

@EventHandler
    public void onJoin(PlayerJoinEvent e) throws InterruptedException {
        Player player = e.getPlayer();
        e.setJoinMessage(ChatColor.DARK_GRAY+"+ "+ ChatColor.WHITE +player.getDisplayName());
        wait(10);
        e.getPlayer().performCommand("sb");
        
    }
drowsy helm
#

?paste

undone axleBOT
drowsy helm
#

No duplicates

drifting bluff
drifting bluff
drowsy helm
#

Oh then yeah external variable

#

In a config

drifting bluff
drifting bluff
#

Okay thanks

#

this is my main file currently

package de.constt.idleeClicker;

import de.constt.idleeClicker.commands.OpenScoreboardCommand;
import de.constt.idleeClicker.listeners.JoinLeaveListener;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

public final class IdleeClicker extends JavaPlugin {
    public FileConfiguration config = getConfig();

    @Override
    public void onEnable() {
        // Commands
        this.getCommand("sb").setExecutor(new OpenScoreboardCommand());

        config.addDefault("joins", 0);
        config.options().copyDefaults(true);
        saveConfig();

        // Listeners
        this.getServer().getPluginManager().registerEvents(new JoinLeaveListener(), this);
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
}

how would I now add 1 to the joins value in the leavejoinlistener class when someone joins?

drowsy helm
#

Get the value, increment it, then set it

drifting bluff
#

How do I get the value in the other file?

#

I may have found out how I could do it

#

yup works now, thanks for the too

somber scarab
#

what's a NodeClickContext?

drowsy helm
somber scarab
#

apperantly not

#

I found it

warm mica
#

Or a node made a click sound

somber scarab
drowsy helm
somber scarab
#

every button trigger needs a NodeClickContext() with like 10 parameters

#

no idea how to fill all that up

drowsy helm
#

Where did you find that api

upper hazel
#

what better use? pdc in chunk for save block data orlocaton and data file?

drowsy helm
#

Has 2 stars and last commit was 11 months, wouldnt trust it

somber scarab
#

Im trying to find a decent one

upper hazel
#

and maybe some text in the future

drowsy helm
#

Chunk pdc then

upper hazel
#

ok

drowsy helm
upper hazel
#

I make a plugin for a mini game something similar to mario kart and would like to know if there is a way to make it so that if the player goes outside the road (void) the plugin will recognize it?

#

i think about marking blocks but not all air blocks should be marking points

#

there are places where the player can fall down and there's another road.

#

maybe I should use air from the void?

#

where player can get damage i gess?

somber scarab
upper hazel
#

yea thenks

drifting bluff
bright spire
#

Guys this limiter does not seem to be working

#

And the server gets crashed. What were you guys trying to achieve?

remote swallow
#

Flamecord

bright spire
umbral ridge
#

is there a way to increase all mobs health by a certain percent

#

or do i have to do onEntitySpawn ... etc

tall furnace
blazing ocean
#

iterate over all entities in a world?

umbral ridge
#

hhhhmmmmmm alright

tall furnace
bright spire
quaint mantle
#

okay, any anticheat nerds here?

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

quaint mantle
#

hi olvio

sullen marlin
#

🤓

quaint mantle
#

so I was wondering if there is any way to patch f3+s exploit

chrome beacon
#

What's the exploit

sullen marlin
#

Wtf is that

umbral ridge
#

what is f3+s

fervent matrix
#

it causes a game reload

#

like F3+T but not for textures

#

so your client freezes for a moment

quaint mantle
#

basically that

umbral ridge
#

why would anyone use this

sullen marlin
#

Ok but what's the exploit

fervent matrix
#

I think knockback or something?

#

I don't think it's patchable

chrome beacon
#

Dumps contents of dynamic textures and font textures to screenshots/debug/

fervent matrix
#

because client motion

chrome beacon
#

from wiki

umbral ridge
#

there is no knockback

quaint mantle
#

yeah so

sullen marlin
#

An noknockback anticheat will be as good as it gets then surely

chrome beacon
#

No idea what polar is

#

but probably

quaint mantle
#

Or any anticheat 🤔

#

Thanks

young knoll
#

That (was?) a big thing hackers would do on hypixel

#

If they got knocked into the void they would cause themselves to lag and then they’d get warped back by the anticheat

bright spire
#

Btw the upstream bridge is the connection between the player and the server right? I am wondering why the packet limiter even if closing the channel, the packets are still being received

#

Maybe some isClosed checks are required when processing packets

drowsy helm
#

Does anyone know how spigot handles exceptions such that when a plugin throws an exception It can still resume execution? I'm designing a service module system and want to implement similar so when they fail or throw exceptions my entire applicaton doesn't die with it.
I understand i can just try catch somewhere but is there a proper design pattern to this?

fervent matrix
dire marsh
blazing ocean
#

then logs the error

drowsy helm
#

yes but where exactly

#

in the class loader?

dire marsh
sullen marlin
#

Basically just where you'd expect, nothing fancy

drowsy helm
#

hm gotcha

#

i think im just over thinking it

sullen marlin
#

Yeah

somber scarab
#

man this is so aggravating. i can't come up with a scalable concept for my GUIs

#

how does hypixel do it for example

#

they have buttons that decorate other buttons, changing meta data, paginators and player lists

#

a layout for each gui

pseudo hazel
#

all of those sound like complete different things

somber scarab
#

but they're all GUI related.

pseudo hazel
#

sure

#

but, how do you know hypixels design is scalable

#

maybe they hardcode every menu

somber scarab
#

that makes my GUI system so large and forces me to consider all the customization options for every single GUI element

pseudo hazel
#

usually the way to make it more scalable is to remove it further from the inventories that they actually are

somber scarab
#

abstraction

pseudo hazel
#

if you have a class like a button, window, window section, paginated window, etc

#

yes

#

then the challenge becomes implementing those things for minecrafts system and having them work together

#

but idk what your goal is

somber scarab
#

but I'll have to force all my inventories to be the max size or else I'll also have to consider laying out all those elements and adapting them to the inventory

#

I mean..

pseudo hazel
#

I mean I guess

#

there would just be a function to determine how to fit a layout into an inventory

#

like normal ui frameworks do

somber scarab
#

picking abilities

#

oh man

pseudo hazel
#

and what are you stuck on exactly

somber scarab
#

I am stuck on the very beginning.. the core component relationship diagram

#

how is everything gonna fit together

pseudo hazel
#

I wouldnt worry about that

#

I would single in on a single menu

#

implement that

#

and then look at the next menu and determine how you can refactor it to get reuse of your first one

#

determine what things can stay the same, what things you would want to move around, and what things are specific to the actual menu in question

somber scarab
#

right now I have a PagesManager that has InventoryGui objects mapped with a PageEnum (PageEnums.MAIN_MENU and so on)

#

and each InventoryGui has its Bukkit Inventory and a map of slot integers InventoryButtons

each Inventory Button has its Itemstack

#

so the issue I ran in is that to implement a Menu, I will need handreds of lines for making each Itemstack with its MetaData

#

and set them manually one by one for each page

pseudo hazel
#

okay

somber scarab
#

this makes my Menus ultra static and not dynamic

pseudo hazel
#

so then can you identify what parts are unique for every item and what things are the same

drifting bluff
#

So I got this as my scoreboard command currently. Is there an way to make it not an command and make it like just add the scoreboard to the player when someone joins? Like without the command

somber scarab
pseudo hazel
drifting bluff
pseudo hazel
#

wdym

#

extract it into a function and call it instead of calling the whole command?

drifting bluff
#

Yes

#

Cus I dont want an command

pseudo hazel
#

yeah

drifting bluff
#

for it

pseudo hazel
#

so thats the answer then

#

extract it

drifting bluff
#

So I just put all the code into an function in the class and then when someone joins I pass the player and then just set the scoreboard?

pseudo hazel
#

yeah

pseudo hazel
drifting bluff
somber scarab
#

I just pass the inventory I need to open. but it's more about the Item Stacks for instance...

in MainMenu.class
https://pastebin.com/sLX3Pn5Q

and in LobbyPage.class
https://pastebin.com/SL2eNmnD

pseudo hazel
#

you mean like the positions and text of each button?

somber scarab
#

I reuse the same buttons but I have to instantiate them each for every page

#

If I want to reuse Buttons, then I'll have to consider all my plugin's worth of logic into that button class which also is not a clean way

pseudo hazel
#

cant you just use consumers for the button?

#

like you have a button itself

#

and then the function/consumer its gonna call

somber scarab
#

consumer?

pseudo hazel
#

lambda function

#

menu.addButton(btnItem, () -> buttonAction()):

somber scarab
#

I never heard of a function/consumer btu I know what lambda functions are

pseudo hazel
#

its basically the same thjng

somber scarab
#

so the buttons logic would be page specific

pseudo hazel
#

a consumer is an object that takes a lambda that has a single argument

somber scarab
#

not plugin wide

pseudo hazel
#

yeah in this case the win is that you dont need to setup your button each time

#

if the button has the same consumer logic then you dont even have to use different functions

#

you can have buttons have a default function

#

like a new CloseButton(menuToClose);

#

that calls menuToClose.close() when the button gets pressed

somber scarab
#

I never did smth like that before. is there a documentation I could use?

pseudo hazel
#

ways to turn your menus into compositions of simple actions

somber scarab
#

but I get what you mean structurally now

pseudo hazel
#

documentation for what

somber scarab
#

Function/Consumer thing

#

is ti called Functional Interfaces?

pseudo hazel
#

a Consumer is a functional interface

#

but yes, you can use functional interfaces with lambdas

somber scarab
#

?gui

somber scarab
#

I saw this before here

#

I think the last snippet is exactly what you're mentionaing

#

but I didnt really understadn it at the time

pseudo hazel
#

yes

#

you can see that InventoryButton has an eventconsumer

#

what it does it consumer.apply(event) which calls the consumer function with that event

#

its a way to create your objects without the button itself knowing what its gonna call

somber scarab
#

hmm

#

that could be it

drifting bluff
#

Im currently using the showScoreboard function in an join and leave listener class so that when you join it will show the scoreboard. How do I make the scoreboard update the join count cus right now Im trying to use the Bukkit.getShedular to like update it but it doesnt work.

https://pastes.dev/Ddlf4AxWwB

upper hazel
#

In my plugin there are certain trigger blocks, crossing which cause certain events, but I don't know how to check if the player who rides on armor stand entity (mtvehicles plugin) has crossed this block.

vague swallow
#

Does anyone know why player.getAttribute(attribute).getDefaultValue() returns 0.7 when the default value actually is 0.1?

upper hazel
umbral ridge
#

if you have a list of blocks which you want to detect, just check it through the Map or List

somber scarab
#

Maps are better because you potentially save up alot of compute power to get the needed block

umbral ridge
#

compute power

#

the list or a map needs to be final and static anyways, cached. does not make much difference at the end to be honest

ivory sleet
#

I mean depending on what exactly you need - perhaps some sort of graph or tree scale even better than a hash based map or array based list

umbral ridge
#

you need ConclubeMoveEvent

ivory sleet
#

🙏

wet breach
#

and with that, I am off to bed

mortal hare
#

my hot take, a method should take only parameter type it really needs, unless its part of an api contract and the implementation isnt known (like event listeners)

#

if method parses usernames it should take either a value type for representing username or string instead of fat Player objects

vague swallow
ivory sleet
mortal hare
#

for that, yes, but what i want to emphasize that only public contracts should expose types in more generic ways, if your interfaces exist just for the sake of internal representations only, you shouldnt waste time either making dtos or passing player objects where you could just pass what you need

ivory sleet
thorn isle
mortal hare
thorn isle
#

other hash map implementations don't use tree buckets at all and degrade to O(n) time complexity in the same case

ivory sleet
mortal hare
#

lets say public interfaces whose implementations can only be retrieved through some kind of factory classes

#

but can be only exported through modules as well

thorn isle
#

likewise other implementations can be quite a bit lighter in terms of space complexity, e.g. fastutil linear probing hashmaps store all entries in a pair of flat, associated arrays rather than spawning Entry objects for them

#

a better rule of thumb when deciding between map vs. list or others, like i've talked about before, isn't really the complexity properties of the collection but the properties of the data set

ivory sleet
drowsy lintel
#

Sorry if it's the wrong area but anyone know the max number of map images in 1.16.5? Wiki says in 1.13 they're "no longer limited to 32,768", which is vague.

thorn isle
#

should duplicates be eliminated? use a set; do you need order? use a linked map; do you need both order and must allow duplicates? use a list; need duplicates but not order? use a multiset

mortal hare
#

for example in Craft craftbukkit prefixed classes you should use stricter types since those interfaces wouldnt need to ensure ABI compatibility after changes but for bukkit api intefaces you should use generic types since those types would be accessed externally and you cant predict what user of the API contract would need

ivory sleet
#

Eh I mean bukkit with its interfaces is a bit special, since like 90% of them don’t allow extension as per api specification

mortal hare
#

i feel like stricter types can enforce better abstractions since in more generic types, you can have implementations of the same functionality which wouldnt use specific objects from the parameters per se

turbid crown
#

Is this the place to look for people to join the team for plugin development?

mortal hare
#

but you lose ABI if you change something up in method signature

ivory sleet
#

what do u mean w stricter vs more generic types?

undone axleBOT
mortal hare
#

i believe you should prefer stricter types for internal representations which are not used in public contract

drowsy lintel
mortal hare
#

but for public ones you should prefer generic ones

chrome beacon
thorn isle
ivory sleet
#

Sometims you wanna enforce the consumer to pass a Player object tho, that guarantees invariants that a String type itself cannot support tho @mortal hare

drowsy lintel
#

Alright thanks 👍🏻

mortal hare
#

too bad java doesnt have std::size_t

ivory sleet
#

not about size

mortal hare
ivory sleet
#

for example allowed characters in such string objects

mortal hare
mortal hare
#

sure it can get out of hand, but if your method requires lots of params, something is wrong either way

ivory sleet
#

why should I pass a second parameter when I can be given the invariant for free by simply passing Player instead?

mortal hare
#

because you're tying the algo to the player object where it can be decoupled from it

ivory sleet
#

As said, it entirely depends on situation when to use the aggregate type vs some explicit type- on the invariants, the modules scope etc

ivory sleet
mortal hare
#

fair enough

#

this argument is useless nonetheless

ivory sleet
#

yea fairs

mortal hare
#

in programming "it all depends"

#

fucking hate that phrase

#

but it stands true

ivory sleet
#

the bitter truth

thorn isle
#

"we should always do things according to this paradigm/principle" is at the peak of the dunning-kruger graph

ivory sleet
stuck oar
#

anyone know how to check if the inventory that a clickevent is in is the inventory that you need?

warm mica
stuck oar
#

its not me

atomic swift
#

im really confused

[17:55:34 ERROR]: Error occurred while enabling CrazyGenerators v0.0.1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "info.sokobot.crazygens.Main.getCommand(String)" is null
    at info.sokobot.crazygens.Main.onEnable(Main.java:140) ~[Crazy-Generators-0.0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:541) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:560) ~[paper-1.18.2.jar:git-Paper-388]
    at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:474) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:665) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:432) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:316) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1164) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.18.2.jar:git-Paper-388]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]

getCommand("crazygensreload").setExecutor(new Reload());

stuck oar
atomic swift
#

no... I just added it and it worked.

stuck oar
#

gotta make sure to remember that

atomic swift
#

yeah i havent done plugin development in a minute

thorn isle
#

nice tan line

stuck oar
#

insane hours

atomic swift
#

idleing

orchid brook
#

Hello quand j'ouvre le GUI buildtool j'ai cette erreur:

java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source) java.util.concurrent.ForkJoinTask.doExec(Unknown Source) java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
umbral ridge
#

what the heck is this spam message in the console

#

i dont want that in the console

#

just process this stuff without broadcasting it to the console??

#

which idiot decided this was a good thing

#

apart from that, message like this .. everything it wrong with it

#

1: "in this world" - can there be multiple end worlds? can you end the game multiple times?

thorn isle
#

yes and yes

chrome beacon
#

Why are you complaining about it here

#

also this ^

#

anyways

#

?whereami

thorn isle
#

that said the message is still ass since "this world" is ambiguous

#

unless perhaps there is a preceding message naming the world

#

i don't remember if there is

grand flint
#

How can I send a generic scale attribute as a packet to a client so the scale only changes for them?

#

I tried with protocollib but it says generic.scale nor scale exists

chrome beacon
#

What version of ProtocolLib are you using

#

also show your code

grand flint
#

I used the latest stable build as well as the latest dev build both didn't work

grand flint
slender elbow
#

oh okay

grand flint
#

ill send at home

trim quest
#

dont know which plugins are popular today as development APIS
Which ones I should know in general?
For example, I want people to be able to select specific areas of many maps as arenas and set player spawn points. I've done this before using start.bat files and nbt

#

when each minigame ends server will load other map that people vote most

#

im developing this atm

#

im planning to use worldguard

thorn isle
#

for designating areas, worldguard is industry standard

#

spawnpoints or other points of interest i don't think there is any popular framework for, you typically just load those from a configuration file

#

i sometimes use marker entities for points of interest but that is kind of 🤡

trim quest
#

i did this before btw but i used start.bat for loading maps for each starting. replacing folders after shut down and restarting it again.

#

when minigame ends i was shutting server down in my plugin

#

and bat file was restarting it

#

i have script

#

but im not gonna use that

#

i want to refactor my minigame

thorn isle
#

loading a new world and unloading the previous is generally sufficient and much faster than fully restarting the server

trim quest
#

there was no ai

#

like chatgpt & stuff

blazing ocean
#

what

thorn isle
#

🤡

#

the future is looking grim

trim quest
#

my learning resources was limited

blazing ocean
#

yep

trim quest
#

i mean this

blazing ocean
#

There are billions of free java learning resources

trim quest
#

yeah

#

anyway i dont want to debate for this

#

one of my old bat files

@echo off

setlocal EnableDelayedExpansion

set "source=D:\MinecraftDev\mc_server\mc_maps"
set "destination=D:\MinecraftDev\mc_server"

:loop
echo Deleting existing world folder...
rmdir /s /q "%destination%\world"

set /a "n = (%random% %% 3) + 1"
set "folder="
set /a "count = 0"

for /d %%a in ("%source%\*") do (
  set /a "count += 1"
  if !count! equ !n! (
    set "folder=%%a"
    goto :copy
  )
)

echo There are not enough directories to copy.
goto :end

:copy
echo Copying %folder% to %destination%...
xcopy /e /i /y "%folder%" "%destination%\world"

java -jar spigot-1.16.5.jar --nogui

goto :loop

:end
blazing ocean
#

using chatgpt to make a batch script to copy worlds is crazy work

trim quest
#

believe or not we was using this since 1.5.2

#

in turkeys 2012-15 mc era

blazing ocean
#

I don't think chatgpt has existed since 2012

trim quest
#

ai make it perfect but we was using this

blazing ocean
#

"perfect"

trim quest
#

server names was baskentcraft, aclikoyunları, i spoked with their admins

#

type to youtube, you will find videos

thorn isle
#

schizophrenia

blazing ocean
#

real

rugged fern
#

Is it possible to add entities to the pool of mob spawning?

#

Or any way around it

trim quest
#

one of their admins

blazing ocean
trim quest
#

bro yeah

#

look at the history

#

are you idiot or smthing

#

why you debating this

#

there was no ai

#

in that time

blazing ocean
#

never said that

#

"AI" has existed back then though

trim quest
#

we was using their discord channel

#

to talk

#

and they said they also used bat script similar to this

#

and helped me a bit

blazing ocean
#

I don't really care

atomic swift
#

can you guys take this to a dm

trim quest
#

then why you call me schizophrenia

blazing ocean
#

literally the worst method of doing this

trim quest
#

yes i know

#

but you guys call me liar in help section of this discord

#

i just want to improve my methods

jovial grove
#

Is there any API method to get current moon phase?

atomic swift
jovial grove
atomic swift
#

something like this


switch (moonPhase) {
            case 0: player.sendMessage("The moon is new."); break;
            case 1: player.sendMessage("The moon is a waxing crescent."); break;
            case 2: player.sendMessage("The moon is first quarter."); break;
            case 3: player.sendMessage("The moon is waxing gibbous."); break;
            case 4: player.sendMessage("The moon is full."); break;
            case 5: player.sendMessage("The moon is waning gibbous."); break;
            case 6: player.sendMessage("The moon is third quarter."); break;
            case 7: player.sendMessage("The moon is waning crescent."); break;
        }
drifting bluff
#

I want to have an variable that every player has that is called clicks and when you right click an specific Item it should add 1 or more to the variable.

1st: What is the best way to do these "variables" per player?
2nd: How do I then add e.g. 10 to the count?

Like an count or variable that every player has

sly topaz
echo basalt
sly topaz
echo basalt
#

^ it depends on your specific structure

#

If you want it in-memory use some sort of Map<UUID, Whatever>

sly topaz
#

if the count is supposed to reset if they lose the item or something, then I'd recommend on the item

drifting bluff
#

So I want it so that every player has an count and when you right click e.g. an stick it will add 1 to the count. When you lose the stick, wich you can only by putting it in the trash via /trash and that you will always keep the count even if you die

ocean gorge
#

BossBar supports ItemsAdder emojis?

drifting bluff
sly topaz
ocean gorge
sly topaz
sly topaz
#

you'd have to use some method to parse the namespaces, but I doubt ItemsAdder provides API for that

ocean gorge
#

😦

ocean gorge
#

i'll check

earnest girder
#

I'm using player#launchProjectile, but I want the projectile to launch from 1 block below the player's eye level. does the launchProjectile method do that by default? The two locations/vectors I've modified in my code dont seem to have any affect on the projectile.

https://paste.md-5.net/howiyubera.cpp
https://paste.md-5.net/imenihoquq.cpp

Do I need to set the location of the projectile after I launch it?

sly topaz
#

if you want to launch a projectile from a specific position, it'd be better to use the World#spawn method and then just set the entity's velocity to wherever you want

#

you can also do what you mentioned and teleport the entity after launching it but that'd probably be visible as the entity is already spawned, though it depends on the player's ping

drifting bluff
#

and what is that

sly topaz
#

?pdc

drifting bluff
#

Okay thanks ill try that

drifting bluff
grand flint
# chrome beacon also show your code
private void setScale(Player viewer, double scale) {
        try {
            PacketContainer packet = new PacketContainer(PacketType.Play.Server.UPDATE_ATTRIBUTES);

            packet.getIntegers().write(0, viewer.getEntityId());

            WrappedAttribute scaleAttr = WrappedAttribute.newBuilder()
                    .attributeKey("generic.scale")
                    .baseValue(scale)
                    .build();

            packet.getAttributeCollectionModifier().write(0, Collections.singletonList(scaleAttr));

            ProtocolLibrary.getProtocolManager().sendServerPacket(viewer, packet);

            viewer.sendMessage("§aSet scale to " + scale);
        } catch (Exception e) {
            viewer.sendMessage("§cFailed to set scale.");
            e.printStackTrace();
        }
    }

This gave the generic.scale error

vague swallow
grand flint
vague swallow
#

Does anyone know why player.getAttribute(Attribute.MOVEMENT_SPEED).getDefaultValue() returns 0.7 when the default value actually is 0.1?

chrome beacon
grand flint
#

1.21.4

grand flint
#

I have set scale

chrome beacon
#

Try without generic.

grand flint
vague swallow
young knoll
#

¯_(ツ)_/¯

sullen marlin
#

Do you have any modifiers set

young knoll
#

It’s probably different for each entity, but the generic default is 0.7

vague swallow
grand flint
vague swallow
grand flint
chrome beacon
grand flint
#

Just did as well <3

#

Oh tbh

#

I installed 742

#

For protocol maybe it is that?

chrome beacon
#

If you weren't using scale before then it's that

trim quest
#
[ERROR] Failed to execute goal on project BukkitGamesRefactoring: Could not collect dependencies for project me.erano.com:BukkitGamesRefactoring:jar:1.0
[ERROR] Failed to read artifact descriptor for me.erano.com:Core:jar:1.0
[ERROR]     Caused by: The following artifacts could not be resolved: me.erano.com:MinecraftPlugins:pom:1.0 (absent): me.erano.com:MinecraftPlugins:pom:1.0 was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced
[ERROR] 
chrome beacon
#

ProtocolLib just wraps the vanilla registry and therefor uses its names

trim quest
#

is my usage wrong ?

#

or need systemPath

chrome beacon
#

Either build the parent pom

#

or run maven install in the API project

trim quest
#

thanks

#

you are helping me a lot

mortal hare
#

i love abusing constructors

#

c# enterprise edition

somber scarab
#

how do you make an item stack with a blaze head as the item?

sullen marlin
#

You'd need to find someone with a blaze head skin and use that. I don't think there's blaze head in vanilla

buoyant viper
#

MHF_Blaze maybe?

buoyant viper
#

got enough constructors?

somber scarab
#

has anyone heard about Head Database?

#

could I just shade it in?

#

or is that a stupid idea

young knoll
#

You could just use their heads

#

You don’t need to shade the plugin

sly topaz
#

did someone ghost ping me smh

somber scarab
#

I'll deff add that

thorn isle
#

last i tried the headdatabase plugin/library/whatever it ended up taking like half a gigabyte of heap to cache the profiles or something equivalently inane

young knoll
#

That’s why you just use the ones you need :p

thorn isle
young knoll
#

Ah

thorn isle
#

while you could achieve the same result by telling the player go to minecraftheads dot com or whatever and have them paste the texture base64 in, nobody ain't got the time for that

young knoll
#

I did make a system that displayed all the heads they have available

#

Seemed to work fine tbh

thorn isle
#

is it public somewhere? i'll grab it 🤡

young knoll
#

I don’t know how I didn’t hit the Mojang rate limit creating that many player profiles

earnest girder
zinc moat
#

can anyone help i registered commands in the onEnable and in the plugin.yml and it still doesnt show up

#

no errors in console

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.

drowsy helm
#

can you show both yml and your code registering it

zinc moat
#

mb its been a while before i asked for support

zinc moat
rough ibex
#

considering you're polite you're doing better than 99% of customers

#

codeblock please

zinc moat
#

alright

#

1 second please

rough ibex
#

screenshots are impossible to copy over and check

drowsy helm
#

You are wonderful EzedOn

#

very polite lol

zinc moat
#

okay im not sure if i do anything wrong so lmk what i can improve on
This is the onEnable

        getCommand("rule").setExecutor(new rulecommand());
        getCommand("buildmode").setExecutor(new buildmode(invManager));
        getCommand("info").setExecutor(new infocommand());
        this.getCommand("bbreload").setExecutor(new configreload(this));
        this.getCommand("report").setExecutor(new reportcommand(this));
#
name: BlockyBoxCore
version: '1.0'
main: me.dean.blockyBoxCore.BlockyBoxCore
api-version: '1.21'
authors: [ Paasdag ]
commands:
  rule:
    aliases: rules
  buildmode:
    permission: BlockyCore.buildmode
  info:
    usage: /<command>
  report:
  bbreload:
#

yml file ^^^

drowsy helm
#

i believe all commands need the usgae string

#

let me check rq

zinc moat
#

usgae string? like usage: /<command> for example?

echo basalt
#

They don't

#

lgtm

#

Are you calling that onEnable or somewhere else?

#

Does the plugin load?

zinc moat
#

yes plugin loads no errors

#

and its in onEnable

echo basalt
#

Funky question time

#

Does it show up if you decompile it

#

(straight off the plugins folder)

zinc moat
#

ill decompile it 1 second

#

would you like the jar so you can also decompile it?

echo basalt
#

Send it over I'll take a look

zinc moat
echo basalt
#

I'll do it silently

zinc moat
#

alright both appear btw config.yml and plugin.yml

drowsy helm
#

So by 'dont show up' do you mean it doesnt command complete?

#

or does it no execute at all either

echo basalt
#

none of these do anything if you're running it as console

zinc moat
#

it doesnt complete idk if if it runs but when i do ./blockyboxcore:report it also doesnt popup

echo basalt
#

and yeah this code is pretty ass but I could tell it before even receiving the .jar

zinc moat
#

well im trying my best atleast

drowsy helm
#

Lmao mean

#

Just nitpicking-
packages should always be lowercase and calsses should always be UpperCamelCase

echo basalt
#

You have some tips in pins when you eventually get it working

zinc moat
#

alright

echo basalt
#

I'm surprised I never mentioned naming conventions

zinc moat
#

wdym

drowsy helm
#

But anyways- unless I'm missing something the command registration looks fine

echo basalt
#

I have a million little guides and none of them cover conventions

drowsy helm
#

your plugin isn't shutting itself down without you knowing

echo basalt
#

what if I just run this myself

drowsy helm
#

hm

echo basalt
#

paper moment?

zinc moat
#

erm

#

i dont wanna talk about it

#

default version 😭

drowsy helm
#

with paper you don't have to put commands in your yml

#

pretty sure registration should be the same though

zinc moat
#

oh didnt know

#

is there still an option to get support here or do i join paper's discord server?

drowsy helm
#

Tbh if you wanna skip headaches i would recommend a command library which would solve all of this

#

but if you're determined, yeah I would recommend their discord

zinc moat
#

ill take both tbh which command library?

drowsy helm
#

Theres quite a few out there-
I use ACF (Annotation Command Framework)

echo basalt
#

hm

zinc moat
#

i would prob need to rewrite a little bit of the code right?

drowsy helm
#

most of it, yeah

zinc moat
#

dammit alright

#

well thanks guys for trying to help!

drowsy helm
#

But do your research on frameworks before hopping in

zinc moat
#

will do

echo basalt
#

I'm a fan of CommandAPI myself but I've found a couple weird issues w it

#

cloud's decent if you can get it to work

#

ACF's full of tricks imo

drowsy helm
echo basalt
#

Not that

#

We use cloud with annotations at work

#

and I'm certain CommandAPI has an annotation parser too

#

it's more around how many undocumented annotations you have to use

#

like wtf is a @Flags

#

tbf I also don't like how cloud needs me to @Arg everything

drowsy helm
#

Maybe I don't really use commands in depth enough to run into those issues

#

Yeah the problem I have with other frameworks is how verbose they are

echo basalt
#

Eh

#

I do find CommandAPI's lack of consistent factory methods ugly

#

having to pass new Whatever as a param instead of Whatever.create

#

I don't like seeing orange in my params

drowsy helm
#

do your command builder statements not get extremely long?

#

I feel Annotation enforces OOP a lot more than a builder method like that

#

albeit a bit more jankily

echo basalt
#

I don't really like making my lambdas big

#

tbf my commands also get pretty big

#

also my commands being ran async kinda trips me off but ig it's fine to let it be default behavior

drowsy helm
#

oh ALL command executions are async?

#

interesting

slender elbow
echo basalt
#

If I don't @Argument it'll error out

#

other than the sender

slender elbow
#

bro doesn't compile with -parameters

echo basalt
#

smh

drowsy helm
echo basalt
#

did I spot light theme

drowsy helm
#

screenshot from github, blame their readme lol

echo basalt
#

ts errors out for me I might be using an old vers

slender elbow
#

the issue is of skill

echo basalt
#

but yeah I don't mind code getting verbose either

#

I wouldn't say you need an ultrawide but you def need an ultra tall display

drowsy helm
#

What would be the equivalent of a ContextResolver in cloud?

#

to deserialize a string to an argument type

echo basalt
#

ArgumentParser

slender elbow
echo basalt
#

it's fine in most cases just annoys me when I want to test something rq

drowsy helm
#

Do you use cloud emily?

echo basalt
#

Sometimes I write commands that do IO and those times come more often than not

slender elbow
#

yeah i use cloud

echo basalt
#

throwback to my kt days where I could just sync {} anywhere

#

I should make an extension of lombok for minecraft fr fr

drowsy helm
#

lomblock

echo basalt
#

🤔 is there any way to subtract a text component

drowsy helm
#

like remove part of a component?

echo basalt
#

if I know I added some gold text at the beginning of the name

#

and I know the new name

#

how can I get the old

drowsy helm
#

You can with util methods in kyori, not sure about bungee components

echo basalt
#

hm

#

What if

#

hm

#

Does PDC get sent to the client?

slender elbow
#

yes

echo basalt
#

Perfect

#

I'll just save the originals in PDC

floral venture
#

I'm looking for a plugin that can equip additional necklace orbs

floral venture
#

gem

#

My English is very poor and I can only rely on translation

#

Want to equip additional necklace jewelry plug-in

#

Do you have any good suggestions?
i can pay

drowsy helm
#

I don't know of any and It might be a bit niche

echo basalt
buoyant viper
lilac zinc
#

Hello. I want to know how to give a fake potion effect to player's client through ProtocolLib, i didn't find any tutorial or wiki about this.

chrome beacon
#

You don't need to use ProtocolLib for that

lilac zinc
#

Wow, thats really cool, thx

#

then what about fake gamemode? for example, actually survival but display creative mode

blazing ocean
#

there's no API for that

#

since that's also weird UB

clever zephyr
blazing ocean
#

yeah that's not what I was referring to

clever zephyr
clever zephyr
#

You have summarised what i have been trying to say to my friends (maven users)

cursive kite
#

I have armorstands i have circling an entity, except when chunk unloads it duplicates them

#

Despite boss being on left the ones on the right somehow dup

rugged fern
#

hey when im placing entities the server is crashing .-.

#

without error: [09:01:34] [Server thread/INFO]: Stopping server [09:01:34] [Server thread/INFO]: [SaberMC] Disabling SaberMC v1.0 [09:01:34] [Server thread/INFO]: Saving players [09:01:34] [Server thread/INFO]: ItzYami04x lost connection: Server closed [09:01:34] [Server thread/INFO]: ItzYami04x left the game. [09:01:34] [Server thread/INFO]: Saving worlds [09:01:35] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [09:01:36] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world_nether]'/minecraft:the_nether [09:01:36] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world_the_end]'/minecraft:the_end [09:01:36] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved [09:01:36] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [09:01:36] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [09:01:36] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved

#

just tried to create a custom wolf and spawn it on EntitySpawnEvent to spawn it naturally .-.

smoky anchor
eternal oxide
#

running out of memory due to an infinite spawn loop

#

you will have a stackoverflow error in teh log somewhere

chrome beacon
#

Yeah spawning in the spawn event

#

That'll be problematic if you're not careful

small egret
#

LF someone that knows how to code in Skript or Java for an SMP plugin! DM me for more info!

undone axleBOT
small egret
blazing ocean
#

You can look at people offering their services

tall rune
#

I want to make the base version of my server 1.8.8 and I want it to be supported up to 1.21.5, what can I do?

#

I am installing via version but the file is not created, I think it works with java 17 .However, I need to use java 8 for minecraft 1.8.8

blazing ocean
#

use 1.21.5 with viabackwards

tall rune
blazing ocean
#

how so

tall rune
#

but I'll try

#

is there a direct way I tried some versions and 1.8.8 can be 1.16.5 at most via version plugin

smoky anchor
tall rune
tall rune
# blazing ocean how so

plugins are made for java 8, there is no new version, can't I make the base version 1.8 directly, so that players between 1.8 and 1.21 can enter the server

sullen marlin
#

?howold 1.8

undone axleBOT
pliant topaz
#

in most cases it will just be hassle you dont want to go through

alpine urchin
undone axleBOT
alpine urchin
#

?howold 1.21.6

undone axleBOT
alpine urchin
#

gotcha

glossy venture
#

?howold 1.8.9

undone axleBOT
glossy venture
#

only 9

pseudo hazel
#

older than most people playing it

glossy venture
#

fuck u

#

i love 1.8 🥰

vital sandal
#

is there anyway to make Mount turn faster ?

#

like horse, boat

#

I want to increase turning speed

weak oyster
#

?howold 1.0.0

undone axleBOT
weak oyster
#

lol

#

?howold 1.8.8

undone axleBOT
weak oyster
#

damn

blazing ocean
#

?howold 1.7.10

undone axleBOT
wet breach
blazing ocean
#

older than some people in this discord

weak oyster
#

?howold Beta 1.0

undone axleBOT
weak oyster
#

crazy

#

?howold 1.0.0

undone axleBOT
weak oyster
#

dude

#

?howold 1.0

undone axleBOT
weak oyster
#

There we go

upper hazel
#

I have special block markers that should display a particle on it for certain players passing the filter. I'm thinking of doing this through ProtocolLib which blocks the particle packet so that the player doesn't see it if it doesn't pass the filter. Or make a false particle that is displayed if the player sees it at a certain distance. Which is better? I don't really understand the rendering process

#

If you simplify the options, the question is whether it is better to have the particle displayed by default but blocked or no particle and displayed falsely to players via packets.

slender elbow
#

just use the API Player#spawnParticle method, no need to use packets or aything

upper hazel
#

packets are needed anyway so that only certain players can see these particles.

slender elbow
#

which is why you should use Player#spawnParticle

#

so only the Player you call spawnParticle on will see the particles

upper hazel
#

oh wait

#

what

slender elbow
#

as opposed to World#spawnParticle

#

Player#spawnParticle will show the particle only to the Player you call the method on

upper hazel
#

lool

#

alr thenks

#

how useful docs are, but how lazy to read them. 😦

smoky anchor
upper hazel
slender elbow
#

the client will ignore it at that point

upper hazel
#

nice

echo basalt
#

ah fuck I gotta make a menu component system

slender elbow
#

no you don't

echo basalt
#

it's the logical way out

wise wedge
#

I'm making a plugin for 1.21.4 and trying to create items with CustomModelData, but I can't get it to work. Can someone help?

floral drum
smoky anchor
floral drum
#

I made it because I needed to modify a menu from another artifact

umbral ridge
#

what's the point of inventoryOwner in Bukkit.createInventory

#

if not null value is set, it will be set null afterwards by internal classes anyways.. so

slender elbow
#

will it?

wise wedge
smoky anchor
wet breach
rotund ravine
umbral ridge
#

ty 😸 schnitzel santa_5

mortal hare
#

am i wrong to think that you shouldnt create lazy fetch implementations for various persistence implementations which uses getters to return data lazily instead of storing it in memory like:

public class DatabaseFoo implements Foo {
  public void getBaz() {
    // lazily fetches `foo.baz` from database
  }
}

instead you should opt in using records and load data to them explicitly, like Foo foo = DatabaseFooLoader.Load()
when you think about it, getters seem like a terrible idea for performance considerations you should prefer storing it in memory always instead of lazy fetching on each getter call

#

also if you would want to optimize for database calls, you will need to lookup implementation details. sounds terrible

worldly ingot
#

Depends on what the data is, how urgent it is, and what's involved with fetching it

#

Sometimes you just don't need data immediately, so a CF is fine

mortal hare
#

which defeats really the purpose of polymorphism if you think about it

#

explicit operations via Loader class of lazy fetching is more verbose but more clear in terms of how they load the data

worldly ingot
#

Why not have two separate interfaces then?

public interface Database {
    public String getThing();
}

public interface AsyncDatabase {
    public CompletableFuture<String> getThing();
}

public final class ConcreteDatabase implements Database, AsyncDatabase {

    @Override
    public String getThing() {
        return getThing().get();
    }

    @Override
    public CompletableFuture<String> getThing() {
        return CompletableFuture.supplyAsync(() -> "some value");
    }

}
#

Or maybe I just don't understand your concern

#

One way or another, you need to make a call to a database. Whether that call is lazy is up to its urgency

worldly ingot
#

Of course

drifting bluff
#

How do I add an custom header and footer to the tab list?

wet breach
#

I am one for designing around in the absence of data which goes in hand with lazy calling/loading

worldly ingot
wet breach
#

?jd

undone axleBOT
drifting bluff
#

hm okay thanks

orchid brook
#

Hi can someone help me to understand what plugin cause this crash and why ?
https://paste.md-5.net/qajonuwume.md
Because i have lot of custom plugin dev by myself but this is the first time i see that i didn't understand 😦

#

because i don’t know where should i look in that dump

pure dagger
#

when i do
Chunk#getEntities();
i get a set of entities
but when a chunk is LOADED and i do
World#getEntity(UUID uuid);
i get null

why?

chrome beacon
#

You sure it's loaded

#

also do you have the right uuid

pure dagger
#

i mean i do entity.getLocation.getChunk.isLoaded

#

and it always returns true

#

even if i get far away because .getchunk loads the chunk?? idk

pure dagger
#

i mean i do Entity.getWorld.getEntity(Entity.getUniqueId())

#

im not really sure what is happening

#

there

worldly ingot
#

Worth noting that chunks and entities are loaded separately

pure dagger
#

cool

worldly ingot
#

So if it's a freshly loaded chunk, it won't have entities yet

pure dagger
#

so when i do Chunk#getEntities thats why it owrks?

chrome beacon
#

and yes getChunk will load the chunk

worldly ingot
#

There is an EntitiesLoadedEvent if that's what you're after

#

As an "alternative" to ChunkLoadEvent

pure dagger
#

can i just Chunk#getEntities

#

it seems to work

#

but im not sure

worldly ingot
#

Yeah, as Olivo mentioned, getChunk() loads the chunk

#

Synchronously, at that. There's just no guarantee that the entities will load in time for your follow-up getEntities() call

pure dagger
#

so what do i do??

worldly ingot
#

What are you trying to do? :p

pure dagger
#

kill a mob

#

i have its uuid and Entity object, but it can get invalid

worldly ingot
#

Yeah cause it could unload. UUID is more useful. But I guess if it's not urgent to remove it, it's probably best to kill it in that EntitiesLoadEvent

#

Try and get the entity in the world, and kill it if it exists. If not, save its UUID somewhere so you know to remove it in that event

pure dagger
#

id would be better to kill it right away

worldly ingot
#

Why? If it's not loaded then it doesn't exist

pure dagger
#

yeah but someone could remove the plugin i guess?

worldly ingot
#

That's true, that's always a concern

pure dagger
#

i dont know if i should think about this case

worldly ingot
#

But there's really not a lot you can do to avoid that. Any plugin mutating the world has that issue

pure dagger
#

i wanted to remove it onDisable or after an hour

worldly ingot
#

I mean even if you add like a scoreboard plugin - it's probably going to create a bunch of scoreboards and teams on the server. If that plugin's removed, those scoreboards and teams are still there

#

So it's one of those things you can't be reasonably expected to clean up

pure dagger
#

yeah okay

#

but ther should be a command to remove it all

worldly ingot
#

Sure, but the only way to do that is to load the chunk you know the entity is probably in (I assume you have coordinates for it saved somewhere too)

#

Which is fine, you can do that, but you're going to create some load on the server for loading a bunch of chunks

pure dagger
#

yeah its in Entity object even if not vaid

#

valid

pure dagger
#

in a long time

worldly ingot
#

Yeah but what about when you restart the plugin. You don't have an Entity instance anywhere :p

pure dagger
#

like once a day or a week

#

idk

#

save it

#

location, uuid

worldly ingot
#

Yeah that's what I'm getting at is to make sure you save its position to disk somewhere too

#

Then you could load its chunk with getChunk(), get its entities, and kill it

pure dagger
#

okay then i guess ill just despawn it when loaded

chrome beacon
#

Why do you need to kill it that way

pure dagger
chrome beacon
#

Grabbing it from an unloaded chunk

worldly ingot
chrome beacon
#

and killing it

pure dagger
#

i dont know i just wanted to kill it onDIsable or something

#

but

#

it doesnt really make sense

#

i gues

chrome beacon
#

How about not making it save in the first place

worldly ingot
#

Also a valid option. Good shout

pure dagger
#

you made me realize

#

thats stupid

pure dagger
#

no it has to be there for an hour or some long

#

some period of time

grand flint
#

If I have a duels mode, should I create all the arenas in one void world away from eachother, or should I create the arena world when it starts?

pure dagger
#

someone could load it

chrome beacon
#

Yeah when the entities are loaded you just spawn it again

#

if you still need it to be there

pure dagger
#

uhmm

#

i could

#

yeah

#

ur smart

worldly ingot
pure dagger
#

how do you make more worlds

chrome beacon
#

With the WorldCreator

pure dagger
#

i never undrestood

pure dagger
#

but how to do it yourself ?

chrome beacon
#

No it's part of the Spigot api

grand flint
pure dagger
#

oh

chrome beacon
pure dagger
#

i think he answered you

grand flint
#

What would be more efficient

pure dagger
#

where do you learn al that

grand flint
#

By coding just keep coding

#

Learn how to use documentations, wikis and stuff

grand flint
#

All arenas in one world, or an arena per world, all under one server

chrome beacon
#

Best for performance and efficiency would be something like Minestom

chrome beacon
#

Use one world

grand flint
#

Alr

chrome beacon
#

if you want you can use a couple worlds, but one per arena is a bit overkill

grand flint
#

Would your answer change if it was a bigger mode like bedwars / skywars

chrome beacon
#

Not really

grand flint
#

Alr I'll just load them into a void world away from eachother

#

I'm just worried about the loading time if I pasted it as a schem for example

mellow edge
#

But in terms of performance it is still all in the same server

#

Please note that the former one is A LOT easier to implement

thorn isle
#

worlds do add a little bit of overhead

#

it's not particularly noticeable for a dozen or so worlds, but if you're intending to scale to 100+ arenas each in its own world, it will definitely become noticeable

#

however discarding a world and loading a new one can be much cheaper and faster and easier than pasting/resetting an arena from a schematic

#

the world overhead is mostly memory, which you can always add more of, while for the paste/reset operation in a single world you are cpu-bound which is much harder to scale

sly topaz
#

at the point you have 100 or even 50+ arenas you're thinking of having a server cluster to host these arenas anyway

#

worlds do not scale in any sort of way at that point, so you just end up running more servers

mellow edge
#

Yup

#

Definitely make proxy support

grand flint
#

It's already on a proxy I just can't expand to sub servers currently

#

Is there a limit to the runnables I can run? Like should I also do a runnable per arena

mellow edge
#

runnable is an interface, wdym

#

if you're asking about whether you should have one per area or global for all I would say it's easier to make a global one.

echo basalt
#

debatable

mellow edge
#

yeah tbh I said that from my own minigame

#

I totally imagine some other codebase could be different

echo basalt
#

I'd say each game instance should be contained

cursive haven
#

Does anyone know how people managed to assign abilities to 3D weapon designs? Is it done through a plugin, or how does the whole system work?

white drift
#

for 3D, u need a custom texture pack

#

(sure, you need a plugin)

cursive haven
#

itemsadder?

white drift
#

I don't know all the functionality of this plugin, but I can say for sure: plugin required