#dev-general
1 messages · Page 597 of 1
yeah yeah
but how is it posible to add the numbers dinamically?
without replacing tons of characters
those are just numbers. you can use fonts to move text to the right/left or top/bottom
@static zealot ez 314377521963466762
dm barry
so hes probably just using some custom characters to move the entire numbers down and right
id doesn't even work. lol xD
I mean it only makes sense, you can use the API however you want
Have you learned NOTHING about GOOD DESIGN?!?
I'll have to teach you myself
lmao
anybody can help me please?
Im stuck on creating custom commands using playercommandpreprocessor event
I wanna do command can change in config.yml file
Looks pretty cool, time to add it to the benchmark? 
lol
Is there somebody that can help me with the earth map?
@boreal needle everything is explained in depth in the wiki but I can walk you through it if you’re confused
YESS
FINALLLLYYY_ _ _ _
now i have to handle ping/pong and close stuff
atm its assuming client & server are always online
and client and server never goes offline
(and if it goes offline it throws a bunch of errors)
Nice job
tbh i love that ui, very minamilistic and cool...
websockets?
😮
yes
no toasters prob
nice!
fast connection
what's it written in?
web? or installed
the client
its a desktop app
okay
ohhh fancy
very minamilistic
hmm
idk if that means that i should keep it simple like that 🥲
lol
im trying to make it not too discord-like
but i like the blue color scheme
🥺
lol
ChatChat!
HelpHelp!
ChatHelp!
👀
DBCord?
XD
exactly
someday I plan to make a live chat client/server :p
😮
stealing my idea 😠 /s
reddit live comments?
idk what that is
sure kinda like that
I kinda made a version of that for a meme website for one of my teachers like a year ago
that was alot of fun
kinda live comments
took me like hours to find a good design xD
1 sec
lemme show u my sketch
lol how many times r u gonna reply to that message???
someone might as well pin it at this point 4 u
lol
i sorta like how jetbrains compose uses design in objects and stuff instead of css
but at the same time i dislike it
since its so hard to find out how to design something that isn't obvious
and sometimes just doesn't have the feature
ex border-radius = clipping to a rounded-cornered shape
no i mean
css is border-radius
but in compose
its Modifier.clip(RoundedCornerShape(10.dp))
imo overall its a lot more readable than css
¯_(ツ)_/¯
(imo)
ex
Does this work with websites too?
Compose
i think so - sort of
its supposed to be able to work on web, desktop, and android
i think
¯_(ツ)_/¯
compose is still in beta though
so
Do I have to use Kotlin?
yes
Unbelievable
lol
Supporting outdated languages
🤨
i ran gradle build and slimjar task was taking 12 minutes
then i looked at my laptop battery
and it went from 100 to 10 percent
lol
Lol
The issue was likely due to because of blocked websites (like Github for example) and some repos cannot be connected to. Idk how slimjar handles blocked sites but there should be a way to make it connect 5 times or smthing and give up
Is slimjar better than shadowjar?
well
they are different uses
slimjar does use shadow plugin however
I would say to use slimjar if you are dealing with bulky dependencies
but if you're dependencies are small you can just shade them tbh
So if I use slimjar for a spigot plugin, and had multiple plugins depend on one thing,
would they share the same library, or have individual instances of it, like how shadowJar
just adds them to your project in new packages?
individual instances
Oh
one of the things you can do in slimjar is relocate packages too
it does its own separate relocations
and creates a folder for each specific "application"
and custom relocated jars
tbh id even use it over the library loader
I've never used the library loader
Hey, does anyone know what this IntellJ error means and how to fix it?
Module 'APCS-A-Labs' production: java.lang.ClassCastException: org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType cannot be cast to org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType
I just read that paper is moving away from Waterfall and towards Velocity for server proxys. Does that mean that BungeeCord plugins won't work with it anymore? Should I also stop developing for Spigot/Bungee and switch to Paper/Velocity then?
realistically its all the same shit
does anyone know how to get all combinations of the sum 4?
IE 1111,112,121,211,31,13,22?
there are infinite combinations, it really depends on the domain
@potent nest
there are 7 combinations, what do you mean
1+1+1+1=4
1+1+2=4
2+1+1=4
1+2+1=4
3+1=4
1+3=4
2+2=4
I can't think of any more
excluding adding 0
0.5 + 3.5 = 4
ignore decimals
5 + -1 = 4
Otherwise it trully is an endless combination
sum
that's why I said that the domain is relevant
What's the use case would be better to know
that's a sum
Well yes, but again, infinite list if you don't have boundaries of which numbers can be used
I mean there are no negatives, no decimals
for natural numbers, the amount of combinations is limited
programmatically?
I have tried every version of a combinationalSum algorithm I could find and attempt to edit
yes
I can only get 1111,31,13,22,112
I can't seem to get 121 and 211
and those numbers are a combination of two different algorithms
do you want permutations or combinations?
permutation of the combinations
121,112,211 are permutations of one of the combinations
I'm now in my 11th hour of attempting to figure this out
I will gladly give a cash reward for helping me solve this
for my mental and physical health
public static void main(String[] args) {
permutations(4).stream().map(Maths::toString).forEach(System.out::println);
}
static String toString(Expr expr) {
return switch (expr) {
case Const c -> Integer.toString(c.value());
case Add a -> toString(a.left()) + " + " + toString(a.right());
};
}
static List<Expr> permutations(int sum) {
if (sum == 1) {
return List.of();
}
List<Expr> result = new ArrayList<>();
for (int i = 1; i < sum; i++) {
List<Expr> a = permutations(i);
for (Expr l : a) {
result.add(new Add(l, new Const(sum - i)));
}
result.add(new Add(new Const(i), new Const(sum - i)));
}
return result;
}
sealed interface Expr {
}
record Add(Expr left, Expr right) implements Expr {
}
record Const(int value) implements Expr {
}
doesn't look that difficult
what is record?
that entire set of code is wayyy over my head
streams, maps, pretty sure you are using lambda statements
don't see any lambdas in there
those are the new switch cases
oh
lambda uses the same -> thing
that is why I thought it was a lambda
its okay, again it's still way over my head
better to ask questions than just accept defeat
the permutations method is the relevant part
I mean I am dead right now
then go to sleep and ask tomorrow
just also want to go back to this message
incase sirywell wants to claim said reward
I mean in best case you understand what's going on
I'm attempting that
Because I gotta figure out how to also put it all into 1 method
like permutation but like Add and Const & Expr is out of it
basically the approach is that if a + b = c, then c + d = e and a + b + d = e
import java.util.*;
public class Solution {
public static void main(final String[] args) {
final Set<Integer> res = new HashSet<Integer>();
permutations(0, 0, 4, res);
for (int i : res) {
System.out.println(i);
}
}
public static void permutations(final int sum, final int cur, final int target, final Set<Integer> results) {
if (sum == target) {
results.add(cur);
return;
}
for (int i = 1; i < target; i++) {
if (sum + i > target) break;
permutations(sum + i, cur * 10 + i, target, results);
}
}
}
There you go, simpler
that doesn't change anything
why final what?
just a cleanliness thing
That is crazy how you can just come up with that
I don't know if its because I've been at it for so long or I'm just not smart enough yet
Usually just overcomplicating so you can't see an easier solution
Good nights sleep usually tends to help if you're stuck
Learn the rules to the 3 player chess game 3 Man Chess quickly and concisely - This video has no distractions, just the rules. The rules are the same as regular chess, except for these changes. For a refresher of those rules, check out this video: https://youtu.be/fKxG8KjH1Qg
Don't own the game? Buy it here:
USA - https://amzn.to/2UHXBAi
UK - ...
What the hell
since getOfflinePlayer() is deprecated it disables the plugin while the server is starting, is there an alternative way of getting a player ignoring if player is online or offline?
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(new DeathListener(), this);
plugin = this;
i = 0;
do {
i++;
getServer().getConsoleSender().sendMessage("açıldı");
} while (i < 10);
saveDefaultConfig();
List<String> s = getConfig().getStringList("kills");
for (String str : s) {
String[] words = str.split(":");
DeathListener.kill.put((Player) getServer().getOfflinePlayer(words[0]), Integer.parseInt(words[0]));
}
}```
getOfflinePlayer's usage has no issues
Its deprecation is for completely different reasons, blame md_5
Look for any stacktrace on enable
so i can use it perfectly, the error is a completely different thing?
You're probably having some othe exception being thrown
getServer().getOfflinePlayer(words[0]), Integer.parseInt(words[0])
This doesnt look right
huh
arg 0 is player name and a number?
Most likely, check your logs for exceptions
java.lang.ClassCastException:
The entire stacktrace
That still isnt the entire stacktrace
Cant tell where the exception is happening without it
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_16_R3.CraftOfflinePlayer cannot be cast to class org.bukkit.entity.Player (org.bukkit.craftbukkit.v1_16_R3.CraftOfflinePlayer and org.bukkit.entity.Player are in unnamed module of loader 'app')
at me.SolidSteed.bukkit.prestige.Main.onEnable(Main.java:32) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.16.5.jar:git-Purpur-1082]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[patched_1.16.5.jar:git-Purpur-1082]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[patched_1.16.5.jar:git-Purpur-1082]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[patched_1.16.5.jar:git-Purpur-1082]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[patched_1.16.5.jar:git-Purpur-1082]
at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:593) ~[patched_1.16.5.jar:git-Purpur-1082]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:293) ~[patched_1.16.5.jar:git-Purpur-1082]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1070) ~[patched_1.16.5.jar:git-Purpur-1082]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Purpur-1082]
at java.lang.Thread.run(Thread.java:831) [?:?]```
Whats on line 32?
String[] words = str.split(":");
whats the type of DeathListener.kill
Something seems to be attempting to cast a player to an nms player
oh I know
it was right there
(Player) getServer().getOfflinePlayer(words[0])
You cant cast OfflinePlayer to player without checking
checking what
can i just use if(!(Bukkit.getOfflinePlayers.isOnline()))
it seems not
as i thought :(
That is the inverse
Why are you negating the isOnline
You want to cast only if its true
Welp, today I learnt that docker has options to configure cpu cores etc, and I've only been using half of what my system actually has :(
interesting
I was watching a youtube video and someone mentioned it, checked settings
I had like half the cpu cores set
o/
oh I was going to ask
am I not supposed to be able to click this?
bcz it looks a lot like a button but its not xD
Oh fuck I forgot thats still dead
Thank you 😂 I haven't done the linkedin thing either oops
als maybe make this clickable?
oo interesting, yeah that would work
that'd be pretty ool
because thats in the viewport on mobile
is it supposed to show only on mobile? bcz it shows on my pc
Yeah shows on both, but mobile is mainly to show people its not just one section
as people can click off
ah
btw on smaller phone screens it goes under the screen so they can't see it. but its on like very small older phones
like the iphone SE
Ahhh ty, i didn't test that, I think I tested a small device, but not that small
let me emulate now
eh, a bit haha
no lmao. I Was thinking of the iphone 3g when was saying iphone se
lmao
yeah
its old but not very
yeah xD
it looks mangled 😂 😂
think about the small guys smh
also link to analyse takes me back to the top actually
well. it opens new tab
but same thing xD
ah is it meant to be like that??
man I hate this keyboard
sometimes when I type a ? it puts in 2
I can make it just open, but its mainly to prevent people going away from the site
oh wtf
because we were talking about top I got confused aha
yeah my bad
also.the top uses, domains, twitter and github doesn't actually go to new tab
Finding all kinds of flaws 😂 ty tho, helps a ton, fixed the links you just mentioned, with the projects its just because its a coming soon, but I could just force it to use the actual link still
Fixed both, should be live in next few mins
Damn, i bought police.io yesterday as I saw it expired, I've had some nice appraisals, kinda shocked
I see you have quite a few domains
Yeah aha, became quite the addiction
the only thing I honestly "collect"
holy crap
88888 nice
i always wonder who are behind those sales
whether its huge companies secretly buying, or individuals
I mean you can go and see what the domain does now
But a lot of the time the domain is nothing, this time yeah it has a landing
but usually they don't redirect anywhere
I'd love a sale like those, this domain if I held on I could prob get a decent amount, but eh, I've been offered $200 so far
OMGGG. All this time I Thought that the F in FOSS stands for free as in price lmao
that's why I wasn't fully sure why everyone is pushing FOSS and not OSS xD. but turns out its not free as in price
all it took is googling FOSS lmao. its literally the first thing they mention on the wiki
wait really
yeah
it stands for free as in everyone is free to use, change and modify
or something like that
and the GNU page has a really good analogy for this
Think of “free speech,” not “free beer.”
my keyboard 😦
well yeah. but its not what it stands for
I always thought it stands for free as in price
Yea
different subject. I Don't suppose C# has anything similar as kotlin's raw string or whatever its called? the one that uses 3 quotes
im currently in the process of figuring out how to use sqlite
and its something id rather use then mysql or some flatfile like yml cause i dont have a mysql server for testing and flatfile is flatfile mainly cause i want to store an array of itemstacks in this db
@quiet depot
i got the docdex api going but it's giving me npes when i try to index the jdk
"javadocs": [{
"names": ["jdk", "jdk17"],
"link": "https://javadoc.lucypoulton.net/jdk/index.html",
"actual_link": "https://docs.oracle.com/en/java/javase/17/docs/api"
},
...]```
i have other javadocs that get indexed fine, its just the jdk ones
Text blocks
too late... I went the manual way
g
Pretty nice
https://stackoverflow.com/a/31981504 this is also nice
Does anyone know how to make client packets?
lmaooo
you probably won't get anyone to give you that. If you have like 30$ I'd recommend getting a Raspberry Pi
oracle 😏
right... if it works for you that's an option
I really can't tell if its an inside joke, a joke or whoever made that didn't test that. because I mean even the name should tell you what it does
thats 5$ per month... you can literally get a raspberry pi and never worry about it lmao.
1GB of RAM and 25GB of SSD storage for 5$? nah xD
but then burden of self hosting, but ig if on a budget then ye aha
by that i mean like you've gotta make sure its plugged in and on always
May as well get a bomb proof ddos protection while you're at it, ha ha
and 24/7 security
Hey…
@remote goblet.
youre trying to cast a primitive to a non primitive
I believe this line is causing an error in Paper? System.out.println which one works in both Spigot and Paper?
Nag author(s): '[Ironic_8b49, original author kroimon]' of 'IronicChest' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
I have never use logger, guess I should look it up
Please use your plugin's logger instead (JavaPlugin#getLogger)
@boreal needle it can’t index j17 yet
ah that explains it thanks
hey actually, do ur pages on hotswapping with DCEVM still works?
yes
and u now of a dcevm version that works on java 17?
jetbrains runtime
how do me setup it
I thought changing the version number in pom should change this [Server thread/INFO]: [IronicChest] Loading IronicChest v1.18.1
that’s from plugin.yml
You might need to add hotswapagent to the actual jb runtime but not 100% sure
I have this there version: ${project.version}
it has been about a year or more this I opened this project
I change the version in plugin.yml to actual version number still not changing
are you using an old jar?
^
Or do mvn clean package instead of mvn package, exact same thing as Piggy's suggestion but uh ""properly""
hey so mmmm, if I change it, it changes on the entire project?
bc I have modules
Hey,
does someone know of an opensource/free discord bot for verifying Github and Spigot accounts?
I want to check my premium plugin buyers and auto invite them as readers into my private github repository.
yo can someone confirm me that spigot 1.12 does not support java 11 at all? bcz I really can't test rn and I've heard it a few times now
nvm. the person that just said it, tested and it works.
i am trying to replicate the old mc beta arrows where u right click and the arrow just spawns out of no where (bows were not introduced to mc back then).. what vector do i assign to the spawned arrow ? i want it to be the same value as it was in mc beta (i posted this in the wrong channel before sorry about that)
anyone else getting spam about some anticheat
no
but do you want to see my anti cheat?
It's comming from Polymart @boreal needle
lame
yeah just saw the announcement
what annoncement?
Polymart getting botted I believe
having DMs open 😷
I wish dms were opt-in instead of opt-out
Wait, what is it?
what is what?
What's coming from Polymart?
dm spam about an anti cheat
bot DMs advertising a probably shit ass AC
Oh right.
OK
Somewhat related but has anyone heard about more about the recent "HostFlow" server backdoor?
again?
whats that?
They are?
Yeah @kindred hatch had it
It's affected a lot of servers, and even ReviveNode pushed an announcement about it... and additionally Dan, from PebbleHost has been talking about it.
Oh
cool
Obviously it stems for the usual Javaassist stuff, but I've seen servers get affected by this and they haven't even touched cracked plugins/jars.
but they might've touched spigot plugins. ez
😆
That's opting out lol
You just turn it off, and it applies globally, or by opt-in do you mean that new accounts that setting is auto off?
I want to have dms open to 2 servers and off to everything else
If i turn off on the settings i can't opt-in for those 2 servers
Soo i have to disable for every single server i join
nah for the average user having dms opt out is much better
i bet most people they dont even know that u can turn dms off
Just leave it turned off, and then turn it on for the 2 individual servers?
this
I believe the global option might take over the per server option
You can't do that, if you turn off, it's off, unless they changed it recently
they mightve just checked and looks like it mightve been changed
since when you turn it off globally you can inherit that to every server
which I'll do rn xD
ye
When you switch the setting, it asks you if you want to apply it to all of your current servers
Then you can change it per-server
yeah. cool. dont think it was like this before
Didn't use to be a thing, probably fairly recently like a month or 2, cuz I remember changing that pretty recent and it was always global
Uh I did that like 6~7 months ago and I had that option lol
Does it matter anyway ¯\_(ツ)_/¯
Yeah I thought its been there a while, but thats dope, I just never toggled it
time to apply it, even though I'n not in many discords
Yeah
The DB from before was breached
What DB?
The hostflow one
What does Hostflow even do?
as all I can find is a related to AirBnB xD
Lol
So, an infected plug-in modifies all the jars in your plugins folder and your main server jar using Java assist
Then, that connects to a DB on start and accepts web requests
Someone breached the DB and is sending messages and kicking players using console
Then, it spreads cause guys send JARs and stuff
I know all that, but I mean how did this spread so fast as I know some folk who haven't touched a leaked jar at all or any suspicious downloads yet they still got it.
I’m in the same boat
Like I said
An infected jar was probably downloaded a lot
Cause i got in my lobby server lol
All jars were free even
I mean... it's gotten to the point that ReviveNode did a public announcement, so it can't just be a few silly kids downloading infected jars or something like that.
Ah... so the infection has been spreading for a while and only now has been used?
It was just a proof of concept
🤨
You've got me confused lol
Like
TL;DR from what I understand:-
Hostflow was a proof of concept malware to show what it can do, and then it has gone into bad hands, added to public plugins, and people have downloaded it. In turn, infecting other jars, and nothing happened until now, in which a bad actor has taken over the DB (of infected servers), and ran malicious commands.```
Cheers.
Is there some article somewhere that explains this in more details or?
When malware gets "hacked" lol
What more do you need lmao
¯_(ツ)_/¯
Anyways
https://www.spigotmc.org/resources/spigot-anti-malware.64982/ and https://github.com/Haizive/HostflowMalwareRemover are what u need
I know about those already haha
wait. bw1058 was os all this time? xD
no
what the hell? xD
yeah lmao
love it
Permission SEX
SEX
mm
so all of the players on my a new server i set up are invisible
i dont really have many plugins loaded in besides stuff like multiverse, world edit, essentials, the works
lel
@cinder flare Im cool again!
Ikr, and a 100 day streak
fuck yeah
worth
Work on a project you can apply your skills on whilst learning
Ty :)
Hahaha
Lol
😌
How would I replace everything that doesn't match a regex?
Negate the regex maybe and then find all those groups where the negated regex matches
or just extract everything that matches
or
why not
Doesn't really make sense.
Just regex what you want.
no but he want's to replace everything that doesn't match !!
So make the match not include those characters/strings 😉
!replace("regex")
regexn't
lol
🌞
Omg i actually found a use for a FSM... Im so happy
cool. no idea what that is
a finite state machine!!!!
Im gonna be using it for event chaining/handling
cool. no idea what that is
uhh
ill send a pic
like this or something
with different states and then transitions between them
This is a good example too
Something something reactive streams
interesting. no idea what that is. but interesting
ive just figured out one usage of the static keyword, in an object you can use the static keyword to keep a variable the se between instances. ive been so against using static cause of static abuse that i missed the point in static all together
The actual design pattern isnt too common, but im sure you've seen something similar before just havent heard the name
would this be considered a FSM?
ya, i cant tell exactly what its doing but i think thats the idea
oh lol, well ya, thats a really good example
pulse. so when can you pulse my beat?
already implemented
i can
lmao
my emat?
why?
Same
lmaoo. Opened the wikipedia page to read about this and I love that the first image there is this
down bad
oh lol, i just took the first one i found on google lol
dkim19375 is typing
nvm
That's what I meant to ask, how do I negate a regex?
Finite state machines are based, I use them a ton when structuring plugins
cool
OH MY FUCKING GOD. I just had a random realisation
All this time I was so confused why forks can't have the ISSUE tab and for some reason I randomly thought "hmm maybe they're just disabled in settings by default". Turns out they are just disabled by default in forks
indeed
hey, im just wondering if deluxemenus can count votes? - i wanna sell some ranks that they have to meet the vote requirements to buy it, is it possible?
no
ah ok
but if your voting plugin can and has placeholders you can use those in deluxemenus
also #general-plugins
next time
oh ok thanks
copy jar task doesn't work because it runs before the jar gets built D:
even tho i call it after shadowJar
oh wait
aaaaaaaaaaaaaaaa why does gradle run all of the tasks whenever it starts a new task
😖
how do i disable it for some tasks?
OOH
I THINK doLast FIXES IT ```kt
tasks.create("copyFile") {
doLast {
val jar = tasks.shadowJar.get().archiveFile.get().asFile
val pluginFolder = file(rootDir).resolve("../.TestServers/${server}/plugins")
if (pluginFolder.exists()) {
// Copy task doesn't work with doLast apparently
jar.copyTo(File(pluginFolder, tasks.shadowJar.get().archiveFileName.get()), true)
}
}
}
:D
21.11 01:24:45 [Server] Failed to parse item tag: TextComponent{text='{id:"minecraft:diamond_pickaxe",Count:1b,Damage:1s,tag:{Enchantments:[0:{id:"minecraft:efficiency",lvl:13s},1:{id:"tokenenchant:autosell",lvl:1s},2:{id:"tokenenchant:excavation",lvl:31s},3:{id:"tokenenchant:fly",lvl:1s},4:{id:"tokenenchant:gemfinder",lvl:10s},5:{id:"tokenenchant:luckyrewardsone",lvl:20s},6:{id:"tokenenchant:luckyrewardssix",lvl:2s},7:{id:"tokenenchant:luckyrewardsthree",lvl:2s},8:{id:"tokenenchant:luckyrewardstwo",lvl:10s},9:{id:"tokenenchant:merchant",lvl:30s},10:{id:"tokenenchant:tokenimpact",lvl:31s},11:{id:"tokenenchant:tokenminer",lvl:11s},12:{id:"tokenenchant:treasurehunt",lvl:1s}],display:{Lore:[]},Damage:1,HideFlags:1}}', siblings=[], style=Style{ color=null, bold=null, italic=null, underlined=null, strikethrough=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null, font=minecraft:default}}
21.11 01:24:45 [Server] INFO com.mojang.brigadier.exceptions.CommandSyntaxException: Expected ']' at position 71: ...ntments:[0<--[HERE]
Using ChatItem and Deluxechat
doing [item] doesn't show the lore of my pickaxe
with custom enchantments
Why not tho?
@EventHandler
public void customInventoryClick(InventoryClickEvent e) {
Player p = (Player) e.getWhoClicked();
PlayerData specificdata = playerhashmap.get(p.getUniqueId());
if (!(specificdata.getInvtype().equalsIgnoreCase("ENCHANT"))) {return;}
if (e.getClickedInventory() == null) {return;}
if (e.getClickedInventory().getType() == InventoryType.PLAYER) {return;}
if (e.getSlot() == 19) {return;}
e.setCancelled(true);
}
so much cleaner then nested if statements
rn with my chat app, i have the ip of the server set to localhost
but what if i want to let others use the app?
I don't want them to know my ip ;-;
how to do like this?
wdym?
what plugin?
this is the code for me to create a copy of squid game
also #development for coding help
Exact same principle as a Minecraft server lol
You have a local client and a remote server
thats what i do
but you can still get the ip if i post to github
or decompile
D:
I mean the client has to know where to connect
You can also, just like Minecraft, let people host their own server and tell the client where to connect
but with mc you can use tcpshield to mask the ip - but i have no idea how i'd do it with non-minecraft servers
hm how should i add a way to delete/edit/etc messages
🤔
jetbrains compose doesn't have a stable version of a context menu
use a proxy
what protocol?
uhhhhh
tcp?
websocket? 🤷
yeah tcp
For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.
._.
😉 😉
but i'd need a vps or smth to host the proxy
correct
i don't know if theres one already out there such as tcpshield but for non mc
does cloudflare support websockets?
it supports only http(s) iirc
wdym?
basically you send a HTTP request, then send an "upgrade" packet
and it's upgraded
from http
to websocket
and then if noone closes it
it well, stays open
how do i send an upgrade packet?
|| idk if this is important info but iirc it was error 522 when trying to connect 🤷 - when using the browser, in the client app itself it just hung||
thats how websockets work. if you use a library for them, then it's built in
but if cloudflare supports it
why doesn't it work? 👀
if its on the gray cloud it works
but on the orange cloud i think it just kept trying to connect
that doesn't protect it
well idk what to tell you
it supports websocket connections
hm
wait
rn my client is using ws
and if i change it to wss
Invalid TLS record type code: 72 I get this error message
🤔
with orange?
or gray cloud
rn just doing localhost
that won't work
since you're not on https
but since cloudflare proxies to https
you need it there
definitely
o
but try wss over cloudflare
alr
50% chance it'l work
thats a big number 👀
man I love being taught what a variable is in school 🥲
my homework is learning what a variable is
🥲
whats the homework look like?
Connect timeout has expired [url=wss://cloudflare-domain-thing:25575/chat, connect_timeout=unknown ms]
☹️
they used var though 🤢
welp
naus?
no idea then
ty for trying tho :)
I missed the tab key
👀
um
fred
do u know why these images are in f12 console 🤨
when going to ws://localhost:25575/chat or wss://localhost:25575/chat
click initaitor
and send a screenshot
uh
hm
note that its unrelated to this issue since it pops up on every localhost thing i put in the browser
🤔
sounds like a chrome extension
or similar
Have you used regex? 💀
using https://developers.cloudflare.com/fundamentals/get-started/network-ports:
http port (2082) + ws: hangs
http port + wss: Invalid TLS record type code: 72
https port (2087) + ws: https://paste.helpch.at/vevapabiwu.xml
https port + wss: hangs
other port (25575) + ws: https://paste.helpch.at/ixejaweqew.css (timed out)
other port + wss: https://paste.helpch.at/volewokawo.css (timed out)
🤔
it does?????? Weird, but ya, i found a place to apply the pattern
you ever just writing code and suddenly you realize something looks incredibly illegal
😷
🥶
while(i --> 0)
🥲

That weirly reads well tho
People throw that at almost any problem with multiple testcases per case in codechef
mhm
No idea 🥲 , will need to test more
ok this might be a stupid question, but how do i understand if player started sneaking or ended sneaking in PlayerToggleSneakEvent? I want to do stuff when player released sneak key.
i think i can use !isSneaking() for this, if player is no longer sneaking i can start doing stuff
while (player.isSneaking()) {
// Do stuff
}
Yoo that's really cool! Watcha making?
post full build.gradle?
uhhh i mean i already changed it to this 🤷
so idk what the old code was
1 sec
tasks.create("copyFile", Copy::class) {
val jar = tasks.shadowJar.get().archiveFile.get().asFile
val pluginFolder = file(rootDir).resolve("../.TestServers/${server}/plugins")
if (pluginFolder.exists()) {
from(jar)
into(pluginFolder)
}
}
i think this is what it was before
that is fine, but what I want to see is the rest of your build.gradle
this also happens in all of my other projects
(which is why if you look at my os projects i don't use the Copy task)
at least i think thats why i don't use that
🤷
doLast {
File(project.rootDir, "build/libs").deleteRecursively()
}
}```?
so that i dont have a billion jars :)
hmm
also
you need to put this line on the end of your shadowJar task scope: kt finalizedBy(tasks.getByName("copyJar"))
by doing that, you link your shadowJar task with your copyJar task, running copyJar AFTER (finalizedBy) shadowJar
i'm already using gradle shadowJar copyFile tho (which works now)
and if your shadowJar task is up to date, then it should not run your copyJar (untested)
I recommend doing that by using finalizedBy
if you run those tasks separately, it'll always copy the file (which will always be slower) than just skipping the task if the shadowJar is up to date
idk
That didn't work
Well half did
But that might have just been discord being discord
You guys recon Minecraft 1.18 brings any big changes to how Paper and Spigot will handle things?
By updating :p
They already support large worlds iirc, so generally things should be fine
handle
VERB
UK
/ˈhænd(ə)l/
WORD FORMS
+
DEFINITIONS4
1
TRANSITIVE to take action in order to deal with a difficult situation
oh wow, thats really cool, had no idea!
Live bytecode inspection, so its easier to work on dangle later on
https://github.com/Vshnv/dangle
https://github.com/Vshnv/paraphraser
😌
currently looking through how other custom enchant plugins work and its quite interesting how its done
@old wyvern Im gonna ping you since you seem to know a bit about FSMs, but this is my event fsm system. I included a diagram about what its suppose to do, does the api i made for it(the code part) make sense at all? Anyone think there is a way to make it more concise?
Yea that looks about right. Usually using fsm as a pattern means switching between implementations to change states.
Altho this looks more of like triggering conditions than events
ya, it is defeintely more of a condition thing, i have the option to change implementations of state, but for the most part it wont be used
That's really awesome!
Yeah poggy pog
Yugi let me know if you need IJ plugin help 
ok
Wow damn you dyno
Absolutely 😁💯💯
Ah I see, Awesome 💯💯
I need some help simplifying my code
https://pastebin.com/vUwHz5CW
if you need all sides, you can use smt like java Arrays.stream(BlockFace.values()).map(block::getRelative) .filter(block -> block.getType() != Material.OBSIDIAN && block.getType() != Material.BEDROCK) .forEach(Block::breakNaturally); (untested)
also e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getLore() can throw NullPointerException if the item being held is AIR
thanks let me try to work this
Hey guys, I am trying to figure out how to create invite links to my server, and not a channel. BUt every time I press invite people it gives me an invite link to a specific channnel
where else do u want it to invite to 
Just to the normal server, I see people sending invite links just to the server and not to a specific channel. Those invite links also have active and offline members. I am trying to create that as well but its not working
yes the "channel" invites will also show the active and offline members
choosing the channel just tells discord where you want the user to be in
when they join ur server
But how do I create a invite link that is not for a channel? Just for the server? Because when i create invite links to a channel it never shows offline and online members.
really?
for me it always shows
lemme test
1 sec
It doesn't for me. Is there any way to just send to a server only? not a channel?
thank you
ah
ic
in the top left
where it shows ur server name
click that and then click Invite
that should work
@obtuse gale
idk where it sends u tho 👀
lol
yes
try this way
hmm
I clicked the server name, then "invite people" and when I send it to my friends it doesnt show the online and total members
hmm
yea same
looks fine to me?
It shows online and members for me
maybe ur server is too small or smth? 🥲
I can see the member count in this link tho, can you not see it?
lol
wait
Thats exactly what i see when I send invite links
Maybe because u sent it
anyway, why are we in #dev-general
no clue
But even on my phone when I am on a different discord account and use the invite link, i still don't see the member count
You know how some invite links have https:// discord.gg / and then the name of the server and not a custom letters and numbers. How do you do that?
thats different
That's what I am trying to get
yeah, my server shows multiple thousands offline, so it's not that
either enough boosts or partner/similar-i-forgot
maybe above like 25,000 or smth
meanwhile mine is like 5 🥲
Name invites are partners aren't they?
and boost lvl 3
and iirc u can get them from having enough boosts
both
Ah, I don't pay attention to the boost stuff
I have booster my server and its at level 3 so i should be able to have my server name on the invite link no
if it's at 14 boosts
and you've unlocked level 3
it's under server settings
"Vanity URL"
I have level 3 and when i go to server settings, it doesn't show me vanity url
is that under another section under server settings?
nope
How do I see the total number of boosts?
or that
send the server id here please
You mean an invite to the server?
