#help-development
1 messages · Page 533 of 1
what are you doing with javaagents in plugins
damn my pulse is 123
Nothing good
that's " a bit" too fast
I tried to modify the return of another plugin API to make it compatible with mine using that I believe
Wtf are you doing, am vibing at 65
at that point id just fork the plugin
That's exactly the shit that I expect plugin devs to do with mixins, touching code they shouldn't touch
I'm an alcoholic, that's why. got an appointment at the clinic on tuesday for detox lol
Which is why I hope that should never be allowed
But you aren't drunk rn?
You can't upload plugins on Spigot that doesn't belong to you
who said anything about uploading
I am always drunk, I'd get a seizure otherwise. it sucks
Man I love insane people that are smart
As I've said, I need it for my plugin
arent you allowed to use your own fork of something as a dependency?
idk, can you?
Oh you fell back? I thought you came clean after the clinic and the benzos
yeah but I was not so smart and started again. this time I wanna do long-term therapy but unfortunately the waiting time is 6 months
Sucks
yeah. as said I'll do detox again on tuesday, takes about 2 weeks, and after that my plan is to never drink anything again, not even a beer or something. I'm quite confident that I'll succeed this time
Is that related to addiction?
Isn't this getting a little bit off-topic
alcohol withdrawal syndrome
Ah ok
this is spigotmc, everything's here is offtopic
I don't understand how people fall back, just came back from a vacation to Fuerteventura and often spend time with this girl that I met there, she didn't smoke in 6 months, but when we were out parting somebody offered her a cig and then she smoked multiple a day again. I tried to stop here but would have to use force, one somebody I barely know, so had to stop
Just sad to see
Anyways... At the end I de-compiled & re-compiled that plugin in runtime, all inside the already running MC server. So yeah, changing a plane engine in mid-air...
So for those that were concerned about compatibility with the enum thing: you can do a plugin like mine, re-compile others'
that's how addictions work, "normal" people cannot understand it. our brains are just a bit broken, it's stupid haha. quitting to smoke is also extremely hard, which makes no sense, because smoking does not have ANY advantage
How are those seizures gonna go away with therapy?
But she did quit, that's the thing, 6 months is such a long time
the body is used to be "slowed down" by alcohol. during detox, alcohol is replaced by benzodiazepines, e.g. Diazepam. This is then slowly reduced, e.g. first day 20mg, second day 15mg, third day 10mg, and so on. The body then slowly learns to not "need" alcohol anymore. After 10-14 days, you're basically "clean" again
I mean, she didn't manage to quit fully, she had snus, lol
my parents once stopped smoking for 5 years and then started again because "child mfnalex" was so annoying haha
yiiikes haha that shit's nasty
Im happy that alex does not care if somebody else talks about alcohol tho, otherwise I would have triggered him like 20 times
Alcoholics can be triggered pretty quickly
When we changed caterers at work our workers council got them to stop using red wine in sauces because they knew we have people working here that get triggered by even that
well but it's always my own fault if I drink.
When I see somebody drinking a beer, it's not their fault if I drink then too. It's 100% my own fault
lmao
that's totally fine
I mean I used to call alex "The Jäger Guy" all day
yeah relatable, I got a jägermeister right next to me rn
Sounds right
I drank so much on Friday, cause it was the last night on Fuerte for me and that girl, we went home at like 5am, I have to chill for a few days now, just physically, lol
Couldn't be drunk that often
"Help-development" more like "Lets talk about addictions"
maybe I should take a look at Antabus - it's a drug you can take every day that makes your body "incompatible" with alcohol, so that even if you only drink a small bit it makes you sweat, vomit, etc so that you know "even if I'd drink right now, all it'd do is make me feel bad"
We didn't know anybody there
face tattoo "don't gimme a cig"
How does it work chemically? Or biologically?
And like, I told here, are you sure you wanna do that, you gonna regret it, etc
But we were both drunk 🤷
im trying to update meta data of a smithing table result with InventoryInteractEvent but its not changing the data, any ideas?
@EventHandler
public void onInventoryInteract(InventoryInteractEvent event) {
Inventory inventory = event.getInventory();
if (inventory instanceof SmithingInventory) {
SmithingInventory smithingInventory = (SmithingInventory) inventory;
ItemStack outputItem = smithingInventory.getResult();
ItemMeta meta = outputItem.getItemMeta();
if (meta.hasCustomModelData() && meta.getCustomModelData() == 6) {
if (outputItem.getType() == Material.NETHERITE_SWORD) {
outputItem.setItemMeta(BenTechItem(3).getItemMeta());
smithingInventory.setResult(outputItem);
}
if (outputItem.getType() == Material.DIAMOND_SWORD) {
outputItem.setItemMeta(BenTechItem(2).getItemMeta());
smithingInventory.setResult(outputItem);
}
if (outputItem.getType() == Material.IRON_SWORD) {
outputItem.setItemMeta(BenTechItem(1).getItemMeta());
smithingInventory.setResult(outputItem);
}
}
}
}```
Well, she was still addicted to nicotine, it doesn't change much I guess
And if she would have been a friend I would for sure taken more control
InventoryInteractEvent can’t be listened to
It’s abstract
Use InventoryClickEvent
ah alright
But we only spend a couple days together, she's an adult, I did what I felt being responsible to do, that ought to be enough
I wonder why you can't listen to abstract events in spigot, what's different then normal observer pattern with adapters
Event handlers are stored in a static list in the event class
Not all events have such a handlerlist tho
So you can't listen to them
Oh, right, thanks
benzodiazepines are slowing down the body's GABA system, just like alcohol. diazepam got a very long half-time, I think it's 20 or 50 hours or something. during that time the body slowly recognizes "ah yes, I don't need alcohol". the general idea is simply, replace alcohol with other drugs haha
So you get the symptoms of alcohol but it is not alcohol
kinda, yeah
Interesting
so you basically have to keep taking those things..
lowering the dose every time
then hoping you dont do alcohol again
wont work for me 💀
nooo, only for a few days
Bro its literally not possible to not drink alcohol and live a normal life where I live
same here but I'll manage that this time
this time I'm serious, the last times I was too uncareful
Good luck then
I will do long-term therapy and inbetween that time, I know "I must not drink, I got therapy to do" so yeah this time I have a goal so I know WHY i shouldnt drink again
ty
time to clean the alcohol closet
also the food at the LWL clinic is quite good
I mean you still gotta be careful after therapy
UKV gotta pay 6000€ for 10 days again haha
Especially since iirc you said that you are gonna drink on special occasions
ofc, I'm sure by boyfriend will be there to help me
my*
not anymore
that was my last idea and it didnt work
Fair
when others celebrate new year's eve w/ booze and hookers, I'll just stick to water or ice tea
this is executed when right clicking on a sword and its supposed to deal damage to entities in its path but it sometimes doesnt deal any damage
private void shootParticleLaser(Player player, double damagePerTick, double maxDistance, int tickDelay) {
int numIterations = (int) (maxDistance / 0.1);
new BukkitRunnable() {
int iteration = 0;
final int particleTicks = 0;
final int particleDuration = 4;
public void run() {
if (iteration >= numIterations || particleTicks >= particleDuration) {
this.cancel();
return;
}
double distance = iteration * 0.1;
Location particleLocation = player.getEyeLocation().add(player.getLocation().getDirection().multiply(distance));
player.getWorld().spawnParticle(Particle.REDSTONE, particleLocation, 1, 0, 0, 0, 0, new Particle.DustOptions(Color.GREEN, 1));
for (Entity entity : particleLocation.getWorld().getEntities()) {
if (entity != player && entity.getLocation().distance(particleLocation) < 1 && entity instanceof LivingEntity) {
// Apply damage to hit entity
LivingEntity livingEntity = (LivingEntity) entity;
livingEntity.damage(damagePerTick);
}
}
iteration++;
if (particleTicks >= particleDuration) {
this.cancel();
}
}
}.runTaskTimer(this, 0, tickDelay);
}```
add a debug statement, e.g. System.out.println("shoort particle laser got called"), then check if it actually runs in those occasions where it doesn't work
alright
also can't hurt if you show us the code where you call this method
Im kinda happy that my dream of mixining into spigot is still reality
it will never happen, trust me
its called a dream for a reason
It will.
I got deep insights into how md's brain works, and he'll say "no, that's an implementation detail" haha.
or sth like that
it won't ever happen, maybe on paper, idk. but definitely not on spigot
Bribe MD
Run Unfixer, Hook JavaAgent and Mixin-Loader, inject with Mixins, Reload Classes
Give him $500
I just do it myself, no need for anything done by md
i dont have much money left
I spent it all on blackjack and hookers property
and mascara
Well then no mixins for you
Why not
^
what do you even need mixins for?
I want to be able to do shit in the future
so you don't really know yet
So I can remove shit I don't want to get performance
And maybe do some stuff with Ticking
I will now try to behave like Verano:
"bro why mixin not needed performance, just kitchen chicken, why not consumer yes?"
What
I do not understand anything of that sentence lmao
that's the idea, when verano talks it's usually some very weird stuff haha
You successed then
it seems to be working now i had the cancel in there twice not sure why, but its supposed to all disappear after 4 ticks of it not being activated but it doesnt, how can i fix this?
It gets executed when right click is held
I mean I can have the power to keep such MixinLoader to myself, or unleash the ultimate chaos and publish it
So everyone can destroy compatibility with everything
I'm unsure on what you're trying to say - does it work now, or not?
yeah the damage does
please show the code where you are calling this method from
but the particles are supposed to disappear after 4 ticks which they don't
I don't think you can "unspawn" particles - once you spawn them, they are there as long as the client wants them to be there
if (event.getAction().toString().contains("RIGHT_CLICK")) {
if (itemInHand.getType() == Material.NETHERITE_SWORD && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 6) {
shootParticleLaser(player, 1, 15, 0);
}
}```
if I clean the player's inventory, does it clean everywhere?
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
ItemStack itemInHand = player.getInventory().getItemInMainHand();
ItemStack DefenestratorPickaxe = new ItemStack(Material.NETHERITE_PICKAXE);
ItemStack DefenestratorAxe = new ItemStack(Material.NETHERITE_AXE);
ItemStack DefenestratorSword = new ItemStack(Material.NETHERITE_SWORD);
ItemMeta DefenestratorSwordMeta = DefenestratorPickaxe.getItemMeta();
ItemMeta DefenestratorPickaxeMeta = DefenestratorPickaxe.getItemMeta();
ItemMeta DefenestratorAxeMeta = DefenestratorAxe.getItemMeta();
List<String> lore = new ArrayList<String>();
lore.add(ChatColor.WHITE + "Tier: " + ChatColor.RED + "1");
DefenestratorPickaxeMeta.setCustomModelData(4);
DefenestratorPickaxeMeta.setLore(lore);
DefenestratorPickaxeMeta.setDisplayName("§5Dig Dug");
DefenestratorPickaxe.setItemMeta(DefenestratorPickaxeMeta);
DefenestratorAxeMeta.setCustomModelData(4);
DefenestratorAxeMeta.setLore(lore);
DefenestratorAxeMeta.setDisplayName("§8Toothless");
DefenestratorAxe.setItemMeta(DefenestratorAxeMeta);
DefenestratorSwordMeta.setCustomModelData(4);
DefenestratorSwordMeta.setLore(lore);
DefenestratorSwordMeta.setDisplayName("§5§lDefenstrator");
DefenestratorSword.setItemMeta(DefenestratorSwordMeta);
if (event.getAction().toString().contains("RIGHT_CLICK")) {
if (itemInHand.getType() == Material.NETHERITE_SWORD && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 6) {
shootParticleLaser(player, 1, 15, 0);
}
}
if (player.isSneaking() && event.getAction().toString().contains("RIGHT_CLICK")) {
if (itemInHand.getType() == Material.NETHERITE_AXE) {
if (itemInHand.getItemMeta() != null && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 4) {
PlayerInventory inventory = player.getInventory();
inventory.setItemInMainHand(DefenestratorPickaxe);
event.setCancelled(true);
}
}
if (itemInHand.getType() == Material.NETHERITE_PICKAXE) {
if (itemInHand.getItemMeta() != null && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 4) {
PlayerInventory inventory = player.getInventory();
inventory.setItemInMainHand(DefenestratorSword);
event.setCancelled(true);
}
}
if (itemInHand.getType() == Material.NETHERITE_SWORD) {
if (itemInHand.getItemMeta() != null && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 4) {
PlayerInventory inventory = player.getInventory();
inventory.setItemInMainHand(DefenestratorAxe);
event.setCancelled(true);
}
}
}
}```
okayyy that doesn't look very good in the first place, why do you create a ton of items in that listener on every interaction? why don't you just create them once, then reuse the existing objects?
i had that working previously but now it isnt working anymore and im not sure wwhy
yeah i'm doing that as i go through each item
tbh I do not know many things about particles, maybe someone else has an idea, but I don't
Yes. Inventory, hotbar, and armour
I also do not understand why you got 3 if statements with exactly the same checks
isnt this all the same?
Is it good that my battery is on 50° C right now?
which battery
I mean, if I save to map PlayerInventory, and after that will clear player inventory, will PlayerInventory update?
Phone
I guess it's fine
Yes, the PlayerInventory instance is backed by an internal inventory
My phone is stupidly hot
It doesn't create a copy
My fingers are burning while touching it
close all running apps, then wait a bit
You can use Inventory#getContents() if you'd like to create a copy of the stacks
the QUora app e.g. can make my iphone way too hot too
make it wet
that's why I love my kindle
I want only 2 things in my life
- marry my boyfriend
- that the tax declaration form for property taxes gets simplified
not even I can fill it out and I studied tax law
if not even I can do it, how is anyone else supposed to do that
Lol
i need help
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
i need help too
I need help too, that's why I made an appointment in a psychiatric clinic
I need help too
but did you make an appointment
I like pie
Not with alcohol
great movie
what's the issue
with cooldowns
i recommend using the datatime api instead of longs
what's the issue
So whats the issue, i dont see one witht the screenshot
me neither
All sets for some unknown reason have the same cooldown despite a different click time
@vast ledge @tender shard
In the screenshot tho, gracz has 9min
vip has 8
deferent command execute time
no
private HashMap<String,Long> graczcooldown = new HashMap<String, Long>();
private HashMap<String,Long> vipcooldown = new HashMap<String, Long>();
private HashMap<String,Long> svipcooldown = new HashMap<String, Long>();
private HashMap<String,Long> sponsorcooldown = new HashMap<String, Long>();```
oh god
Well the just do
enum KIT {
VIP, VIP+
}
public Long getRemainingTime(KIT kit){
switch(kit):
case VIP:
return lastclaim - cooldownVip;
case VIP+:
return lastclaim - cooldownVipPlus;
case default:
return 0;
}
the spacing on that is terrible
First off, just for scalability, i would create a PlayerData class, that contains the rank, the last claim time, and other important stuff
Because then you dont gotta deal with hashmaps
You can also save that data to a database
id use Instants
or a local file
I mean how the f is he saving ranks?
idk
i must add to code lastclaim - cooldown?
@quaint mantle Where are you saving the player rank
Right now, nowhere
Well how are you planning on doing that?
u going to implement an existing rank plugin?
waiting till java supports case 'A'...'Z'
but i don't understand how to fix my code
You hurt my eyes
so many cool stuff that c++ has and java doesnt and the other way around
Ok, so currently what is going to happen when you restart the server, all of the saved data in ur hashmaps are going to get cleared
So all cooldowns no longer exist
Like @tardy delta and I said, you should save the data somewhere
So you have a refence point to the last time the player claimed the kit
.
You have to decide, either Database or a Local file
local file
The Configuration API is a set of tools to help developers quickly parse and emit configuration files that are human readable and editable. Despite the name, the API can easily be used to store plugin data in addition to plugin configuration. Presently only YAML configurations can be used. The API however was designed to be extensible and allow ...
I mean... at this point you'd use an if statement, no?
Then take a look at what @tardy delta just sent
it should hlep you with the basics of generating new files
switches are so much more efficient when you care about performance
but ye
if you want to use one switch and not a bunch of code underneath it
Several people are Typing...
You'll see a pretty negligible difference between that switch statement and if (value > 'a' && value < 'z')
int ch = reader.get();
if(ch >= (int) 'A' && ch <= (int) 'Z') {
}
Why would you ever need to do this anyway?
like i measured the performance of using a switch here vs if else and a switch was about 80% more efficient
https://github.com/FourteenBrush/MathExpressionParser/blob/d764cfebcd8d84126f98900a927590bffb409cfc/core/src/main/java/me/fourteendoggo/mathexpressionparser/Tokenizer.java#L77
but ye i care about microseconds in that project, bit overkill 💀
how can i open a book displaying text
There should be a Player#openBook() method iirc
Pass in an ItemStack with book meta and what not
okay thx
My Epic MongoManager
theres so much syntax sugar in java so 'A'...'Z' would be a nice addon

oh there we go again with the big screens
you coding in a cinema or smth?
Heheboi
Maybe
i tried everything to disable the mongodb loggers
same
I don't like mongodb
My best screenshot
docs make stuff always so bloat
oh ye those arent javadocs
Yea
thats me getting angry at myself
i should probably remove that before production release
Oh my, my best comment so far
record wait that exposes collection
are you one of those people that does ArrayList<T> on declarations
Nooo, id never
Wait
i have code
that will make everybodys eyes bleed
HERE
MAY YOUR EYES
BLEED WITH ME
only thing that looks good is the font
Here, a close look
💀
hm that is not the greatest way to handle things
something that my classmates would do
well they would probably do throws NullPointerException but anyways
i hope you realize that i dropped something at your front door
at my
Mine?
or who
yours
He means us both probably
Well, good that the location im currently sleeping at is not my home
how are you calling it
if you are gonna use that player later its pointless, mongo will fetch it from database 2 times
stop using mysql
I don't
embrace binary files
Why
at that point id static import Filters.eq
I use MariaDB c;
why binary
Heyo, any non-NMS way to fire a vanilla GameEvent ?
/j
I dont think so
MariaDB best
who so many blank lines
What it acctually looks like
I just had inlays telling me the number of usages
i put a space between each function
I have 1000000000 in eclipse
"fields may be final"
Eclipse >>
Intellij >>>>> Eclipse
one of the most useless ones
Why would I make my fields final lmao
I just supress them cus theyer pointless
I don't. It always tells that on all my fields that are accessed by reflection. I mean sure it can't know for sure but there's a runtime annotation over it
Can't read that one rn, may you gimme a TLDR pls?
Dies
feed it to chatgpt or something
Diesel?
Passes away
kerosine > diesel
cocain > meth
This article explains the concept of the final keyword in Java and its impact on JVM memory. The final keyword in Java is used to declare a constant or to restrict the subclassing of a class or the overriding of a method. When a variable is declared as final, its value cannot be changed once initialized. The article explains that using the final keyword can have a positive impact on JVM memory usage, as it allows the JVM to optimize memory usage by reusing objects that are no longer being modified. ChatSonic (requested a TL DR)
Seedless Grapes > Normal Grapes
Thanks
Seedless watermelon >= Norm Watermelon
youre welcome
watermelons, I dont care about the seeds, you can easily eat them
watermelons shouldnt be too soft
I once planted a water melon "tree" in turkey, it's still alive today
WATERMelon
bruh
mainly about visibility in multitthreaded applications, like avoiding partially initialized objects, jvm optimizes code with "final" to do store instructions as late as possible to make code run more performant
apart from that, the article is shit 💀
"final" in java is pretty useless for most things, and for classes it's actually harmful
jvm can inline final fields so it guantantees faster execution time in most of the cases
yeah for fields it can make sense
final helps to properly design your application
but for everything else, it's pretty much pointless
🍿
seems about right
I do use final everywhere too but it's pretty pointless
that time unit is probably not even used in computers
contracts > making parameters final
No, System.getTimeInNanoSeconds();
Smth like that
0.000001 ns
I use it extensively, hence I think I'm allowed to participate in this discussion
Ofc
System.nanoTime();
final is important for several things, but i agree on the parameters thing
never used it there
I use kotlin most of the time so it’s second-hand to think whether a field is final or not
you didnt had to out yourself like that
thanks, it’s 988 and you could use it too
kotlin is great
Well
kotlin is shit. fun fact, "Kot" means "shit" in german
Sometimes having final parameters reduce amount of bytecode instructions compiled
Kot, anderes wort für Tier Kacke
thats a femtosecond "according t chatgpt"
okay I gotta rectify my previous statement. Kotlin is not "shit", but it's definitely just java in worse
i know lmao
anyways the point of me saying that is for two reasons 1) in Kotlin you need to think about mutability and 2) that sometimes carries to Java and so I put a lot of final in Java code
and imagine having mutable stuff
@mutable
Yea
final is like a safety precaution
Talking about mutability. Just spam random links here and choco will mute you. That means, everyone here besides md_5 is mutable
muteable
i dont wanna be muted
Muteability
i cant talk
md once muted me for 30 minutes because I kept talking about paper haha
Understandable
yeah
Dont talk about Paper he wont be happy
Not to mention it’s not really necessary for reducing code execution or compile time, that impact is small, but it helps developers understand that xyz is not part of the objects mutable state while other things are likely to change
since when there is a mute
Always?
and is also really helpful when auto generating getters and setters in Java
i just always get banned unreasonable
plot twist: It was a college paper
anyway, no class should ever be final, it adds nothing useful and only restricts other people
Yeah altho I’d say like… final parameters are barely necessary
mutable String class 🤔
the purpose is there for the developer who wrote that method, that's it
Cuz if your functions are so big you need to use final to maintain the state of variables
Then probably sth else is an issue also
contracts are way better, they tell the outside user that this object won't be changed
Just set it on fire
need to rethink some life choices then
You can brun all of your problems
Indebt? Burn the bank
Didnt write something, burn it
Yeah, but contracts don’t really talk about mutation of parameter variables
that is true
mutation of parameter variables? not like putting final in front would do anything?
in c++ it will but not in java
my usual way of thinking is: If the return is void, it's allowed to change object's states, if not, then not
e.g. Collections.sort
erm yes it does
it means you can’t reassign the parameter’s reference
its a copy
yes, and you can’t change the reference of the copy
Stop putting final in your code. It makes it harder for me to transform your classes ;)
Yes
We
there’s an actual effect of final in front of parameters, idk why u don’t know that
I will block you if you ever use that 😉 emoji again
🤔
not like this would do anything to o
Object o = new Object();
y(o);
}
void y(Object y) {
y = new Object();
}```
Obviously not
I did not use any emoji, its a text
what are you saying then
did someone say sth?
But that’s a useless function
but if you put final in front f Object y then you can’t reassign it inside of the method body
jk, I'd never block conclure. he already banned me once
Alex are you fine with ^^ ?
Which to be honest I can’t remember when I’ve had to, but there’s an actual case for it
uh ye i think you should consider going to a doctor if you do that
sure!
Like fourteen sure that void function doesnt change state
^^ is the german version of uwu
But it doesn’t do anything meaningful also
Not necessarily, could be helpful to default variables when you don’t overload
i get it but its useless
I literally use ^^ all the time
Like if y is null, y equals SomeEnum.X
are you gay or something lmao
are you gay or something lmao
he’s “fucking gay,” he advanced in class
Real
Damn how much I like alex for being so open
🎟️ Buy the FULL SHOW now to watch from home: https://www.moment.co/mrnigelng
Watch #HAIYAASpecial with nieces and nephew all over the world when it drops on June 4th @momentworld #shorts #uncleroger #comedy
Most people would be tilted if someone used something like "you are gay" as an insult or just for fun, but alex uses it himself
saw that one already
I am happy with how I am, that's why I'm openly talking about everything
Thats great
I also love everyone here ❤️ you are all such friendly people, I don't know what I'd do without this discord, but I'd definitely be at least 10 % less happy
Would you stop that any people use gay as an insult if you could right now?
This code is epic isnt it
If thats not ironic, thank you and the same goes to you^^ if it is ironic, well then lmao
This is an error I have when starting server with a plugin I’m trying to make anyone know how to fix it? https://paste.techscode.com/denabitipabefos.properties
I actually also used that as insult years ago. Not understandable to me right now. It's basically the same as using "behindert" / r-word to insult people. It happens automatically, but when one thinks about it, it's a shitty insult. If you truly insult someone, you have to get more real, e.g. say something like "you're a very lonely and sad person". that hits much more than using any standard phrase anyway
does that render as an image?
<Ö>-<Ö>
If someone says "Your mother's a bitch", people just laugh it off. But if someone says to you "You are a very lonely, sad person" then you actually start to think about your life choices
It cant find ur mainclass
did u chang ethe name?
its should be Hyperion.java
ah shit that renders as an image i have been scammed
So, you'd care more if someone says "you are a sad and lonely person" than if someone insults you because you are gay?
being gay is totally fine, nothing wrong with that. if someone calls me a "fucking f**got" then it says more about them than it does about me
Hyperion got no package name
yea
true
move Hyperion into org.example
i dont really know what that means im kinda new
drag the Hyperion file onto the org.example folder
packages are like folders. your classes should always have a package. usually something like "me.bananabutt76.myawesomeplugin"
then do i rename that folor to something or
bananabutt76 ICANT
org.example seems a bit strange
at the top of the class, write this:
"package me.bananabutt76.myplugin;"
then IJ will complain and you can right-click it and tell it to "move this class to the specified package/folder"
also bananabutt76 was my old old user i just cant change nickname lol
I use de.dafeist everywhere but dafeist.de is not reachable anymore because I cannot just randomly afford a server anymore so I stopped it but yeah
your package structur nearly always represents a domain
dev.luzifer
org.patheloper
com.github
The domain dafeist.de is still registered to me, so don't bother claiming it lmao
trust me, nobody would
if i dont have a domain will this just not work then
Is it legal to have a domain below 18 years old?
you really are the devil arent you
you dont need one
yea
as a hobby
waht are you trying to make
if youve never created anything before you shoudl startout with
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
i dont know i had chat gpt make some java sort of copying a sword from a game i like and i wanted to see if i could get it to work
Actually it would be REALLY bad if someone else claimed my domain, since autoupdaters refer to it
I guess ur trying to copy a hyp from hypixel sb
Yea, it require a bit of code to get custom items working
yea idk wat u did
create a new project
download
the intellij plugin called mc development tho
its create the base files for
you
how do i download plugins for it
?bing
Bing your question before asking it:
https://www.bing.com/
lmao
there's no mc development plugin on the marketplace
should i just change that to like me.senbler?
somebody didnt have commonsense
?common
why
?sense
WHYYYYYYYY
use "line1 \n line2"
TELL ME WHY
so would it work i mean i really dont know anything it aint common sense to me
Download the intellij plugin, and create a new project
yes i did
then create a new class and paste what ChatGPT told you
but its telling me to change org.example
just do org.banana
thanks
It generates one with deps shaded and one without
yea
just leave the default generated way
Then paste ur code
Ayy, it passed my checks
Nice
Its weird. I am in vacation for 2 days now but I really want to continue coding rn
The Core system is finished, player data can be sent and recieved, ranks can be generated a pulled
I am addicted
the mongodb spam 🙏
it has 40 errors lmao
Sometimes you just feel like it
?
Gotta get my HoldDownEvent done
have you thought about drinking instead?
like just all those
ChatGPT is good with that
Yes I tried
HAHA
Yo alex is it legal to own a domain without being 18?
sure
§ 110 BGB
these errors wer'nt there before
you either need permissions from you rparents, or you have to have enough money to pay for it yourself
Ayy you german?
Ayyy
yeah I'm a lawyer for german tax law
HEY, CAN YOU DO MY TAXES?
He can’t even do his own taxes
said who
sure, for 115€ per hour I can do your income tax returns
just don’t ask him to do your property taxes
it's only the property taxes that I'm struggling with. income tax is no problem
epic
Youll get it eventually
anyone know how to fix these errors?
did you get any Lohnsteuerbescheinigung yet?
We cant, we cant see ur code through our telepathy
i can pastebin it if you want
?paste
paste it there pls
I dont do taxes yet, not full legal age
ah ok. if you ever get one, lemme know, income tax is easy. takes about 20 minutes and you'll get back about 700€ on average for a year
dayum free money
always
Only have to give alex 40 Euros and he gives you 700 Euros lmao
it's not free. you paid it to the state earlier
nah 50/50
actualkly wait
Ye ik, but you can make urself feel better by saying its free 😢
free hugs
true haha
waiting...
where do I sign up
thats from intellij
come to Florida?
no thank you, I still appreciate human rights and stuff 🥲
😭
even Germans know what the fuck is happening here
desantis is quite present in german news
@ripe flint You commited 3rd defree murder on my eyes
why lol
Because
this
is no
just no
I dont know what to say
i want to cry
i want to die
help
no
he pasted two files into the same paste
you can copypaste
😳
Remove everything
in that file
and replace it with chatgpts
code
then rename "HyperionPlugin" to "HyperionTest"
"missing package statement: 'org.banana.hyperiontest'
insert it
i have no idea what that means 💀
add "org.banana.hyperiontest" to the very top of ur file
infront put package
it should say
package org.banana.hyperiontest;
yeah
yeah
i need to try and figure out some java so i have the slightst clue what im doing
?learnjava
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
welp
Theres also wiki articles
the plugin is in but the command does not work lmao
what?
erm
gpt is such an idiot
i guess i rewrote it so many times it just got rid of it
alright
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (command.getName().equalsIgnoreCase("hyperion")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + "This command can only be executed by a player.");
return true;
}
Btw here are a few Tutorials created by the Community
https://www.spigotmc.org/wiki/plugin-snippets/
and here one that kinda touches the join event (I made it feedback is welcome)
https://www.spigotmc.org/wiki/creating-join-messages/
it added that
yea just put that in ur main class
maybe you should actually learn how to make a plugin instead of copying chatgpt
probably should
believe me i want to
No excuses
this is not how you use GPT to learn
Aight im back
hi back
ok who tf wrote this 🤣
Is there a way to check when a spercifc block ie. dirt is right clicked on, and then if that is true it does p.sendmessage("message);
Someone who clearly understands developing
PlayerInteractEvent and Block#getType
is there a good way to set the max stack size of an item stack
i tried that and it doesnt work
you're missing @EventHandler on top of the method
also check action
oh ye lol
is there a way to only make it right clicks though?
getAction() isnt working
if(event.getAction == Action.RIGHT_CLICK)
or smth like that
ty
it was e.getAction() == Action.RIGHT_CLICK_BLOCK, thanks
ye
Alright who fucked up the indentation on the list items
discord ig
Nah that's a user formatting error
Someone probably put a space in front of subsequent entries in that list lol
ah someone changed it 💀
solved this
basically
the problem is that the client is 'deccelerating' a block that has a setentitymotion packet applied to it
over 50ms
so in the time between ticks
the block is deccelerating
it's subtle
MC has air resistance
yeah i know i was reapplying motion every tick
but the resistance is applied in the client between ticks
sadly i need to do the analytical math now to solve these equation sug
what is wrong here?
inventoryview has it
you have to get the view
ye
and you shouldnt be checking by name
how should i be checking?
wdym
If you setDropItems to false in a BlockBreakEvent, it stops stuff like buttons and levers being supported by a block from dropping, but if you run getDrops on the broken block it will not include stuff like buttons and levers - is there a way to find player-accurate block drops, including doors and beds when breaking either part, and the drops of supported blocks?
I'm trying to make a telekinesis enchantment, but disabling the drops and giving the player event.getBlock().getDrops(event.getPlayer().getInventory().getItemInMainHand()) does not work because it doesn't give the player things dropped by supported blocks, or sometimes beds and doors if broken on the wrong block, but still stops them dropping.
Where could I find a list of java versions corresponding to server versions?
preferably the numeric value of the java version
doesn't 1.19+ require Java 17? or is 16 fine for that
strange that they'd use a non LTS for 1.17+, but 🤷♂️
ahhh
time to make some shitty UI front end for my server panel 😈
I'll just force 17+ for everything past 1.17 as there is no reason you should be using java 16 past that anyways
ShapedRecipe recipe = new ShapedRecipe(
new NamespacedKey(DCakeLibrary.getPlugin(), "spawner_shard_recipe"),
new ItemStack(Material.SPAWNER)
);
recipe.shape("sss", "s s", "sss");
recipe.setIngredient('s', new RecipeChoice.ExactChoice(CustomItem.SPAWNER_SHARD.clone()));
plugin.getRecipesManager().registerRecipe(recipe, recipe.getKey());```
Why i can't craft spawner? Recipe is registered and i can see it in my recipe book.
The player has to learn it
wtf
what tf does my spigot from the BuildTools not work as a library
no
if you want to depend on nms, it will put it in your .m2
you can see further on how to use nms here
?nms
using a build system is the way to go now adays
to see how Bukkit.reloadCommands is implemented
doesn't really work
man
am begging you
just give me the goddamn file
you are just simply unwilling to look at the open source code
also Bukkit#reloadCommands isn't a method
e
Then what u lookin for
reload the commands
so that the aliases apply
you can reload commands manually by editing the command map
do the aliases work by like
you can access command map like so
added them as if they were commands but using the same executor?
but only one command executor can be registered, right?
Damn
How so?
ye
ye
so for aliases it should be the same
mm
so I have to reload the file?
looking for good lib for custom guis any recomendations?
what?
I'm looking for a way to reload the aliases so that they're visible even if added in the runtime
BRO
Disrespect
:C
also, you made nothing clear by this code
I can certainly tell yours by this code
suuuure
anyways
what would replacing the command object in the command map serve?
Stop being toxic whilst accusing others of being disrespectful. You'll get further with sugar than vinegar.
sorry
now
getting the command object from the map shares the object
You can overwrite a command by calling setExecutor again.
yeah, but that's not what I'm trying to do
I want to set the aliases in the runtime
and also have them take effect
simple, when you call getCommand() you are given a Command instance. Set aliases, then set executor should do it
yeee, noooo
I tried simply setting aliases
will brigadier even update if you don’t also manually send that packet, or does the Command API do that?
but it doesn't work
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
Method getCommandMap = pl.getServer().getClass().getMethod("getCommandMap", new Class[0]);
SimpleCommandMap cmdMap = (SimpleCommandMap)getCommandMap.invoke(pl.getServer(), new Object[0]);
List list = cmdMap.getCommand(cmdName).getAliases();
for (String s : aliases) {
list.add(s.toLowerCase());
}
Command cmd = cmdMap.getCommand(cmdName).setAliases(list);
cmdMap.register(cmdName, cmd);```
here u go
did you register an executor after setting the aliases as I explained?
I am telling you exactly what I'm trying to achieve and what doesn't work
Not really, you are being vague
mf, y'all being toxic but picking on me
the fuck is wrong with ppl
Because people are trying to help you and you insulted them
that jab about skill on the other person really annoyed me
just take code I posted up I am using it for year
anyways for your question about the command map
Yes you need to re register it otherwise it won’t send the updated command list for brigadier to the client, among other things, pretty sure
even though the object likely mutated, the command map part is important
damn, thanks
@quaint mantle this is how i save data to sqlite https://github.com/The-Epic/SimpleChatGames/blob/master/src/main/java/me/epic/chatgames/storage/SQLiteStorageHandler.java#L60-L72
but for mysql you should do that async
Yeah. SQLite is still IO
when using LivingEntity#damage(double amount, Entity source) does it just damage the entity by the source?
like if i pull up a entitydamagebyentityevent
will it show source as the damager and the livingentity as target?
and will that affect passive entities like iron golem and endermen as the LivingEntity?
Guys, is it bad idea to load data from database on server startup?
Even if there are 30-100 pieces of data
Depends on the data you're loading, what you're doing with it, whether or not it's important to have in memory, etc.
You can't really have a straight forward answer to that question
Kinda unrelated to #help-development , but does anyone know a stronger version of kill -9 <pid>? I have an unresponsive task (i.e. steam) that doesn't even flinch with kill -9
Guys pls help me
Why this query code doesn't send Ping Response? It sends MOTD and players, but without ping
https://paste.md-5.net/inetiyoyuz.cs
https://i.imgur.com/wXnFbGg.png
i'm trying to make a custom world generator but im finding that ChunkData.setBlock() is very slow. Is there an nms (or any) alternative that has better performance for placing blocks?