#help-development

1 messages · Page 1026 of 1

icy beacon
#

i see

lusty cipher
#

oh I have an idea

#

couldn't I create a synced queue for results

#

and then have a task that runs every tick that I just init with runTask and that calls runTask for itself so that it keeps running every tick

#

until some bool is set to say the async loading is done

chrome beacon
#

just use runTaskTimer

ivory sleet
#

I mean sounds like a runTaskTimer

chrome beacon
#

and cancel the task when it's done

lusty cipher
#

ok and put an infinite period on that function?

chrome beacon
#

no

lusty cipher
#

thought it might need a finite period

ivory sleet
#

I mean its gonna invoke itself as long as u dont cancel it by the given interval u pass

chrome beacon
lusty cipher
#

oh I misread the docs

#

I thought period was the span over which it runs, nvm

#

yeah this will work, thanks

icy beacon
#

my fucking code was not working because a string had a trailing whitespace

#

i spent like an hour debugging

#

ffssssssssss

blazing ocean
#

lmfao

icy beacon
#

dear acf, when I do
val previousArgument = ctx.getContextValue(String::class.java)
I except to receive unbreaking and not unbreaking . is that so hard to comprehend???

#

all i had to do was slap a .trim()

#

and now it works

#

#help-server or better yet, model engine's discord server (if they have one)

blazing ocean
#

should've used cloud

icy beacon
#

i'm comfortable with acf so i'm using it

#

one day i'll get to write my own command framework

#

too busy rn

blazing ocean
#

good command framework

#

good kotlin support

still ridge
#

ok, well without the infinite loop it works better but then I have another problem, when I shift click in the anvil inventory (player to anvil), the item vanishing

tardy delta
#

i suppose cloud has no way to work with annotations?

ivory sleet
#

It has

#

Like cloud is nice but a bit too enterprisy sometimes when u just wanna write up a simple command or so
(Maybe it got better, long time since I used it)

blazing ocean
tardy delta
#

already two levels of indentation, cringe

#

torvalds wouldnt approve

ivory sleet
#

The issue when u’re setting the command manager up

blazing ocean
#

eh

#

it's fine

ivory sleet
#

I remember having to define my own error handler, command coordinator, help page, ensure paper capabilities etc

blazing ocean
#

parsers are a bit annoying to have to define

ivory sleet
#

like there was a lot to set up just, ofc its nice in terms of functionality and it being powerful

#

but for a simple command

#

I just wanna be able to yk…

#

But as said, maybe they added some nice factory method that injects default implementations so I don’t have to pass like 5 middle layered components to the command manager constructor

#

it was a long time since I used it

quaint mantle
#

does anybody know a good way of converting this to viewable html ?

"playerName": "§x§f§b§e§3§0§9[Z§x§f§c§e§c§5§ae§x§f§c§f§4§a§cu§x§f§d§f§d§f§ds]§f drollwik§r"

from minecraft i get the displayName but is there some kind of parser that can translate it to html ?

hazy parrot
#

i wrote some kind of parser a while ago, it was for react tho

#

can send u if u want

pseudo hazel
#

is it possible to see spigot/bungee docs from pervious versions?

#

i.e. 1.19.4 or something

echo tangle
#

when running my plugin (w/ nms) i'm getting this error org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/minecraft/server/level/ServerPlayer, am i remapping wrong?
pom.xml - https://paste.md-5.net/agecagowuf.xml

chrome beacon
ivory sleet
#

But when I used it, u used to have to invoke the defaults still

#

altho this was like 1 year ago or maybe 2

sleek estuary
#

i can make this verification to check if blocklocation is a door?

sleek estuary
flint coyote
#

You should check the tags

tardy delta
#

block aint gonna be a door, either blockstate or blockdata

fair rock
#

Tags.DOORS.contains(block.getBlock.getType())

#

or something like that

sleek estuary
young knoll
#

org.bukkit.material.door is the legacy MaterialData crap

#

Use the tag

sleek estuary
#

i using bukkit 1.8

young knoll
#

lol

#

Then just check if the type is a door iirc

fair rock
#

Command for 1.8 video? xd

young knoll
#

?1.8

undone axleBOT
sleek estuary
#

this way?

young knoll
#

I think you need to add a getData to that

fair rock
#

Does anyone know the MVP who pays the domain xd

young knoll
#

Ah wait getData is a byte

#

Idk how you get material data from a block tbh

#

Haven't used that api in 10 years

fair rock
young knoll
#

Wait might have found it

#

new MaterialData(location.getBlock().getType());

#

maybe, I assume that will never get you a subclass tho

dry hazel
#

location.getBlock().getState().getData() iirc

chrome beacon
#

Do use a material check as getting the state requires copying it

#

which is slow

young knoll
#

Is it only the two materials back then

#

Wood door and iron door?

tardy delta
#

what other doors are there that i dont know of?

young knoll
#

Well these days every wood has a door

fair rock
tardy delta
#

ah assumed that to be wood too

fair rock
#

💀

ivory sleet
#

Is bamboo wood?

young knoll
#

D O O R S

icy beacon
#

wtf is this door made of

young knoll
#

mangrove wood

fair rock
#

Crimson

#

OH TRUE

icy beacon
#

what is mangrove

young knoll
#

Can I ban him

ivory sleet
#

Yes

fair rock
#

I forgot about mangrove because i never see that biome lmao

icy beacon
young knoll
#

I see it more than normal swamps now

icy beacon
#

i don't see swamps at all

#

you wanna know how my test world in 1.20.6 looks like

#

i stand in the corner of that glass

tardy delta
icy beacon
#

and i test my shit

tardy delta
#

also trees

icy beacon
#

i don't explore

fair rock
tardy delta
#

my test world is usually full of holes :|

icy beacon
fair rock
echo tangle
#

may be wrong

eternal oxide
#

thats wrong

#

your maven build will produce a jar

echo tangle
#

ohh alright lol thanks

pseudo hazel
#

how do I get json string from a chat component

#

in 1.19.4

#

so ComponentSerializer.toJson doesnt exist

agile hollow
#

when i do p.gedAdress() it get /*.*.*.*:* how can i get only the *.*.*.*

agile hollow
blazing ocean
#

why does it not even return an INetSocketAddress

young knoll
#

It does

agile hollow
#

idk why i get this type of ip

blazing ocean
#

are you calling toString() or something

#

show your code

young knoll
#

Use Player#getAddress#getHostString

agile hollow
#

pstmt.setString(1, String.valueOf(p.getAddress()));

#

i'm pasting it in a db

blazing ocean
#

that's pretty much just calling toString()

blazing ocean
agile hollow
#

oh thx

echo tangle
eternal oxide
#

it must be in the resources folder of your project

icy beacon
#

ok some committer definitely likes to be a centerpiece

eternal oxide
#

uh we have a furry doing the docs?

icy beacon
#

And this still has not been changed lmao

blazing ocean
#

is this real

#

🔥🔥🔥🔥🔥

icy beacon
blazing ocean
#

this is real

#

and is in paper too

#

lmfao

young knoll
#

Yeah it's MDs doing

#

The potion effects used to have only the meme descriptions, I added the proper descriptions

agile hollow
#

how can i decrypt and crypt something?

icy beacon
#

provide context

agile hollow
#

i'm trying to do a register method

#

but i saw that the password it's visible if i log in the databse

#

for that i want to encypt it

young knoll
#

You want to hash it, so it cannot be reversed

icy beacon
#

and in general i recommend either bcrypt or argon for hashing passwords

#

^

icy beacon
icy beacon
#

rewatched it multiple times

young knoll
#

What about sha256

icy beacon
#

is this sarcasm or genuine

#

i can explain if you want

young knoll
#

Hey at least java has it built in!

blazing ocean
#

just use base64!!

pseudo hazel
#

base2

sturdy heron
icy beacon
#

they may help

slender elbow
#

bcrypt my beloved

marble hearth
#

do you guys know the best plugin for custom ore generation besides oraxen

kind hatch
#

?paste the error

undone axleBOT
eternal oxide
#

special source too old

#

um odd BT

kind hatch
#

Possible issue with java version being used?

#

Might need to use Java 17 instead of Java 21

sturdy heron
#

huh

#

ill try that

kind hatch
#

Could also be running in an older BT folder.

#

Always want to run it in a clean directory.

eternal oxide
#

BT version is latest 181

#

probaly as you say, wrong java version

sturdy heron
#

yeah that was it

sleek estuary
pliant topaz
#

Does anyone know what is all required for loot context?
this: List<ItemStack> lootItems = (List<ItemStack>) lootTable.populateLoot(new Random(), new LootContext.Builder(location).lootingModifier(itemStack.getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS)).build());
says that basically everything that i didn't provide (like killer entity etc) is missing so i get an error, this line btw is the only error cause in this case, so i think that sgould be enough info? if u need the complete error i can provide it

#

and yes, the loot table is existent at given file location

hollow socket
#

Is anyone done plugins with python?

blazing ocean
#

no

#

and it will never be done

#

or, well, nobody will ever use it

tardy delta
#

why do people use python for everything its not supposed to do?

hollow socket
#

Well I guess its time to learn java

blazing ocean
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

hollow socket
#

Well I managed to find something,,, And I can see it works but not sure how to use them ;D

#

And wow it actually works!

# -*- coding: utf-8 -*-

from mcapi import *
from org.bukkit.event.player import PlayerItemDamageEvent
from org.bukkit import ChatColor

@asynchronous()
def durability_event(e):
    player = e.getPlayer()
    item = e.getItem()

    if item.getType().getMaxDurability() > 0:
        durability = item.getType().getMaxDurability() - item.getDurability()
        if durability < 15:
            message = "{}Your {} durability is {}".format(ChatColor.RED, str(item.getType().name()).capitalize(),
                                                          durability)
            player.sendMessage(message)

listener = add_event_listener(PlayerItemDamageEvent, durability_event)
blazing ocean
#

why

#

just why

tardy delta
#

plugin in python?

hollow socket
#

Well I dont speak Java...

hollow socket
pliant topaz
#

Python is a great language, but it really isn't the choice here

tardy delta
#

how does it run?

pliant topaz
#

prob compiles and outputs the jar

shadow night
#

I hope it doesn't do some on runtime funnies

hollow socket
tardy delta
#

transpile to c and load it in java with the ffi 🤓

#

ah its an interpreter

shadow night
#

Oh fuck no it is doing runtime funnies

tardy delta
#

go work on your mapper instead 🤓

shadow night
#

._.

quiet ice
#

Or just use graal

shadow night
#

What does graal do

river oracle
quiet ice
#

Graal supports python I believe and should be better than jython (jython uses python 2.7, where as graal will use python 3.something)

blazing ocean
shadow night
quiet ice
#

yeah, all the cool kids use jruby

blazing ocean
#

based

#

jkotlin when

quiet ice
#

or what about nashorn?

blazing ocean
#

jotlin

tardy delta
#

kotlin can compile to native

blazing ocean
#

ik

tardy delta
#

dont ask me how, neve tried

shadow night
blazing ocean
#

kotlin can also compile to js

quiet ice
blazing ocean
agile hollow
#

how can i prevent the sendind of the command in the console?

shadow night
#
  1. what
  2. are you making a backdoor
agile hollow
#

i'm trying to make a Auth plugin

quiet ice
#

Probably a server admin uses cmd blocks for something

#

or not?

blazing ocean
#

makes sense then

shadow night
#

Ah

agile hollow
#

i don't want to log the /login * or the /register * in the console how normaly it do with the other commands

#

but i don't know a way for do that

blazing ocean
#

understandable

shadow night
#

I think you can cancel the command in the pre process event, right? And then handle shit afterwards

hollow socket
#

Well tbh I'm not really sure how the yml file works there :/

quiet ice
#

I suppose you could filter out it with a custom logging adapter, but that is hacky as hell

shadow night
#

json is the best fr fr

quiet ice
#

json and yaml is pretty much the same thing fr

shadow night
#

All my mods use json for configs

blazing ocean
#

i use yaml for most of my configs

hollow socket
#

Oh I see

blazing ocean
#

kaml ftw

shadow night
quiet ice
#

(jokes aside, yaml is a superset of json at it's core - so you can actually use json syntax if the yaml syntax is beyond you)

blazing ocean
#

^

agile hollow
#

what event log the command in the console? PlayerCommandPreprocessEvent?

quiet ice
#

Yeah - that's common knowledge. Didn't you know that?

blazing ocean
#

i did not

#

just use gleam at that point

#

pickl*

#

same thing

quiet ice
#

hocon is better :p

blazing ocean
#

hocon is fine

hollow socket
blazing ocean
#

you can

shadow night
#

You can

blazing ocean
#

you'll just need something like gson

#

bukkit has builtin support for yaml

shadow night
#

It's just about personal preference and uhh, what was the word

#

Something starting with c

#

I think

quiet ice
#

configurate?

agile hollow
#

if i cancel the event on the PlayerCommandPreprocessEvent for the /login command i can get the args?

icy beacon
#

I prefer json with gson

hollow socket
#

What is the difference between yml and json?

icy beacon
#

Lovely

quiet ice
#

configurate is a bit more intricate

blazing ocean
shadow night
quiet ice
shadow night
#

consistent!

#

Yes, for consistency

icy beacon
quiet ice
#

And well yaml supports comments while json does not - so it is better for configs

icy beacon
#

Supports comments while json doesn't, too

blazing ocean
#

yaml is indent based 🤢

#

json5 moment

icy beacon
#

Yml also can parse a json file

#

Json can't parse yml

#

I prefer json though because well I prefer json

#

Can't really explain it. A matter of taste

#

Maybe the tooling? Gson is great

quiet ice
blazing ocean
#

yaml for me

#

i just use kaml which is a ktx.serial adapter for yaml

shadow night
blazing ocean
shadow night
#

Do you guys ever directly interact with the computers network module because you want to invent a new protocol

icy beacon
#

json5 seems tooo lenient to my eyes

#

Idk

quiet ice
#

Well if I want comments and feel like working with the bloat attached to supporting it then I'd use HOCON which for all intents and purposes is json with comments.

blazing ocean
#

just use shell scripts for configs at that point

#

groovy

#

kts

quiet ice
#

Though I'd really like to see an org.json:json-style library for hocon - but alas, I'd be waiting for a while there

blazing ocean
quiet ice
#

not needed - as long as you use maven or gradle

blazing ocean
#

it should work with java too

icy beacon
#

mc dev plugin is just a convenient template

quiet ice
icy beacon
#

but it also eat a lot of memory (allegedly) so you'd be better off just adding shit by yourself

hollow socket
#

Well I'm kinda stuck with commands... don't really know how to create one because the way I did it doesnt work...

blazing ocean
quiet ice
#

which is like several MiBs large

blazing ocean
#

is that a bad thing

#

oh

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

hollow socket
quiet ice
quiet ice
#

Though explaining expected versus actual behaviour is best

hollow socket
#

#test_plugin.py
from org.bukkit.plugin.java import JavaPlugin
from org.bukkit.command import CommandExecutor, Command
from org.bukkit.entity import Player
from org.bukkit import ChatColor

class HelloPlugin(JavaPlugin):

    def onEnable(self):
        self.getLogger().info("HelloPlugin enabled")
        self.getCommand("hello").setExecutor(HelloCommandExecutor())

class HelloCommandExecutor(CommandExecutor):

    def onCommand(self, sender, command, label, args):
        if isinstance(sender, Player):
            player = sender
            player.sendMessage(ChatColor.RED + "Die")
            player.setHealth(0.0)  # Kill the player
            return True
        return False

#plugin.yml
name: HelloPlugin
version: 1.0
main: test_plugin.HelloPlugin
description: A simple plugin that kills the player when they type /hello
commands:
  hello:
    description: Sends a message and kills the player
    usage: /hello

Does this look very bad?

quiet ice
#

because what you are describing right now is extremely … useless shall I say?

quiet ice
blazing ocean
tardy delta
blazing ocean
#

damn

quiet ice
#

You can also do ["A", "B", "C"] for a list of things which is less cursed at times

wraith delta
hollow socket
quiet ice
tardy delta
#

just use cbor 💀

quiet ice
# hollow socket apparently not

then yeah, then that is your problem. Unfortunately I cannot aid you much further as my inuition dries up here and your problem way beyond my knowledge.

hollow socket
quiet ice
#

Do you have any scary error messages in the log/stdout?

hollow socket
#

None, thats the funny part

#

But I can see the plugin exists

quiet ice
#

And just in case you are one of those people: An error message usually contains the word "ERROR" next to the timestamp

quiet ice
#

And what plugin are you referring to - the plugin you wrote in python or some other plugin?

hollow socket
#

the one i created

quiet ice
#

Is the plugin's name (when running /pl) green, red or does it contain an asterisk?

hollow socket
#

Oh no, now i see very big and scary error

icy beacon
#

?paste

undone axleBOT
quiet ice
#

If you can't figure out the cause of the error message on your own, you can paste it (though since it probably will be a bit longer, I'd recommend it to paste it in the above paste site or another paste site of choice) so we can help - or at least try to

hollow socket
#

Well its something with org.bukkit.plugin.java.pluginclassloader, I'll try to manage it somehow

icy beacon
hollow socket
#

I cant copy it because I see it in minecraft.. I can send an image..

quiet ice
#

Wha?

icy beacon
#

there should be an error in your console

quiet ice
#

I'd probably read up on the documentation of your plugin loader shall I say? Spigot by itself is incapable of loading python plugins and there are a billion ways of loading python plugins - you can easily do it wrong here in quite a few ways so not too much we can assist here without knowing the full stacktrace

blazing ocean
#

please, just learn java, or even kotlin (more similar to python) for this as what you are doing is 100% not supported

hollow socket
#

Well Now it appeared in the console

blazing ocean
icy beacon
quiet ice
#

100% not supported is an overstatement

#

it's not supported by default, yes - but bukkit was written in a way that allows to write plugins in a language other than java

hollow socket
#

Well I managed to get it working, but only the durability_event, command still doesnt work

quiet ice
#

what's the colour of the plugin's name in /pl?

hollow socket
quiet ice
#

Or is there anything "wrong" with the plugin's name (like a suffixed asterisk or similar)?

hollow socket
#

Oh wait it doesnt show it anymore.. I might have messed up something yet again

hollow socket
#

It works like any other command

quiet ice
#

glad to hear

hollow socket
#

Well expect that when I type the command its all red...

#

But it works

echo basalt
#

Any of you kotlin nerds have any experience with ktoml and how it can serialize but not deserialize my objects?

quiet ice
#

all red? That is ominous

hollow socket
#

And couldnt get the yml file working so did without it

#

You know like when you try to type an command /help but you type /hepl and it is red... tells you that "Unknown or incomplete command, see below forerror at position 1: /<--[HERE]" but when I press enter the command is working fine

quiet ice
#

ah yes, that is just a brig moment

hollow socket
#

Got any ideas how to fix that?

echo basalt
#

something about resending commands

hollow socket
#

Well now when I died I saw random numbers in chat.... hehheeheee

warm walrus
#

in GoalSelector#addGoal(int var0, Goal var1) what does var0 mean?

hollow socket
warm walrus
echo tangle
#

does anyone know why, when sending a respawn packet, i get stuck on the loading terrain screen for 30 seconds?

                plyr.level().dimensionTypeRegistration(),
                plyr.level().dimension(),
                plyr.level().getWorld().getSeed(),
                plyr.gameMode.getGameModeForPlayer(),
                plyr.gameMode.getPreviousGameModeForPlayer(),
                plyr.level().isDebug(),
                plyr.level().getWorld().getWorldType()==WorldType.FLAT,
                Optional.of(GlobalPos.of(plyr.level().dimension(),plyr.getOnPos())),
                plyr.getPortalCooldown()
        );
        ((CraftPlayer) p).getHandle().connection.send(new ClientboundRespawnPacket(playerSpawnInfo,(byte)0x01));```
hollow socket
rough ibex
#

yes, yarn

echo basalt
#

screw this lib

alpine urchin
#

😂

echo basalt
#

legit throws a meaningless error

#

Now, if I pass a default value on the parser

#

It throws a different meaningless error

#

And I can't really change the libs we use at work because I'm not the lead

#

And I'm also not allowed to work on pointless things like making my own parser

#

Legit won't get paid if I do

alpine urchin
#

well

twilit creek
#

quick question, is it possible to manipulate the classpath (java.class.path), because it points always direct at the Spigot.jar but to load a dependency of my Plugin it needs to point direct on the plugin jar.

alpine urchin
#

pass it onto someone else

echo basalt
#

team doesn't work weekends, lead dev won't bother, junior dev is.. junior

#

imma just hardcode this banger

daring urchin
#

Can someone help? I keep getting this. [20:25:38 WARN]: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. java.lang.RuntimeException: Unable to access address of buffer Theres more stuff after it but it spammed it. I use 1.8.8 spigot

blazing ocean
daring urchin
#

and also the more stuff after it would prob count as spam

sand mirage
#

Anyone knows why this is not marking the whole portal?

https://www.codebin.cc/code/clx6kn1nq0001mj08bm65vd24:2nziaKiebpPnSGuwEwxRFcTqMNi6NfvshNZYbcfc15du

Is blockface not working for nether_portal tiles?

agile hollow
#

i'm trying to do a login plugin and need to find a way for remove the log of the /login or the /register someone have any tip? or the solution?

tardy delta
#

api question, is there a way to know if a player currently is being shown an actionbar? the sane way, not with packets

wraith delta
hazy parrot
agile hollow
#

thanks for the help <3

tardy delta
blazing ocean
#

never heard of runCatching

quiet ice
#

probably not a great idea either

tardy delta
#

one of those utility functions

blazing ocean
quiet ice
#

Yes, a great exception sinkhole that will undoubtedly bite you back at some point in time

tardy delta
#

tell me how

#

exactly what i thought

sleek estuary
#

Should I set AIR at the top of the door or at the bottom to remove? spigot 1.8

hollow socket
#

Is there an event when players tool breaks?

fair rock
#

?

agile hollow
#

i can modify the uuid of a player when they join the server?

pseudo hazel
#

wdym

#

the uuid is bound to the account of the player

agile hollow
#

ye

pseudo hazel
#

oh

#

well we dont support offline mode 😛

agile hollow
#

oh okay sorry

rough ibex
#

the short answer is yes

#

the long answer is you are on your own bub

fair rock
#

What does bub mean

pseudo hazel
#

buddy

agile hollow
#

but like i can do it on online mode too

#

like if i want to use the uuid of another guy

rough ibex
#

okay?

agile hollow
#

but the way is the problem

rough ibex
#

thats for you to figure out

#

we dont support such a thing

quiet ice
tardy delta
#

people just using them wrongly /s

fierce salmon
young knoll
#

You need a default config.yml in your jar

fierce salmon
#

oh gotcha

#

thanks

#

What would I add to my java code to put something like this into my config.yml:

database:
  host: localhost # host of your database
  port: 3306 # default port for MariaDB and MySQL
  database: db # name of your database. A database server can contain multiple databases
  user: username
  password: passy
sullen marlin
#

you could just make a default config.yml inside your plugin

slender elbow
#

passy

echo basalt
#

where did md_5 go

#

bro's just m... now

#

nvm I have streamer mode on

#

fuck

slender elbow
#

xd

fierce salmon
fierce salmon
#

I'm following the connecting to databases spigot tutorial and I am at this step:

Database database = config.getDatabase();
// we set our credentials
dataSource.setServerName(database.getHost());
dataSource.setPortNumber(database.getPort());
dataSource.setDatabaseName(database.getDatabase());
dataSource.setUser(database.getUser());
dataSource.setPassword(database.getPassword());

I seem to not have the library needed to create a Database object, which is weird because I followed all of the steps

sullen marlin
#

What's the tutorial

fierce salmon
#

nvm

sullen marlin
#

That's not pure java jdbc code so there must be some library

fierce salmon
#

im stupid

sullen marlin
#

Hi stupid

fierce salmon
#

"I'm dad"

young knoll
#

No he’s md_5

fierce salmon
sleek estuary
#

not is right?

#

im using java 22

chrome beacon
#

I don't think that's a string

#

could be wrong though 🤷‍♂️

quaint mantle
#

I'm not an expert about gradle, but effectively, as I am not an expert on gradle I can't say nothing

worldly ingot
#

It's not a string but I'd opt to use toolchains instead anyways

#
java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(22))
    }
}
#

I think you can do java.toolchain.languageVersion.set(JavaLanguageVersion.of(22)) as well, but I'm not sure

#

Maybe Kotlin script is more strict on that than Groovy is

wraith delta
remote swallow
wintry elk
#

i keep trying to check and im getting the same error

young knoll
#

?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.

vast ledge
#

Bro referring to something that was said like 9h ago

young knoll
#

I’m aware

#

But we still need to see updated code

wintry elk
vast ledge
wintry elk
vast ledge
#

Oh god

#

not the if tree of doom

wintry elk
#

i was up all night

young knoll
#

All the code

#

Not just a small part

wintry elk
vast ledge
#

pls fix

#

if tree

vast ledge
wintry elk
#

i wasnt

#

i was just saying

vast ledge
#

It sounded rather demanding imma be honest

wintry elk
#

i asked what was wrong with it and he said just check if its null

#

never mentioned the entire code was bad

vast ledge
#

We didnt say that

#

he wants to see the code where this is being implemented

wintry elk
vast ledge
#

Yea, he doesnt want to see the 4 lines you sent, he wants to see the entire code

young knoll
#

At least the entire method

vast ledge
#

^

wintry elk
#

well he can see it back 9 hours ago nothing changed

vast ledge
#

You could also just do us the gratuity of sending it again

#

Since, we do help for free, and are not required to help you :)

wintry elk
vast ledge
#

Thanks

#

That shouldnt be static

#

afaik

#

public void onGhostBladeSpawn(...)

glad prawn
#

i usually leave it private or default

young knoll
#

they work fine when static

vast ledge
#

it looks weird tho

young knoll
#

However you are calling a method on the target before your null check

#

So you’re still going to get a NPE

vast ledge
#

btw i miss typed the hasMetaData, it should be #hasMetadata

young knoll
#

Make sure to remove the metadata when the entity dies, otherwise you’ll have memory leaks

#

Or use pdc instead

slender elbow
#

it always passes the listener instance to the Method

young knoll
#

The instance is ignored for static methods isn’t it

slender elbow
#

it is indeed not

echo tangle
#

i'm getting this error from this code
class java.lang.Integer cannot be cast to class java.lang.String
i have no clue why this is happening as there are no errors and the line should be fine
int length = Integer.parseInt((String) this.getConfig().get("test.schem.length"));

young knoll
#

“If the underlying method is static, then the specified obj argument is ignored. It may be null.“

slender elbow
#

oh you mean in the Method, i thought in the EventExecutor

echo tangle
#

huh

vast ledge
#

just on the #get() do #toString()

young knoll
#

Or

young knoll
#

Just use getInt

vast ledge
#

oh

#

i didnt know that existed .-.

young knoll
#

Either way they are getting an int already

#

No reason to convert it to a string and then parse that back to an int

remote swallow
vast ledge
#

I dont use the default configs

#

Have my own lib

#

like it alot more

young knoll
#

Gotta love good old reflection based config lib

vast ledge
#

wdym?

young knoll
#

My config library handles converting directly from a yml file to fields in an object

vast ledge
#

I just use the one my friend made

fierce salmon
#

When I enable my plugin, I get this error:

java.sql.SQLException: No suitable driver found for jdbc:us-dal-mysql-01.plox.host/db_structure.php?server=1&db=s3052_parkour
[00:20:35 WARN]:        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:708)
[00:20:35 WARN]:        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:230)
[00:20:35 WARN]:        at Practiceable-1.0-SNAPSHOT 1717892433764.jar//org.frank.practiceable.Practiceable.onEnable(Practiceable.java:141)

Here is my code: https://pastebin.com/tCHec6t4

young knoll
#

It is actually kinda an ORM now

#

It works with yaml, JSON, and NBT

vast ledge
#

bro

#

what the fuck

#

setWaterClutching1

#

why do you have 70 of em

#

Why are they all static

#

ehm

#

btw you just leaked ur psw and user for the database

#

you should probably change that

fierce salmon
#

oops

#

i dont really care

#

like what can they do with it?

vast ledge
#

Corrupt it ig

ivory sleet
young knoll
#

lol

#

If I ever have a need for them I will

vast ledge
#

btw, why are you resetting all the values in onDisable()

#

You do know, it just rm -r -f them when it shuts down right?

ivory sleet
vast ledge
#

It also seems like a massive amount of edits to be doing..

young knoll
#

An adapter for sql would probably be my next need

vast ledge
#

Yea, it would make life so much easier

#

I do work with mongo tho

young knoll
#

But sql is quite different from flat files so that’ll be a lot more effort

vast ledge
#

one of those fanbodys

#

boys**

ivory sleet
#

mongo is nice tho

young knoll
#

Mongo would be pretty easy considering it’s just binary json

#

My lib being 1mb makes me sad

#

Ik that’s not much but blah

ivory sleet
#

Jesus

ivory sleet
#

what ru shoving up its throat?

#

1mb

vast ledge
#

most likely either, its not shaded correctly, or the link is screwed

young knoll
#

Adventure api, Bukkit adapter, and minimessage

ivory sleet
#

oh right

#

btw coll, for your model thingy, you only used display entities, or am I wrong? (Mb for switching topics so rapidly)

young knoll
#

Yep

fierce salmon
#

@vast ledge i deleted that old database should i be good now?

vast ledge
#

wdym?

fierce salmon
#

no people messing with my database

vast ledge
#

You'd have to change user password and name

fierce salmon
#

oh it made a new username and password i think perchance

ivory sleet
# young knoll Yep

Did you get far enough to deal with animations like keyframe ones from blockbench?

young knoll
#

Yeah

ivory sleet
#

Hmm interesting that display entities are that powerful, this is my first time touching them but yea damn, nice ^^

young knoll
#

They have full xyz rotation

#

Basically all you need

ivory sleet
#

Yea, and the translation

young knoll
#

Armor stands had that too tho tbf

#

But display entities can also do scaling

ivory sleet
#

can’t you do that w armor stands?

#

thinking about the new scale attribute

young knoll
#

Yeah you actually can now

#

I’d say display entities are easier tho

ivory sleet
#

there is no performance gain to display entities?

#

or is the simplicity in being able to pass a matrix4 what attracts its usage?

young knoll
#

Both

#

They don’t tick at all and working with a single matrix is nice

#

Plus they probably perform better rendering wise

ivory sleet
#

Hmm sounds good, but you still have to spawn in a few per model if the model is complex enough I’d assume

ivory sleet
young knoll
#

Yeah it’ll always be slower than a proper model

#

But it’s the best we have atm

wet breach
ivory sleet
#

yea

jolly creek
#

Hi any easy way to do cross version support for the 1.20.5 enum renames and minor changes like entity categories?

#

Or just from valueOf("")?

worldly ingot
#

Ideally you just don't

#

If someone wants to use your plugin on an older version of the game, they can use an older version of your plugin

#

They're already missing like 9 years worth of Minecraft features, they'll be fine missing out on some plugin features too

jolly creek
#

Yeah but don't these changes just create a whole border of cross version support now? Because I wanna keep my plugin working 1.14-newest

wet breach
#

not sure what you mean by a whole border?

#

I mean, its not like the older versions are getting any updated mc changes lol

worldly ingot
#

I mean yeah. If you want to use new features, you can't support versions that don't have those features

#

We wrote some bytecode so that older plugins that don't receive updates should ideally still work as best as possible, but we can't do that the other way around

jolly creek
worldly ingot
#

So if you want to support 1.14+, compile against 1.14+ API

#

I personally just say drop 1.20.4 support and below

wet breach
#

they chose to be divided, not that anyone forced them to be lmao. Many players are opting to ditch outdated versions

worldly ingot
#

Anyone wanting to run on 1.14 can use the previous version of your plugin

wet breach
#

especially with some of the neat features these updated versions have

jolly creek
worldly ingot
#

Some people are so hell-bent on supporting as many versions as possible in one .jar file

#

Unsure why that is

sullen marlin
#

I don't think a lot do, it is pretty hard to properly support pre-1.13 and post-1.13

#

?1.8

undone axleBOT
wet breach
young knoll
#

People aren’t smort enough to find the right jar for their version

wet breach
#

there is simply no short cut or easy way to just support all the versions lol

worldly ingot
#

I just put some links at the top of my resource description

young knoll
#

Plus spigotmc sadly doesn’t have a nice file browser like modrinth or curse

worldly ingot
#

This works fine for me :p

jolly creek
sullen marlin
#

"ignored"?

#

you are welcome to fix it yourself....

jolly creek
young knoll
worldly ingot
#

true

young knoll
#

Or would it be legacier

jolly creek
worldly ingot
#

"Please seek help (Minecraft 1.8.x - 1.12.x)"

young knoll
#

Kek

sullen marlin
#

you started your issue with "don't really feel like it" and then get upset when no one else does it for you?

#

this is a free and open source project that relies on people doing things

wet breach
jolly creek
wet breach
#

never had that issue

#

always told those who use my plugins to use version appropriate plugins

#

I don't waste my time on backporting

jolly creek
jolly creek
young knoll
#

Depends on what your plugin does

sullen marlin
#

sure, you're just limited to not having 9 years of additional APIs

wet breach
#

as well as if you want to make use of features in updated JDK versions

#

fortunately there isn't terribly a lot in regards to that but there is a few

jolly creek
wet breach
#

you don't know how to open a project in your IDE from buildtools?

#

and then follow a guide to make a patch?

#

like buildtools gives you everything

jolly creek
wet breach
#

you would have to, to get the spigot source

jolly creek
#

I use maven and the repo

young knoll
#

Yeah you technically can do it that way

jolly creek
#

bukkit

#

get bukkit for the jar

young knoll
#

Although you still need the work directory from buildtools to run applyPatches

wet breach
#

so you go through unofficial sources for the source when a program is provided to get it for you

young knoll
#

Kek

jolly creek
wet breach
#

probably should check out buildtools, good news it now has a GUI program if you want a GUI variant

jolly creek
#

same thing

young knoll
#

It’s not the same thing

young knoll
#

One is official and supported

#

The other one is often outdated and may contain malware

jolly creek
#

But how does this help me contribute and submit a PR?

young knoll
#

And violates mojangs copyright

wet breach
young knoll
#

It’s fairly simple

  1. Sign CLA
  2. Run buildtools to get the source
  3. Make your changes (and run buildPatches if you’ve made any changes to NMS classes)
  4. Commit changes
  5. Open PRs
jolly creek
wet breach
#

I trust md and his program then some other dude who is not affliated with spigot at all

jolly creek
wet breach
#

as my main?

#

because like I use more then one OS if that matters

jolly creek
#

Yeah your main?

wet breach
#

my main is windows for gaming

jolly creek
#

I see, why bother with linux then?

wet breach
#

because sometimes I need to match the environment depending on what I am making

#

same goes for any testing

jolly creek
#

Makes sense

#

Do you have it all set up yourself to contribute to the official buildtools?

wet breach
#

if games worked on linux like they do on Windows, I would use linux

eternal oxide
#

^

jolly creek
#

Windows still for me way more convienent for everything

wet breach
#

well sure, many are accustomed to windows due to it being popular to begin with

young knoll
#

I can’t imagine there’s a big difference between windows and a good gui based Linux distro these days

wet breach
#

I would choose linux because I am not a fan of a millions services running all trying to do mischievious things

wet breach
#

if I want a service to run, I should be able to control that. Unless its a system needed one

wet breach
river oracle
#

Haven't daily driven windows for years

jolly creek
#

But yeah can anyone actually just copy and paste my jira code and pop it in their build tools?

jolly creek
#

legit like 15 lines commented and everything

river oracle
#

We can't copy your code

wet breach
#

but yeah not a fan of windows with its million services it wants to run in the background, the forced updates, the forced upgrading of hardware unnecessarily

jolly creek
river oracle
sullen marlin
young knoll
#

?cla

undone axleBOT
wet breach
#

while you may be saying that here, without signing the CLA who is to say later down the road you decide to say you didn't approve that etc

jolly creek
#

Brother legit 50% of coding is copying and pasting

wet breach
#

just fyi, its like the main reason bukkit died

river oracle
jolly creek
wet breach
#

I mean for simple stuff maybe

sullen marlin
#

you're right, its 25% copy pasting and 25% chatgpt

river oracle
#

We both go to school for compsci wild innit

wet breach
#

maybe one day I will go to college

#

I could just take a single class, and then I can say I have been to college

river oracle
young knoll
#

You can just walk onto a college campus and then say you’ve been to college

river oracle
#

I'm going because I have connections up where I'm at it'll be nice to be near then plus I only have to go for a year and a half

wet breach
river oracle
#

It'd be idiotic not to finish

young knoll
#

Nerd

river oracle
#

I'm a standing junior

wet breach
sullen marlin
#

is that bettter than a sitting junior?

wet breach
river oracle
#

Those guys 💀 I feel bad for them

wet breach
#

lol

river oracle
#

Not funny to make fun of disabled people frostalf I'm sure they'd love to stand too

jolly creek
young knoll
#

I’m currently a lying down graduate

river oracle
sullen marlin
#

"I build bridges"

#

"I write code"

jolly creek
#

But lets say this code that I found isnt mine can you copy paste it into your buildtools please

sullen marlin
#

which one is the engineer

river oracle
#

Nor is anyone else

jolly creek
young knoll
#

If the code isn’t written by someone who has signed the CLA

#

Then it’s evil

river oracle
wet breach
#

lmao

jolly creek
river oracle
#

You can write prs yourself then!

jolly creek
#

Your fake

river oracle
#

Wouldn't even need us neet how that works

river oracle
wet breach
#

but even then, if you at least submit a pr someone else could potentially work on it

#

or fix any mistakes etc

young knoll
#

My fake what?

young knoll
#

:(

jolly creek
river oracle
#

Kekw

sullen marlin
#

lol

#

don't know why you would think it takes hours

#

but giving up before you've tried is cool

river oracle
drowsy helm
river oracle
#

Spigot on github when 😞

sullen marlin
#

doing anything fun this weekend buoo?

jolly creek
young knoll
#

I mean

#

It basically works the same as git

river oracle
#

bit bucket is just...

#

Some companies use bitbucket

#

Like actually

drowsy helm
sullen marlin
#

camping or smthing?

drowsy helm
#

yeah camping

jolly creek
sullen marlin
#

nah nothing

#

nice

#

I've never been to SA lol

drowsy helm
#

Yeah neither, gonna be my first time. I'll take some pics

#

super expensive fuel wise though

river oracle
#

I didn't know Australia had anything to the north outside of desert

drowsy helm
#

its greener on the coasts

#

but yeah the center and northern bits are pretty much desert, but peopel still live there

river oracle
#

all the friends I have, have either live in Sydney or Melbourne

drowsy helm
#

yeah sydney and melbourne are 50% of the population

young knoll
#

There’s other parts of Australia?

#

Could have fooled me

river oracle
#

exactly lol

young knoll
#

Apparently some people even live on Tasmania

#

Wild

drowsy helm
#

yeah tasmania is a self replicating island

#

we don't claim them

sullen marlin
#

I've never been there either

drowsy helm
#

don't think you want to anyway

river oracle
#

guys I think you do

#

they have a tourism website

#

its gotta be fun

young knoll
#

So does North Korea

river oracle
sullen marlin
#

Oof

young knoll
#

Tbf id go to see the nature

drowsy helm
#

notice that all tasmanian tourism has nothign to do with the cities

river oracle
# young knoll So does North Korea

I want to tour north korea I've always wanted to see what its like to be in the empty cities that they parade you in to keep you blissfully unaware of the ghetos that everyone lives in

young knoll
#

My favourite!

river oracle
#

I can't believe MD is one of the 12 people who live in northern australia tho

#

no wonder he has time to work on spigot must get lonely up there

eternal oxide
#

I supposedly have distant relatives in/from Tasmania

drowsy helm
#

md lives in melbourne

river oracle
#

awh well that's boring

#

I'm moving to American Somoa

young knoll
#

If I were to travel I’d probably like to visit beautiful parts of nature more than big cities

#

Paris? Pfft who cares about a big tower we have one at home anyway

river oracle
#

its the best

young knoll
#

Is that where the pineapple came from

river oracle
#

nah the pineapples are from teh US

sullen marlin
river oracle
jolly creek
#

ItemFlag.HIDE_POTION_EFFECTS new name?

young knoll
#

Hide item specific I think

jolly creek
young knoll
#

Ah its hide additional tooltip

jolly creek
#

thnx

#

very strange rename, this one is definitely a step backwards

young knoll
#

How

#

It hides way more than potion effects

jolly creek
# young knoll How

It did what it said it would it the name, now its just less convienent.

young knoll
#

It does what it says in the name now

#

It’ll also hide map tooltips, banner patterns, book data, firework data, etc

jolly creek
#

Pretty sure that was under hide attributes

fierce salmon
#

I am trying to connect to my database via jdbc in my java plugin and am using the exact username and password i used to login via phpadmin and copied and pasted the connection string, but it says Access Denied for user

young knoll
jolly creek
jolly creek
# young knoll It wasn’t

Strange, I never used it for any of those but always assumed that would be under hide attributes since they are attributes

young knoll
#

Nah attributes are the attribute modifiers

#

Health, attack damage, etc

jolly creek
#

Weird naming scheme for it

fierce salmon
jolly creek
fierce salmon
#

If I send it on discord won't it show my username and password?

jolly creek
#

yes, remove those when you send it

fierce salmon
#

jdbc:mysql://username:password@us-dal-mysql-01.plox.host:3306/s3052_practiceable

jolly creek
#

Not sure if it is sensitive like that, did you do something similiar like this before/

fierce salmon
#

yeah it worked for a different database I had lemme see the difference between the jdbc connection strings

slender elbow
#

SQL Server != MySQL

#

buuuut in theeeory it shouldn't matter

fierce salmon
#

yes ik

wet breach
#
String connectionUrl = "jdbc:mysql://localhost:3306/test";

try (Connection conn = DriverManager.getConnection(connectionUrl, "username", "password"); {

} catch (SQLException exception) {
}
#

this is the proper way to connect to a mysql DB

#

you shouldn't be adding the user and password to the JDBC connection as that sends it over in plaintext

wet breach
#

the JDBC driver does that for you if you just do it properly

#

but if you toss the user and password into the url it won't

#

anyways, its a non-issue if you are connecting via unix socket or loopback address

#

IE db is not accessible to the outside at all

fierce salmon
#

jdbc:mysql://localhost:3306/s3052_pdb

#

does this look right?

wet breach
#

so far yes, and after / would be the DB name you are wanting to connect to

fierce salmon
#

the database is called s3052_pdb

wet breach
#

I wouldn't know

#

only you would 😉

fierce salmon
#

my server host is weird in naming

#

ik

jolly creek
#

or on a server

wet breach
#

well they said their host

jolly creek
#

if server then not local host

fierce salmon
#

on a server

glacial forum
#

hi, i have a multiverse sever where the hub and sururial are in diff worlds when a player spawns or dies they spawn at the suruvial worlds spawn when i want them to spawn at the hub world, ty

wet breach
#

if mc server is on the same machine as db

#

then localhost is fine

glacial forum
#

to calrify i have six worlds, crates, pvp, spawn, nether, overworld, end. When you join for the first time, you end up in 0,0 overworld instead of spawn dimension. This issue is the same for when you die, you get sent to 0,0 overworld.

jolly creek
glacial forum
fierce salmon
wet breach
#

well looks like you will need to create a test plugin to find out 🙂

jolly creek
wet breach
#

I am going to assume they don't have console access

glacial forum
wet breach
fierce salmon
glacial forum
wet breach
fierce salmon
#

it works on my server i just did /setspawn [worldname]

wet breach
#

oh, maybe they updated it since I last seen it

#

should try that then if that is the case

glacial forum
#

when i do /setspawn it isnt even a command on my sver

wet breach
#

do you have EssentialsX?

glacial forum
fierce salmon
#

do you have EssentialsXSpawn as well as EssentialsX

#

they are two separate plugins

wet breach
#

and I was getting to that lmao

glacial forum
#

only essentialsX

fierce salmon
#

beat you too it 😉

#

well then get EssentialsXSpawn

glacial forum
#

ahh i see tysm

wet breach
#

also next time there is the #help-server channel for help of this nature

glacial forum
#

yeah mb

#

hmm i did /setspawn (worldname) and when i die im still spawing at a dif world

fierce salmon
#

did you restart your server?

glacial forum
#

yes

fierce salmon
#

wait sorry you dont do /setspawn (worldname) you just do /setspawn

#

the second parameter is for the group so if you want it to apply to all players you leave it blank

glacial forum
#

ohh k

#

still dosent work

#

i did /setspawn on the spawnblock of the lobby

fierce salmon
glacial forum
#

k

fierce salmon
#

@wet breach my server host gives me a connection string, username, and password and when I use the username and password to connect to the database through phpMyAdmin, it lets me connect but doesn't through my plugin

carmine oracle
#

is it a bad idea to have multiple listeners in my plugin that listen to the same type of event?
Something like having a onEntitySpawnEvent ||(idk if that's a thing)|| and have it 2 times but 1 is meant to handle entity death logging and messaging, while the other one is for entity properties handling, like adding potion effects, changing the entity's name or whatever

young knoll
#

It’s fine

echo tangle
#

ok so i keep getting this error for this line. i may be stupid but i have no clue why Integer.parseInt isn't sufficient for converting start[0] (string) to an int
error: java.lang.NumberFormatException: For input string: "0.0" at java.lang.NumberFormatException.forInputString(Unknown Source) ~[?:?] at java.lang.Integer.parseInt(Unknown Source) ~[?:?] at java.lang.Integer.parseInt(Unknown Source) ~[?:?]
line: ProtectedCuboidRegion region = new ProtectedCuboidRegion(p.getName() + "-area", BlockVector3.at(Integer.parseInt(start[0]),Integer.parseInt(start[1]),Integer.parseInt(start[2])), BlockVector3.at(Integer.parseInt(start[0])+length,Integer.parseInt(start[1])+length,Integer.parseInt(start[2])+length));

spice burrow
#

how can I disable the FOV change when giving players a potion effect, in example speed 3?

river oracle
#

you could just increase the players walk speed with attributes though

echo tangle
spice burrow
wet breach
#

or its something on your hosts end

#

or the server and DB are actually on the same machine

mint lynx
#

I tried to summon an ItemDisplay in ProtocolLib, but I cannot change the Entity rotation because the serializer for Quaternion is not implemented. How can I handle Quaternion?

sullen marlin
#

why are you using protocollib for this?

mint lynx
# sullen marlin why are you using protocollib for this?

I don't want DisplayEntity to actually spawn in Minecraft because I want it to only be visible or look different for certain players. If I actually spawn it in Minecraft, it would be a hassle to manage the Entity afterwards.

sullen marlin
#

why?

#

Entity.setPersistent(false); Entity.setVisibleByDefault(false);

#

what's the problem with this?

mint lynx
sullen marlin
#

and? what's the problem here

river oracle
#

I'd assume they want to reduce lag, but display entities have such a little impact on the server unless you have hundreds of thousands its not worth doing it packet based

mint lynx
#

If you actually spawn an Entity, won't the Entity remain in the world when you deactivate the plug-in that manages it? For example, if I create a plugin that deletes an Entity one minute after it is spawned, if the plugin crashes during that one minute, I will not be able to delete the Entity.

sullen marlin
#

Entity.setPersistent(false);

mint lynx
#

Sorry, I just looked up setPersistent. I did not know about this method.

#

Do I need to use NMS if I want to change the behavior of the Entity itself?

sullen marlin
#

display entities have no behaviour...

mint lynx
#

I know that. Is it possible to implement a feature in DisplayEntity, for example, that would send messages to surrounding players at regular intervals?

sullen marlin
#

that's just coding a plugin, not sure why NMS would be relevant

river oracle
#

the API is fairly powerful. It has drawbacks in areas like in depth menu management and complete AI rewrites, but that's pretty niche

#

its safe to assume you can do most things with the API

wet breach
river oracle
#

kekw facts

mint lynx
#

I was not really used to controlling Entity from a plugin, I wanted to create a new Entity that extended from DisplayEntity like a Mod and manage all of its behavior.
However, it looks like I would be better off using the API.

#

I will try to implement this using the API in a plugin. Thanks.

river oracle
#

yeah with plugins controlling entities and the game in general to the same extent as mods is impossible

#

its duck taped hacks all the way down

mint lynx
#

Hmmm.... It is a little difficult, but I will try.

sullen marlin
#

I don't see how it is any different....

river oracle