#💻︱programming
1 messages · Page 8 of 1
very professional
Wayy too good
Thanks!
excuse me how do you get the developer badge on discord??
Pro-gramming
Get it?
Some really nice development, like OptiFire said, very professional.
Thank you!
I own a CubeCraft Brazilian server (obviously not official). I made a bot that translates the announcements into Portuguese instantly as soon as they are posted. They are translated in an announcement channel, so the translation is also instantly published to the Brazilian community that is on my server. I recently added a system where the bot can edit the translated announcement message if it is edited here as well. If it is deleted here, it will also be deleted on my server. But it only works if it is deleted/edited within a period of 30 days, so as not to overload the bot with too much information. The only downside is that the announcements are not always translated correctly. Some changelogs barely make any sense. The bot translates using Google Translate
About the custom emojis like cuberightarrow, I'm thinking of having the bot replace them with similar ones inside my server, but nothing's come off the drawing board yet. Not even sure if I'm actually going to add this
That's pretty awesome @plucky root . Have you considered using an AI model API such as GPT to do the translation, rather than google translate? Apparently it is more accurate, worth experimenting with
Yes, I did. But I ended up coming to the conclusion that it's better for me to use a service dedicated exclusively to translation, not an AI model. I'll spend some time looking for a better API
but anyways, thx for the suggestion. I'm always open to new ideas
Kinda silly. Assuming this is bot run on a vps, you cant host gpt yourselves and basically every gpt online is priced and youre going to use their API services 5 times a month is not a good idea (if this would be only use case that is)
You can look into DeepL, they most likely have an api with a free tier (with some kind of restrictions ofc)
Oh yeah deepl free tier is more than enough
I'll research about
Also I believe bots should be able to custom emojis
only if the bot is on this server
After you have translated it, you replace :name: with name:emoji_id
It seemed to work for me
i'll try
Nevermind just poopy discord code as usual
Bannable
Does it work on Java?
On java you have to use api without wrapper (because we not have one yet) but thats possilbe still, read more about that api here:
https://www.cubecraft.net/threads/bedrock-online-leaderboards-and-api-unofficial.344404/
400+ downloads already :O
@drowsy terrace You should make some links available in this channel
like github, sourcebin, npmjs
Github is pretty sure
is the wrapper unofficial, or the api unofficial?
The api
or both
Sends a bot to the server and gets all the info avaliable to the client through menus
Yes
Yes, search up cubecraft-leaderboards on github :)
Anyone has any tips for start on Python? It can be anything
The api call pricing for openai is actually fairly reasonable, I imagine with our changelog/announcements volume you wouldn’t be spending more than 10$ a month on it. Likely less than they pay for the VPS itself.
That being said there are some advantages because the models know what Minecraft is, so if the prompt to the model gives the context of what this is and relates to, and asks for it to write it in another language rather than just 1:1 translate it, the results should be pretty decent.
I found it when using it to translate its way better than google translate if you ask it to write it in the other language but not directly translate, as then it’s effectively writing the same story/message but using all of the local languages way of writing and describing things, rather than taking the English way and changing the words.
Thats one very smart way to do that
Wait i had a little break fart on the pricing part
Hi
I assume ur wrapper is just based off data in game and from leaderboards so there's no way to really get player stats etc
like for any player
That is correct
how unfortunate
If only we had /profile on cubecraft 😁
I wish
Bring back old update
This thing blocks us from so many cool stuff
System.out.print(“pleace fix the server fast”);
Output
If someone knows a package to convert bedrock packs into java or java to bedrock, please inform me here.
Oh man wasn't even remembering wrong, i knew this was asked before
There's an api on the same GitHub org
@sweet barn You made PackConverter?
parts of it yes
D:
most was based on an old javascript one tho that no longere xists
I just wanted to use it on my discord bot
write the discord bot in java 😉
Are my messages falling to deaf ears?
no, it would be better to give helpful advice rather than throwing a google link. already told you that previously, that is what this channel is for.
if you're not happy about that you don't have to participate here.
How is saying "there's an api on the same github org" not helpful?
I'm literally googling for him? Giving him options?
Do you want me to directly link the repositories? They need to do somethings on their own. Me sending a google link adds a couple clicks and scroll wheel
I just didn't inform anyone that I was need npm package ☠️
You're good no worries
(the one on their github is indeed an npm package, you'll need yarn though)
I am develop my server in minecraft
If one know how i can get the colour name like eggwars whene you are in the pink team your name is pink
You can set players nametags
Can't really tell you how/where to look, without knowing what you're making it in though :)
Hes making it in Minecraft
Is there anyway that I can change Knockback and PVP combats in my world?
Well once I did it for sumo with instant health and instant damage but it is not working anymore
just use /effect n /enchant

Well It is not giving me the results that I want
Yes
I am doing a game like egg wars it name protect the cat and there two teams i want colour the name of players to know who the team are playing on it
oh
impossible
without mods
I've tried same thing
I used Smelly Ranks
mod
i don't really remember its name
Yes i know
Unless you use scoreboard
but its not really thing u need rn
For anticheat of a server (to counter autoclickers) what would be better, cps cap or repetive click detection
cps cap honestly bc if they ina. fight they will prolly be spam clicking
alr thankjs
drag clicking is allowed tho
alot of people would get banned from going over the cap
hes likely making his own server
that would depend on how it would be implemented
if it just cancels clicks that happen less than 50ms or 100ms after the last or smth, the cheaters wouldn't really be cheating anymore
okay
What does it say?
Im saying i cant play parkour in cubecraft and why
Practice makes perfect
2nd pinned message
Guys i need help and you say practice make perfect
I dont kidding
Let's say parkour was a little bit broken after 1.19 update just a tiny bit so they closed it
You don't specify your problem enough.
It will get back online as soon as its playable
Why closed
I assume you play bedrock tho because I think you should be able to play parkour on java not sure
I literally said why 3 times
Ok
how to fix cubecraft:
shutdownJava();
true
Guys I’m programming a hamster what should I call it
Quinto
Doggo
server.stop.Java()
Catie
Hamster
illegal
yes
Hampter
Hampter
Hampter
Hampter
Hampter
Hamster
rabbit?
u meant with plugins?
also isn't it just Player.displayName(Component.text(player.getDisplayName()).color(NamedTextColor.YOUR_COLOR));
oh yo talking about bedrock ok
Minecraft commanr
Doesn't matter what ur gonna call it just dont call it hamster but after youve done programing make sure to brain wash them into thinking theyre not a hamster
Why you might ask
Cuz it's cruel
Noted 😎
What languages are best for programming stuff? Like games
Dam
I only know a bit about python lmao
Not Java haha Learn C# its the easiest to get a grasp on and has wide support for games
^ most game engines use c# or c++, but c# is a little easier to get your head around :p
Alr
the godot engine’s gdscript is somewhat similar to python as well
and with godot you can also use c#/c++/other langs once you get the hang of it and want to branch out
Isn't gdscript used for discord bots too
Hello I am making a command that checks if user has passed discord OAuth2 to continue using the bot. I need help, bot is in JS :)
How can check if user passed OAuth2
like
if(user.isAuthorized) or smth
in JS
Or I am dumb and can't normally search in google or there's no information about it 😭
No response? 😭
I have very little discord bot development experience, so I can't help you here
:(
Can you be more specific? If someone is using your bot, they're logged into discord. If you want to requests perms from their account (email/avatar/...) you can use OAuth to get them. You'll probably need to set up a little website/api for discord to respond to. I've never used it so not 100% sure. But it won't be something you can check for over the discord API.
Oh
Idk man looks like discord api to me
fetch('discord api', {
headers: {
authorization: `${tokenType} ${accessToken}`,
},
})
I cant put the actual url cuz goofy blanket ban of urls bans it
https://discord dot com/api/users/@me
Idk why y'all are saying that it is not possible to get discord data from discord api
discord oauth2
nah bro that uses some 3rd party api
I don't think that is remotely what they're trying to do
You also won't be helping or encouraging many people with that tone, which this channel is for...
have you tried using the package
npm package?
Yes
It is probably worth explaining what you're trying to do with it, rather than directly how to do it with this. You might be in need of something else, or someone here might know of a good example for the specific thing you're trying to do
Blehh i misunderstood your message my bad bro
#💻︱programming message this perhaps?
So it's a command that registers a user's Xbox account(gamertag) and adds it to data saver (mongo db in my case), to avoid people from giving gamertags that they don't own, I got an idea to make bot check xbox gamertag in their discord connections, but to make bot to get connections, user must authorize their account into my bot (Sorry I don't really know how to explain all this stuff 😭 )
I didn't know that I must go so far
But since I already started-
Its literally xbox account linking system just like cubecraft's but easier
Bot also gives a role if the gamertag they provided in the command is in any leaderboards
Soon it will be able to give vip rank roles if /profile command will be added to cubecraft, then all the work goes to FreezeEngine and Sterdy's cubecraft API
See if this helps you! https://discord.com/developers/docs/topics/oauth2
I'm on phone, but scrolling through it quickly. I think it has an example and is what you need
I've seen this page 6th time for today 😭
@tropic nymph
First today!
hey uh
does anyone know on where the create world button sound is defined in sound_definitions.json or sounds.json?
i don't have any leads to it
random.click
no not that
uh I'll send the clip
create world button sound in question
it's a different sound, with reverb and another sound layered
ok it's from OreUI
i tracked down the UI used via the language text file
but can't find the exact sound definition
Oreui is likely hardcoded.
pain
can't find it within the vanilla assets folder
the only thing i find in the ore ui is the language text files
Yeah it won't be in there
agony
OK I FOUND IT LOL
it's in the dist folder for whatever reason
assets/gui/dist/hbui
Sounds like you're breaking the game
in what way? ewe
That sound hahah
ah xd
i mean, in doom, every selection you made in the menu is literally the pistol sound
Does anyone know some good applications to code using JavaScript on MacOS? 
Webstorm / visual studio code :)
Very nice! Thank you!
Neovim 🫢
i think she's trying to say that she's a sweat
yeah she is
ahww 
I grind with phpstorm 💪
but it makes me insecure
I did actually start using nvim for non Java stuff and it is nice
I dislike the ui 😭
go away
even though you can change it
Eclipse 😭
WHATS WRONG
The first ever java tutorial I watched was in eclipse so I did not really have a choice
Have you tried github copilot already? @quiet arrow
ye
I love it
It's meh
It wrong a bit too much for me to love it
Loved it while adding debug logs though haha
@vapid mountain also loves copilot
look how amazing
I helped a friend with Java and they worked in Eclipse for school, it was not very nice to help them 😭
its whatever you're used to
#[AllowDynamicProperties] class Database
{
function __construct()
{
$this->db = new PDO('mysql:host=localhost;dbname=zf', 'root', '');
}
function getRow($sql)
{
$stmt = $this->db->query($sql);
return $stmt->fetch(PDO::FETCH_ASSOC);
}
function getRows($sql): false|array
{
$stmt = $this->db->query($sql);
return $stmt->fetchAll(PDO::FETCH_ASSOC);
}
function getCol($sql): false|array
{
$stmt = $this->db->query($sql);
return $stmt->fetchAll(PDO::FETCH_COLUMN);
}```
This is way too easy 😭
All i have to do is press on tab
I don't think I like php very much
Understandable
Meh, I'm not sure I love it, but I'd definitely rather have it than not.
It can be super cool and useful sometimes where it just knows what method you want next, but then other times it can try to predict too much and gives you like +10 lines when you only want 1.
I know I don't like php very much
I don't know why, but I have some deep hate against syntax's that use the dollar sign
It also has been hallucinating some stuff for me
Understandable 😂
but now mcfunction uses it too D:
pain 😭

i just need php for laravel
I don't like the web very much anyway, thinking about UI makes my brain hurt
I had never heard of it, so i searched it up and:
It is NOT elegant
😂😂
fair
love to do back-end, but whenever I have to do front-end, it's just terrible xD
I have a mate to do the front end for me
jealous
@sharp crystal I will have php and laravel at school this year 🤣
bro who learns php now a days
finally!!
?
This looks promising https://github.com/rivet-gg/rivet
Well, it is very easy to shoot your foot using php. It is dynamic-typed, strange at some things like even using methods without brackets and stuff
C# is much closer to me
Hi y'all, me again...
Does anyone know of a way to store a letter in JavaScript without using strings?
🥺
probably the hexidecimal representation of that letter? https://www.rapidtables.com/convert/number/ascii-to-hex.html
ASCII/Unicode text to hexadecimal string converter.
charCodes?
Thank you!
As a ratchet and clank fan, that name is ruined for me
Nahww I thought you said Racket
Would be cool if it supported running in Kubernetes, however there's an alternative that already does it 😉
https://agones.dev/
Agones is a library for hosting, running and scaling dedicated game servers on Kubernetes.
ouu
dab
Does anyone know a good way to compress images while keeping them fairly high-res?
Sorry for asking so many question but I'm working on a big project and I'm awful at coding.
Depends how much compression you want
because compressing it does take out the quality
I've used sharp and it's been pretty good. Very overkill for my usage but it worked
Only lossy compression does
yeah ik
@peak stag
Copilot is so smart
Lmao
the CB beta update is good but it kicks the player out and leave it with disconnected from the server
Who studies python right now?
I had it two years ago at school
That's pretty cool
After taking an introduction to java within 1 month, I can say programming is hard (for me)
I did pass it tho 🙂
Passing by single dimensional arrays and methods, it was easy tbh
hi im new to coding a wanna be a bedrock server developer how to learn coding or what is the right place to learn?
❤️
🥚
@vapid mountain can you help me
Hey
#📢︱announcements message
is that display entities? & potentially update to 1.20?
You don't need block displays if you can use plug-ins ;)
Nope, those are your standard dropped item entities, they've just had all their settings turned off so that they don't interact with anything, and move along a route to the player.
really, they looked like growing when they got closer to the player
Hey, sorry, I'm afraid I don't know much about coding for bedrock servers. We use a java server even on our bedrock platform, so we write everything in java using a custom fork of spigot. If you're just wanting pure bedrock, then you'll have to start learning C++.
Yeh you can make most entities glow on java, bedrock won't have that functionality I'm afraid as bedrock currently doesn't support it.
Oh sorry, you said growing, not glowing. XD
Nope, they're not being scaled. Just a trick of perspective.
was about to say that .d
but im willing to see what you guys can do with display entities
Yiss it'll be fun messing around with them.
We'll make the best programming!
🤨
@inland cove hello! how to code?? 😳
I place blocks
Wow
‘I place blocks’ - Soul
guys which programming language should I learn?
c++ prob
Depends what you wanna use it for
Hello World
it depends what do you want to do
my recomendation for beginners is: Malbolge 😈 💀
Scheme r5rs
@sharp crystal agrees
Hottest language on the planet
it looks absolutely terrible but i think it's also amazing
its still weird tho.
😆
Learn Java and the Bukkit API if you are trying to work for CubeCraft. I do not know what other networks are using.
most networks use bukkit API for plugins
For Bedrock, probably, but shouldn't claim that I know that when I haven't worked on their Bedrock networks and the Bukkit is typically used for Java servers 😆
Do you do developer commisions?
Does anyone know how to disable these "search tips" (in gray) in VSCode?
I think its this one
🫡
vscode slander not tolerated
just use all the IDEs then you can never have a problem 😉
memory hog
Intelijidea and Eclipse are W
here is a lot of server softwares
- galaxite using Dragonfly engine which is written in GO language - it's their own software
- inpvp (mineville) probably using MiNET that's language is written in C# language / for sure they used
- hive have java engine
- some servers running on pocketmine-MP written in PHP language i think because it's/was the most popular server software for bedrock and have huge amount of plugins that you can choose
- other smaller servers can use nukkit that's written in java and also have some free to use plugins
If someone is curious here is a page about bedrock server engines, active/in developmnet/discontinued
https://minecraftservers.fandom.com/wiki/Bedrock_Edition_server_software
There is one in Python LMAO
Cloudburst is under historical projects 🥲
💀
You get banned using a riptide trident. Why so? Fast movement of the trident?
that would be the "why" yeah
M
h
If i want to develop minecraft servers what language should i learn
And what else i might need for any minecraft server
If it's on minecraft bedrock, then it will be most likely C++ and JS
What about java
Java is developed in java 
😂
laravel is amazing
Probably the one pain I had was
The SQL PAIN
what why?!
squeel
fr
Same honestly.
I'm like "I make game do stuff... I no no how network stuff work..."

Facts
😂
Bruh
Anything but OOP 
True
Learn scheme
learn php xx
I will have to for school
Oop is cool
It's fub
Fun
Especially java
I rather stick with functions
I only use classes and such if they are in a library like discord.js

go gopher!!
I've tried go again, and it's been absolutely amazing. Love it very much
I really want to get into it more. I like strict typing languages
Yeahh, same
I'm still a sucker for python. But I have strict typing rules enabled and I try and use the newest features that they add for typing
Go is really easy syntax as well. Do have to write / import some very basic functions but I found I very calm to write and read
I cannot write Python without typing haha
Honestly. Wish it was the python default. Rather than the language allowing non-typing for compatibility.
I do want a union / sum type in go
But I guess they have to cater to how many billion versions they have
Python 4 when
I shudder
I don't even understand how people code without (strict) types tbh, keeps confusing me. And then your lsp is kinda useless
What would you rather, Python 4, or Python 3.14159265359
thats why they call our updates irrational
What do you think of the error handling?
The errors as type is amazing. The actual handling is a bit verbose and it'd be great to have syntax to do an early return if something errors without the explicit check
foo := try bar()
// instead of
foo, err := bar()
if err != nil {
return err
}
Something like that, but I don't really mind it. Way better than raising errors
Would also like nil checks to be at compile time. Such that you can't do dumb stuff
Yeah thats the beige flag I think for go. you have to handle errors if something might raise them. you can't really ignore them
Yeah not great hahaha
my girlfriend does golang in her software engineering work. and they have a custom linter that forbids _ for errors
oh my god php is so great
imagine remote code execution by just uploading a file and then viewing it
oh wait-
Add luckyblock egg wars
you should try laravel! its amazing
Hi
I would instead python 3 because e = π = 3 hence proved
cursed
Fr
what language is the cubecraft mods coded in
Java
bruh since when do they use mods?
lol
that makes sense
They're called plugins server side, but same thing different name 
all servers have plugins/mods
Otherwise half the servers features wouldn’t be there
Bun 1.0
package me.doggo.bridges.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class KillCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player) {
Player player = (Player) sender;
// Check if the player has permission to use the /kill command
if (player.hasPermission("bridges.kill")) {
player.setHealth(0.0); // Kill the player by setting their health to 0
player.sendMessage("§cYou have been killed!");
} else {
player.sendMessage("§cYou do not have permission to use this command.");
}
} else {
sender.sendMessage("§cOnly players can use this command.");
}
return true;
}
}
does anyone know how to do this easier?
It seems pretty straightforward to me already
@stark horizon is that python?
no hes a doggo
basically just made a theme for this website i used to play around on a lot
nope is java
You can put the cast in the instanceof 
And use early returns instead of nesting for readability but that's just preference I suppose.
If you're going to make a lot of commands I'd look for some sort of command library that parses input for you, and adds it automatically so you don't have to put it in that weird file
Ahh ye i will try to do that tomorrow
I love how that looks nothing like python
your python code is weird lookin bro I think it needs fixing
GUARD STATEMENTS 💂♀️ 💂♀️ 💂♀️ 💂♀️ 💂♀️ 💂♀️ 💪
cool
how does it work integrating the code into the game
like how do you do that?
spigot / paper does that
i’m making it for a server
no way its Andyuu
blockwars sweat smh
I am
i haven’t released it publicly yet
currently in private beta phase
Nope, would be dead really fast
Pringle tried to do that on OpFFA
Assault and Dreamer played it once i think
nobody else really did
@stark horizon omg
?
Hoi
Well kinda xd
he never really finished it
@quiet arrow hello
since our nice conversation this morning I have a question about programming
👀
might be a really clear answer but me and my classmate cant seem to figure it out
we need to split an array of numbers into seperate arrays but it's an uneven amount of numbers
so 1 array needs to be 1 longer perhaps
Euh, yeah
Can probably take slices
And the middle will be floor/ceil/round of len/2
We've managed to split an array into 2 parts when there are an even amount but uneven we haven't quite figured that out
This'll work for both
middle := math.Floor( len(array)/2)
part1 := array[:middle]
part2 := array[middle:]
tidy
I had nothing specific in mind, speudo code 
But I think it'll work in go and python kinda
so you're coding without knowing the language?
thanks alot! we applied it and works great now

now onto threads
They're all the same, just spelled differently
Syntaxed differently?
can't join these convos
barely know java and barely passed the intro
i scored 67% on mid and final
I'm coding in Java btw
k
hi kristn
hi
k
Coding is about logics, not about syntax :p
Great, but do you know, you can actually shorten codes simply based on the syntax the code has to offer?
🗿👍
Let's take an example
The ?: operator in java
Shorter than using if statements
in certain cases
Think about it. A simple and elegant code which you would love to modify as per your needs or an overcomplicated nearly machine-language code?
If you don't understand your code later on (due to its complexity) how'd you even proceed with the thing later on?
For example, when you wish to make changes to your algorithm or a part of it
Pretty sure this is just syntactic sugar, nothing else
if (a == true)
{
System.out.println("A");
}
else
{
System.out.println("B");
}
?? Or,
System.out.println((a==true)?"A":"B");
??
I don't think you understood what I meant
I'm saying they're both the same thing, one is just syntactic sugar (other, purely syntax; no actual code changes)
There are things to think about when writing in different languages, using that operator is not one of them
Now let's say, you want your algorithm to change such that when, here, (a == true) then you will print "C" instead.
Will you scroll through the entire if-else thing just to forget at the end what you wanted to do?
XD
If you have that many if else branches, you shouldn't be using if else
Maybe a switch is a better idea
Which is actually a different thing
Readability
Nah, same thing, only the purpose is different
Both provide conditions
But the type of condition and the structure changes
You can't also speak English to a machine yk, unless, a voice assistant is there
@faint knoll what is your point?
If else branches, and a switch are different things. They don't perform & behave the same. A single if else and the ternary operator are different syntax for the same stuff
My point is, in a program, both syntax and algorithm equally matter
Converting this to switch case=
switch(a)
{
case true:
System.out.println("A");
break;
case false:
System.out.println("A");
break;
default:
}
No one will ever use a switch for a boolean
Right, and that is why syntax changes with the purpose
Syntax must match with the algorithm you have
Or else your efforts would feel pointless like this
Never overcomplicate your program, keep it simple so that you understand it later on (in simple terms)
Yes, but I doubt how much the ternary operator improves readability in comparison to
else return Y;```
Oneliners are rarely the most readable
In Java for single statements we don't need braces
I hate it
Ok
I need my braces 
class Main{public static void main(String args[]) {System.out.println("Hello World!"):}}
Bruh where's the syntax preference
Ternary operators are meant to be written in single line
💀
Ok tell me one thing
Why do we use methods other than main methods?
To shorten our code? To make it simpler? Right?

There's syntax
If you didn't wanna rely on syntax and just write everything in main
There u go, only logic no syntax
And then programmer like :if it works, let it be
O and a funny meme
To wrap it up
Don't forget the semicolons in java
☺️
fesa->delete(); @quiet arrow
end;
what in the world is this supposed to do
A
Indeed
that broke my brain
Amazing
i hope you dont code like that
Now I have full control over ur bren
No I focus on syntax sometimes
That was just an example
syntax would say
Of bad syntax
(if (eq? a #t)
(display "A")
(display "B"))
if(hi) { ```
nah
that seems french
(hi)?:;
Nasty high level languages
Mine shortest I win
what lang is that in
Java
lol
l0l
yk
Good
After I am over with my primary studies I'll learn many languages
You guys already at college also we here have huge stress in school
Oh
like php
Lol
Haha
good luck with debugging divs 
Ok
I have a plan
Idk in how many years will I be knowledgeable enough
To achieve this feat
But I have an algorithm
Ig
Ooooh sorry girl, don't ever look at my code then. ♥️
I'd remove the brackets from a try-catch if I could but unfortunately java doesn't support that... yet.
If it's a simple "should the variable equal this or that" then ternary operators are fantastic, but when you start using them in casts or for objects which implement multiple similar interfaces in order to access the methods in them?
That becomes much less readable and opens you up to having to rewrite it all anyway if you ever change the inheritance of those objects.
It's better practice to keep ternary operators to simple results.
But yeh, got an 'if' which only does one thing? Yeetus deletus those brackets, or don't, either is fine but if I have to work on your code I will be removing them.
Just, whatever you do, don't put them on their own lines 🤢
That's gross and we can't be friends.
Too big 😜
I didn’t know that this channel still exists...

2am is nothing, especially for a Friday night. XD
I can't even keep my eyes open at midnight
I did play star rail with one eye till one thought 😭
You know what you should do?
Get some sleep. 😴
Went to bed at 2:30, woke up at 9:30.
7 hours sleep is plenty. DancingCrab.gif
(Pay no attention to the times I go to sleep at 4:30 and wake at 10:00 😬)
What's a 'health'? Never heard of it.
Too true :\
hell
I heard java awt is being deprecated. So my concern is, what alternative should I use instead of .addActionListener(this); for swing class buttons?
Or java will keep this thing for buttons in awt package?
Oh, and also, will the Font class in java awt stay?
Any help pls? Really need help for my school
package me.doggo.bridges.Utils;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import java.util.HashSet;
import java.util.Random;
public class TeleportUtils {
public static HashSet<Material> bad_blocks = new HashSet<>();
static{
bad_blocks.add(Material.VOID_AIR);
bad_blocks.add(Material.AIR);
}
public static Location generateLocation(Player player){
Random random = new Random();
int x = random.nextInt(100) -50;
int y = 80;
int z = random.nextInt(100) -50;
Location randomLocation = new Location(player.getWorld(), x, y, z);
while(!isLocationSave(randomLocation)){ // loop for save location
randomLocation = generateLocation(player);
}
return randomLocation;
}
public static boolean isLocationSave(Location location){
int x = location.getBlockX();
int y = location.getBlockY();
int z = location.getBlockZ();
Block block = location.getWorld().getBlockAt(x, y, z);
Block below = location.getWorld().getBlockAt(x, y -1, z);
Block above = location.getWorld().getBlockAt(x, y +1, z);
return !(bad_blocks.contains(below.getType())) || (block.getType().isSolid()) || (above.getType().isSolid());
} // Checks if location is safe
}```
does anyone know how to generate negative coordinates differently?
atm it has a range from -50 to 50 because of the -50 at the end
What do you want it's range to be?
Atm im just generating a number from 0-100 and then doing -50 after that
but there is probably an easier way to do that
Btw you can use Random class
i'm already doing that though
Ok idk any easier way to generate random numbers
All I know you gotta use some formulas:)
Any help with this?
That is the best way.
Keep in mind that 100 is exclusive, so you will never get 50 in this case.
The general function for getting random numbers in range is
random.nextInt(max - min) + min;
Question
What is better to generate a random number
Using the Math.random
Or using the import java.util.random
?
For beginners ^
Cuz I'm having trouble remembering the math.random long equation
Not like a better or worse one
its like
int r = (int) (Math.random() * (max - min) + min);
I'd use math.random
Anyone can pls tell if listeners and Font class will be deprecated in awt package or not
vs int r = random.nextInt(max-min)+min;
that's not easy to remember while writing code on paper
code on paper?!
There are Location#getBlock() & Block#getRelative
Not sure how much the function is called, but I don't think you need to remake the Random class each time
o- on paper?
yes
damn
I had a test where I had to write 3 large codes on paper
Yeah, my exam last year was also on paper
that must be terrible
It's painful
It's every year for me
And it was python, you indent python correctly on paper lol
It's useless
:-:
Same
My lsp will memorize everything for me
Duh java good
This one's neat
youll need to instantiate the Random class first
No problem
It should say @Deprecated if they will be
@lusty pagoda the Random number generators work on a pseudo random series
Not in my IDE 😦
In the class documentation
@quiet arrow In laravel
Idk what you're using, but consider switching if it doesn't do that
there's this amazing feature
Ok so which IDE you considering
Cuz mine's not showing class documentation
so does Math.random()
:)
IntelliJ
Yep
So uh the best way to get the random number series is by directly using the formula
They use to make the series
What are you using currently 👀
BlueJ

it is quite a complex one probably. There is literally no reason to do that
But it'll be the most compact method if done correctly, right lol?
ok...
Use build in functions, if they are provided to you. They'll be more efficient than anything you'll write (most likely)
Well, my pc still runs many (all) awt codes without an issue. But some of my school computers show that awt package itself will be deprecated
That's why I got confused. Ok thx anyways
Plzz
Koi cray texture pack link bhej do
Why is that vulnerable ? @bold fable
You can have an adress that serves you an actual site with html pages, but you can also have an API that returns data/...
Bcs it’s a string
There is a PASSWORD()
in sql?
Oh, so that's it, like the input part in a form filling
What the form would be calling
because this is not vulnerable at all
Nah I don't need it, or I'll find a way through
Thanks mate
Had GitHub English been easier
I suppose its only vulnerable if you're not salting your passwords when they're added to the table
this is just for website users
exactly
Don't use password() in sql btw
Ofc not
This function is deprecated in MySQL 5.7 and is removed in MySQL 8.0.
Stupid algorithm
Then why are you saying there is one ..

Anyways
im currently working on a password reset system
it's a pain
as the mail server refuses to work
Wait we can incorporate our mail into our program?
Dream come true situation
If only our school taught these
So how u gunna go w it
Haha common
@sharp crystal L muted lol image
Everything
thats the easy way
Let's try sending Google homepage
O thx
But first let's test
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
Success

🔥
that would be terrible
What subjects do you have
Agree but not agree
Computer student
Node.js 👀
I use node.js with php
Yeah so
I still need to know php 😭
Long way ahead
Php totally different syntax, <php ?>
<?php ?>```
@bold fable these are the packages i usually use for websites;
"devDependencies": {
"@headlessui/react": "^1.4.2",
"@inertiajs/react": "^1.0.0",
"@tailwindcss/forms": "^0.5.3",
"@types/node": "^18.13.0",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.10",
"@types/ziggy-js": "^1.3.2",
"@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.12",
"axios": "^1.1.2",
"laravel-vite-plugin": "^0.8.0",
"postcss": "^8.4.18",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.2.1",
"typescript": "^5.0.2",
"vite": "^4.0.0"
}```
👀
Actually (want) to do/doing cyber security so web dev no no pls haha, encryption 🙌
Good luck
ahh xD that makes sense
good luck!
But probably gonna leave that and focussing on biomedical engineering + computer ir.
That's it I'm making my own php server
if you need a mysql library
That’s basically what that cloud interfaces do haha
let me know
And that they let people use through payments?
Amazing
EA stuff
@faint knollare you actually going to learn php?
Soon™
Actually from today night
I'll start
Yeah, cuz now I am free
I secretly always find the syntax funny, as if you are asking the interpreter if this is valid php
How are your ternary operators going?
😭
npm install is-odd
.
guthib
You find computer
You find a server.jar file that suits your needs (most likely paper)
You open up your ports on the computer
Run the file with the optimal arguments
Bim bam boom a piece of cake
Oh
No you basically watch YouTube, especially those Indian tutorials
It depends if you want to make it for Java, Bedrock Edition or Crossplay
been having this for a while and still don't know how did it appear
do it in the admin terminal
what to do in admin terminal
go to that path and try it again
i am not trying to paste a command
or execute whatever program you're trying to open as administrator
^
it appears as soon as i open my laptop
hmm
look in task scheduler
hm?
search task scheduler, open it
what next?
you should see a bunch rows, yes?
look at the triggers column and if it says "when a user logs on", take a peek what it does
yeah can't find that
do you know what xmrig is?
nope
it just started appearing everytime i login
i thought it's somewhere in the files but couldn't find anything
have you installed anything lately?
not lately
the last thing i installed was epic games store, from there i got Valorant and 911 Operator
https://www.google.com/search?q=unable+to+open+xmrig.json
click the answers microsoft site, it has instrunctions
anyone wanna look into why cubecraft has been consistently laggy
I like how it looks
Bruh it said not to share 😐
I don't follow my rules
Retrieving access_token...
Hacking your discord account...
Getting your information...
😭

congrats
🔥👍
Sharing the first 20 lines of a 3 kb file should be fineee 😁
Share a 3 kb photo of your credit number
access and refresh tokens are huge even with the first characters it would take them years to brute force the rest
Btw it's been resolved sorry for replying too late
Thank you so much!
Cool
is-odd
Oh okay
axios and discord js + others
Ooo cool
A java
then just use this @minor roost
And if you wanna bedrock
BC java suck
debatable, but why did you ask for java then
why did you even ask for java then
but well, idk about bedrock
Still that, and you slap some https://geysermc.org on it
I just found my brother’s laptop from 2009 which has 4gb of ram and an intel pentium with windows 7 atm
would it be better to use an other operating system or just stick to windows 7?
Depends what you want to do with it. If you wanna give it a new life, I'd put a Linux distro on it and replace the hdd with an ssd (if it even has a hard drive, obviously)
Basic tasks like editing word documents and being online just work. Though you're not gonna have a good/easy experience with fonts...
guys I PASSED MY COLLAGE FINAL YEAR EXAM
