#help-development
1 messages ยท Page 968 of 1
how do u make it so that if a person is on a specific team, the advancements they made do not show up in chat but show in chat for everyone else on that team
reload maven
I did
weird
ss?
?notworking
"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.
dang I just got mogged
i mean, he did say what isnt working and what he expects it to do
where? all I see is "why isnt mongo working"
you forgot the part after that
are you talking about me xD?
no
WTF is going on
idk
i still have the same problem tho xD
what's the error message
hold on
for me it does not load the StatsUser to the SkyUser
so after i load the SkyUser , i set statsUser after that ๐
but for some reason it keep create new ones , and never the one i created when player joined
why it say no doc found :-: weird ha?
Oh fixed
anyway to remove an entity without having it drop all of its stuff (Boat chest dropping everything inside it)
Entity#remove should do it no?
no drops everything
i don't want it to drop everything
then just clear the items first
anybody got an idea now? short tl;dr: sending chunk data packets with water blocks, yet they behave like air (i can fall through them)
im not sure how mongodb works, but here's a checklist you could run through?
- Make sure your database connection is properly established and you're connecting to the right one
- Double check your data retrieval logic. Is usersCollection.find() properly querying the database and returning the document?
- Make sure the document you're trying to retrieve actually exists, otherwise it will return null and say no doc found
- Make sure the UUID key is properly formatted to match the database
*Make sure the documents are inserted properly, and aren't being removed unexpectedly
I just suspect that when the user leaves it saves the data but isn't actually writing to the file
like in sql terms
U made the prepared statement
but never executed it
yea and while the player is on it wont be null during that time
because of how saving works with memory
Maybe test to see if the document exists while the player is online
And if it does, then that's your problem
Do u know how to remove an entity without having it drop all its contents?
Wdym?
I have a chest boat right?
Ohhhh
is this corect?
do i need to edit anthing here?
I don't know mongo so idk.
Spigot doesn't handle the contents automatically, so you need to do it manually before removing the entity
Have you asked here?
You could loop through it's contents and remove each one
Seems messy and idk if i'm doing it correctly.
ChestBoat chestBoat = (ChestBoat) boat;
for (ItemStack x : chestBoat.getInventory()) {
}
i forgor how to clear inventory (its like 3am
wait i forgot discord tells me the time
its 3:34 am
.getContents()
or like
you could just set that itemstack to null or something
for each iteration
ChestBoat chestBoat = (ChestBoat) boat;
for (ItemStack x : chestBoat.getInventory().getContents()) {
x.setAmount(0);
}
would that work?
test it out
or you know...
i'd have a bajillion dolars
geInventory().clear()...
yeah
fuck
i just remembered LMAO
i was gonna say that
avoids the for loop entirely
chestBoat.getInventory().clear();
I thought there would've been a cleaner way of doing it
yeah, where you wouldn't have to manually do it
"skipping failed lines"
Hm?
well like
I know the "boat" variable could be a boat or a chest boat
but just let me right
boat.getInventory().clear()
and if it doesnt have an inventory
skip the line
That sounds like something from a dynamically typed language
Try to make a separate method just to debug
See if the document exists while the player is online
Yea im pretty sure js has it but i dont touch js so idk
Not possible for statically typed languages
Do you know what in particular makes it impossible?
you could just check if it's null
why dont u just check if the entity is an inventoryholder
and cast to that if its the case
get the inv -> clear
didn't realize that was a class
makes sense
Best you could do in "one line" is
public void clearBoat(Entity entity) {
Optional.of(entity)
.filter(ChestBoat.class::isInstance)
.map(ChestBoat.class::cast)
.map(ChestBoat::getInventory)
.ifPresent(Inventory::clear);
}
or
public void clearBoat(Entity entity) {
if(entity instanceof ChestBoat chestBoat) chestBoat.getInventory().clear();
}
i will try it out later ..
okay
If it exists while the player is online, that means you aren't properly saving it when they disconnect
What are we trying to do here?
something with mongodb
I meant the boat thing
oh
yeah it does not save it , so everytime a player join it reset his data :p
Oh yea
he's trying to kill the chest boat without it dropping everything
So basically
does anyone know if there is a way to get the entity which caused the BlockExplodeEvent? E.g. the tnt or creeper
Does calling .remove() on a ChestBoat drop its contents?
Never tried that.
Boat System Advanced Cool
Boats can be claimed
Stowed (Stored in mid air, up to 3 per player)
Spawned (From the storage)
Unclaimed
Upgraded
Etc
yeah it does drop its contents
It does drop the contents
wonder if minecraft chests function the same
block explode is for things like beds. Creepers and tnt throw an entity explosion event
would be useful if ingame i could write lines of java and have it work
spigot doesnt provide the entity that caused the explosion i dont think, but you can kinda figure it out in a hacky way im sure
like
public void onBlockExplode(BlockExplodeEvent event) {
// Get the location of the exploded block
Location explosionLocation = event.getBlock().getLocation();
// Define the radius to search for entities
int radius = 10; // Adjust as needed
// Iterate over nearby entities
for (Entity entity : explosionLocation.getWorld().getNearbyEntities(explosionLocation, radius, radius, radius)) {
// Check if the entity is TNT or a Creeper
if (entity.getType() == EntityType.PRIMED_TNT || entity.getType() == EntityType.CREEPER) {
// This entity likely caused the explosion
System.out.println("Explosion caused by: " + entity.getType());
return; // Stop further processing if source is found
}
}
}```
but
that doesn't really work if there are multiple creepers
anyone wanna be sent a boat?
sure
spruce
do i just /summon it?
uhm
idk if that would work considering its a serialization
Are you Assailent
yes
phytorboats
idk why my name is JellyPark on spigot
:)
oh that was it, thank you so much!
i dont know why mine is ministrater 5002
cmae up with it years ago
yeah mine too i guess
my account is from 2015
and i logged into it for the first time probably since then today
AngryJellyBean has always been my username, ever since club penguin
how do you want me to do that using a command?
/check ? for example?
mines from 2020 but its the name of an email made like 2017 or smth
bro club penguin was peak
Ministrater came from back when i played pocket edition
and i was on a small factions server
and i tried to trick the owner into giving me admin
5002 = 2005?
saying i was "Ad ministrater"
That's funny
No it just sounds cool ig
which is still true
5002 and sick
is sick * Holy shit my english is bad now. its 3:52 am
ahh fuck i gotta add oraxen and itemsadder support now
sham
I'm linking all my old projects to this one project so i can steal my code easy
something like this in mongodb?
Yeah something like that
I'm not sure how the syntax is supposed to look
but a method to check if it exists
And then however you wanna trigger that method
maybe with a command
Because the error you were getting before seems like it was because the document was null, aka doesnt exist
but it works when the player is online
so something like /check ?
have it print something in chat like "Exists."
or "Does not exist" if its null
you know you could also just get something like MongoDBCompass
so u can actually see whats being saved
in ur db
sql works fine for loading and saving .. only mongodb
i tried but didn't know how to see the database
data
connect to it?
tried
well then ur doin somethn wrong
hold on xD
- Make sure your database connection is properly established and you're connecting to the right one
- Double check your data retrieval logic. Is usersCollection.find() properly querying the database and returning the document?
- Make sure the document you're trying to retrieve actually exists, otherwise it will return null and say no doc found
- Make sure the UUID key is properly formatted to match the database
- Make sure the documents are inserted properly, and aren't being removed unexpectedly
game crashed my pc is running potato ๐๐ป
I have no idea how to work with mongodb, you probably know a lot better than I do
But that checklist should help you figure out the problem
hah?
No
ICommand.., really?
my custom system why?
can u just send wherevr you insert the document into the db
didn't waana have more libs for commands
im gonna learn you csharp if you keep doing that
is my guess
Yeah that might actually be it
I think the whole problem is just how you're saving it
alright thanks ๐
Thank you Bert
no problem chief
Is that short for Robert?
Or just bert
i mean you dont have to answer
that's personal
Cool name man
is it ? xd
that would always do two networking operations, would wanna do one
is that background an intelliJ plugin
no, intellij supports it by default
breh whatttt
I've been using intelliJ for 4 years to write code and haven't made my environment pretty?
thats just sad ๐ฆ
;d
wowwwww
send your background
Do you think I could nab one from wallpaper engine?
who even needs backgrounds on an ide
real people use vim
yea ig that should work.
No insertAndReplqce?
no didn't find it
im not aware of it existing
I don't think he even needed the insertOne
he has upsert(true)
idk man
i don't use this
he should just connect to his database to view the changes
upsert ๐
lmfao
does it exist?
no
really?
happened to me too
how i can protect the server mongodb?
read__me_to_recover_your_data
u need to password protect it
iam using ubuntu 22
did u use docker?
yes
well u can use environment variables to setup the first account iirc
those are the 2 variables
u can read all of it here https://hub.docker.com/_/mongo
it will probably give you contact details to contact the "hacker" xD
yes someone tried to enter my email information
Yeah I hope nothing important was in there
Is it important? Or can you start it over?
should i just format the entire vps ?
If you can start it over, just don't even open it
u could
Yeah it's just a file
if theres notinh inportant
but
yeah would doo ๐ it will take weeks to get it back working
i mean all my plugins are on my disk
hopefully i am not hacked too haha
Probably not
doubt it
i don't think so , someone tried to enter my email details today
these people just have automatic scanners searching the interner for unprotected databases
like yourself
Yeah
Well that doesn't mean you're hacked
It might just mean there was a database leak somewhere
and they're trying the password
my ip was probbly on the databases i guess
just make sure you change all your passwords
i did change it
Then nothing to worry about
do you know any good free anti virus?
No :(
Windows defender
I don't think it's a virus man
I think your username/password was in a database leak somewhere
and someone tried to use it to log in
he probably didnt even set one ...
yeah anyway , how i can fix the database bug?
atlas without password?
i never used mongodb
ohhh yeah, he probably just got sniped by bots
this is my second time
create ur db using this @twin venture
what are you using for db 'hosting'
so its actually password protected
^^
they also attempt a few common passwords
i mean, not that a database should be exposed to the internet anyway, the port should be closed on the firewall
yeah but for some reason it wasnt
yea. that too but oh well
it's a lesson learned hopefully
luckily doesn't seem like anything sensitive was on it
Ah now this doesn't look too bad ๐ ty @tall dragon I would have never known
too complicated xD
@twin venture do it anyways!!
didn't know how to ๐ฆ
you will get hacked again if you dont use a password
bruh its eazy
i only use docker for pterodactyl panel
send me ur vps creds il create one for u xD
no maybe come vc?
why I have this problem?
are you shading protocollib or something
that is all about ProtocolLib
Everything worked before, and then it shows this:
?paste
my pom looks like: https://paste.md-5.net/ceyihapowo.xml
Does reading entity variables from an asynchronous runnable have any side effects? Like just reading if entity X .isDead()?
Like can that in theory slow the main thread
does protocollib really enable before your plugin?
although normally paper should fail to load your plugin if softdepend would result in cyclic dependencies, can't hurt to check your startup log
you're initializing it in a field
you must get the manager in onEnable too
your plugin instance gets constructed before PLib gets enabled
so your getProtocolManager is still null
(my guess)
it is in onEnable()
does anyone have the ImIllusion's bounding box class paste
bounding box class? spigot includes that?
yeah i know, i just need it for one thing outsideof spigot
huh idk that looks good to me
I looked at the Git for peopleโs problems, I didnโt find anything there, they said the same guesses, but everything is just so good
do you atleast know what i mean
public class BoundingBox {
private Point3D minPoint;
private Point3D maxPoint;
// Constructor to create a bounding box with specified minimum and maximum points
public BoundingBox(Point3D minPoint, Point3D maxPoint) {
this.minPoint = minPoint;
this.maxPoint = maxPoint;
}
// Getters and Setters for minPoint and maxPoint
public Point3D getMinPoint() {
return minPoint;
}
public void setMinPoint(Point3D minPoint) {
this.minPoint = minPoint;
}
public Point3D getMaxPoint() {
return maxPoint;
}
public void setMaxPoint(Point3D maxPoint) {
this.maxPoint = maxPoint;
}
// Method to check if a point is inside the bounding box
public boolean contains(Point3D point) {
return point.getX() >= minPoint.getX() && point.getX() <= maxPoint.getX() &&
point.getY() >= minPoint.getY() && point.getY() <= maxPoint.getY() &&
point.getZ() >= minPoint.getZ() && point.getZ() <= maxPoint.getZ();
}
// Method to calculate the volume of the bounding box
public float volume() {
return (maxPoint.getX() - minPoint.getX()) *
(maxPoint.getY() - minPoint.getY()) *
(maxPoint.getZ() - minPoint.getZ());
}
@Override
public String toString() {
return "BoundingBox{" +
"minPoint=" + minPoint +
", maxPoint=" + maxPoint +
'}';
}
// Static inner class for a 3D point
public static class Point3D {
private float x;
private float y;
private float z;
public Point3D(float x, float y, float z) {
this.x = x;
this.y = y;
this.z = z;
}
// Getters and setters for x, y, and z
public float getX() {
return x;
}
public void setX(float x) {
this.x = x;
}
public float getY() {
return y;
}
public void setY(float y) {
this.y = y;
}
public float getZ() {
return z;
}
public void setZ(float z) {
this.z = z;
}
@Override
public String toString() {
return "Point3D{" +
"x=" + x +
", y=" + y +
", z=" + z +
'}';
}
}
}
generic chatgpt boundingbox
kek
wee
very well
i actually needed it for the iterator lol, im too lazy to write it myself(its not a plugin sooo)
would be less if you guys wouldn't all hate on kotlin the whole day ๐ฅฒ
then here's the same in kotlin
data class Point3D(val x: Float, val y: Float, val z: Float)
data class BoundingBox(val minPoint: Point3D, val maxPoint: Point3D) {
fun contains(point: Point3D): Boolean =
point.x in minPoint.x..maxPoint.x &&
point.y in minPoint.y..maxPoint.y &&
point.z in minPoint.z..maxPoint.z
fun volume(): Float =
(maxPoint.x - minPoint.x) * (maxPoint.y - minPoint.y) * (maxPoint.z - minPoint.z)
}
๐ฅฒ
What did the spigot bounding box do to you
they wanna use it for sth outside of spigot
How to get Material from NMS?
So like get a material from "minecraft:iron_ingot"
I can't use Material#GetMaterial as it only supports the names of spigot materials
I would first need to convert the NMS material to a Bukkit Material
how?
matchMaterial
How do i get a NMS item from string?
nevermind
U meant
Material#matchMaterial
fuck
Registry.MATERIAL.get(NamespacedKey.minecraft("iron_ingot"))
or NamespacedKey.fromString, that takes either namespaced already or if it isn't it'll use the minecraft namespace
Thank you
Thereโs also just Registry#match iirc
Only material or whole item (including all other SNBT)?
For full snbt itโs ItemFactory#createItemStack or sth
With the plugin, I placed the block right in front of the chest as a sign, but it does not connect with the chest. How can I combine them?
BlockData
WALL_SIGN > blockdata, probably Attachable or Directional or sth
Ah didnโt know
so why I have this? ๐ข
if I event.getEntity().getPlayer() is that object always instanceof Player? What if the entity is not a player?
how would I find that out after I used .getPlayer()?
What does getEntity return
an entity?
Whatโs the event?
you're asking smart question
there is no event that isn't triggered by a player that has .getPlayer on the entity
what does sys meant ho
is possible yes
Itโs ur name
Player extends OfflinePlayer which has getPlayer
yes, there is. For example EntityDeathEvent
Well
No
what no
Ur info is wrong
Or u didnโt undersrand what he meant
I understood. they're confused about why Player has a getPlayer() method, and you correctly answers it's because Player extends OfflinePlayer.
the confusion although probably comes from the fact that getEntity() returns a player objects in some events, because subclasses / extending interfaces are allowed to narrow down the return type
EntityDeathEvent does not return a class that has getPlayer though
PlayerDeathEvent does
that is correct, but if the entity in EntityDeathEvent it is a player, then getEntity() returns a Player - and that again ofc has a getPlayer method
Not unless ya cast it
it is a Player no matter whether you cast it or not :p
Well, true. But getPlayer is hidden ๐คท๐ฝโโ๏ธ
that ofc is also true kek. I guess we both know how it works haha
I'm a pacifist bro
I am not
I'll send frostalf into this fight for me
not sure if entitydeathevent is even fired for a player since there is a player specific one
It is
one of the few that does then
PlayerDeath is just a subevent of entity death
Both should be fired
AAAAAHHHHH
because this is wrong but also true
Bish
ofc only one event is fired. but if you register a listener for both PlayerDeath and another one for EntityDeath, then sure, both listeners get called
while true it depends on how its implemented, in this case its done the proper way, in some of the other places, even though it extends it is called specifically
Yete
i yelled because I wasn't sure whether to smart-ass or not
sorry, I'm bored
and general is dead
let's fight DrVoss in general, he's still a child - so we should easily win
lmao WHUT
Yeah
Pretty much what my 8-hour shift is
If he wakes up and does smth stupid I am supposed to guide him into doing smth less stupid yaknow
10mg haloperidol
Heโs on lots offf good stuff
He terminal so he gets it all
anesthetist coding:
while(true) {
while(patient.isAwake) {
patient += 0.1mg Propofol
}
}
um, why in ppe?
We used a nice pump to do propofol infusions in one of my clinicals
anestesist coders love operator overloading
are they contagious ?
Lung infection and influenza
ok, so not really contagious
Enough for full ppe
no not really
how can i do like everyday at x o'clock somethink appen on the server?
Depends
Are u coding smth?
wdym
in a plugin? or the server itself? do you care whether it "skips it" if the server is offline at that exact time?
in a plugin
if you are that scared of the flu, lung infections are not contagious except for certain kinds
but ok
so e.g. you wanna do X every day at 3 am - what if the server gets rebooted twice daily - it shall still just happen at 3 am right? what if the server restarts between 2:59 and 3:01 am? shall it then not run, or run at 3:01?
typical "cronjob questions"
M8, itโs not about being scared ahaha
right
We donโt want to pass it on to other patients or other healthcare providers
So we use ppe
unless you are in a negative pressure room that is going to happen regardless
It is mitigated a lot by ppe
Entity entity = (Entity but without spawning it?)
it will do it at 3am and if the server is off at the 3 it will do at the first time it get on like its the 4am it will do at 4 am
that's actually much more complicated than it sounds
I mean
I would just store a timestamp and check against it every once in a while, once itโs in the past do the thing and make a new timestamp
That way if the server is off itโll see the timestamp is in the past as soon as it comes back on
daylight savings time :p
Yeah I guess that will technically cause issues
(granted, probably doesn't matter - although they specifically mentioned 3am which is exactly the time where the clocks change)
yeah or use 3:01 am instead
like if i want to reset a table in an sql every day for every label in the database its "easyer" ?
do you care whether it's 3am? or just "24 hour at most?" if latter, do what coll said. on first time, store current date. then every minute check the stored date, if it's older than 24 hours, do your thing and reset the stored timestamp to "now"
i care if it goes the Nearest to the 24h
if its 24h and 1m or 24h and 5m it's not that matter
and that is possibile with like smth every 7 days?
last question and i will go to bed
best way to do the timestamp and best way for check it periodocaly
and how i can do the cycle for do the check between this 2 var every 5 min ? or 1 min
?scheduling
thanks a lot y all have a good night see you tmrw
sorry for bothering you another time but what's the better for my situation ? (changing everyday all the values of a table in a database)
This packet is not going through (or is not showing up clientside) and I dont know why. I am using 1.20.4 remapped, the entity is an armorstand btw:
ClientboundAddEntityPacket packet = new ClientboundAddEntityPacket(((CraftEntity) entity).getHandle());
((CraftPlayer) recipient).getHandle().connection.send(packet); // doesnt work
System.out.println("sending packet");
((CraftPlayer) recipient).getHandle().connection.send(new ClientboundSystemChatPacket(TextComponent.fromLegacyText("sent you the packet"), true)); // works
This worked like last week, but now it doesnt, and yes, the location is set
Am I being stupid or is it something else?
What is "this packet", you are showing two
Using nms to send messages seems.. pretty dumb
Seems is not correct here I think you mean.
Sending messages with nms is straight up idiotic behavior and you should check with your primary care and get tested for lead poisoning or other possible conditions that could result I the degradation of the brain
exactly
I just wanted to see if the packets were going through
I dont normally do that lmao
first one, second one goes through
Check if you defined the location of the entity accordingly
Ok so, heres the issue. I am trying to have clientside entities, and currently the entity doesnt exist serverside. I am using NMS to create and send it through packets they way I want it to be shown. Currently, I sent the add entity, then the set passenger, and this worked, but for some reason stopped. When I restart the server (since i made the entity, but the packets were never sent intially) the entity shows up, however it is not because of my packets its just that now the server registeres its existence. Does that make sense?
Not really
Packet entities should work fine as long as you send both addEntity packets before the setPassengers one
And of course you actually add the entity as a passenger
Might need to delay ur setPassenger a bit btw
Delaying always fixes all leโ problems
Iirc Iโve done it in the same tick
In a bundle packet tho but I doubt that matters
How do you create the entity instance?
hey, I was updating one of my plugins when I noticed hex codes don't work in vanilla mc's tab
anyone knows why? here's my hex util class if you need it https://paste.md-5.net/voveyedati.java
Hey! I'm trying to get into Skript Reflect and I just wanna know from plugin devs if anyone here has used Reflect and, if so, how similar is it to actual plugin development
I know one difference is that Reflect literally just. DOESN'T have class files but that's all I know
Ask for skript on the forums
^
No one here knows it ๐คท๐ฝโโ๏ธ
Atleast they havenโt the last 50 times someone asked
Skript is a hellhole and I never ever even want to try learning it
I haven't seen talk of Reflect in here through all my checking of the search tab
And I did ask in SkUnity
They were not very helpful
no one realyl uses skript here
bump, cause all of that skript talk is burrying my request for help ๐
and that method works in regular chat?
Okay I went through talk to find ANY mention of Reflect (which is what I was asking about and is inherently different from Skript) and the last mention of it was half a year ago they did seem to know about it and it's apparently VERY different from plugin development, so I guess thanks
it works in chat and in non-vanilla tabs (TAB as an example)
join the skunity discord
if you havent already
do you really want to use skript? You could join ACTUAL development
@topaz panther https://blog.jeff-media.com/how-to-create-your-first-minecraft-plugin-using-the-spigot-api-and-maven/
they left asap after you mentioned learning Java
I didn't even mention ?learnjava ๐ฅฒ
skript is just spigot api with extra steps ๐ฆ
you mean, a lot of steps
yeah like, if spigot api is a fully working escalator, skript is like a ladder where every second step is broken
I don't get how you make a plugin, based on a somewhat easy to use API, to make another layer of API that is somehow harder to learn than the API it was itself coded with
me neither. it's probably started as a fun project but the skript author didnt expect anyone to actually ever use it
it's a possibility
I mean - skript is nice to just send a custom join message or sth - but writing actual PLUGINS in it? that makes little sense
just like how my very first plugin was only meant to be a way to visit other towns faster on a server but ended up released on spigot with almost 1k downloads
yeah, might aswell learn java and spigot lol
exactly! kek
much better and atleast you can do other fun stuff with java later down the road
i learnt java through some stupid school IDE called "hamster simulator" lmao
hamster ? ๐น
I learned java from youtube tutorials and worked my way up through trial and error (and being hated by many because of too many help requests)
yep
you controlled a hamster through java code
to guide it through mazes
yo that's dope actually
I had the same, with C.
we didnt learn anything about classes etc but it did teach me the basics of imperative coding
besides the user interface which is kinda lame but if you can see through it's really fun lol
fair enough, but yeah learning trough fun doesn't sound bad
anyway, it's 3 am and my insomnia is finally letting me feel tired
I still can only highly recommend actual books ๐ฅฒ
as long as you learn at the end of the day ๐คทโโ๏ธ
time to go read a book and sleep, have a great night
indeed
a book about german tax law?
school helps with that too
btw what's the tax rate in germany?
nothing helps you better @ falling asleep than a book about german tax law
nope, interactive D&D-style book written by the youtuber that inspired my username
that depends. income tax? corporate tax? capital gains tax? property tax? ...
if it's about personal income tax, then it scales with your income
income tax first
also, hi country neighbor
let's say 95, 000โฌ / year
95k per year means you pay 32.24% income tax = 30625โฌ income tax
minus the 1200โฌ you can automatically tax deduct (from the taxable income, not the tax itself)
32 might sound bad but doesn't look as bad as it sounds
and if you're employed, it includes 100% of your health care, pension funds etc
gotta add in the rest though
your guys's taxes go to things that actually help you anyways
I pay over 40% taxes and I think I should pay more
yeah that's also a bonus, handles your well being
americans have to pay a shit ton in taxes AND pay out the ass for school and medical stuff
paying more taxes and getting free health care is better than less taxes but expensive medical bills
how much do you make if it's not indiscrete ?
nah, if you're employed, that's all you pay
seems fair
my job is corporate tax law. does this answer your question or do you need an actual number?
I don't really know about that subject so a number might give me an idea
same
~~ none of anybody's business ~~
You're doing PRETTY well
that does include sleepless nights
sign me up if that's all it takes
it includes never being on vacation even though you're "free"
study tax law
ยฏ_(ใ)_/ยฏ
hopefully includes an early retirement tho
just might, don't know what to do yet
nope - 0 retirement benefits as it counts as "freelancer" job with 0 benefits
and when I fuck up, people sue me
oh okay, so i'm sure the pay somewhat compensates a little
brings it back down to a normal 6 figure
how many times did you fuck up
(over a certain time period)
many people who do the same job as I do are employed and make about 200k (before taxes)
that's very good
got any ideas for an entry level job ?
surely isn't as high as 200k
you mentioned that you wish you did a computer science degree
do you have the option of saving some money for a while so you can go back to school?
for what? law or computer stuff?
law
which country?
spain
then no idea
๐ญ
all I know is that there's many german tax consultants living in spain, who are doing taxes for rich german expats who live in spain (e.g. mallorca) lol
i'll search it up for myself it's all good
doesn't surprise me
anyway I'd much rather be an airline pilot (got a PPL-A + IFR license anyway) but then I could never be at home with my boyfriend
so I stick with my current stupid job
that does make you a good living
but i could understand why you find it stupid
i wouldn't be too happy with lawsuits either
wheres my boyfriend
you tell me
๐ญ
I don't really have to worry, there's usually two cases:
- I sue the tax authority in someone else's name. I gain / lose nothing from that besides normal fees
- Someone sues me. If I lose, my professional liablity insurance would have to pay
Oh and ofc #3 which #1 reversed
anyway, the lawyer gets money no matter whether the client wins or loses
that's why bad lawyers always wear the most expensive suits
(they talk any client into starting a lawsuit, no matter whether it'll be successful or not)
if you really think it's interesting - here's a noob paper I had to write during my study in 2016 or sth #general message
this.textDisplayEntity = new Display.TextDisplay(EntityType.TEXT_DISPLAY, ((CraftWorld) world).getHandle());
the PDF is the english version
I'll take a look at it, gotta do something simultaneously
I mean that's not always true right?
A lot of lawyers take a cut instead, so they'll only pursue suits they believe will win?
I am. I am delaying every packet 1 tick after the last. What is weird is this all worked like last week. I came to edit the code and everything just falls apart ๐ญ
Although I did change one piece, which is that I kept it in the NMS form previously, now I go NMS -> Bukkit Entity -> NMS for things since I am using modules and stuff for version support.
we got the Rechtsanwaltsvergรผtungsverordnung (basically "law about how lawyers get paid") which allows me to charge me up to a high 3 figure โฌ per hour of work. Minimum time frame is 15 minutes so if I got 3 minutes of work, I can charge full 15 minutes which is then already like 100โฌ or more. Ofc that's only done for clients you don't wanna meet again
nah, we just chain words together
e.g. "Law about how lawyers get paid" in german would be "LawersChargingAmountLaw" or sth
thats cool for it to be regulated, tho kinda fucked y'all are stuck to an hourly
we're not, usually we're paid for the "Streitwert", e.g. the amount about what the lawsuit is worth
ah okay
if someone sues you for 500โฌ, the streitwert is only 500โฌ and then my fee would be like 150โฌ or sth (idk, I dont have the calculator open)
I see
but it's up to me to accept this or to say "well but I just don't accept this" - only "law assigned lawyers" would have to accept the case for that amount
which happens sometimes, if someone doesnt find a lawyer even when they're required to get one
mm so court appointed
yeah we have that here in the US too
just not for civil pretty sure
and people are only required to get one if the case is about 5000โฌ or higher, or if they did a "verbrechen" = possible sentence of 1 year or more
if it'S a civil case, the state pays me to my normal rate, otherwise if it's a criminal case, I can usually find an excuse not to do it (only happened a few times). Once I had to defend someone who got accused of involuntary manslaughter and I got next to nothing for that
because as said, state-appointed lawyer makes next to nothing
my field is corporate tax law
and how to evade them
and my "enemy" is usually the tax authority
yeah that sounds abt right
court appointed attorneys paid nothing and tax attorneys for corporations making bank
yep. but every lawyer, not matter what their special field is, can sometimes have bad luck and get appointed
right
and you'll need a very good reason to get out of that, e.g. "I went to school with the defendant" is not reason enough
do they just choose a name off the bar list?
every court has their own system but in the end, it's basically a lottery, yeah
gotcha
some go by name, others literally roll a dice
thats messed up tho
imagine you've got a real estate attorney defending someone accused of manslaughter
like for real, they got a list of 128 approved lawyers in their "bezirk" so they roll three dice and see what the number says
128 is an example number ofc
ya
i dont know the actual number
also sometimes I accept cases for very little money (e.g. 50โฌ because I have to charge at least STH, for insurance reasons) if I'm sure it's literally no work and it's a guaranteed win, or if it's for friends etc). but in 90% of cases, all I do is to give advice and it won't even end up in court. in thouse cases, I can easily charge 450โฌ per hour
e.g. someone faces having to pay negative tax returns of 300,000โฌ because of "<insert legal reason>" and then for them, 3000โฌ for my opinion is nothing for them
right because court is what will really make hours
oh actually it's the other way around. preparing for an actual lawsuit is the time.
just imagine:
court: takes 2 hours
Preparing for that case: 40 hours
how does professional liability insurance work? is it expensive to cover?
now calculate: 42 * 300 โฌ (just use this as average) = 12,600โฌ
if my client wins = great. opponent pays it
if the other dude wins = bad luck for my client. I told him the chances beforehand. he now pays 20,000โฌ. 12,600โฌ to me, remaining amount for the opposite lawyer + court fees
๐ญ
I'm not a jerk though, I tell people beforehand how high their chances of winning are
also 95% of my clients are big corporations
would be unethical to lie otherwise
yes and illegal
exactly
it's my duty by law to help them and be honest to them
still ofc there's a difference between me saying "yeah we're def gonna win" and "hm depends on whether the judge got a good day or not"
also judges are people too - I know that some are pro corpors, others are not
do u tell them their chances of winning after seeing the name of whoever is presiding? lmao
yes of course. But I would never give them a "percentage" or anything. I tell them exactly what I think, I would e.g. tell them "well I had a similar case and the judge didn't even believe the prove of contract last time when they could only provide whatsapp screenshots" and stuff like that
Makes sense
tho, say your client files, you see the judge and realize its a hit or miss, and client doesn't want to take a chance
they cant really just drop it after that, isnt that contempt or something for undermining the court
let
s move this to general, someone's having a coding question
?jd-s
Ah, NMS. Then you're out of luck with me
Though is NMS really needed for that?
Strange, on modern version you likely can use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/MultipleFacing.html#hasFace(org.bukkit.block.BlockFace)
what version are you on? proper API was added in like 1.13 or sth
do I have to use keys to find enchantments names now? ๐
why make it difficult ๐ฆ
Enchantment enchantment : Enchantment.values() would save me that headache ๐ฆ
What's the question
woah
I love those situations where I start writing a request for help and the act of writing forces me to structure my thinking and consider alternative solutions. Often, and this is how it happened just now, before I send my message I think of a possible solution and then look on the internet and confirm that the alternative solution will work. I come to the point where I no longer need to ask for help.
I wonder how many times this has happened to everyone on this channel.
rubber duck
?paste
I want to change the burn time of Coal fuel, I thought I can do this by handling "FurnaceStartSmeltEvent" and setting burn time here(setBurnTime()), but it doesn't change anything.
https://sourceb.in/SYsnx5abzy - code
?paste
what happens when this code triggers?
only console logs, nothing more
what happens?
what do you mean?
Do I really have to do 20 questions. How far through does it go. WHat are you expecting to happen. What actually happens. Does it do anything?
Also this is settign the Cooktime, not the fuel consumption rate
I except it to set burning time inside furnace to 1 second, while nothing happens. I can see all 3 messages I except in console.
Ohh, I see, works now
Thanks!
How can I send information between two plugins I made?
multiple ways
what kind of plugins?
is one plugin for example a core?
and also what kind of information
not rly I got one managing everything about creating a shop and being able to sell things and a different one where I got a bank and everyone has money. So I would need to tell the bank plugin whenever someone buys smth from a shop how much money the bank plugin should deduct from the player bank account
it should also register as a service provider
mhm
and how do I do that, or anyone got a good tutorial where I can look it up?
create your API, then register it with bukkit
If you want it compatible with other economies you shoudl implement the Economy.class from Vault
pluginManager#callEvent() should run synchronously at the time it is called right?
damage
yes
yes
2/3 of my MongoDB shards went down, is this my fault and what do I need to do to get them back online, or do I just need to wait?
why is there a arrayindexoutofboundsexcpetion when i call method.getParameterTypes()[0]; even tho the method obviously has 1 param?
print out it and see if it have any param
i do
count == 1
i check before
at de.mars.event.ListeningMethod.<init>(ListeningMethod.java:17)
public ListeningMethod(Method method) {
this.method = method;
this.eventType = null;
if(method.getParameterCount() != 1) {
return;
}
this.eventType = (Class<? extends Event>) this.method.getTypeParameters()[0].getClass();
}```
how can this be
this.method = method;
this.method = method?
only if there is no field
try printing this.method.getTypeParameters().length
no need to print i alr check if its 1 and the code continues as you can see
he's telling you to check the length of getTypeParmeters() not getPeramiterCount()
oh he's using getTypeParameters
thanks it works now
if not 1 -> return
if 0 -> continue
There's a logical error, no?
? no logical its debug
i checked before creating
params and generic type params are different things
and i clearly dont read chat
umm it seems like now im getting a illegalaccessexception altough im quite sure that the methods are being invoked only by the correct event types
?paste
Maybe debug through and check
there is currently only 1 listener registered
with 1 method
with 1 param
and 1 callevent with the correct param
I'd do the check before registering in the map tbh
Good point too
still doesnt work
Maybe wrong event for wring method?
Cant sadly test it by myself since im just on my phone
as i said there is only 1 callEvent usage :/
Im just guessing lol
Yea I see
But if the parameter is correct, its not the parameter part which causes the issue
Does the constructor of the method class need any parameters which has to be filled maybe first ?
Oh
and not the extended
Yea this could be a issue
still doesnt work
Anyone got any idea how to make my maven profile run a .bat file after it packages the plugin?
???
you can use exec-maven-plugin
but ideally your .bat should be running the mvn package, not the other way around
well its for my test server
so in this profile
i want it so after the compiling the server runs
how would i get my .bat to run the maven?
run the mvn package command in it
then launch server after its done
Where do i find the full command?
what full command?
in what directory tho?
this is a separate .bat from your server start bat fyi
same dir as the pom.xml
maven should be able to do the rest
mvn package
xcopy plugin_jar server_plugin_folder_location
cd ServerDir
call .\start.bat
basically that
cd C:\<path>\AdvancedBoating
mvn package
cd C:\<path>\Test Server
java -Xmx16384M -Xms16384M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar --nogui
oh wait how do i select the mvn profile?
(I have a maven profile that puts the plugin.jar into the plugins folder)
wow for some reason maven isnt a recognised command outside of intellij>?
is there a cmd to download or do i ahve to get binaries?
to download maven?
eyea
probably is some cmd im not sure
ok i downloaded binaries now what
does anypne know how to get the length of data from a packet
without doing any nms stuff
like a way to measure the amount of packets being sent, and the data length
could i listen in on the websocket?
Yeah do Packet#getDataLength
you'll have to use a lib like PAcketEvents or something
thers no way to do it without using NMS
but cant u listen in on the socket
ig you could intercept it, but would be a pain in the ass
i swear u can just listen in on the socket tho
i guess i'll do that
no i dont
just the size of data
i need to monitor amount of data being transfered to detect players sending unreasonable amounts of network traffic and block it
because its a good early sign of a hack client that trys to crash server
you could possibly listen to the socket but im not sure how well that will work
I'm using toml files for translations, any recommendation or suggestion?
?paste
Recommendation or suggestion for what?
if you would do it in another way or sm else
I'd use yaml
It's what most plugins use and Spigot comes bundled with the required libraries
yeah ill take a look thanks. Also why this is in gray, the lombok dependency is applying to all subprojects
That happens a lot
intellij isnt the best for intellisense with groovy+gradle
so should not be a problem
Idk, I open the project in other IDE and things not work
Try it and see if it works
the build works fine at intelliJ
how do I store an integer value in a itemstack's persistent data container thing? trying to do so gives me this error
java.lang.IllegalArgumentException: The found tag instance (NBTTagByte) cannot store Integer
?nocode
Itโs hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
?jd-s
Yo, i cant import my file like this ?
InputStream input = getClass().getClassLoader().getResourceAsStream("fr/syntrow/dwwm/config.properties");
it return an error "the file doesnt exist" : https://pastebin.com/Uh7uKhmP
does the file exist within your jar under the specified path?
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (!(sender instanceof Player player)) return false;
ItemStack itemStack = new ItemStack(Material.STICK, 1);
ItemMeta meta = itemStack.getItemMeta();
if (args.length == 1) meta.getPersistentDataContainer().set(key, PersistentDataType.INTEGER, Integer.parseInt(args[0]));
itemStack.setItemMeta(meta);
player.getInventory().addItem(itemStack);
return true;
}```
ofc
add a / before fr
Like "I unzipped the jar" kind of sure or "I put it in "src/main/java" kind of sure?
nah, same error
I would have been surprised if that fixed it
where is the file in the .jar file
same tho
that, a lot of the time, fixes it
no clue why
what iskey set to?
new NamespacedKey(this, "cooldown");
I'm using maven for compile it, i dont know you guys are talking about, the file "config.properties" is just in my package fr.syntrow.dwwm > config.properties
I know why it might cause that, but I've yet to encounter an instance where it actually matters
- Use Plugin#getResource (as it's simpler).
- Really check yoru jar to be certain the resource exists. Just because it was in your resources folder doesn;t mean it will be copied if you make another mistake.
Okay yeah then you put it in the wrong directory
You need to put it in src/main/resources
put it in the resources folder
Not src/main/java
ok i'll try
i must reconfigure path ?
it changes itself by : InputStream input = getClass().getClassLoader().getResourceAsStream("/config.properties");
well depends on what you are trying to achive