#dev-general
1 messages · Page 24 of 1
I wonder when the first hologram plugin will be released xD
Might be able to finish mine with that feature.
the black outline on the text won't be there anymore tho
so
idk if ppl will like it
¯_(ツ)_/¯
prob get used to it tho
what black outline?
Some people have never liked that so its kinda an improvement.
And no more dark text when the armorstand is in a block
yeah, if you can have one single background that's 10000 times better than what we have rn
you can have literally any background colour you want with any opacity you want, full ARGB
ARGB 😮
Is there a way to increase the Y for player.addPassenger(armorStand); or is there a better way to display holograms on players?
you can add entities between the player and armor stand
i think a common trick is to use invisible baby slimes
and at that point you can just get rid of the armor stands entirely and only use baby slimes
so you stack multiple to form the Y ?
yea
had a quick look at how TAB by Neznamy does their unlimited tags, they just have an armorstand being constantly teleported just above the player's head
ofcourse as a packet only, not an actual armorstand entity
bruh, since when does java not allow casting boolean to int?
or is that just a C thing
i dont think that's ever been a thing
you tend to do it in C for branch avoidance
int val = (bool) ? 1 : 0;
in java i believe its mostly boolean ? 1 : 0
I guess
casting in theory allows the cpu to not have to make a branch which is better for processor pipelining. so in C you tend to cast a boolean to int so it doesnt need to jump in code
but I guess java doesnt give you that option
quick google, int to boolean conversion cannot be done in Java without jumps or branching at the native level
java is already inefficient compared to some other languages like C afaik so i dont think this jump will matter in the grand scheme of things
Might be jitted
And if you are micro optimizing so much to the point youre removing as many branches as possible then dont use java
I mean, using ints instead of booleans is not an optimization
booleans are represented by 1b (true = 1, false = 0) while ints have 32b
It's not that easy
in cpu registers, it hardly matters - and in memory, a boolean will typically be stored as one byte
Yeah exactly
on the jvm booleans are also 32 bit
Ok
int instructions are used for booleans, but that doesn’t mean that booleans are 32bit everywhere
yeah I think it’s implementation defined
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Display.html wew, an API
looks decent
yeah it's very straightforward
thank you github for displaying this message even though I have dismissed it 5 times already LOL
made me think I don't have any 2FA enabled lmao
me playing with swing panels be like
and to think that the actual exercice was only this lmao
okay, chill, chill, I am not a pro like that
go high or go home
it's swing...
think it's almost impossible to do that without some stupid issues and lag
Hey, when I print the homeIDs the correct numbers show up, but when i use the (i) it just counts from 0 > max result?
player.sendMessage("yass?" + homeIDs);
for(int i = 0; i < homeIDs.size(); i++) {
player.sendMessage("Noe? " + String.valueOf(i));```
its the loop obviuosly, but I'm silly ignorant regarding loops. I assume the 0 can't be 0?
the table rows returned should be 2,3,4,5,6,7,8,9 and 10. but it just counts to 10.
<=
https://www.youtube.com/watch?v=H5GETOP7ivs this looks nice
=== Check out Motion Canvas ===
https://motioncanvas.io
=== Support the Channel ===
https://www.patreon.com/aarthificial
=== Livestreams on the Second Channel ===
https://www.youtube.com/aarthificial2/about
=== Wishlist Astortion on Steam ===
https://store.steampowered.com/app/1993980/Astortion/
0:00 Introduction
0:38 Signals
2:15 Layouts
3:...
https://www.youtube.com/watch?v=GEbn3nHyKnA ~8:00 to 9:00
Moral of the story: don't replace ancient code that's been there for ages 
Sources:
https://blog.cloudflare.com/incident-report-on-memory-leak-caused-by-cloudflare-parser-bug/
https://blog.cloudflare.com/quantifying-the-impact-of-cloudbleed/
https://bugs.chromium.org/p/project-zero/issues/detail?id=1139
https://asamborski.github.io/cs558_s17_blog/2017/04/08/cloudbleed.html
https://www.colm.net/open-source/ragel/
"[Clou...
Anyone sees a way to optimize this?
String input = "837123123448101";
char[] chars = input.toCharArray();
HashMap<Character, Integer> map = new HashMap<>();
long startTime = System.nanoTime();
for (Character c : chars) {
if (map.containsKey(c)) {
map.put(c, map.get(c) + 1);
} else {
map.put(c, 1);
}
}
long stopTime = System.nanoTime();
long diff = stopTime - startTime;
long diff_ms = diff / 1000000;
long diff_sec = diff_ms / 1000;
for (var entry : map.entrySet()) {
System.out.println(entry.getKey() + ": " + entry.getValue());
}
System.out.println("");
System.out.println("Total Chars: " + chars.length);
System.out.println("Time taken: " + diff_sec + "s (" + diff_ms + "ms)");
(it already can do it with 65k chars in like 10ms but you never know)
For context, random idea my math teacher suddenly had, he wants to know how many times X number comes in PI lol
so input would be PI with a max of 65k digits (limited by String)
(didn't use doubles cause they are highly limited)
well you're doing containsKey + get + put, while you only need get + put
but also, a HashMap might be limiting slow there
if it's only 0-9, just use an array
this feels like micro-optimisation but you could use an int[] instead of a HashMap
^
alternatively it might be worth investigating a parallelStream approach
but ehhh
yeah this looks fine enough xD
true
how would I use an array since I have to still store how many times it came?
in the hashmap K is the char and V is the times it came
in theory it also supports other charecters not just numbers
CHAR - '0'
map#merge btw
uh? confusion
Also had to do this to test it with more than 65k
since apparently it doesn't let you set it to more than that directly
but you can append more lol
either way 50M chars in ~600ms
took more time to append all the text than the calculating itself lmao
what does "won't work" mean
too much work
one line of code
is it?
gtg back to making my "space invaders" game
Files#readall or something
Instead of put(ch, get(ch)+1) you can use merge(ch, 1, Integer::sum)
just dont use a map at all
array seems like a decent solution. and use the character's integer value as position or something
still don't understand how you want to do that tbh
and tbf, I like that it also supports other chars
you use the character's ascii value as position. it will support all ascii characters
what would be stored in that array? that's what I am confused about...
from what I understood, you want to store all unique chars that came
for ex. in 13567, the chars 1, 3, 5, 6 and 7 came
the number of times the characters show up
yeah. at position 1 the value would be 1, 3 would be 1, 5 would be 1, etc
well not position 1. whatever 1 is in ascii
at position 49, value would be 1.
what about the positions below that?
like 0, etc?
would they simply not exist or what
they'd have the value 0 by default
wait how would I adapt this
for (int entry : numbers) {
System.out.println(entry + ": " + entry.getValue()); // this
}
``` to show also the char in "entry", since entry is now the value
the inverse of how you got from char to index
you'd probably want to use an index loop
if you want to print the character as well
since the index represents the character
yeah just did
only issue now is that the array isn't initalized
do I need to initialize one by one?
no, you start at 0
I am confused
the array is the exact same as a hashmap where index = key and value = value
I might have misunderstood what y'alls idea was
exactly
index should be the character
in this case in ascii
which 1 = 49
not 0
when you need to count a new character, you just do array[(int) char]++
then if you want to find how many of a character there are you just do array[(int) char]
if the returned value is 0, it means that character didn't show up at all
I see a c right there
fk, forgot this was java (worked with c yesterday)
And also a failure
might be acceptable for a cold jvm
xD
in my defense, got offended by my teacher, he doesn't know about programming and wanted to check with a friend of his (informatics teacher) to see if my code wouldn't have issues checking 10k characters
sooo now it checks 50M chars in about 30ms
lol
is there a reason why you're doing this in java
might as well use C for something this simple
free performance
it's what's used here in education so I decided to just go for it
I just wanted it fast af just for the memes lol
pretty sure he would've had accepted the 600ms one lol
think he thought it would take like a bunch of seconds for 10k lol
tip: don't use system.out.println for performance
use PrintWriter (so that you flush it all at once)
oh im pretty late
¯_(ツ)_/¯
it lets you flush at a custom time whereas System.out flushes every time (?)
Anyways if you're printing 50m lines then printwriter is a billion times faster
🥲 System.out flushes every print i think which is why it's so slow
wait until you find out what System.out's type is
¯_(ツ)_/¯
I'm 99% sure its faster
Wait until you find out what PrintStream/Writer do by default
it was just a guess
if you're worried about performance you wouldn't use either anyway
scanner has its own great overhead
I assume it's the best for ease + performance combined
The key component there is the BufferedWriter not the PrintWriter
BufferedReader?
oh
but thank you for your response
it didn't mention which so i didn't know
which one mattered more
System.out already is a PrintWriter, and you can't magically undo the flushing without accessing the underlying writer/stream
Scanner on the other hand uses regex for the delimiter, it's actually a fairly decent tokenizing utility, but rarely anyone ever uses it outside of hello worlds; so skipping the regex by using the stream directly with a reader is a really good move
"separate"?
like new PrintWriter(System.out).println()
is there much of a difference? or is it mostly just the bufferedreader that makes up the difference
that won't make a difference, that will still use the PrintWriter in System.out inside the "outer" PrintWriter
huh, interesting
i wonder why they put that there then
u sure theres no difference? 🥲
Many stream/writer/reader subclasses take another stream/writer/reader and it's nothing more than a delegate
it's literally just delegation
again, you won't see any improvements without accessing the underlying stream
or writing to the file descriptor directly which is essentially the same thing
That screenshot you shared is showing both sysin via Scanner and sysout, not just sysout, getting rid of the Scanner is most likely the largest difference
On my server i have items with potion effects that players can use, but the effects bypass my pvp toggle plugin, anyone know any fixes/ pvp plugins thst may fix this?
I'm hurt.


Yooo I am going to be doing an amazon cloud workshop in april pog
nice
Does Bungeecord use Spigot servers instead of paper servers?
I didn't knah sorry
I'm setting up a Bungeecord server and I am confused, what exactly is the listeners section?
Is that just where I specify how users connect to my server?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
So I'm having an issue I can't seem to resolve..
Caused by: java.lang.NumberFormatException: For input string: "death"
can someone explain to me what that means and how I debug that cause I've been looking 😂
**NumberFormatException** input **string**: "death"
You're putting a string where a number belongs.
Np
Still can't find the error, is there a good way to put my code without flooding the chat? xd
?paste
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
• HelpChat Paste - How To Use
.txt or the a text site.
Can start with the error; I'll split up and give relevant code.
https://paste.helpch.at/idocamebet.rb
https://paste.helpch.at/nupezoyuxi.kotlin code ~ let me know if you need something else or more.
The error throws when I use /home set <name> or I die, as I have a function that sets a home when you die which was recently added which may or may not cause this error. ill add that in a new paste... https://paste.helpch.at/bazitupato.java
It's the check for maxhomes function... still no clue how that's a string as it's fully integer?
Figured it out ~ public boolean maxHomes(Player player) { if(getMaxHomes(player) <= getPlayerHomeCount(player)) { return true; } return false; } was the fix.
Uhm so I am working with swing and I am making a component library (aka stuff like custom buttons, painted ones, not actual frames, they are painted in a panel), here's the thing what would be the best:
- Add a way to set a consumer of that button and on click execute that consumer
- Give the button an id and then have a class listen for the click event which then compares IDs and executes the appropriate thing
okay
that doesn't help
no, I stated two options, and asked which would be the better option
I can't do both lol
AH fk
my bad
no, I def. didn't
I am just trying to decide which way to do it
My informatics teacher told me the second would be noice but like, knowing how the school system sucks, I trust more people here than my teacher 💀
@pastel imp if u were to choose urself, which one would u choose and why
TBH, I was leaning more into the consmer one, but the thing is, a button shouldn't be the one executing stuff, it should just say a manager that it got clicked, and that manager does the rest
similar to how discord buttons work, with ids, etc
so I suppose that's what would make more sense in that sense
i mean that's basically how you abstract stuff like UI interactions, especially between remote processes, an element has an ID, you designate a callback for that ID somewhere, when the action happens, compare IDs, invoke callback
smh
Is anyone here using Chat-GPT for paper/bungee development
I find it's actually pretty decent as long as you know what you are doing
I had it write a method to color specific keywords of any provided TextComponent, and it's done so 90% accurately
And in general it's really good at explaining some parts of the API
i typically just use Github Copilot since it's specifically meant for code
and you don't have to open up the browser
Huh i have never heard of it
Is that useful in this field?
If I had to guess, it's better than GPT-3.5 but it's not as good as GPT-4
ChatGPT is designed for conversation, while it can provide seemingly useful answers at first, sometimes it spews random bullshit, because that's what it's designed for basically
GitHub Copilot on the other hand lives and breathes code, it learns from your existing codebase and new ones out there, it will use patterns and classes from your current project
it's specifically built to be your AI "Copilot" while writing code
I mean I guess best thing would be to use both
it's free if you're a student 
Huh
but paid if you're not
okay fine i'll try it
:))
Might be useful for some assignments
yeah this especially
really good if you're writing relatively ""repetitive"" code
but still really good because it can look at your project and find patterns
I genuinely have become so accustomed to using copilot
i hard struggle to do without it
and it fills in all the gaps in my memory on how to do something
:)
bad dev
yes
.
doesn't that override the tab completion of the IDE tho?
i haven't used it before so idk
nope
You can press ctrl + space to force tab complete options
i IDE Tab compelte database connector and connect, and it finishes the rest
Hey everyone
PacketTooLarge - PacketPlayOutScoreboardTeam is 2097176. Max is 2097152
Anyone can help me figure out whats wrong with my server?
Yeah, same. It's really helpful when it comes to remembering repetitive stuff instead of googling it
One of my friend's uni group mate refuses to use copilot cuz , quote "its coding style is bad"
Literally says it... your scoreboard has to many characters
It wasnt that easy
but.. it was?
Is it bad practice to generate instances of a class in a static method? And also is it fine to get user input using Scanner.nextLine etc. in a static method? I assume both are alright since they're kind of utils?
Uh what
can you show an example
broadly though static is only "bad" when it's relying on state in some way (reading or modifying)
This is the method that generates the object, but it's in danish so might not be very understandable lol
That’s probably fine
All I’ll say is you might wanna split it into small methods, potentially separating the actual logic and the input handling
static factory methods are somewhat common and also Item 1 in Effective Java
Does anyone have info about the protocolib repo being down?
Some tickets on the github, no response yet
yep
that's all I could find
probably gonna upload it to my repo in the meantime
Well incase someone needs it urgently like me, you can find it on my repo under the same group and artifact id (5.0.0-SNAPSHOT only): https://repo.kyngs.xyz/repository/maven-public/
anyone has idea why natural mobs are not spawning in any world
My Kotlin is code is just hanging on a class instantiation. Just a few variables being passed in. No init. No functions being called. Just a data class being created. No errors. Doesn't crash. It just gets stuck. The rest of the program continues to function as normal.
kotlin won't do that by itself - show code plz
val team = Team(voice!!, text!!, teamName, leader)
class Team(val voiceChannel: VoiceChannel, val textChannel: TextChannel, val name: String, val leader: User) {
I can show you more if you like. I find this very weird too. Not my first time using Kotlin, never had issues before. That class just has a few methods I’m not running on init.
if(user.wantsCodeInMarkDown)
donnot();
elsejava markdown();
Lmao
@radiant basalt wrong channel
@private Gaby TM(Chad Country); :modhammer:
Wrong access modifier
lol
Lol what
stupid
it's very silly and lame
how many you get? 4 per month?
lol no
hmm? I swear I saw that somewhere
you get two per week, but i don't know if you can accumulate them, i got started with 5
classic still a thing?
idk. it is from discord's official faq tho
that doesn't really answer if you can accumulate them
100% you can not
no, but you can keep it as long you pay the subscription
yeah but they "give you" two per week
which is why i'm asking if you can accumulate them
ig we'll find out eventually
How do you even add a "super reaction"?
ikr
it also shows up in the reaction menu thing
thats why i spend them on useless shit cause its funny
but generally its not the reason i throw money and this company
Damn i got 4 left 😭
are you on mobile?
nope, on pc
restart discord ig
Ty, that fixed it
So why are super reactions a thing???
So it's 5 super reactions per week per emote
No, it's total lol
So it's not "this", discord smh
Hold up you can react 2 of the same emojis ??
On your own message
It's a different emoji
oh yeah slightly different name
names don't matter
can't even do a super reaction per day of the week 😭
they're different IDs.
oh damn i'm already out of super reactions
More debugging, it has to do with the variables im passing in.
yeah seeing more code would be ideal
Not using !! would probably be a good start, but yes more code please ❤️
when removing items from an inventory, im not sure if doing left to right or right to left looks better
Either give a smaller/modified portion of the code which can have the issue reproduced by us, or send all relevant code
Me when !! 
Turns out it was an NPE getting swallowed by Java. It was just not throwing the error. Thanks anyways :D
Whats the alternative when you're sure something isnt null?
Even though it was in this case 💀
i hate you barry
using ?: and actually doing nullchecks
using !! is completely throwing the purpose of kotlin out the window
(most of the time at least)
I use the plugin SimpleGems.
I want to use deluxemenu with the requirement that if they have enough gems. They can buy certain stuff.
How can I do this?
i think VoiceChannel and TextChannel are jda types so they have to do that cuz its prob being returned by a java api
That’s not really a good excuse
because clearly !! can still cause problems as we’re seeing
Null checks exist though
That would throw an npe tho and they said no errors
And what would u do if the null check fails
Fails ?
When its null
It can either be null or not 
if(x == null) {
return;
}
// x is not null here
?
value ?: return 
Why would u do that if u know its not null tho? Silently failing is never a good idea
because we write in a stupid language
if a variable is marked as nullable, its nullable for a reason
But its probably from java meaning its nullness is unknown
what's the big issue of writing a null check
if you "know" it's not null, then it "won't reach" the 'return'
or if you wish you can add a log message there
System.out.println('uh oh this was not supposed to be null weewoo')
we're talking about kotlin here, a language with the purpose of sending NPEs to the shadow realm
WEE WOO
Wtf are you talking about? How can it fail if it is not null?
K 🤮 tlin

true ogs code in jython
true gigachads code in brainfuck
moolang anyone???
its failing when it is null?
and its doing nothing
thats why its silent
what are you trying to achieve
<null>!! will probably throw a big ass exception if thats what you mean
im just saying that if u think something cant be null, doing nothing when it is null is worse than throwing an exception because at least you know that ur assumption is wrong
yes
no it's not
how??
Null check and do whatever you want if it is null
!! Is prob better than just a return nullcheck
Btw
exactly
yeah I wasn't sure what he's trying to do and I don't know how kotlin works
It's still better to do like illegalstate
I guess they create the channels and they are considered null by kotlin because the methods are either @solid flaxable or the nullability is unknown so kt considers them nullable
thank you lmao
Nobody said to make it fail silently, just to do a null check, and then you can do whatever you want inside the if lol
Well
Kotlin supports Java nullability studd
Studf
Stuff
M0dii
Said return
So I continued it with that
.
👍
depends if the java code is annotated with a supported nullability annotation
At school now for me
:))
If its not annotated then u don't need!!
sch😩 😩 l
🥲
Only if it has nullable annotation
reminder if you dont want code to fail silently in kotlin, .let exists for a reason
idk i should prob stop talking cuz i havent used kt in a while lol
inline fun <T, R> T.let(block: (T) -> R): R 🤓
how does that stop smth from failing silently
its a fancy if (value != null) do something
but the receiver is non null?
a shorter less wank version of Optional#ifPresent Optional#orElse
i believe
im lying about the or else
and you can add a ?: next to it for the or else
Exceptions can get suppressed sometimes by funny things
oh lol
oooh
JDA has nullability annotations setup and Kotlin understands it well and should be handled correctly, using !! is going to cause NPE
Even when you are sure it is not null, it's always better to use the safety, for example this "sure it's not null" ended up not being so sure
i mean yeah instead of blindly doing !!, how about, you properly handle null values lol
no, the value is surely not null
it's only an accident that he got a null value there

java class name hell moment
Beautiful
You know what else is beautiful?
somehow this has not yet caused any issues in production servers
Hasn't caused any reported* issues
@mental trench i made the file auto-updater 
altho i havent tested so uh famous last words :DDDDDD
xddd
my config updates since the first release
i just decided to remove comments xd
Does anyone understand shader code? I want to update SEUS PTGI E12 to support 1.19 glow blocks.
It's been ages since I touched anything resource pack related, is it still not possible to validate a sound from a resource pack?
ie. I have a plugin config where a sound is specified as a string and it could either be vanilla or resource pack based.
afaik the server isnt aware of a sound actually existing or not and just sends a packet with a sound id so id assume not
well, aware of a sound existing in a resource pack, since vanilla sounds are predefined
great news!!! it didnt work and i wasted my entire day working on it :DDDDD
and theres no way to fix it since bukkit yml doesnt save comments in any manner :DDDDDDDDDDD
and i cant switch to another yml library cause that'd be so annoying for developers to have to learn :DDDDDDDDDDDDDD
afaik it does, in latest version of snakeyaml or something (paper i think)
bukkit uses snakeyaml
???????
i dont think so
i only see that with paper configs
bukkit config uses snakeyaml
yes
I mean i don't know about 1.3 lol but it's certainly used in the unnameable version
im using 1.11 api
it depends on the version the server is running anyway, but it'll be there in 1.11
how would i use a later version of snakeyaml that bukkit is using tho?
can i just add it to my own dependencies and call it a day (i assume no)?
no
if anything you'd have to shade + relocate + use a separate config framework rather than bukkit's
how do u deal with message placeholders?
whats that?
like "%player% said hello"
mm
so if i ran /hello, the plugin would say "srnyx said hello" in chat or something
mmm i dont get the question
i mean, that depends on the plugin
if i want it to return i replace the variables
sorry wait let me rephrase
how do u communicate the placeholders available for a message and their description inside of ur msgs file?
for the end-user to understand
for me i just do this:
hello-command: "%player% said hello" # %player%
goodbye-command: "%player% said goodbye to %target%" # %player%, %target%
```which is why i need comments
what?
ahhhhh
i get your question now lol
it would be better to ask
"how the users know which placeholders are available in a message?"
xdddd
well, easy
yeah sorry lmao im rly bad at explaining
the ancient technique
- Default messages have everything they need to know
Kill: "&6Player %killer% killed %killed% using a %armor%. (%weapon%)"
they decide to remove it or not
- additionally my default configs are on github
- really important things
have their own seection
wait is there more? cause u put a 1
Important-option:
Warning:
- "Enabling this blah blah will reset your world"
#Instead of doing it like this
Enabled: true

ah so u use a separate key as the comment (sometimes)?
only for really important things
like once or twice
but for anything else
i reply
"read default config"
my plugins are plug and play
so they dont even need to change sounds or materials
no one asked what placeholders they can use
lol
same i try to do that too but also add as much customizability possible
I make them customizable
issue is config file ends being 1000 lines
and people find it hard to translate
o sry sry i didnt mean to say that u dont make urs customizable lmao
reminder that this is what a wiki is for
exactly
wikis are annoying to maintain tho fr
tutorials are on wiki
havent touch my wikis in a long time
i make them before releasing the plugin
so no nneed to maintain unless i add something completely new
but at least they're updated knowledge on the plugin
instead of outdated config files
thats why ive been trying to make file auto-update with comments
but ig its not possible
i just dont wanna make ppl have to open up wiki pages and such
they need to
so they learn they must search
and not evething will be given to them
otherwise they come like some people here
"how to use multiverse???"
they must learn themselves
tell them to read your wikis
you wrote them for a reason
if people are so unwilling to find the information themself
they shouldnt be making servers
hot take
having a wiki also allows you to make changes to it without having to release an update of the entire plugin
i think i actually started to make wikis for all my plugins so ill just finish them (as in actually add the content)
not encouraging people to find wikis and information for themselves is how you end up with the absolute baboons in #general-plugins
i have 25 wikis (one per plugin)
pretty sure people read it
how to set material type for item in deluxemenus
im a perfectionist so all of my wikis have to have the same format 
and im not perfectionist?
i make my own banners so all of them fit
the same pattern xd
even plugin icons follow the same pattern
i suck at icons so i just match the names of the plugins, they all have alliterations
me too, but still, i guess they look "good"
wow i love ur banners, they're all the same size 😍







¯_(ツ)_/¯
o i was gonna look into discordsrv's auto-updater
cause i remember they used to have the same comment delete issue but then they magically fixed it
you were told already to waste your time in more important stuff
up to you
¯_(ツ)_/¯
ye not gonna mess with it anymore ig 
Tfw json spec doesn't support comments 😔
Jsonc moment
took me a good second to remember who scarsz was
I don't know of them
they're the discord srv dev
i knew i recognised the name but didnt know where from
Ah that makes sense
Hello super smart developers. I'm wondering if it is possible to display a box in the bottom right corner of the screen (with hotkeys so the user can remove the box) that will show some basic info I need, with other hot keys that will switch tabs basically showing different boxes with different information. That's kinda the best information I can give without giving away my project ideas lol.
I should add this box should be reachable from Papi, or other plugins, to use to display updating information about a player
You can use some texture pack tricks and shift the text of a bossbar to the right
I think they use actionbar for this, but it is the same concept
Hmm. Can I make the bar whatever shape and size I want? And display icons on it from the same texture back and display information on it from Papi placeholders?
Oh cool. I thought I'd have to have a whole plugin made. Without giving out too much information my idea is basically a skills tab in the bottom right screen, hotkeying will display other information like magic skills, skill levels, stats, etc. So I would need to hide one bar and display another when they hotkey. That's possible also?
no, you can not listen to custom hotkeys
so unless they are like Q, left/right click and other buttons used by the game, it is impossible in vanilla sadly
Think of RuneScape. I'm trying to make something similar with how they show skill levels, magic skills, prayer skills, etc.
Oh cool. I thought I'd have to have a whole plugin made.
Well, you do, I'm just saying that the text shift part and icons are handled by the texture pack, but you need the plugin in order to display the info which is then rendered to the client in the corner
Without a mod you can't send the server specific key presses.
I do not play RS
Unless you want this 'project' to be a custom plugin, id suggest to take a look at HappyHud, looks nice
Right. So I guess what I'm getting out is if someone could point my in a specific direction of someone that would be willing to help me create this, or somewhere I can learn how to do this specific thing.
Yeah it's a custom project with all custom stuff, I've spent a year working on resources, texture files, maps, all kinds of stuff. Now I'm getting ready to start building the actual server but I'm stuck lol
#minecraft would be a better channel to ask in about texture packs
I can do the texture part. I'm stuck on the plugin part. I've never made a plugin and this is so specific I'm not sure to begin learning to be able to accomplish this myself. Might have to just outsource a paid dev to make it because idk anything about coding tbh
.
Right. I can do that easy. But I still need a custom plugin to keep track of the stats and stuff anyway
Ah ofc
And idk how to make stuff like that I can code html and css that's about it. So I guess I'm looking for a developer now that won't bankrupt me 🤣
Where can one outsource a trustable non expensive plugin developer?
me, i'll write any plugin for $50/hour and then resell it on spigot for free
but genuinely if you're wanting good developer for any project
you absolutely should be paying these people their worth
but
#1080586241684291635 is probably best and saying what your rates are but if they're too low, expect to either not get request or people to react negatively
RS expert is typing...
Bottom right of the screen is very complicated with actionbar, because it is moved from the center, which means people with lower resolution will have it cut-off, most things using actionbar and bossbar need to be wary of space away from the center
A better alternative would be shifted down scoreboard and a shader to remove the actual scoreboard, this would always be on the right side, though you still would have resolution issues if you put it too far down
Example
well, sucks to play on a microwave
Yo this is funny and very sad LOL these old fuckers know nothing about technology 🤣 https://vm.tiktxk.com/ZGJ5nd6v7/
So true lmao.
Did you see the part where they grilled the guy about some harmful videos being on the platform for 41 days and then just didn't let him respond and moved on the next topic?
No, but nothing surprises me 
I swear they also haven't heard of a big screen- as they printed out a literal slide-show onto cardboard.
What? LOL
Let me get a pic.
I have the exact same mouse as well
it is the G305
from Logitech
the guy in the video shows a mouse at the end
lmao
lets say i dont have a domain currently but im hosting the project on github, what should my groupid be, cus currently its io.github.lunaiskey but im not sure if thats what its supposed to be or not
that's fine
right, just making sure
Are they just ditching companion objects? I figured that was already enough
Not ditching, but adding static as well
Biggest benefit is static extensions for Java classes
Are they not functionally equivalent? I figured if you had a companion object it would just be equivalent to everything being static to any Java impl
Pretty sure companion objects are created as singletons, which static doesn't do in java.
Well yeah but I mean like to a Java API
Like using Kt code in Java?
yea
No, it's slightly different, for example to extend a "static" function in Kotlin you need to target the companion:
fun MyClass.companion.myExtension()
Since Java classes don't have a companion you can't do it for those
If you are using Java calling kt code it'd look like MyClass.Companion.function()
Matt will likely have a better answer, but it would have to be annotated with jvmstatic to work that way I believe
Yeah, if you add jvmstatic then it would turn into MyClass.function()
Matt do be the kotlin pro here
oh I see, the Companion does exist in Java
interesting
Example
Which is funny because you can name companions
While in Kotlin it wouldn't matter the name
Interesting, if you make it jvm static, it works both ways
Huh, it creates a copy of the function inside MyClass that returns Companion.myFunc(); lol
how about you go suck an onion?
I love sucking onions
😋
On a scale from 1 to 10, how likely would you recommend Kotlin to a friend???
a solid 6
And to not a friend???
I personally don't use it but as blitz said, 6
Kotlin is pog, but decently harder to learn than java
Haven't used kotlin at all, that's why I don't like it 😎
if a friend just started out, I would def. go for java, not too easy like python but also not too hard
I actually found it easier to learn than java, and actually helped to increase my understanding of Java.
I would say java is quite in the middle
I like my comfort zone, java 😳🙏
bruh
same
even better when it's the language we do at school lmao
so I can flex the 100% tests
But its in my plans to try it out someday, just too lazy to start out setting up all the stuff
already won 35 bucks on bets with this lmao
IJ makes it super easy
I think by default there's templates for webservers with reactjs even, fair bit of work pre-done
Zod if M0dii is like me, that was just an excuse to not leave his comfort zone lol
which is understandable I think
a wise man once said "it's not the plane that defines if you win a fight, it's the pilot"
translated to nerd language, "it's not the language that defines if it's good, it's the coder"
But with the scale the project is it'd be pain in the ass to migrate
Not very wise, what if your plane is out of gas
👀
n- n- not what it meant
pretty sure it's speaking about a plane's age/model/guns/whatever
not fuel
what would fuel even be in a programming language?
🫡
im stuck, im trying to figure out how to rotate the damned display entity, I have this code right here https://paste.helpch.at/awuboroviy.java but whenever I rotate 90 degrees on the Y, it rotates unexpectedly and scales down for some reason. Using -270 gives the same angle but without the scaling issue. rotating on the z without other rotations seems to rotate on the y, backwards. And countless other issues.
Any forge devs here that can tell me if I can use mixin in my mod to edit other mods code like add an armor into my mod that modifies damage for spells of ars nouveau
While mixin can technically setup to edit a mods code in certain scenarios, that's not the ideal step to whatever you're likely attempting to do.
I would divert to the Spongepowered guild to the mixin channel so you can discuss more directly with support that will be familiar with your woes
Since they make the tool after all
oh that's nothing special, it can be done naturally, just, you can't mixin into mixin classes, because they aren't real classes, you'd need to mixin into the target or find some other workaround
Oh maybe that was it, it's been awhile. Ty for correction
yo @eager fern sorry for the ping, just curious, why do you have 8 shards on levely while only having less than 1k? It also looks like your website shows quite some incorrect stats lol
Static data
I never released the new landing page
I couldn’t bother everything is under a new recode
either way when adding your bot it says its in about 900 guilds
why 8 shards?
lol
ah gotcha
no
we have no idea what you need help with so it's next to impossible for us to help 😔
no
I would have helped you as of now and your issue would've been fixed, but since you asked without providing your problem, you won't be hearing from me again and your problem will never be fixed
hi , does anyone know if its even possible to port a flans mod pack to 1.12.2 (the pack is 1.7.10)
Anyone know how to use NMS to update the title of a gui in 1.19.3? Or is there any guide for NMS?
how do you apply for the developer role again?
you can't anymore. there used to be a channel for it
cube said he was going to remake it but idk when that's going to happen
pretty much
f
because you spammed multiple channels
I didn't know which channel to ask for help on, sorry.
Channel topics will help
still working on a prison core plugin, trying to create a decent economy is difficult and im currently headbanging cus of it :)

either some parts are too fast and easy, some parts are too slow and painful
😤
not related to PAPI but can anyone link me to an actually functional Bungeecord-Spigot bridge plugin?
What plugin?
What's the best protocol for transfering large files (2-40GB) from a windows PC to a remote server using the Powershell command line?
SFTP
hmmmm

I see you're a fan of maven
no im not
https://classroom.github.com/ tf, github classroom?
"Who breaks the pipeline is failing the class" 
send a packet to re-open the same container ID but with a different title
you might need to re-send the container data too
I wrote this, if you want to have a read
or just
Ok, ill read over this shortly. This is what i have currently i couldn't figure out another way to get the container ID.
EntityPlayer ep = ((CraftPlayer)p).getHandle();
int containerID = ep.nextContainerCounter();
String message = "test";
IChatBaseComponent chatTitle = IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + message + "\"}");
PacketPlayOutOpenWindow packet = new PacketPlayOutOpenWindow(containerID, Containers.f, chatTitle);
// Send the packet to the player
((CraftPlayer) p).getHandle().b.a(packet);```
However it doesn't actually update it.
I think the issue is with the container id as i do send the packet.
Just curious why do you do p.getHandle twice? Also is the message suppose to have a space infront of it in json?
I get the handle the first time to get the Entity player and the second for the craft player.
Im not sure about the space.
Its the same thing
Well. CraftPlayer extends EntityPlayer
Ah
but they both end up returning EntityPlayer
I changed that, the space didn't change anything. It makes it past that point, but im not sure how to confirm that the packet is sent.
since your still getHandle()ing them
if your doing Player.send(packet) yhen yeah theyre being sent
Im doing EntityPlayer.b.a() as im using the unmapped version atm.
imma assume thats the obfuscated version of PlayerEntity.connection.send() or whatever
Yeah
Doesn't spigot have TextComponent? Try using that
found a resource on the spigot website for this
public void update(Player p, String title){
EntityPlayer ep = ((CraftPlayer)p).getHandle();
IChatBaseComponent invTitle = new ChatMessage(title);
PacketPlayOutOpenWindow packet = new PacketPlayOutOpenWindow(ep.activeContainer.windowId, Containers.GENERIC_9X6, invTitle);
ep.playerConnection.sendPacket(packet);
ep.updateInventory(ep.activeContainer);
}
I think so, but the PacketPlayOutOpenWindo wants a IChatBaseComponent
this is from jun 2020 so probably a bit different
Alright, let me try updating it how he does.
That still didnt work, I think im going to try to do it a different way as I dont have a whole lot of experience with NMS
Are you actually able to change the GUI name without closing? I thought the client doesn't allow that.
I feel like iv seen it done before im not too sure. But im making a Matching game so im trying to stay away from closing/opening as it resets the cursor.
I have a gui that has "gameslots" and i thought about updating the lore of those with the timer, however i dont want that to be super intensive updating items constantly
Its an inventory. You can do everything async
so id be ok to do it that way if its all Async?
That is not true at all
Just because it doesn’t throw an exception doesn’t mean it’s safe
Anything inside the inventory is safe
Proof?
Custom inventories. Not chest or other world based containers
Yeah still, proof?
Modifying any mutable variable without locking or some other protection isn’t safe, other threads don’t always see the changes, there might be double modifications, writes might get ignored, etc
Just because it doesn’t throw an exception or immediately blow up, doesn’t mean it’s safe
In fact most concurrency issues are more insidious, they work 99% of the time but will blow up eventually and be near impossible to debug
besides you shouldn’t be doing that async anyway, it’s a fairly simple operation that doesn’t justify the multithreading overhead
In his case maybe 1 inventory with a few items. In my case hundreds of inventories, thousands of items Async is the way to go.
no it’s not
It is
if you need to update thousands of items per second that’s indicative of a larger problem
But inventory updates are not intensive operations
They don’t need to be asynchronous and by doing so you’re guaranteeing some problems later in the future
I’m curious how you think just saying “it is” is somehow invalidating all the objective reasoning I’ve given to why it’s a bad idea
nice, nice
Looks hot
When was the Namespace key introduced, was it 1.11?
More specifically, the stuff to do with resource pack sounds with the likes of packname:example.sound.name?
in minecraft? uh i think they were first introduced in like 1.6?
then in 1.7 you were able to use stuff like minecraft:stone in commands, instead of the numerical id 1
I must have gotten my words mixed up then. For example, Sound#getKey() isn't in the Spigot 1.8 but is in Spigot 1.19.
I am looking to get the full sound name and path from a string. Eg. CLICK -> random.click (in 1.8).
oh you mean on spigot lol, should've figured
I am able to get the Sound object from CLICK but cannot seem to get random.click which is what is needed to play a sound from a string.
I think it was added in 1.12, but it wasn't adopted everywhere it should have been, so there will be some places where you'll find a getKey() wasn't added until, like, 1.14 or whatever
Sound#getKey() was added in 1.16.4 💀
btw https://jd.andross.fr/tools/versions.html great site
that's another thing
I might have just had a brain-wave. I basically have theses "actions" which each have their own paired sound and I am currently storing them all in 1 big Hashmap<Action, String>. Maybe I should have a second one with just the Sound objects?
I am using String currently to support Resource pack sounds since they cannot be validated / mapped to a Sound object
I am heavily sleep deprived btw
tbh, i would keep it that way
Just the 1 HashMap?
i mean keep the sounds as a string, that's.. basically what the client receives anyway, and if this is able to run on multiple versions then they should properly search for the sound they want to use for that version (available in the minecraft fandom ofc)
The issue I have is, for atleast 1.8, I need the full path of a sound for it to play to the client.
I am only provided the Sound name such as CLICK via a config.
correct?
Sound.valueOf("CLICK") does successfully get the sound object, but there is no like getPath() method to retrieve random.click.
y'know of ShopGUIPlus (the plugin)?
An addon, yes.
However, I am directly contributing to the source code of the plugin.
...and BRC has used the enum names since day 1 in the configs.
So we're having to consider "legacy" configs here.
There's probably some internal CraftBukkit function to map between the Bukkit Sound and the key
But, like, no idea
It's 1.8, what can you expect?
I'd honestly say fuck 'em but you can't exactly fuck paying users.
certain escort businesses would disagree
Mood
You're signing up to Ivan's dodgy business model? 
ivan is a very trustworthy individual
I never said that
The voices in my head is a mood
But instead of my head it's people telling me to do stuff 😦
Hey, why i cant see the request channels?
@eager fern ?
You have been service muted
Oh for how long ?
permanent
How can I appeal
You cant for the reason you got muted for
are sounds even that used?
Apparently so
no, I mean, would be that much of a deal if you switch from bukkit names to sound keys?
me with nitro themes having those gifs ruined
yeah so you're opening with the wrong inv container id
even the community one looks pretty, uh, it looks like molten glass ngl
Or csgo's fade
Reminds me of this music video
https://www.youtube.com/watch?v=lyjgw3gczgM
Listen to the album here: https://OMAM.lnk.to/FEVERDREAMYD
►Download “Wild Roses"" here: https://OMAM.lnk.to/WildRosesYD
► Get tickets for the FEVER DREAM TOUR here: http://www.ofmonstersandmen.com/
►Exclusive Merch: https://www.ofmonstersandmenofficialmerch.com/
►Follow Of Monsters and Men Online
Instagram: https://www.instagram.com/ofmonst...
remember that time where all of them were just ass
they were all like this for a bit
I don't mind the bubblescape
Hey guys, so i figured out a way to get the gui title to update without closing/opening the gui. However the only issue now, which is the reason i did it this way, is the flash each time it updates.
This is my current code:
EntityPlayer ep = ((CraftPlayer)p).getHandle();
int containerID = ep.bU.j;
System.out.println(containerID + " container ID <-");
String message = "Time remaining: " + time + "s";
IChatBaseComponent chatTitle = IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + message + "\"}");
PacketPlayOutOpenWindow packet = new PacketPlayOutOpenWindow(containerID, Containers.f, chatTitle);
// Send the packet to the player
ep.b.a(packet);
p.updateInventory();```
I tried doing it a tick later but it still looks the same.
yeah yesterday
Ez
Hey, using PlayerMoveEvent seems like a lot of instances being called. I'm simply just checking if a hash exists but are there better ways? It's a cancel teleport if move thing. want to know if there are more resource friendly ways of doing it
id say the way your doing it more then likely is the best way of doing it
actually, you could change your teleport delay task to check the player's location, clone it and then on the next tick check it again to see if its the same
tho wouldnt the playermoveevemt only fire once oer tick?
per



