#help-development
1 messages ยท Page 1193 of 1
If you're not going to send all of it all I can do is link this: https://www.spigotmc.org/wiki/connecting-to-databases-mysql/
literally the whole function
https://paste.md-5.net/eterexafez.php
for mysql its
https://dev.mysql.com/downloads/connector/j/
but what do i do with this? the server is running on a game server so prob linux but my pc is windows
val timersMarkedForRemoval = mutableListOf<TimedTask>()
for (timer in timerManager) {
timer.tick(startTick, tick)
if (timer.shouldRemove()) {
timersMarkedForRemoval.add(timer)
}
}
timersMarkedForRemoval.forEach(timerManager::remove)
I don't understand why I'm getting CME'd here. Message is just null, at the for (timer in timerManager) line
cme?
ConcurentModificationException
weird
i blame kotlin
maybe shouldRemove isnt const or whatever, idk what kotlin does
List timersMarkedForRemoval = new ArrayList();
for (TimedTask timer : this.timerManager) {
timer.tick(startTick, tick);
if (!timer.shouldRemove()) continue;
timersMarkedForRemoval.add(timer);
}
Iterable iterable = timersMarkedForRemoval;
TimerManager timerManager = this.timerManager;
boolean $i$f$forEach = false;
for (Object element$iv : $this$forEach$iv) {
TimedTask p0 = (TimedTask)element$iv;
boolean bl2 = false;
timerManager.remove(p0);
}
doesn't look that bad to me
yo
wait, in kotlin you don't have generics?
ah
anyone knows how link javaFX in gradle?
makes sense ๐
or just generally how to link it to a project?
i think it's in the standard library, or at least it was until some time
in java 8
unless it's the wrong one
(only)
if it's separated find the repository and dependency
can't find the rep
ye?
so how do I link this bad boi
nice
If you mean player.closeInventory, I've allready tried that and it didn't worked. Unless player#closeInventory is something else lol
It's not
Show your code
One Minute
Block block = event.getClickedBlock();
Player player = event.getPlayer();
boolean isContainer =
block.getType().equals(Material.CHEST)
|| block.getType().equals(Material.TRAPPED_CHEST)
|| block.getType().equals(Material.BARREL);
if (isContainer) {
Container container = (Container) block.getState();
String cName = container.getCustomName();
String key = "locked:" + player.getName();
if (cName.contains("locked:")) {
if (!cName.equals(key)) {
player.sendMessage(ChatColor.RED + "You are not the owner of this container!");
player.closeInventory();
}
}
}
This is bassicly just an PlayerInteractEvent that is (for now) supposed to just check if the custom name of a chest contains "locked:" and if it is, its checking if the playername is behind that "locked:".
If its not you get a message that you are not allowed to do that and then closes the Chest
The chest isnโt opened yet in that event
I just told you not to detect inventories by their name ๐
@EventHandler
fun on(event: InventoryClickEvent) {
println("Drag event | Holder: ${event.inventory.getHolder(false)?.javaClass?.simpleName}")
val furnace = (event.inventory.getHolder(false) as? Furnace) ?: return
furnace.cookTime = Short.MAX_VALUE
furnace.cookTimeTotal = Int.MAX_VALUE
furnace.burnTime = Short.MAX_VALUE
}
I'm trying to make the furnaces insta-smelt, however it does not, in fact, worky
Is that NotJustBikes in the background
Yessss
Tell me more about Doug Ford
this guy
Jk donโt I live in Ontario 
Use code notjustbikes at the link below to get 60% off an annual Incogni plan: https://incogni.com/notjustbikes
Watch this video ad-free and sponsor-free on Nebula:
https://nebula.tv/videos/notjustbikes-the-worlds-dumbest-bike-lane-law-just-passed-in-canada
Patreon: https://patreon.com/notjustbikes
Mastodon: @notjustbikes@notjustbikes.com
NJB ...
anyway any idea why I still need to wait for it to finish cooking?
block state snapshot
I assume
getHolder(false) doesn't return a snapshot (I should go to paper, fuck I forgor)
Get him
Why tho? For me it looked like a good solution, because I just want the player to have to rename the chest to lock it
Me on my way to rename a chest to โlocked: peepeepoopooโ
Also me when I change my name and get locked out of all my chests

The Plugin is just for a server from we with some friends so it doesn't have to be that save against bugs and stuff like that
so I'll leave it like that for now
// temporary fix (date: 2004)
there we go
-# or you could use a datapack to change the recipes cooking time
no
Now make auto pickup and then make it smelt entire inventory on interact
not needed for this
the fuq
shade javafx
it's really only for testing
might have to add javafx sdk in the path
wdym?
you know, like you do with java sdk
never have I done anything with sdks
Getting started with JavaFX for Java desktop application development
yup this is it ^
see also the maven and gradle plugins
do not nut
uh
donut
do donut
do not do, do not not, do not nut
Been trying to make the spinning donut in javafx for like
5 hours
but can't get past the fuckin compilation phase
Now implement a emerald ingot ๐
hell yeah
make a folder for the sdk folder where you unzip it, go in system variables in windows, go in path for users, add the path to /lib in there ๐
that's it
it should work
nvm,path for system
type system variables in search box
I really do appreciate your help tho ;]
nah bro
.jar vs .java
but compiling java classes individually doesn't seem nice tho
Which is why you use the maven/gradle plugin
Okay now i finally understood how this connector J thing works i now have this error:
[Server thread/WARN]: java.sql.SQLException: Connector/J cannot handle a connection string 'IP-ADRESS'.
My sql server is on version 8.0.40, but connector J only goes up to 8.0.30, is that a problem?
I init my db connection using this:
@Override
public void onEnable() {
mysqlDataSource.setURL("IP-ADRESS");
mysqlDataSource.setPort(3306);```
I just use mysqlDataSource.getConnection(user, password) everywhere
Sounds like you have a bad connection string
is the ip adress supposed to be the literal ip adress or some jbdc:// thing
but the error he showed is about the runtime missing, which should be solved with providing the sdk in the path
.
jdbc:mysql://
and then the ip?
yes
ok imma check then
Not sure about that datasource but that's what you'd do with the DriverManager
in that spigot guide it tells me that and some other stuff
I might not be the brightest
That should work too
mhh
reloaded plugin, nothing reponds
imma restart see what happens
timed out now
failed to verify username
persists
restarted launcher same bs
The plugin puts the required modules in to the manifest so java knows what to load
You do need it installed on the system to run ofc
So you're not wrong
Did you use the gradle or maven plugin to compile
gradle
wtf
Send your build file
hypixel works but the server now always says failed to verify username
.
okay
I uh-
You're not making a runtime image are you
no idea
what's that?
Now i have this error
[20:47:21] [Server thread/WARN]:
[20:47:21] [Server thread/WARN]: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.```
or run ./gradlew(.bat) run
oh
it works
xd
nice
I love you
this took way too long
I wonder why the run task works, but not the main() run
That's quite a generic error when the connection fails
Can by caused by many things
Is the database accessible
idk how to test that
Because the task will tell it to grab the javafx modules
I know this one
I recently had it
it's either 1. The server is firewalled or 2. An invalid driver is used
Could be more reasons that that
but the first one is usually the most common issue
Class.forName("com.mysql.cj.jdbc.Driver").getConstructor().newInstance();
``` after unfirewalling solved it for me
creating an instance shouldn't be needed
Just using forName and forcibly loading the class should be enough
I guess so
wait so if i paste the code in onEnable i should be safe right?
you should probably make a different class for that
why
not good to throw everything in one method
not good or not working
the whole db logic I mean
for testing ok?
yes
i have that, just the enabling functions in the main class
still the same error
how to test if it has to do with firewall?
i can connect to the db just fine with my pc
mhh
weird, if i use mysql workbench i also cant connect
why
Is it running
nah, the minecraft server and the database are both neither on my pc, nor on the same server
where is the phpMyAdmin
on the database server (vserver)
That would probably be why
for security reasons the default behaviour is to only listen for local connections
You need to expose the database if you want to use it externally
how to do that
First make sure that you don't have a firewall blocking the port
dont think i have, the vserver is letting everything through
but how to check for ubuntu
ufw
found a tutorial
When you've done that set:
[mysqld]
bind-address=0.0.0.0
in your mysql config file
okay, digital ocean saying the same
Probably worth to run mysql_secure_installation first
i made this, so if i want to create custom config i extend it and add methods like getPlayers or get somethnig
i dont know if this is good approach so just wanna post it her
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
import java.io.IOException;
public abstract class CustomConfig {
private final File file;
private final FileConfiguration config;
private final ConfigValidator validator;
private final JavaPlugin plugin;
public CustomConfig(JavaPlugin plugin, String fileName, ConfigValidator validator) {
this.plugin = plugin;
this.validator = validator;
file = new File(plugin.getDataFolder(), fileName);
if (!file.exists()) {
file.getParentFile().mkdirs();
plugin.saveResource(fileName, false);
}
config = new YamlConfiguration();
reloadCustomConfig();
}
private void validate() {
validator.validate(config);
}
public void saveCustomConfig() {
try {
config.save(file);
} catch (IOException e) {
plugin.getLogger().severe("Failed to save config file: " + file.getName());
e.printStackTrace();
}
}
public void reloadCustomConfig() {
try {
config.load(file);
validate();
} catch (IOException | InvalidConfigurationException e) {
plugin.getLogger().severe("Failed to load config file: " + file.getName());
e.printStackTrace();
}
}
protected File getFile() {
return file;
}
protected FileConfiguration getConfig() {
return config;
}
protected JavaPlugin getPlugin() {
return plugin;
}
}
that opens some weird tabs in termius
Seems fine
can someone explain to me why bungee does not get any problems caused by the bundledelimiter packet?
i coded a proxy in rust and i needed to handle and sync them because its not allowed to send a config start while the client is bundeling.
If the client received one (StartConfig from server) while bundeling it disconnects.
So why doesn't it happen on bungee, as we do not handle those
coool
Does bungee receive bundled packets like that?
it doesnt have bundle packets registered i guess
i think the bytes are just forwarded
@sullen marlin do u like chicken nuggets?
i didnt asked u
CHUGGIES??? SOMEBODY SAID CHUGGIES?
but if i do the same i sometimes gat disconnected because the startconfig is between the 2 bundle delimiter packets
CHUGGIIIIES



Question, is there plans for events relating to the Crafter?
@azure zealot arent u a bungee collab?
yes
saw u on github i guess
nice
but why dont u have helper rank? impersonator? ๐คทโโ๏ธ
still same error ๐ข
stash is my biggest enemy
i dont know i just didnt got any rank
contributor != helper
collaborator*
what
hes not just contributor
i am collaborator not contributer
i saw him on collaborator members
Did you restart MySQL
still doesn't mean discord helper
i never said so
schnitzel
Snitzel
i just corrected contributor != helper to collaborator != helper
Do you like kangaroo meat?
๐
โ ๏ธ
how often does the australian fauna overthrow the australian government?
n e v e r
u must be german
i am too
I'm polish
๐
Czeลฤ
wha
please dont steal my car...
๐
Idk haven't had it very often
I'm confused
stereotypes
ok and zebra (horse with fewer cromosomes)
Have not had zebra....
nice
Do people even eat that
propbably yes
apparently so
in germany very much
yes (i am half polish)
like Romanians
privet
man, why do romanians are only known for the worst things ๐ฆ
I know a romanian plugin dev
he drives to moldova to smuggle cigars
goes to raves every night
has mad women around him but he pushes them aside and opens up intellij
lmfaooo
is someone i know?
Love some intellij at a rave
gotta open up netbeans or eclipse to get those women
What about vim
arent you netbeans main?
Yeah
why xd
Netbeans best beans
it looks like a something that my grandpa has installed on his pc from 1990
Seems like a win to me
i like my beans rare
Does everything I need and the maven integration is better than every ide out there
i tried it ones, but it was laggy for me idk
You can just open a pom.xml without making a project
Absolutely mind blowing stuff
crazy
that's cool ๐
but can you please think about my bundle packet question? xd
I don't know the answer
I don't think bungee messed with bundles, it would just pass them through
yeah
Is it your proxy or the client breaking
but i dont understand why bungee can do so, because the client normaly does not allow that a startconfig is send during a bundle
and we just send it without knowing if the client is bundeling at the moment
Why is the server sending start config in a bundle
Idk, magic
Does vanilla use bundles a lot?
some dark netty magic
yes
for very entity spawn
it sends very much of those
i am really confused
velocity also added thos bundle checks
Sounds strange that bungee doesn't have an issue but your proxy consistently does
but bungeecord somehow overpowers the minecraft client bundle checks
is there a place where you can see what all the nms methods do?
what if you didn't use maven
Idk
maven is goated
Gradle support is similar but I don't use gradle
I personally do not like maven, not a fan of xml ngl
Do you ever use ant
No, also that's xml
Ant is ancient
Fair
I wonder if it's still used by any modern java projects
Most likely by a few
I'd assume you'd see it for some legacy java 6 or java 8 project or something in a business
Yeah there's most likely a bank somewhere using ant and like java 5
Lombok:
Doesn't bt use lombok
It does
The only thing from Lombok that would be nice is @Getter and @Setter
Or something like C# properties
does "bog" ring a bell
Lombok builders are nice
nope
But there are better alternatives
pfew, i'm safe ๐
record-builder >>
kotlin >>
but it requires records so no Java 8
i thought it was themag lol
Wtf is record-builder
why is it better
how can i get an EntityPlayer from a player without invoking CraftPlayer? I have 0 experience in Reflection
wdym without invoking
well ((CraftPlayer) player).getHandle() is your only real option
that or via world
or wait, craftserver
either way, you need to interact with craftbukkit
^ You need to interact with it no matter what lol
You could maybe get the internal player list and do a uuid lookup
hmmm could i reflect everything?
hey, know how 1.21.4 changed attributes? does anyone know if the registry namespaced keys were also used or can I switch to getting that for a version independent getter for attributes (assuming attributes were already there before, I think so?)
tl;dr has this changed since, say, 1.19.4
because MAX_HEALTH has
and I can't use that anymore
(not an enum anymore)
Check the difference
yes, pretty sure it used to be generic.max_health or something
the answer is always compile the oldest version you wish to support and let the server handle the rest
can't
it errors
well it probably errors due to a number of problems to be fair
some self-inflicted
Do Spigot based servers automatically resolve that stuff?
yes
for this plugin specifically I want to support the latest features, not least of which because the resource pack format has changed quite significantly for the better in my use case
but I still want a degree of backwards compat
Ahh, api version is for that?
yes
That plugin for managing resource packs.
Did you achieve to make it do the work in config phase?
hm?
I think I'll have to rely on a conversion table
and use value of and the old enums
well let's hope that doesn't deprecate out of existence before 1.24ish
You had a plugin for managing all of your resource packs, right? So that users don't have to do everything manually.
I don't remember if I asked in your Discord but I noticed that your plugin didn't send the resource pack while in config phase but it sends while in play phase
hm yeah that's been online and working for several months
really useful
I've yet to adequately document it or announce it to the wider world but it's also just a set it and forget it thing anyway
the server should convert it for you I think
But could also fail ๐
if you're using the string methods
wdym?
get("generic.max_health") or whatever should still work on 1.21.4 and automatically convert to get("max_health")
oh
ie, you don't need a lookup table, the server has one
well yeah because an old server doesn't know what changed in a new server
ok this was probably not going to work anyway because I was going through the registry
just predict the future smh
and this wasn't in the registry before I think
If it doesn't just check what version the server is on?
Java still hasnโt added an api for that yet
should I be going through the key then?
prediction with AI ๐คฃ
yeah just ask chatgpt
lies, there's Future
nah it's our boy bogdan
guess I'll try valueOf
valueOf has diff bytecode for enums so it gives errors on older versions
iirc
I had to do some cursed shit
it should be fine to get by namespaced key if it is in a registry, which it should in 1.14+
Strange, I thought I knew all the plug-in devs lol
yeah? Name every spigot user
ok
ChatGPT needs an active internet connection.
What about Llama 3.2 1b?
Should be enought parameters and context
Md5, rad Javier, need i name more?
wow md_5
wow md_5
Does Australia even have data protection law?
How are the PWs hashed?
I knew it was sus when md_5 showed up on my discord server and told me it was time to verify my spigot account and then asked me for my legal id and social security number
he also then sent me a file called validator.pdf.exe
4th member leaked
Amazing
Wait whoโs member 69
Who even is the first member?
We know at least that he doesn't care about EU ๐คฃ
Opting Out of Third Party Cookies
If you wish to limit third party advertising cookies, you may be able to turn cookies off by visiting the following links:Your Online Choices Network Advertising Initiative Digital Advertising AllianceOpting out of any internet based advertising will only work for the browser you are currently using. Any additional browsers or devices with which you access our Platform must be opted out of separately. Some opt outs may only work if your browser accepts cookies. If you delete cookies, change your browser settings, switch browsers or computers, or use another device you may be required to opt out again.
That part isn't legal in the EU afaik. because you must opt in lol
It better be md5
But I'm not a legal expert
MD is 1st
Nice
Error is user 0
user -1
The username is "Error"
(it's steve)
the real question is who is user #1 in md_5's heart
Thatโs not Steve :(
It is
user 69 has lore
omg its elon musk
many
wonder how long till we hit integer overflow
currently looking up!
More accounts than atoms in the universe
latest member is in the right of the home page - https://www.spigotmc.org/members/skypflaume.2182236/
2m users is a lot
2182236
guess I was right, it's at least 3
Still long way from integer overflow
1/1000th of the way to 2.1 billion
what are we going to do when there's as many spigot users as people on earth?
Hi do you know the menu for spectate game mode where you can teleport to a player, is it possible to remove a player from the list so they arenโt able to teleport to them??
Spigot has 2182238 users
assimilate humanity
Oh, I am too late
I dont know the list, but I assume it's based on everyone on the tab list
I was looking it up by hand ๐คฃ
we will setup a huge civilation VII server
is civ 7 gonna be good? I think I preferred 5 to 6 tbh
I wonder how many of those 2182236 have been thanosed
I prefer 5 honestly, it's my childhood
also they got rid of army doom stacks and I hated the new way conquering cities works
At least 5
yes
a lot changed
you also used to have a button to see a render of what your city looked like
don't think that has ever returned
making roads was also hilarious
you'd end the game with basically railroads on every tile
and then gandi would nuke you
don't think that changed, has it
damn i cant post a image, was going to send a ss of the spectate teleport list
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
!verify
Usage: !verify <forums username>
!verify TillyMasters1
A private message has been sent to your SpigotMC.org account for verification!
Rip paper fork
well I fucked up
I put way too much chicken in my slow cooker
I think it's just barely too much
oh no it's magmaguy chicken day again
my man
it's been chicken day every day since february
I'm still on the same diet
Truly on a quest to single handedly offset the losses to the chicken industry brought about by vegetarians
mmmh
Jesus Christ. You think you added just a little too much?
that chicken looks raw still
I mean yeah
I should hope it's raw, it's a slow cooker and I barely just put them on
they still have at least 5 hours to go
I have faith that it will cook even filled to the brim like that
I believe in you chicken
been using it since feb and it has yet to come out raw a single time
If you tried it then it's amazing ๐
I mean I overfill it about 20% of the time
the vaccuum sealed chicken I buy comes in large doses, the amount in the slow cooker right now is just 2 bags
my other option would be to cook exactly half
and that's really annoying
Half is still like 2 meals no?
do you just make a lot of servings then put it in the freezer and reheat with microwave
Then it's not that bad
I would do that if I had a microwave honestly, can't be bothered to cook for myself every day
I rather eat freshly cooked food
Awesome ๐
but food with chicken gains flavor by the next day
thats a whole ass chicken
before I had the slow cooker
I like to condiment chicken and leave it in the fridge for a day, but not the way around
Bruh
small amount of veggies
I thought that was a mountain of candy corn
Nice
I don't like cooking in anything less than multiples of 1kg
5-6kg at a time is usually my goal
MagmaGuy don't overfill pot challenge (impossible)
I wanna try to boil a protein shake
i just air fry everything
Fancy
another peculiarity is that this ends up being so much food I have to eat every day that I gave up and now I just eat out of mixing bowls
and I'm still losing too much weight so I'm probably going to have to step it up
is this cause youre working out a lot
yeah
gotta be strong enough to lift the bar on spigot ya know
still this is absolutely nothing compared to some guys I know
I know a guy who eats almost exactly 4x more than I do
I don't know how he does it
when he gets sick for a day he drops 5kg
it's crazy
How much do you weigh?
83-84kg
185cm
is magmaguy the perfect specimen
clearly you haven't seen his beard
Is that actually him in the profile Pic?
yes he is, this question is one that is not needed to be asked. It is clear I mean have you seen him??
not only can he code very well (super talented) He is also beautiful
was going to ask a question, but I guess u guys are too busy drooling over magma
no no you can ask I guess
sorry, please ask
lol uhm
Is there a method to stop items despawning? I'm trying to create a plugin that has "shooting stars", whereby random items just suddenly fall in unloaded chunks, if possible, and keep them persistent there until picked up
declaration: package: org.bukkit.entity, interface: Item
Food is an important development
Would fit in great in Norse Mythology
Damn that's so accurate too
hey not too bad for good old one take jake
I'm playing through AC: Valhala lately and like,
that's spot on
I think heโll automatically go to Valhalla when he dies
The Hall of Odin's Champions awaits, drengr
๐
I like to have children?
can you tone it down like 3 notches
I don't think you paid attention to the message, listen to it again louder
no thanks
weird after singing holding out for a hero and making the video that didn't seem to fix my code
Anyone heere good at algorithms and can help me in refining a location perturbation algorithm, using weight distribution?
The idea of this is to calculate an ideal location to spawn a boss, or item drop, based on the distribution of players on a server. It avoids being completely random, predictable*, and doesn't simply average out a location, instead it disregards outliers.
and it's a terrible way of doing it
Why's that?
I am completely open to suggestions criticism, but I'd rather you explain :)
people don't group up in perfect grids, if you have a city with 5 players and then random individual players everywhere else in the map then your bias will be to spam those 5 players with bosses and everyone else in the server will never see them
Yeah and isn't that better than just averaging it to a location that no one can feasibly get to either?
your spawn system should be representative of player distribution, not exclusionary
that's just another terrible way of doing it
The goal is to calculate an optimal location for spawning a boss. The problem with just creating an average is, if there is any significant outlier, all the other players will be negatively affected due to having a skewed output. if the dataset was like:
X: 100,130,110,121,134,122,123,123,143,300000
Then an average location would be within the 30Ks, which is impractical to all players.
how about instead of making it impractical to everyone all the time you make it practical to someone every time
I'm all for that, but could you expand on how?
you can just pick a random player, go X distance in a radius around it, check if it's too close to any other player then just spawn the boss there
this is how minecraft basically works in the first place
I understand your point 100%. And I think it would be valid for like SMPs and stuff. But my server is inherintly spread out, no actual cities or anything.
or you can do even easier and just pick a natural spawn and replace that spawn with a boss, or add a boss to it
if the server is spread out then it would only make even more sense to have it spawn like that
if people are truly spread out and it averages out a location it might spawn 2k blocks away from anyone
can you imagine if minecraft mobs spawned like that?
no one would ever see one
not to mention that if they're consistently radially spread out from a spawn point it will average out to the center of the map, which is the spawn
at least traditionally
and traditionally also where the newest players tend to be
as in, the least well equipped to deal with a boss
speaking of, are there any rules in spigot for a resource to have such bad performance that it gets taken down due to that?
there's one that is pretty popular and is absolutely wrecking everyone, I keep getting support tickets from people using it
BetterRTP
I think it's called
yeah
it's crazy, it keeps loading chunks, leaks memory, also seems to nearly infinitely generate worlds well beyond world borders
I think in the background it is always trying to randomize locations for some reason, even if people are not actively using it
and causing chunks to load
ill read ur rant in a minute, im just slicing a mango
that's for forum staff
doubt it tbh, that's just a "give it a bad review and recommend people not use it" moment
If there were rules against being a bad developer we'd have to ban everyone
Yeah but doesn't that also exclude people?
/s
is my algorithm neccessarily bad
no
not /s
no but seriously this plugin has 114573 downloads since may 24th and it actually bricks servers consistently

choco tell ur gf to lock in
She has ADHD. She's currently going on a music video binge for some reason
well guess I'll make an alternative that isn't broken and see if I can steal their SEO or something
thats a second monitor activity
I'm so tired of tickets about this plugin
still got another monitor to code
Dude it's the top RTP plugin isnt it?
I don't know if it's the top but with this dl count I would guess yes
I have a fancy rtp plugin and I never even publicly released it
let me see if it even stil lworks
yeah it does
plops you right into an ocean
meh where it can land you can be configurable
not hard to do
I think there was even code in there to avoid worldguard regions
Essentials has RTP
yeah I thought it might
Vanilla spawn be like
Gone are the days where Minecraft always spawned you on a beach :(
Hey at least it doesnโt put you right into the ocean
It is quite dedicated to searching for a safe block
it's not that bad
Thank you for flying WorldCanon
lands you in the middle of the ocean
is this some malaysian airlines dupe?
The good news is weโll be landing immediately!
The bad news is, weโre crash landing
remember guys, measure once cut twice
I prefer eyeball it half a time and wear two circular saws as rollerblades
it's conceptually bad so I didn't get to that step
I'd read it but I'm on mobile
don't ask questions you don't want the answer to
Wait but how can you say its bad if u didnt read it?
Oh right
I dont think its that much different from doing it with radius's since it uses weights anyways
if you're unbothered to read the code, I can explain it's process.
It begins by calculating the local density for each player's location based on the number of nearby players within a defined fairness radius. Only players with significant density influence are considered, ensuring fairness in the calculation. Then calculates a weighted centroid (average position), where weights are based on the local densities of the filtered player locations. This ensures that denser clusters of players influence the spawn location more. It ensures the spawn location is within a minimum and maximum distance from the server's spawn point by adjusting the location outward or inward as necessary.
did the men in black show up in your room an neuralize your memories of my criticism of this exact system out of your brain
maybeeee
this is probably why I had you blocked to start with
If the server is spread out
Will players even be close enough for them to be inside the โfairnessโ radius
In all fairness though, I do (and did) understand your criticism, I just imagined that perhaps your criticism was the result of a lack of explanation on my behalf. As, some of the things you mentioned were addressed in my code.
I don't understand what you mean by blocking me, I dont think I have ever even had a conversation with you, so it just seems wholly unnecessary and confusing.
52 changed files, 48 of which modifications, turns out I use attributes quite a lot
well it works now
I surprisingly started using them a lot more once they added the block/hit reach and generic jump strength attributes
Is it possible to discover all recipes (for all players) without them seeing a thousand toast messages?
I think the packet that registers the recipes as being discovered, also triggers the toast message from the client side.
Can you do it before they join
question: can you access the the value of a set key in a pdc? (the 1 in this case)
pdc.set(immovableKey, PersistentDataType.INTEGER, 1);```
Get?
i wonder if it would be possible to use Array of varint on other packets, like entity position, entity metada etc ๐ค
tags?
Write only pdc
No itโs not
No because when they join it updates, from my experinece.
just kick them directly after
Has anyone figured out how to use custom armor models in 1.21.4
I can't seem to get the new format to work:
{ "layers": { "horse_body": [ { "texture": "minecraft:diamond" } ], "humanoid": [ { "predicate": { "custom_model_data": "test" }, "texture": "minecraft:iron" }, { "texture": "minecraft:diamond" } ], "humanoid_leggings": [ { "texture": "minecraft:diamond" } ] } }
For reference this doesn't work
Ask the minecraft commands discord
I want to manipulate every message sent to the chat with e.setFormat and make it clickable, but although I have tried everything, I cannot make it clickable in any way. I have been researching for 2 weeks and I have seen that papermc's chatrender feature can do this, but it doesn't work for me because it receives raw messages rather than messages manipulated by other plugins
setup an async message listener on the lowest prio and wrap the content of it on a ChatComponent
Player.spigot().sendMessage..
you cant just manipulate the message in being clickable. you have to resent a textcomponent
I think that simply sending the message to all players has huge problems with other plugins and the structure of the game. I don't think it's possible to send a message on behalf of the player
Moreover, the delay that will occur will basically increase
The delay won't create by much
but yeah modifying messages on their behalf isn't something that the game likes
you dont really have much of an option here
i would look for chatpackets, but it seems like wikivg is down
its been merged into the mc wiki
do you have a link?
@ivory sleet can you make a command ?wikivg that links to https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Main_Page please
?protocol could be more efficient
Is there an example made? I'm terrible at protocollib
?protocol
at least make it go to the protocol page then smh
shouldit it be this https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Protocol
the og protocol
?wiki and ?protocol ๐ค
lmao
have you ever worked with item durability? How can I check an item's durability? If an item's durability is 1, the item disappears from the inventory. private void decreaseDurability(ItemStack item, int amount, Player player) {
short durability = item.getDurability();
item.setDurability((short) (durability + amount));
if (durability == 1) {
player.getInventory().remove(item);
}
} this theme does not work
stop crossposting, this is the right channel
ok
Isnt durability part of meta now
use the damageable interface
int currentDurability = damageable.damage(); ?
?tryandsee
dont work guys
one second
private void decreaseDurability(ItemStack item, int amount, Player player) {
if (item.getItemMeta() instanceof Damageable damageable) {
int currentDurability = damageable.damage();
int newDurability = currentDurability + amount;
damageable.damage(newDurability);
item.setItemMeta((ItemMeta) damageable);
if (newDurability <= 0) {
item.setAmount(0);
}
}
}
this ?
nothing is happening?
Probably the wrong Damagable
guys
maybe this?
private void decreaseDurability(ItemStack item, int amount, Player player) {
if (item.getItemMeta() instanceof Damageable damageable) {
short currentDurability = item.getDurability();
int newDurability = currentDurability + amount;
damageable.damage(newDurability);
item.setItemMeta((ItemMeta) damageable);
if (newDurability >= item.getType().getMaxDurability()) {
item.setAmount(0);
}
}
}
maybe
What import do you have for Damageable at the top of the class
@EventHandler
private void onMove(PlayerMoveEvent e) {
final Player p = e.getPlayer();
if (p.getAllowFlight()) {
return;
}
ItemStack i = p.getInventory().getBoots();
effectiveDurability += 0.1;
if (effectiveDurability >= 1) {
decreaseDurability(i, 1, p);
effectiveDurability -= 1;
}
}
Above that, its either
import org.bukkit.inventory.meta.Damageable; or import org.bukkit.entity.Damageable;
a
one sec
import org.bukkit.entity.Damageable;
You want the other one
wow
erros in Intel is end
now test
private void decreaseDurability(ItemStack item, int amount, Player player) {
if (item.getItemMeta() instanceof Damageable damageable) {
int currentDurability = damageable.getDamage();
int newDurability = currentDurability + amount;
damageable.setDamage(newDurability);
item.setItemMeta((ItemMeta) damageable);
if (newDurability >= item.getType().getMaxDurability()) {
item.setAmount(0);
}
}
thanks bro
Thank Jishuna, he called it first :p
if its work
its so good
wow
its work
thanks guys
top g
@young knoll also thanks
thats another win for api class names
Can I ask questions here about plugin development
yes
no, you may not ask questions about plugin development in the plugin development channel ๐
What are the default values used for PotionEffect(PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) when calling PotionEffect(PotionEffectType type, int duration, int amplifier)?
amplifier is 0-3 depending on the level of the potion
specifically boolean ambient, boolean particles, boolean icon
ambient is probably false
๐ค
i dont know what ambient even is
Even if Iโm still developing for 1.8.9?
nope, get out ๐ ๐ช
well you are 10 years late
you can, just don't really expect many to help you
but you can still ask the question
all of them true
ambient too?
yes
why
I think my issue is more with just Java and not necessarily with a Minecraft version, since Iโm new to Java in general
?learnjava ong
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! ๐
holy flood
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
then we will be the judge of what to do xD
For the record, Bukkit is open source, you can always figure out yourself what the answer is,
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/potion/PotionEffect.java#99-101
But yes, ambient is true by default
ty
Doesn't this just send it to the player?
Okay so Iโm working on an โOverwatchโ equivalent for an ultimate that charges passively or when doing damage. I use an itemโs durability to show how far itโs charged. So far pretty much everything works. My only issue is that for some reason when it checks if charge is higher or equal to maxcharge, it always thinks itโs lower than maxcharge, even though when debugging it clearly shows itโs not. And I donโt know if this is because Iโm using the wrong values
why is getHighestBlockYAt returning a block with AIR material?
it sends some fancy components to the player
can you shoow the code for the check?
If only I was home right now ๐
uhh, can u send code?
This is not my purpose, I send it on behalf of the player
alright, well without knowing what you did it will be hard to help xD
The client won't like that
Send it as the server
I'm not sure u can make clikable text on behalf of player
But there is no such thing and I need to use protocollib. Is there still such a manipulative thing?
But is it not just as simple as
If
charge < maxCharge
return
yea, save the component and after loop over recepients of message and send the component instead, cancel the event
but we dont know how you defined and set the charges
The paper chat renderer feature seems to do this quite well, or it misleads
Then it should just work
Of course. https://paste.md-5.net/iniyiyawut.cs
I will once Iโm home
why r u getting verify block from z-1
I used three floats, an ultimateCharge to update the current charge, an ultimateMaxCharge to show what the maximum number is before itโs charged, and an ultimateChargeAdd to specify how much charge gets added every second passively.
?sendcode
I honestly don't know, but that's not the cause of the problem.
?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.
what is verifyBlock
ah
I say this because the highest block is for example at y: 70 and it is returning me at y: 80
Iโll be home in 4 hours I guess
How to get potion effect type from string? I think it has something to do with registries but idk where to go from there
declaration: package: org.bukkit, interface: Registry
and then call get on it
Vanilla effects are under the minecraft namespace you can use the static method for it
whats the dif between PotionEffectType and PotionType?
PottionEffectType is an enum
so is potiontype
you can add a potion effect to a Player with a method similar to addPotionEffect and for this you need to provide the duration, amplifier and enum
u can add PotionEffect
which is constructed from PotionEffectType
PotionType can contain multiple PotionEffects
They represent what type of potion it is
yes
If you think of it from the creative inventory
For example I can make my own PotionType that gives the effect slowness
well seems like I need PotionEffectTypes
instead
so
Registry#get(Namespaced key)
so how do I get the namespaced key again
declaration: package: org.bukkit, interface: Registry
instead of type if that's what you want
why is getHighestBlockYAt returning a block with AIR material? https://paste.md-5.net/iniyiyawut.cs
yeah I will
again you're checking the block under the highest one
NamespacedKey.fromString(inputStringHere)?
You can also just use Registry#match
into the get method
but that's not the problem because I checked that the block on top of the printed block is AIR too
imagine match is deprecated
?whereami
then report an issue, maybe its a bug, but I have never seen issues with getHighestBlockatY
What
registry.get(new NamespacedKey(NamespacedKey.MINECRAFT, input));```
does this look good
NamespacedKey.minecraft(input)
oh
if you're going to hardcode the namespace
registry.get(NamespacedKey.minecraft(input));?
Registry.EFFECT#match(input)
wait I can also Registry.EFFECT?
what's the difference
that getRegistry accepts a variable?
There are static constants for all the registries
Not a fan of the
may do so through unspecified means.
