#help-development
1 messages · Page 1026 of 1
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
just use runTaskTimer
I mean sounds like a runTaskTimer
and cancel the task when it's done
ok and put an infinite period on that function?
no
thought it might need a finite period
I mean its gonna invoke itself as long as u dont cancel it by the given interval u pass
The delay is the time until the first task is run
period is the time between every other run
oh I misread the docs
I thought period was the span over which it runs, nvm
yeah this will work, thanks
my fucking code was not working because a string had a trailing whitespace
i spent like an hour debugging
ffssssssssss
lmfao
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)
acf moment
should've used cloud
idk what cloud is
i'm comfortable with acf so i'm using it
one day i'll get to write my own command framework
too busy rn
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
i suppose cloud has no way to work with annotations?
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)
commandManager.buildAndRegister("command") {
handler { ctx ->
ctx.sender().sendMessage("hi")
}
}
That’s not the issue
The issue when u’re setting the command manager up
I remember having to define my own error handler, command coordinator, help page, ensure paper capabilities etc
parsers are a bit annoying to have to define
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
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 ?
they dont provide defaults?
is it possible to see spigot/bungee docs from pervious versions?
i.e. 1.19.4 or something
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
How did you build the plugin jar
They do
But when I used it, u used to have to invoke the defaults still
altho this was like 1 year ago or maybe 2
i can make this verification to check if blocklocation is a door?
at the top and bottom of the door
You should check the tags
block aint gonna be a door, either blockstate or blockdata
this way I can't?
i using bukkit 1.8
Command for 1.8 video? xd
?1.8
Too old! (Click the link to get the exact time)
verify the instances not is right?
this way?
I think you need to add a getData to that
Does anyone know the MVP who pays the domain xd
Ah wait getData is a byte
Idk how you get material data from a block tbh
Haven't used that api in 10 years
Make sense 💀
Wait might have found it
new MaterialData(location.getBlock().getType());
maybe, I assume that will never get you a subclass tho
location.getBlock().getState().getData() iirc
what other doors are there that i dont know of?
Well these days every wood has a door
ah assumed that to be wood too
💀
Is bamboo wood?
D O O R S
wtf is this door made of
mangrove wood
what is mangrove
Can I ban him
Yes
I forgot about mangrove because i never see that biome lmao
😭
I see it more than normal swamps now
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
ton of water where crocodiles go splash splash
and i test my shit
also trees
i don't explore
without crocodiles :c
my test world is usually full of holes :|
js like mme bbygirl
Imagine he deleted his world and sends a vid of that, what happens to you then? xd
run as -> maven build, and then file -> export -> jar
may be wrong
ohh alright lol thanks
how do I get json string from a chat component
in 1.19.4
so ComponentSerializer.toJson doesnt exist
when i do p.gedAdress() it get /*.*.*.*:* how can i get only the *.*.*.*
.replace()?
and how can i remove the numbers after the :
why does it not even return an INetSocketAddress
It does
idk why i get this type of ip
Use Player#getAddress#getHostString
that's pretty much just calling toString()
^
oh thx
how do i include the plugin.yml in this build? i keep getting java.io.FileNotFoundException: Jar does not contain plugin.yml
it must be in the resources folder of your project
uh we have a furry doing the docs?
And this still has not been changed lmao
chat is this real
wait
this is real
and is in paper too
lmfao
Yeah it's MDs doing
The potion effects used to have only the meme descriptions, I added the proper descriptions
how can i decrypt and crypt something?
very very very very vague question with a very large magnitude of possible answers
provide context
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
https://www.youtube.com/watch?v=qgpsIBLvrGY i recommend this video
You want to hash it, so it cannot be reversed
personally prefer argon
but yeah this video is a good starter for password storage
rewatched it multiple times
What about sha256
Hey at least java has it built in!
just use base64!!
base2
having issues with buildtools
i think you're better off in #1117702470139904020
they may help
bcrypt my beloved
do you guys know the best plugin for custom ore generation besides oraxen
Possible issue with java version being used?
Might need to use Java 17 instead of Java 21
Could also be running in an older BT folder.
Always want to run it in a clean directory.
yeah that was it
the code maybe works
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
Is anyone done plugins with python?
why do people use python for everything its not supposed to do?
Well I guess its time to learn java
?learnjava
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! 🎉
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)
plugin in python?
Well I dont speak Java...
Yeah
Python is a great language, but it really isn't the choice here
how does it run?
prob compiles and outputs the jar
I hope it doesn't do some on runtime funnies
Oh fuck no it is doing runtime funnies
go work on your mapper instead 🤓
._.
Or just use graal
What does graal do
"mapper" with questionable use case
Graal supports python I believe and should be better than jython (jython uses python 2.7, where as graal will use python 3.something)
note that you're not gonna be able to find proper help, docs and ecosystem for this. better off just sticking with java/jvm langs
oh holy god, jython, I haven't heard about it for a while
yeah, all the cool kids use jruby
or what about nashorn?
jotlin
kotlin can compile to native
ik
dont ask me how, neve tried
You really had to add that "jvm langs" part, but tbh kotlin does kind of seem better for a python user than java, atleast from my point of view
kotlin can also compile to js
graal be like: Cry
yup, that's why i added it :)
how can i prevent the sendind of the command in the console?
- what
- are you making a backdoor
i'm trying to make a Auth plugin
makes sense then
Ah
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
understandable
I think you can cancel the command in the pre process event, right? And then handle shit afterwards
Well tbh I'm not really sure how the yml file works there :/
I suppose you could filter out it with a custom logging adapter, but that is hacky as hell
just use json
json is the best fr fr
json and yaml is pretty much the same thing fr
All my mods use json for configs
i use yaml for most of my configs
Oh I see
kaml ftw
Yaml for plugins, json (or json5) for mods
(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)
^
what event log the command in the console? PlayerCommandPreprocessEvent?
wait what
Yeah - that's common knowledge. Didn't you know that?
hocon is better :p
hocon is fine
Hold on... so I cant use json for plugins?
you can
You can
It's just about personal preference and uhh, what was the word
Something starting with c
I think
configurate?
if i cancel the event on the PlayerCommandPreprocessEvent for the /login command i can get the args?
I prefer json with gson
What is the difference between yml and json?
Lovely
configurate is a bit more intricate
never tried it, supposed to be good tho
When everything stays in a similar way
syntax exclusively
Yml is simpler you could say
And well yaml supports comments while json does not - so it is better for configs
Supports comments while json doesn't, too
json5
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
Is that supported by org.json:json? If not, then it doesn't exist in my eyes
Then keep using "__comment" or whatever
Do you guys ever directly interact with the computers network module because you want to invent a new protocol
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.
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
have you ever tried ktx.serial
not needed - as long as you use maven or gradle
it should work with java too
mc dev plugin is just a convenient template
doesn't that have a hard dependency on the kotlin stdlib?
but it also eat a lot of memory (allegedly) so you'd be better off just adding shit by yourself
Well I'm kinda stuck with commands... don't really know how to create one because the way I did it doesnt work...
maybe, idk
which is like several MiBs large
?notworking
"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.
Not sure what's even wrong at this point
not really, but the bloat is not great.
Did you configure the plugin.yml correctly?
Though explaining expected versus actual behaviour is best
#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?
because what you are describing right now is extremely … useless shall I say?
is the logger working (that is, is the plugin initializing?)
oh. my. god. that is so fucking cursed
afaik you can write - { x: "A", y: "b" } or smth in yaml
damn
You can also do ["A", "B", "C"] for a list of things which is less cursed at times
You know Java is easier than that. And it looks pretty similar in some places, enough that you minus well just learn Java
apparently not
I mean configurate also supports XML, so that is not a great point here
just use cbor 💀
uh
hm
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.
I cant make it work with the yml file not even the first thing I tried(durability_event)
Do you have any scary error messages in the log/stdout?
And just in case you are one of those people: An error message usually contains the word "ERROR" next to the timestamp
When executing /pl, or?
And what plugin are you referring to - the plugin you wrote in python or some other plugin?
the one i created
Is the plugin's name (when running /pl) green, red or does it contain an asterisk?
Oh no, now i see very big and scary error
?paste
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
Well its something with org.bukkit.plugin.java.pluginclassloader, I'll try to manage it somehow
paste the error please
here
I cant copy it because I see it in minecraft.. I can send an image..
Wha?
there should be an error in your console
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
please, just learn java, or even kotlin (more similar to python) for this as what you are doing is 100% not supported
Well Now it appeared in the console
@quiet ice why did you react with ▶️
so can you now paste it
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
Well I managed to get it working, but only the durability_event, command still doesnt work
what's the colour of the plugin's name in /pl?
green
Or is there anything "wrong" with the plugin's name (like a suffixed asterisk or similar)?
Oh wait it doesnt show it anymore.. I might have messed up something yet again
Everything fixed
It works like any other command
glad to hear
Any of you kotlin nerds have any experience with ktoml and how it can serialize but not deserialize my objects?
all red? That is ominous
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
ah yes, that is just a brig moment
Got any ideas how to fix that?
something about resending commands
Well now when I died I saw random numbers in chat.... hehheeheee
in GoalSelector#addGoal(int var0, Goal var1) what does var0 mean?
An integer representing the priority or weight of the goal being added. Higher values typically indicate higher priority?
that's word for word the answer chatgpt got me lol
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));```
priority
Yarn mapping says priority
version: 1.20.6, hash: 6fb2e93502
https://maven.fabricmc.net/docs/yarn-21w05b+build.11/net/minecraft/entity/ai/goal/GoalSelector.html
so does this
public void add(int priority,
Goal goal)
yes, yarn
screw this lib
😂
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
well
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.
pass it onto someone else
team doesn't work weekends, lead dev won't bother, junior dev is.. junior
imma just hardcode this banger
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
ktx.serial my beloved
and also the more stuff after it would prob count as spam
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?
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?
api question, is there a way to know if a player currently is being shown an actionbar? the sane way, not with packets
save their name to uuid in a yaml, check the yaml if their name exist with a different one
Logj4 filter, just deny if it's from your plugin
ye ye i saw the authme plugin and i done like it
thanks for the help <3
val decoded = runCatching { Toml.decodeFromString<MapTemplate>(tomlString) }.getOrNull()

never heard of runCatching
probably not a great idea either
one of those utility functions
love kt stdlib
Yes, a great exception sinkhole that will undoubtedly bite you back at some point in time
Should I set AIR at the top of the door or at the bottom to remove? spigot 1.8
Is there an event when players tool breaks?
i can modify the uuid of a player when they join the server?
Cracked server?
ye
oh okay sorry
What does bub mean
buddy
but like i can do it on online mode too
like if i want to use the uuid of another guy
okay?
but the way is the problem
Watch and learn.
people just using them wrongly /s
All I did was type this.saveDefaultConfig() in my onEnable method to generate a config.yml file and I got this error: https://pastebin.com/tG5dSBAe
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
You need a default config.yml in your jar
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
you could just make a default config.yml inside your plugin
passy
xd
whoever made that must've known what they were doing xd
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
What's the tutorial
nvm
That's not pure java jdbc code so there must be some library
im stupid
Hi stupid
"I'm dad"
No he’s 
https://www.spigotmc.org/wiki/connecting-to-databases-mysql/ this is the tutorial im using
I'm not an expert about gradle, but effectively, as I am not an expert on gradle I can't say nothing
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
I tabbed in discord and this came up. I did not think this was the word it is.
Update gradle
i keep trying to check and im getting the same error
?nocode
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.
Bro referring to something that was said like 9h ago
I was just laughing at the time gap xD
i fell asleep after i posted that
i was up all night
couldve mentioned that when i asked 9 hours ago
if(event.getTarget() == null || !(spawnedvex instanceof Vex) || !spawnedvex.hasMetaData(String.valueOf(playerId))) return;
event.setCancelled(true)
pls fix
if tree
No need to be agressive .-.
It sounded rather demanding imma be honest
i asked what was wrong with it and he said just check if its null
never mentioned the entire code was bad
he said "all the code, not just the small part"
Yea, he doesnt want to see the 4 lines you sent, he wants to see the entire code
At least the entire method
^
well he can see it back 9 hours ago nothing changed
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 :)
i usually leave it private or default
they work fine when static
it looks weird tho
However you are calling a method on the target before your null check
So you’re still going to get a NPE
btw i miss typed the hasMetaData, it should be #hasMetadata
Make sure to remove the metadata when the entity dies, otherwise you’ll have memory leaks
Or use pdc instead
it shouldn't? i don't see any logic in the executor that takes care of static EHs
it always passes the listener instance to the Method
The instance is ignored for static methods isn’t it
it is indeed not
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"));
“If the underlying method is static, then the specified obj argument is ignored. It may be null.“
oh you mean in the Method, i thought in the EventExecutor
You cant cast in to string
huh
just on the #get() do #toString()
Or
just getInt dude
Just use getInt
Either way they are getting an int already
No reason to convert it to a string and then parse that back to an int
Dont you do paid commissions
Gotta love good old reflection based config lib
wdym?
My config library handles converting directly from a yml file to fields in an object
Coll + ORM :0
CORM?
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
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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
Corrupt it ig
so we’re not including hocon, toml and pkl? :(
btw, why are you resetting all the values in onDisable()
You do know, it just rm -r -f them when it shuts down right?
I was gonna suggest the name ||cormhub|| as a lib name, but its way too inappropriate 😔
It also seems like a massive amount of edits to be doing..
An adapter for sql would probably be my next need
But sql is quite different from flat files so that’ll be a lot more effort
mongo is nice tho
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
Jesus
most likely either, its not shaded correctly, or the link is screwed
Adventure api, Bukkit adapter, and minimessage
oh right
btw coll, for your model thingy, you only used display entities, or am I wrong? (Mb for switching topics so rapidly)
Yep
@vast ledge i deleted that old database should i be good now?
wdym?
no people messing with my database
You'd have to change user password and name
oh it made a new username and password i think perchance
Did you get far enough to deal with animations like keyframe ones from blockbench?
Yeah
Hmm interesting that display entities are that powerful, this is my first time touching them but yea damn, nice ^^
Yea, and the translation
there is no performance gain to display entities?
or is the simplicity in being able to pass a matrix4 what attracts its usage?
Both
They don’t tick at all and working with a single matrix is nice
Plus they probably perform better rendering wise
Hmm sounds good, but you still have to spawn in a few per model if the model is complex enough I’d assume
I bet the matrix is just sent straight to open gl so makes a lot of sense
it would be the most efficient considering this exists
glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv
yea
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("")?
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
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
not sure what you mean by a whole border?
I mean, its not like the older versions are getting any updated mc changes lol
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
Like how modders were divided in forge between 1.18 and 1.19
So if you want to support 1.14+, compile against 1.14+ API
I personally just say drop 1.20.4 support and below
they chose to be divided, not that anyone forced them to be lmao. Many players are opting to ditch outdated versions
Anyone wanting to run on 1.14 can use the previous version of your plugin
especially with some of the neat features these updated versions have
Is this expected? Because a lot of plugins usually go back to 1.8 to newest. So I am assuming they are going to just have a workaround for this?
Some people are so hell-bent on supporting as many versions as possible in one .jar file
Unsure why that is
I don't think a lot do, it is pretty hard to properly support pre-1.13 and post-1.13
?1.8
Too old! (Click the link to get the exact time)
most plugins don't support outdated versions. There are some that do though and its a personal choice, but it does create more work on your part
People aren’t smort enough to find the right jar for their version
there is simply no short cut or easy way to just support all the versions lol
I just put some links at the top of my resource description
Plus spigotmc sadly doesn’t have a nice file browser like modrinth or curse
Also md_5 can I get info on why this issue on the jira was ignored? I'm still hoping for this change
https://hub.spigotmc.org/jira/browse/SPIGOT-7420?filter=-2
I just mean its been almost a year
Clearly should be legacy and legacyer
true
Or would it be legacier
Yeah its such a small fix and I've never actually hooked to a fork and it would be a pain to get it all working for a PR when its like 10 lines of code
"Please seek help (Minecraft 1.8.x - 1.12.x)"
Kek
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
if its only 10 lines, should be relatively easy and not a whole lot of work. Could probably setup and submit a pr within an hour for this
I have lots of players that use random versions, I prefer newer too but they will be on 1.14 or 1.16 and it would be a pain to have several jars for each version after each update. It's just convienent to support as many so you don't get the constant "Please make for 1.12"
never had that issue
always told those who use my plugins to use version appropriate plugins
I don't waste my time on backporting
Because I tried and couldn't figure it out, its such a small change thats why I left the entire code for copy paste of the few lines change in hopes that somebody with it all set up can literally press 2 buttons to copy and paste it in.
I mean only for 1.12 and below its a lot, 1.13 and above as long as enum names stay the same it is relatively no extra work.
Depends on what your plugin does
sure, you're just limited to not having 9 years of additional APIs
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
I couldn't figure it out, I'm not used to using stuff like this which isn't simple like github. Could you possibly take a look into it?
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
I don't use the buildtools
you would have to, to get the spigot source
I use maven and the repo
Yeah you technically can do it that way
Although you still need the work directory from buildtools to run applyPatches
so you go through unofficial sources for the source when a program is provided to get it for you
Kek
I've used it before, its just not as convienet as getting the jar from get bukkit
probably should check out buildtools, good news it now has a GUI program if you want a GUI variant
same thing
It’s not the same thing
A GUI, that sounds nice
One is official and supported
The other one is often outdated and may contain malware
But how does this help me contribute and submit a PR?
And violates mojangs copyright
because buildtools gives you all the sources you need
It’s fairly simple
- Sign CLA
- Run buildtools to get the source
- Make your changes (and run buildPatches if you’ve made any changes to NMS classes)
- Commit changes
- Open PRs
I've been using it for years with probably a majority of the community using it to get their servers if they don't use paper. There is no malware its safe and just for convienence
I trust md and his program then some other dude who is not affliated with spigot at all
Do you use linux, just out of curiosity?
Yeah your main?
my main is windows for gaming
I see, why bother with linux then?
because sometimes I need to match the environment depending on what I am making
same goes for any testing
Makes sense
Do you have it all set up yourself to contribute to the official buildtools?
if games worked on linux like they do on Windows, I would use linux
^
Windows still for me way more convienent for everything
well sure, many are accustomed to windows due to it being popular to begin with
I can’t imagine there’s a big difference between windows and a good gui based Linux distro these days
I would choose linux because I am not a fan of a millions services running all trying to do mischievious things
I mean ltsc
if I want a service to run, I should be able to control that. Unless its a system needed one
Other than yk, software support
there isn't in fact there is even some distro's that pretty much go out of their way to make linux look and feel like windows lol
Yeah honestly not really. There are their inconveniences for sure but overall it's lovely
Haven't daily driven windows for years
But yeah can anyone actually just copy and paste my jira code and pop it in their build tools?
No you haven't signed the cla
legit like 15 lines commented and everything
We can't copy your code
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
What I am literally asking you to copy it
We legally can not
?cla
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
Brother legit 50% of coding is copying and pasting
just fyi, its like the main reason bukkit died
That's not even true kekw
I legit went to school for this, and this is all everyone in the industry does
I mean for simple stuff maybe
you're right, its 25% copy pasting and 25% chatgpt
Same
We both go to school for compsci wild innit
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
It's useless given you're already established tbh
You can just walk onto a college campus and then say you’ve been to college
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
yeah, but then I don't get to show off a piece of paper that cost $50k
I already finished 3 years of my college in HS
It'd be idiotic not to finish
Nerd
I'm a standing junior
this is true, and I am not suggesting at all thatt you don't finish lol
is that bettter than a sitting junior?
as opposed to a sitting one?
Yeah sitting juniors have it rough
Those guys 💀 I feel bad for them
lol
Not funny to make fun of disabled people frostalf I'm sure they'd love to stand too
comp engineerring
I’m currently a lying down graduate
Get your hardware ass outta here
But lets say this code that I found isnt mine can you copy paste it into your buildtools please
which one is the engineer
I'm not losing my stash access foe you
Nor is anyone else
No, that’s worse
You do code just with binary and C
its ok, I am disabled too
It's okay to make fun of you though everyone else is off thr table
lmao
Alright if I sign it?
You can write prs yourself then!
Your fake
Wouldn't even need us neet how that works
I'm very real unfortunately I wish I was linear algebra
but even then, if you at least submit a pr someone else could potentially work on it
or fix any mistakes etc
My fake what?
:(
Yes, but this sucks ig because I don't wanna spend hours trying to get a alt of github to work figuring it out and to submit like 15 lines change which will probably get rejected because I forgot to sign the tos of my hardware interacting with buildtools or some other bs. Oh well, whatever.
Kekw
lol
don't know why you would think it takes hours
but giving up before you've tried is cool
He's a computer engineer he's not used to this high level shit give him a break smh
it's an unfortunate reality because of past legal issues
Spigot on github when 😞
doing anything fun this weekend buoo?
We use standard stuff, if we kept using offbrand alts of stuff we would be stuck on this level of tech forever
going to south australia for a week on the 24th so just getting ready for that, buying all the gear. yourself?
camping or smthing?
yeah camping
fr
Yeah neither, gonna be my first time. I'll take some pics
super expensive fuel wise though
I didn't know Australia had anything to the north outside of desert
its greener on the coasts
but yeah the center and northern bits are pretty much desert, but peopel still live there
all the friends I have, have either live in Sydney or Melbourne
yeah sydney and melbourne are 50% of the population
exactly lol
I've never been there either
don't think you want to anyway
So does North Korea
Oof
Tbf id go to see the nature
notice that all tasmanian tourism has nothign to do with the cities
Except for MONA
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
My favourite!
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
I supposedly have distant relatives in/from Tasmania
md lives in melbourne
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
I always go to tropical islands
its the best
Is that where the pineapple came from
nah the pineapples are from teh US
Isn't that just a military base
yes yes it is
ItemFlag.HIDE_POTION_EFFECTS new name?
Hide item specific I think
Ah its hide additional tooltip
It did what it said it would it the name, now its just less convienent.
It does what it says in the name now
It’ll also hide map tooltips, banner patterns, book data, firework data, etc
Pretty sure that was under hide attributes
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
It wasn’t
Databases have users you create in php admin for the database
Strange, I never used it for any of those but always assumed that would be under hide attributes since they are attributes
Weird naming scheme for it
I'm using the user that my server host created for me
Whats your connection string look like?
If I send it on discord won't it show my username and password?
yes, remove those when you send it
jdbc:mysql://username:password@us-dal-mysql-01.plox.host:3306/s3052_practiceable
not too familiar with jdbc, but on their docs it shows that the server name goes first
https://learn.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver16
Not sure if it is sensitive like that, did you do something similiar like this before/
yeah it worked for a different database I had lemme see the difference between the jdbc connection strings
yes ik
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
encrypt
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
so far yes, and after / would be the DB name you are wanting to connect to
the database is called s3052_pdb
is the database on your pc?
or on a server
well they said their host
if server then not local host
on a server
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
it depends where the mc server is running from
if mc server is on the same machine as db
then localhost is fine
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.
yes but us-dal-mysql-01.plox.host:3306 this does not look like his same machine
need a plugin to intervene
you know any?
i have no idea if they are running on the same machine or not its through the host
well looks like you will need to create a test plugin to find out 🙂
Ah thats what you mean, you could just ask them or ping it
I am going to assume they don't have console access
do you know any that would help?
no I don't but you are in the development help though
EssentialsXSpawn?
tried but it dosent work, i may of done it wrong tho
they have multiple worlds, this wouldn't stop them from respawning into another world
it works on my server i just did /setspawn [worldname]
oh, maybe they updated it since I last seen it
should try that then if that is the case
when i do /setspawn it isnt even a command on my sver
do you have EssentialsX?
yes
and I was getting to that lmao
only essentialsX
ahh i see tysm
also next time there is the #help-server channel for help of this nature
yeah mb
hmm i did /setspawn (worldname) and when i die im still spawing at a dif world
did you restart your server?
yes
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
go to #help-server i have no idea
k
@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
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
It’s fine
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));
how can I disable the FOV change when giving players a potion effect, in example speed 3?
0.0 is a double not an int
that is client side
you could just increase the players walk speed with attributes though
yeah i'm stupid, it takes floats anyways. thank you!
Gotcha, so basically just modify the players walk speed to the equivalent of the speed potion I’m trying to replicate? It won’t look janky will it?
there is probably some setting you are missing
or its something on your hosts end
or the server and DB are actually on the same machine
nah
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?
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.
why?
Entity.setPersistent(false); Entity.setVisibleByDefault(false);
what's the problem with this?
I want to create an API to manage the dummy Entity and allow the dummy Entity itself to implement its own functionality by inheriting from the abstract dummy Entity class.
and? what's the problem here
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
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.
Entity.setPersistent(false);
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?
display entities have no behaviour...
I know that. Is it possible to implement a feature in DisplayEntity, for example, that would send messages to surrounding players at regular intervals?
that's just coding a plugin, not sure why NMS would be relevant
why would you need NMS for that
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
its not a real plugin unless it uses nms though
kekw facts
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.
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
Hmmm.... It is a little difficult, but I will try.
I don't see how it is any different....
modders just hate their APIs