#dev-general
1 messages · Page 3 of 1
i was taught to use a scanner in HS
i'm sure there are dozens of ways each with their own usecase
yeah, that's why I'm asking. there's loads of ways. wondering if there's one that's usually recommended over all the others. I'll just use the scanner for now I guess
yml files. don't want to read them key by key. I want the actual file contents. creating a dump command for deluxemenus
just hoping there's no way for me to corrupt the files tho. bcz if that happens, people will hate me xD
well, more like hoping I Won't do it
In Java 8 you can do something like this too if you wanna use streams
try (Stream<String> stream = Files.lines(Paths.get(fileName))) {
stream.forEach(System.out::println);
}
with guava u can use smth like this:
List<String> lines = Files.readLines(new File("goofy_ahh_file.txt"), StandardCharsets.UTF_8);
lines.forEach(System.out::println);
oh wait. there's a Files class in java as well. how did I miss that? xD
there sure is 

ye combine files with buffered reader imho
there's also still Files.readAllLines like you were using lol
the java one is readAllLines
is it?
java.nio.file.Files.readAllLines
oh yeah. I imported the guava one
it uses a bufferedreader internally
D:
I use my eyes
imagine being privileged like that and then rubbing it in my ears
not like you should rely on what it uses internally, just trust the jdk devs to be smart enough to know what they're doing
:))
I saw that
good. I wanted you to see that
File#readText
Smh
(kotlin)
Anyone have experience writing authentication for an API that's not hosted on the same domain as the page it's being used on?
tldr; I can't set the JWT as a cookie on the domain that the page you access it from
since the JWT is returned on a different page
Have a callback to ur original website
#1004004211945652364 message
Wow kotlin
take the request mr. kotlin = best
And not home
Gimme darkmode
dark mode coming Soon™️
there arent any semicolons?
yes
No light mode
that's the problem
Only darkmode
Can you see any?
also maybe add multiple colors for private/public, datatypes etc
oh that’s a fun idea
I'd also add some colored boxes or something to "organize"
Idk I like regular javadocs but only if it was "more modern" and dark mode :))
Since atm it sort of looks like an article
Idk
I'm nowhere close to being a web designer
Just remember this is what javadoc used to look like https://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html
😍 the good old days
her inspiration probably 
💀
what sites do you guys use for portfolio?
mongodatabase
What's a portfolio
frosty. hi ❤️
If you mean showcasing your previous work, I use pornhub for that
link please
Ayo
what?
Also howdy
I want to learn from the best


HELLO guys
I use a plugin on Intellij called Minecraft Development to make my life significantly easier whilst coding mods, plugins etc
the lowest a mod can go is 1.12, however I would like to downgrade to 1.8
how would I about downgrading from 1.12 to 1.8?
Manually change the version, if it's forge though remember it's not supported anymore and iirc it's pretty hard to get it working for 1.8
well I manually changed it
however
its asking me for a different forgegradle version
and I cant find the version im meant to be using
nor where I could change my current version
alright I found it
but not sure whcih version im meant to use
lets be honest, chances you get support are low since 1.8 isn't supported anymore, outdated af.

at this point you can just learn java LOL
people love creating entirely new things
to avoid having to use a specific language for something it excells or is required in
truly incredible
import:
java.lang.Integer
java.lang.String
preimport:
org.blub.Blub
public skript class org.blub.Blub:
public String name = "Blub"
protected char blubSymbol = 'B'
public and static Integer[] IDs
on load:
set {_name} to new Blub().name
broadcast "%{_name}%"```
Literally java
nvm, i can;t think
I see skript, I ban
public and static Integer[] IDs
🤣
oh my that's horrid
lmao
Is there any way to detect all blocks that are added to the world? Mostly looking for blocks added by plugins.
What’s your context, or goal.
I want to cache blocks without having to loop through them every time the chunk loads
And I need to know when blocks are added right when they are
Might not be optimal but you can get the chunk snapshots and loop them async
I might have to do that if there is no other option
You could also try listening to blockupdateevent
Since nearby blocks might update
Some plugins don't to optimize
I think that includes worldedi5
ty kotlin
Lol np
Just listening to block change packet and updating the cache based on that
is this anticheat related?
No
anyways packetevents 2.0 can read chunk data packets, multi block changes, block changes, explosions (which do block changes)
Yeah I'm using packet events for it
2.0 branch
Yeah
hope you enjoy my abstraction then
bukkit based
but retrooper and I are on a mission to rewrite the entirety of minecraft
So we have a version abstract platform abstract block data implementation
it's like you are on the flattening even on 1.8 which is nice
Are you going to make a new server jar?
I would support it, but its not written in Skript so I can't
legally can't
^
Oh boy if it isn't another "minecraft server from scratch" I am sure this one won't be abandoned
it wasn't meant to be a serious project, it was meant to learn the protocol
and a way to showcase how you can write a minecraft server with packetevents 2.0 - try getting protocollib to do that
might be useful for proxy limbo plugins... or to not go insane writing cross version. But yes it's completely overkill
Oh I thought packet events was a library as a plugin
Anyone know where I can sell domains?
Anyone got any ideas/suggestions on what I should use for connecting multiple controller modules together, wirelessly is my goal, and preferably still being optimal for a battery, by controller I mean an led controller
And by connecting I mean: having them be able to send and receive a command
are they minecraft related?
Hey how to get players current cordinates, also place block, also tp player to specific world with specific cordinates and give essentials eco to player which run command
Hey, how can I check if the key exists? NamespacedKey use_key = new NamespacedKey(plugin, "Amount");
because when I update the plugin and players who got the older "item" now issues console errors since they do not have the meta obviously. but not sure how I can check if they have that key exactly
if(meta.getPersistentDataContainer().equals(use_key)) maybe? :x nope
Get the container, retrieve the value, and check if it's null
or just use #has()
Whatever floats his boat
In spigot how do you use hex? Ex in item name and lore
Could only find a video on it but can't watch one atm
why not just use MiniMessage lmao
https://www.spigotmc.org/threads/hex-color-code-translate.449748/ from a 1.2s google search
Yes it does
Oh
Chatcolor.of
I couldn't find
But thanks
Oh wait
yeah\
and it basically replaces it with the §x§a§a§F§F§0§0 format
😬
you don't pass in a full string btw
you pass in just the hex
yeah. I Can just give you the one we use in DMenus if you want
probably no the best but it works.
Nono it's alr
well xD ok then. I still done it https://paste.helpch.at/ekekuhivir.cs
I was just wondering how it was done without reflection
Oh lol
the version helper just checks if its 1.16 btw
so if you know you ain't using 1.15 or lower remove that extra check
Yep
{
// Other properties
"icon": {
"url": "https://trello.placker.com/power-up-mirror/current/img/mirror-logo.png"
}
}```
If I got this object inside another object, is there any way to tell gson to look at `icon.url` for it, instead of making a whole class with an `url` property?
Decode it to a JsonObject and use get calls
ah I wanted to deserialize the json to an object, I guess there's no other way than creating a class
easy
no as far as I know, gson requires an empty constructor and will initialize the fields based on their name / @SerializedName
Can u try adding a constructor with parameters? Since I think that's what kotlin does
but for what reason
@half harness still on holiday?
Wdym?
You dont need to create the class tho
JsonObject lets you interact with it as with a Mao
Map*
I know, but I want it as a class because is easier to deserialize the json xD
Oh 😂
class SomeClass {
@Path("icon.url")
String iconUrl;
}```
I was looking for something like this
you could use a custom type adapter for that
also, can I do something regarding to the boilerplate of an empty constructor and n methods? I guess a record won't help, right?
can someone please explain me what the difference between java double random = ThreadLocalRandom.current().nextDouble() * 100.0; random = Double.parseDouble(getDecimalFormat().format(random)); return random <= parsedChance; and
double random = ThreadLocalRandom.current().nextDouble() * 100.0;
return random <= parsedChance;``` would be? the getDecimalFormat method returns ```java
if (df != null) {
return df;
}
df = new DecimalFormat("#.##");
df.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.US));
return df;```. I'm so fucking confused.
lol, that's just a very bad way to round the number
I guess
Yep
why clip? why? 😭
u can use records but I believe gson still hasn't added support for them yet. u have to register ur own type adapter factory (aka steal one online) for them to work
😦
📉
what would be a better way to do this one tho? I know I can use string format and then parse to double, but this one also seems like a bad way to do it,
I am thinking maybe using Math.round? something like java (double) Math.round(random * 100) / 100;?
oh. I could just do /100.0
so no need to cast
you can also use nextDouble(100000) instead of the two multiplications
double multiplication? its only 1. its supposed to be 0-100. but I will do that.
if you want to round, you're having one multiplication to scale from [0, 1) to [0, 100), one multiplication from [0, 100) to [0, 10000), then the round call, then the division from [0, 10000) back to [0, 100]
oh. wait. I see. that makes sense. so we could have 0 to 10000 and then divide by 100 to get the final number.
I was confused double confused bcz you also said 100k. makes sense now. ty
yeah I'm just bad at multiplication
its alright. I'm way worse. thank you once again
having final in non-static fields is fine for gson
and you can just not define a constructor, Java creates a public no-args one for you if there is none (which is arguably not a good thing, lol)
Ah, ok
Having to declare an empty ctor would be weird too ig
Wait, not a good thing to have none or what java does?
The fact it adds one for you when you have none is a weird default thing to do
But oh well, so many defaults from 1995 have stuck around
Ah ah
would u rather have to deal with the extra boilerplate?
empty ctor tho 😷
Somebody have expierinnce with Box Server plugin?
Looking for a Custom Shopkeeper plugin
In protocolllib is it bad to have a lot of addPacketListeners? Just wondering for the future of performance.
Hey guys!
Any person knows how to display an animation when a player death?
im working with fabric
Im trying to use deluxemenus to charge xp for a purchase but how do i make it so if they dont ahve the xp they cant get it?
personally I wouldn't worry or care about the amount of packet listeners I add (unless we are talking about hundreds, but still), I think prioritizing code maintainability and readability over pseudo-optimization assumptions are the way to go
Yeah it wont pass 100 anytime soon but it might one day, which is why I was wondering if I should see if I could do something
your code might be used on the ISS one day so you should optimize it to run on a realtime system
:/s emote:
feel bad for those on the ISS the day my code gets deployed
Lil or not so lil question for all lib devs out there, so I have been designing for the past months an all-in library for all of my minecraft related future projects, but the problem is that I cant decide how should I structure the project due to that I need (or want) that it can support 3 different types of platforms: paper, fabric and forge, support for forge is planned but not in the instant goals.
I have been thinking and I believe that a structure like this could work:
Project/
core/
All the abstract providers and systems that do not require an specific type of Minecraft.
api/
Uses core's providers to access each thing, separated into 3 platform modules.
paper/
Lib's Api paper support
fabric/
Lib's Api fabric support
forge/
Lib's Api forge support
paper/
Paper support, uses core's providers to make the lib's api requests work on the fabric platform
fabric/
Fabric support, uses core's providers to make the lib's api requests work on the fabric platform
forge/
Forge support, same as above
I do know that this is a huge structure but I want to structure this project in a way that in the future I can add support to more platforms and work continuously on it without needing to rewrite or re-structure it in the future; Also the way I will be adding support to each of the platforms will be periodically, so I wont work on all of them at once.
Sorry for this wall text but this is something that has been bugging me for a while and I want to get it clear asap
thanks in advance
API and its sub projects aren't really necessary when you have a core
Isn't core usually a lib?
how would I support the different platforms though?
That'd be done by the specific platform modules you have there
Which all would implement core
lib-paper depends on lib-core
lib-forge depends on lib-core
lib-fabric depends on lib-core
my multi-platform plugin's "common" module depends on lib-core
the paper implementation of my multi-module plugin depends on lib-paper
the forge implementation of my multi-module plugin depends on lib-forge
the fabric implementation of my multi-module plugin depends on lib-fabric
what do the lib-paper modules do?
it's the paper implementation of the library API
Yeah but don't you know paper is filled with bugs? You shouldn't be using it.
so is extracting a .jar file to get the messages.properties and stick it in the folder for that plugin (this way the messages are editable and it overrides the one inside the jar) actually considered illegal? it's not code, nor is it redistributing it
how can i find a plugin's license?
it should be mentioned in its resource/github page, or ask the author otherwise
in theory every single plugin should be GNU GPL v3 because they are forced to
in practice.. that does not apply, but in a legal scenario where that actually mattered (and the plugin's license was not GNU GPL v3), you would win the case
odds are that will never ever happen
i don't see anything more than a basic disclaimer at the bottom of this plugin's spigot page
mandatory "i am not a lawyer"
theres no github
also so long as you don't actually tell anyone what you're doing, you can do whatever you want, lol
i'm just tired of all the plugins that claim to be "customizable" but then package the message.properties within the executable
Good
I need some assistance with Rich Presence - it doens't work for me at all and I have ran out of ideas what to try
What exactly doesn't work?
it doesn't appear on discord when pressing the plus button.
I have tried everything I could think of, apart from new account on a freshly installed computer, but don't want to do that
it used to work a long time ago, so probably i messed up some settings on DC, but no idea what.
Do any of you know the exact things that need to be enabled for rich presence to work correctly? probably from technical side. I am also running WARP dns if that has any effect
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.
Best intellij theme?
I personally use material's atome one dark + matt's color scheme. its pretty nice
I know a lot of people in here do the same
I use the new Dark theme with a slightly adjusted New Dark colour scheme, used to use the combo Blitz mentioned
dracula colored
Guys I think I did it, I was able to generate serialVersionUID using a plugin compiler I created!
Btw this is kotlin compiler AST dump for those not familiar with
create compiler plug-ins is extremely hard because Kotlin compiler API has basically no documentation whatsoever, or at least I found it very hard
a compiler with documentation wouldn't be a compiler
MessageAnnouncer Dev for 1.19.1
ok

Wait Matt has a color scheme???
What am I missing lol
you download it, extract it, open IntelliJ, go to Settings, go to Editor, go to Color SCheme, Press the 3 dots, and select Import Scheme (icls or jar), then select the file you downloaded and extracted.
Thanks :3
Does anyone know how much (on average) an experienced developer charges per hour?
that really depends. if they're from the west, they'll most likely charge US$25+
but you'll find that some developers from more underdeveloped countries will charge less. not always but sometimes yes
Yea 20-25
🇷🇴
crap I'm gonna go blind
hmm?
too bright
Yo sorry to disturb, any way to change the font size of the color scheme? lol, too zomed in for me, and idk why I am unable to zoom out
Settings > Editor > Color Scheme Font
IJ has like 10 different font settings, just search font or size and they'll all come up. change whatever you need
yeah. lmao
Anyone know a DEV looking for a new project?
I didn't even know its under editor and color scheme. I Just searched font, and in the first option it was linking to that one saying itsoverwritten from there
Yea same. It shows u that one isn't affecting anything and i just follow the hotlinks until i get to the right one, but once i got there i just told him the path lol
ty
Hey guys
I'm getting unmappable character (0x90) for encoding windows-1252 with IntelliJ even though I changed the encoding to UTF 8
Why is this still happening?
does anyone know how I would stop someone from interacting a bed if they right click it?
I'm trying to implement it into this
@EventHandler
public void onLeaveBed(PlayerBedLeaveEvent event) {
Player player = event.getPlayer();
if (player.isOp() == false)
player.damage(1);
player.sendMessage("§7[§3K-Events§7]§C§LSleeping is not enabled on this server!");
Might be a better question for #development
alright thank you 
Any developer will charge us rates, it is remote work in the end, so why wouldn't you
Nah. At least freelancers. They might charge lower rates bcz they can afford it
@half harness Since you like pvp stuff, have you played wool wars yet on Hypixel?
sucks
I haven't, no
iirc it was like the game in the mc tourny thing though
and tbh I don't really play much mc anymore
Isnt it just CTF?
oh. is it a new one?
I thought its the old one they had that was capture the flag yeah
Yeah it's a "copy" of our BattleBox
Lol
I mean mcc's BattleBox I guess
Lmao
Btw close beta will be this month, soon™️ so I might be able to share things very soon
Where do I find happiness again? Is there a PlayerSad event or packet I can cancel?
Don't think you can, but you can send a few PlayerDopaminePacket
That should do the trick, thanks
How can I split this in to 2 seperate lines?
<br>
oh shoot, thanks 👍
just treat JavaDoc comments as HTML, then think "how would I <do some thing> in HTML?", then you'll have your answer
uh oh sometimes javadoc has a better approach than writing html
Hey guys can i ask help for logging into my discord account here
its the one im currently speaking to you on
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.
lol ive already tried there.
okay but we're not discord
hi yes i would like one (1) discord please
we only have 2 packs
but it costs the same as a 1 pack tho
12 2 packs? or 6 2 packs which is 12 discords?
yes
ok sir. it will cost you
i have no moneys
well then get the hell out of my bed
I'm not using it. just testing it
be careful. don't step on my bag. I'll be sleeping here this night
we will leave the thermostat unlocked just for you
thank you
Anyone have a reliable method to convert 9 (for example) of one item to 1 (for example) of another but in an inventory?
like if I have 16 gold, the 16 gold in my inventory gets replaced with 1 gold block and 7 gold ingots are added to my inventory
Tried creating my own, but I keep getting dupes and it's pretty annoying to fix them
and also the same the other way, 1 gold block -> 9 gold
I also want to make it so that it if the inventory becomes full while converting (ex if half the inventory is full with gold blocks, it can only convert some), it will still convert as most as it can
use math
but my brain is too small to think of how to do that
count up the number of materials, how much space is in the inventory, and extrapolate to see how many resulting items you get
yep
😖
use math though
Maybe that's simpler than what I'm doing atm
items /9 = blocks
items % 9 = remainder
i think trying to do it iteratively and looping is a recipe for disaster
._.
lol
that would work, besides this part
yep... that's what it is right now
worked, but so far players have found 2 dupes
sounds right
💀
and now the current dupe... I can't find out why it's happening and I don't really want to debug every single thing
you forgot to clone
100%
nono what I did was make a separate inventory (array of itemstacks) and did it on that
and somehow getting dupes
oh wait
you mean cloning itemstacks
yes
umm
I will probably just do the math thing that ivan mentioned
you're subtracting the amount from the clone
yes
well
my thing is pretty complicated
which makes it also pretty difficult to debug
well, the original itemstack will still have the amount right? idk. that line shows nothing
yes but the slot will either get edited or removed
so I have had a bug previously where the slot would be modified twice
but fixed that
wait a minute your work for mcc?
MCC Island yes
Thanks for the tip.
god that's really poggers ngl matt
It's pretty fun to work on it ;p
well, congrats? only found out about it now so, late congrats? xD
Imagine having to deal with mutable item stacks lol
go on
go on
how do u change the item
do u have to set the slot again
hmmm
It's a bit finicky but means the item stacks can be used safely across concurrency barriers
mutable inventories 😕
And there's also no chance of your item stack being modified by others
Immutable inventories would be way too expensive
don't care
And also, they don't have the issues that mutable item stacks do
mutable entities!!!!
wdym?
oh ig u mean that its not used as much like this
immutable everything
The problem with mutable item stacks is that it's easy to get lost and have others modify your item stacks that you thought were safe to share
With immutable item stacks, you don't have to worry about cloning everywhere, you can have one stack and share it between a lot of things
oh
btw sort of offtopic but how did they deobfuscate it?
before the mappings were released
as a great man used to say, PR or shut up :)))
for safety concerns, I have to say this was a joke
Not sure if I would call that person a great man 
💀
yeah. we all miss chazza but unfortunately he's not amongst us anymore.
I wanted to say ||among us|| so badly
||serverworldfiles|| tho.
Are you sure? The underlying CompoundTag tag is still mutable
Not fully sure, but I believe so, the tags are immutable mutable but ItemStack's only way to set a tag returns a clone
I could be very wrong though
the tags are immutable
err, no?
I meant mutable there
Like I said I could be wrong
Yeah you're right
Uh no, if you have any question ask in the correct channel, if you're looking for discord support you're in the wrong place
Why do people do that. Don't reply to a message with something completely unrelated just so you can ping someone without just pinging them
can you DM me
what's your favourite type of cheese
Lol
I swear to god this shit literally never works properly
Hey Frosty, what theme do you use?
Dracula
Oh, i use it too, but I have never seen such popup
A corrupted file mostlikely, but I can't be asked to figure out which one
Hello
anyone remember what's the IJ registry entry for max file undo action?
no
me neither
neither
undo.documentUndoLimit
there's also another registry for undoing file changes, i.e. deleting files and making files
yesss that's the one
if that's the one you meant, undo.globalUndoLimit
emily
i'm going to show you something
;o?
this is how I answered your question
I went through my brain for about 10 seconds to see if I could remember it
I couldn't
well you aren't wrong
https://i.imgur.com/xXeVYUl.png
💀 so that's why I haven't been getting renovatebot emails recently
ok discord
plz embed
thank you
skill issue
the former is more effort, because you have to reply to questions made by confused helpers who don't understand what you're trying to ask or questions like "why don't u just google it bro" lol
i disagree
Anybody know about making a snowball in projectile form disappearing from client (invisible projectile)
Or projectile in general
I believe there's a method to make it invisible, not 100% sure tho
thank you, this is a client packet?
ty
Are you sure the bukkit object doesn’t have a set invisible property?
am I doing this incorrectly? Trying to set the fireball projectile invisible, with its entity metadata of 0x20. I can still see the fireball.
https://prnt.sc/Mv_0bU0kfcDR
Is there a packet on the client I have to change as well?
So annoying when you can't cast IntTag as int/Integer (Not asking a question)
Jake++ lmao
configurate is great
lucko's fork or the sponge one
ah the sponge one is
idk why the lucko's one coming first on search
but i am looking for something like bukkits
just need to preserve comments actually
Latest version saves comments
Hold up configurate YAML saves comments now?
If thats what bukkit uses. (I though it used simple-yaml)
Oh nvm damn
bukkit uses snakeyaml
It also uses ThreadLocals because snakeyaml is not thread safe 🤬
face with symbols over mouth
???
🤬
why are java devs addicted to making random things stateful
why does a yaml parser and number formatter need state
what are states?
mutable variables
actually thats not even true
it's presumably not thread-safe because it has global state
which is dumb
it's so fucking stupid
state itself is safe as long as it's constrained properly
in a single thread 
Single threaded environments are the only real-world environments anyway
Nothing is multi-threaded at all
(this is a joke)
if you live in the 1990's it isn't
I'm living in 2022
why
not sure
i was born in the wrong generation
kids these days dont appreciate "the beatles" and "skrillex"
Who
Asked
final moment
it's not state if it's final
USA soon to dissolve
thank god
thank simon
https://www.gnu.org/licenses/gpl-faq.en.html#OOPLang
dunno who needs to see this but i guess this solidifies the "plugins aren't GPL" thing
tee hee
omw to sue premium plugin devs
so what should we use after all?
well the point is that technically all you can use is GPL
or a GPL derivative
since subclassing JavaPlugin is making a derivative
yeah i dont necessarily agree
but threatening legal action on the loser premium plugin devs could be funny
LGPL relieved
You’ll need a bukkit dev or someone who has a GPL dependency
not necessarily
Yes, you will, it’s not your copyright to enforce
For all you know, the plugin dev got permission from every dev to not follow GPL
that's correct
Sadly I think effort would just be wasted
this is not - under the GPL license, plugins are part of the main program (bukkit) and so you can't give permission - if you use bukkit code, it must be under GPL
Spigot is hosted on DMCA ignored servers
and therefore you must provide the source to any consumers on request
So you’ll need real legal action to do anything, costing 5 figures for what? Getting another website to do the exact same thing?
If the main program and the plugins are a single combined program then this means you must license the plug-in under the GPL or a GPL-compatible free software license and distribute it with source code in a GPL-compliant way. A main program that is separate from its plug-ins makes no requirements for the plug-ins.
oh i'm not going to actually do it, i'm just saying it would be funny to make hollow threats
They get enough of those
however i could make a legitimate case for getting the source code if i had bought the plugin
It won’t work
paid anticheat devs would never (or would probably not) release their source code 💀
I’ve tried it with LiteBans and the author told me GPL doesn’t apply because he doesn’t shade bukkit
well then he is wrong
Tell him he lacks chunks of brain
GPL applies if you're extending any bukkit classes
Btw if java for example was GPL
would that mean every java app would have to be open source
since that would be quite interesting
I’ve tried cracking Litebans and it’s very difficult
wdym cracking?
afaik GPL doesn't require open source necessarily, but you must provide the source code to a buyer if they request it
oh
I don’t trust DRM systems when I buy plugins
So I usually remove DRM on my own plugins I’ve bought before running in production
One less point of failure
Oh like if it makes it so that only 3 servers can have the plugin?
Such as when their auth servers have downtime or go down
Your server can still use the plugin
At least Spigot doesn't allow DRM that uses license servers iirc
Spigot requires the plugin to function even if their DRM is down.
premium plugins have to work offline is the point
Basically, if the plugin can function with no internet connection and if your DRM is down for some reason, you can have any DRM.
not that spigot actually enforce that
The GNU GPL demands that as soon as you distribute GPL licensed software in executable format you make available the "complete corresponding source code". The GNU GPL also
so whether it's free or paid you have to make source available to anyone with a jarfile
Technically not everyone
what that does mean is that you don't have to give source to non-buyers
Just the person you got it from
Meaning that piracy site is illegal if the uploaded also doesn’t give source to downloaders
yeah
any distribution
what GPL also allows you to do is resell the software which is amusing
I like this
I don’t like the right to redistribute the sources provided though
joining this whole GPL license thing, wouldn't making your plugin OS solve the issue?
and if you wanna go with Premium, then just go Freemium lol
+1 and also resell
yes it would
but people could resell it which is an issue for Freemium plugins
yeah im not saying GPL is necessarily a good thing
it does have some flaws
some quite big ones
however it allows me to hypothetically make threatening emails to premium plugin devs which is fun
so what license would serve a Freemium software better?
Usually it’s just GPL, large sites don’t just let you resell plugins
that would actually be a net positive for everyone basically, but GPL is much too far of a step and much too harsh of a license imo
MIT gang 4 lyfe
mit would also permit reselling lol
but i guess with MIT you could change the license
not that it's gonna matter anyway, this is all hypothetical since none of us can afford a lawyer
just become your own lawyer smh. stupid devs always depending on "lawyer," i implemented it myself many times
Sus
smiling face with tear

I am so confused rn
about which license if technically the best for freemium
but whatever
I suppose I won't try to understand it
There isn't 1 right answer
even more confusion
Also worth noting that "No license" is still a license, and that license is "All rights reserved"
choosing a license is entirely up to u
MIT = people can close source your code
GPL = people can’t but they can redistribute and sell
what's an in the middle one
Not publishing it
bruh
What exactly are you looking for from a license?
can you redistribute and sell with MIT?
Yes
Yeah
ah
Open source but can't redistribute nor sell lol
Redistribute, close source, and sell
Then closed source?
That’s why companies love MIT
that's what I want
btw, if it's closed source, would anyone even know that your open source project was used in the closed source product?
People decompiling it
but aren't comments removed?
Similar bugs is a good indicator
on decompilation
oh
but there's no requirement to give credit?
besides the comment block at the top
Oh, MIT requires giving credit
it's usually (afaik) done by having a comment block at the top, but if it's compiled then how would anyone know?
or does it have to be in like a text document in the jar or something
Discord has a nice open source libraries credit somewhere
oh
the point is that the purchase is for support
Acknowledgements in settings
they already have the code, it doesn't really matter if someone else takes it and does whatever
freemium is that you pay for support
and for those that don't read the description (ex citizens) :)))
That's not to stop any community from just offering free support at the same time either, though obviously the level of support you need might warrant first-party support.
I mean yeah but GPL won't protect you from other people offering free support either lol
Things I didn't say
any reason why the interception of this packet wont work for me? shooting an arrow for testing. getProjectile returns the arrow entity.
https://hastebin.com/etovulegem.csharp
invisiblity is the goal : )
Are you sure you can make non-living entities invisible?
I see the a reference to isVisible() in LivingEntityRenderer but not where it renders arrows
f3 + b might show if it's rendering despite being invisible, if it has a hitbox then it's visible
You could also use MCP-reborn to debug this
Oh, perhaps not. That also might explain why LivingEntity has a set invisible method
It's weird... Entity most definitely has the metadata
did you try splashing potion of invisibility on arrows?
No, I was stubborn on getting the entity meta thing to work
I’ll probably try that next when I’m home
since when did I opt into the technical preview
or wait
is my copilot access gonna get revoked?
wasnt it permanent
I just googled
they changed the licensing stuff since it's no longer in closed beta
now, it's paid unless you're a student
💀 I'm guessing you aren't a student
or have a lot of stars
indeed
he L0st all his stars :(
breh
I have not done anything at all thats public
but finally I'm settling in a full minecraft lib and a mod
on the plugin I'm currently maintaining haha

i am using one month free for now

labels are pure evil
nah
the more the better
what do labels do
They aren't very used but is nice to have such feature I guess xD
most clean code fanatics probably loathe the idea of labels
since nesting loops in the first place is considered bad
Wrong
Nesting loops is fine in some situations
I mean in many cases it's just unavoidable
Indeed, if you can avoid it, why wouldn't you tho
But if you can't ¯_(ツ)_/¯
there are a lot of things that are considered bad practice but sometimes just are the only viable solution
It's called people not realising that programming is a flavour of engineering, it isn't supposed to be nice but to work in the constraints you put (maintainability, efficiency, performance, cost, whatever)
I see this issue with students and people just learning programming.
It should be nice in a sense of readability
That's why most programs are fucked when it comes to maintability, cause the code was rushed and noone knows what anything does anymore
my code is self documenting 
you named the constraints which are the roots of recommendations about good/bad practice :)
Thats the fun part
Let me give you a proper example in a "startup business" situation. 90% of startups fail, often because of bad fundamentals, drainage of funds and eventual bankruptcy, or the business not panning out as profitable as the founders or shareholders expected and them bailing out.
As a startup, one of the essential starting points for your product is creating a MVP. That is a product that does the bare minimum to satisfy your project, with the least possible cost, so you can launch with it, and see if clients bite. If they do, keep working on it. If they don't, stop working on it.
More times than not, the MVP is trash code, because making it efficient would mean time spent in not cutting corners, redoing major parts when some idea changes as part of normal startup development, etc
So it's a good idea actually to do "trash code" in an MVP, if this can save you a large amount of money, which is often the case if you do skip on some good practices
Now, it's obvious in the future that will bite you in the arse, but at that point your client base should be enough to pull investors willing to put their money for you to build a good product
At that point, scalability matters since you've already tested out if your product is worth developing further on, and you want a good foundation to build your business upon
Obviously everything matters on the financial situation, the strategic interest of the company (startup, growup, established), and the resources the company can leverage
Businesses do the best of what they have, or at least they try to
Businesses do the best of what they have, or at least they try to
Yeah in 90% of cases that ain't true
But yea I get what you're saying
They try to, they may not always do a good job in it
But idea is, people generally only focus on growdth when it's worth it
There are many businesses that did a great product and realized they have f all clients when they eventually release after millions in expenditure
oh yes, the "I don't have time to care about my work" argument
I think that's a fair point.
if the difference is between code that comes out on time and functions or is late and doesn't function there's a clear choice.
The downside is obviously that fixing bad code can be harder once it's in production, then you get into the rut of legacy debt a la bad code that might be difficult or not possible to rewrite properly.
if only MVPs were about keeping it minimal rather than rushing everything to a huge product no matter what
relieved
Most Valuable Product
when cant you avoid nesting loops
for x y z
i feel like ive never seen nesting not be avoidable
you can make 3 methods and pass them in as params
instead of nesting
that's just moving the issue around so they aren't visibly nested, they still are
well yeah
the whole point is to not visibly nest imo
so you have more readable code
I would argue splitting them into separate functions that all they do is call the other function inside a loop makes it less clear
But hey to each their own
just write one loop and do some modulo fiddling to extract the x y z components
true...
based
imo, clean as shit
public void remove(final World world) {
manage((x, y, z) -> {
final Block block = world.getBlockAt(x, y, z);
if (block.getType() != this.material) {
return;
}
block.setType(Material.AIR);
});
}
private void manage(final TriConsumer<Integer, Integer, Integer> logic) {
for (int x = (int) this.boundingBox.getMinX(); x <= this.boundingBox.getMaxX(); x++) {
for (int y = (int) this.boundingBox.getMinY(); y <= this.boundingBox.getMaxY(); y++) {
for (int z = (int) this.boundingBox.getMinZ(); z <= this.boundingBox.getMaxZ(); z++) {
logic.accept(x, y, z);
}
}
}
}
nested loops 😔
:(
lemme get my laptop
Ivan I don't know what you think but I don't think this
void setBlocks(World world, BlockData data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
for (int x = minX; x < maxX; x++) {
setBlocksInX(world, data, x, minY, minZ, maxY, maxZ);
}
}
void setBlocksInX(World world, BlockData data, int x, int minY, int minZ, int maxY, int maxZ) {
for (int y = minY; y < maxY; y++) {
setBlocksInXY(world, data, x, y, minZ, maxZ);
}
}
void setBlocksInXY(World world, BlockData data, int x, int y, int minZ, int maxZ) {
for (int z = minZ; z < maxZ; z++) {
setBlock(world, data, x, y, z);
}
}
void setBlock(World world, BlockData data, int x, int y, int z) {
world.getBlock(x, y, z).setBlockData(data);
}
is any more readable, clean and/or maintainable or even just practical than this in any way, if anything I find it less understandable
void setBlocks(World world, BlockData data, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
for (int x = minX; x < maxX; x++) {
for (int y = minY; y < maxY; y++) {
for (int z = minZ; z < maxZ; z++) {
world.getBlock(x, y, z).setBlockData(data);
}
}
}
}
public void remove(final World world) {
manage((x, y, z) -> {
final Block block = world.getBlockAt(x, y, z);
if (block.getType() != this.material)
return;
block.setType(Material.AIR);
});
}
private void manage(final TriConsumer<Integer, Integer, Integer> logic) {
for (int x = (int) this.boundingBox.getMinX(); x <= this.boundingBox.getMaxX(); x++)
manageWithX(logic, x);
}
private void manageWithX(final TriConsumer<Integer, Integer, Integer> logic, int x) {
for (int y = (int) this.boundingBox.getMinY(); y <= this.boundingBox.getMaxY(); y++)
manageWithXY(logic, x, y);
}
private void manageWithXY(final TriConsumer<Integer, Integer, Integer> logic, int x, int y){
for (int z = (int) this.boundingBox.getMinZ(); z <= this.boundingBox.getMaxZ(); z++)
logic.accept(x, y, z);
}
Absolute madlads
i think with enough thought into the naming scheme this could be much better than a bunch of loops
brb
you are still nesting for loops but moving it around and pretend it isn't there and call it "clean" and "maintainable"
it's garbage
it's more layers of indirection you need to follow and keep in mind
[(x, y, z) | x <- [minX..maxX], y <- [minY..maxY], z <- [minZ..maxZ]]
Relieved
Any volunteers to shoot him in the knee?
o/
Too powerful to be left alive
😌
I'd argue there's a difference between three nested loops that make sense because you're dealing with actual dimensions of something or three nested loops that just do totally different things
well you see they do perform three different tasks, one sets an entire volume, the other sets a whole plane, the other sets a whole line and the other sets a point 
it's super maintainable, SRP and what have you!!
stop right there
why is it null if I specifically tell it that it should return that
what the fuck is that function below
it's a test
doesn't make it any less cursed
I didnt invent it
so yeah, if anyone knows what the fuck is the solution to this, let me know
other tests work correctly
i think its groovy spock specifications to be exact
still gRoOvY
=
!=
not=
what
Problem is windows eating almost 50% of my shit
Consider not using Windows
I am dualbooting windoesn't from now on
ngl that is an absolute beauty
based
Okay I need to speak out about this
Why do all custom uis look so FUCKING corporate
Like think of something actually stylized instead of copying everyone else's big head blocky style
Like if you're gonna make uis even if ur not good at pixel art bad looking pixel art still has more potential than this corporate art style
UIs aren’t just art
They are
In their own way
There are people who design uis for a living
Oh shit I misread
Well yeah they need other functions as well but you don't see CSGO or league or even Minecraft have that type of ui. Sure it's poppy and maybe I'm the only one with this opinion but it's tiring seeing the same shit everywhere
Yeah i've thought this too
I saw mineclub do it and thought it looked cool but I feel like i see it everywhere now
I don't even know if mineclub was the first to do it, probably not
it definitely feels very reminiscent of a corporate art style
Luckily the bigger servers are working on/have their own style
Smaller servers tend to commission UIs that look like mineclub’s or just yoink the guis
new badge for bots, wot
Old news.
I just noticed ¯_(ツ)_/¯
what? where?
its new news for me
never seen that
oh its a badge duh
best algorithm in existence
https://cdn.discordapp.com/attachments/596064215505305650/1007172746108747917/we_do_a_little_sorting.mp4
um I can't remember but do you have to do some extra steps for IJ annotations to work?
Or are they only for IDE warnings and have no effect on the jar
ah there we go nope
Thought you had streamlabs open for a sec xD
What was wrong with that?
I think jetbrains annotations are just for the IDE
Wouldn't make sense to be anything else
Yes, they are for static analysis tools only
I need something to actually add these assertions (@NotNull, @Range etc)
During compile time or runtime?
runtime
not possible without a compiler plugin that adds such assertions in your code
I see
\
Might be worth looking into checker framework
Yeah but that is compile time purely, no?
I thought that one added runtime checks
No idea, never seen that being a thing honestly lol
lombok (🤮) does that, but I don't think checker framework messes with the AST that much
Anyone have a repo of deluxechat's api?
no. but I have a repo of deluxechat
there's only a few events really. not much else
Unless there's a way to add code to a project without making it compile into the jar
DeluxeGFYEvent
just seeing if someone has a jar or maven repo for it already
I might be wrong but clip has a maven repo for it
I might be wrong but clip has a maven repo for it
yes
Oh
i found a github repo
🥲
yea
from 2015
still seemed to have the api that i needed tho
link please
dont know who markozmc is
¯_(ツ)_/¯
Does anyone know if it's possible to apply a glow to a placed block based on where the player's cursor is looking?
with particles probably yes

