#help-development
1 messages · Page 258 of 1
well if you draw that line you have a full line and not an actual trail
therefore it may look bad
theres no such method, i meant by 'Draw a line' doing the same thing as with the bullet trail just in that sphere around the player. Removes all but two raytraces and a lot of math
final int STEPS = 10;
Location playerLocation = observer.getLocation();
Location start = playerLocation.clone().add(bulletTrailStart.toVector().clone().subtract(playerLocation.toVector()).normalize().multiply(16));
Location end = playerLocation.clone().add(bulletTrailStart.toVector().clone().subtract(playerLocation.toVector()).normalize().multiply(16));
Vector connection = end.toVector().subtract(start.toVector());
connection.multiply(1/STEPS);
HashSet<Location> particleLocations = new HashSet<>(STEPS+1,1.0f);
for(int i=0;i<STEPS+1;i++){
particleLocations.add(start);
start.add(connection);
}
return particleLocations;
here u go
sorry I may be dumb but I kind of do not understand that 100%
oh you wrote some code
lemme look over that
so this will still like a realistic bullet trail you mean?
in exchange for rendering even if theres solid blocks in the way
choose your poison
this one cant be modified to check for blocks in the way easily
ohhh right I forgot that I need to run like 7465t764538765376 checks in addition lmao
How do I update a mobs display name with there currenthealth/maxhealth. While keeping the format” [1] Wild Boar 10/10❤️”?
How can I allow it to put it so its all seen?
Just use the String " [1] Wild Boar " + currenthealth + "/" + maxhealth + "❤️"
I did it, but it’s not very efficient because I have to check for there name, then having to put the mobs name on hit.
Is there a way to just change the health part and leave the rest alone?
as in?
Well what do you mean by that?
You can do .replace(oldvalue, newvalue)
also i dont want to redo the descriptions cause i got like 50 commands
And to get the values, you gotta get the String and split it
Hence the mob has 3 space, can I split it then replace the text after the third space?
make your own /help probably
And keep the rest the same?
thats actually helpful but when people do /help it still would show that mess
wait you mean like /betterserver help?
any
Yes exactly what I mean by splitting it
but that would probably be better
with mycommands plugin, you can block commands or reroute them towards your own custom built /help
mycommands?
i use it for almost everything on my server. very helpful
if you use p.getInventory().addItem() and their inventory is full what will happen?
I THINK it will drop
thats what i hope lol
If not just make a check
yeah
And drop it manually when it is full
yeah lol
Just try it out at this point
yea
it returns the item stacks that couldnt be added
private void giveOrDropItem(Player player, ItemStack... items) {
Map<Integer, ItemStack> map = player.getInventory().addItem(items);
for (ItemStack item : map.values()) {
player.getWorld().dropItem(block.getLocation(), item);
}
}
because that is smart
Is there any documention on spigot yet to edit and sign player messages?
like with the preview and everything
I mean like let the player confirm the signation and stuff
So everything is like green and not yellow or red because of the modification
you want to use the preview chat event i think it was called in 1.19.1 and 1.19.2
...
yeah
mojang
mojank
mowank
That's the problem, you really can't due to the way the system was designed. The only way to circumvent those status indicators is to send their message as a system message.
or use anti popup
IIRC there was a way to manipulate a message, previewing the manipulation for the player and make them approve of it basically
that was the preview event
I read it on some gist kennytv has written up but I think it was removed in a revision
ah okay
It will return Map<ItemStack, Integer> for the itemstack and the count that couldn't be added
there it was
but yeah since it was removed no more bothering I guess
I hate how it was removed
The problem with Chat Previews was that it was a client controlled setting. So even if you implemented it with the server events, the client may not even send or receive that specific packet.
oh makes sense
Mojang said they removed it since it was confusing players, and tbh it was since they made it an opt in setting that was extremely unclear.
So it's on them for making a half baked implementation of something that could have been really cool and useful.
Even if the rest of the underlying system is hot garbage.
no one cares about paper api
🙆♂️
deprecating all our string methods and then not following naming convetions
fLuEnT mEtHoDs bReAk nAmInG cOnvEntIonS
yer
tho you cannot even do it with paper api rn xD
I was more saying, the mojang system technically allows it
if it doesnt have the other method of a set or get then the name is fine but most of them do, which i hate
I mean, that would mean removing spigot methods
dont you do that anyway
no ?
paper aims to remain compatible with spigot plugins
but anyway mojang has something called a ChatType internally
which you can abuse to send a custom prefix
just
not exposed to the API in either spigot or paper
Which ItemFlag disables the placement of a item? (tripwire_hook)
None of them. That's an item attribute.
That I believe only works in adventure mode to begin with.
or you just
public void onChat(PlayerChatEvent e) {
e.setCancelled(true);
for (Player p : Bukkit.getOnlinePlayers()) {
p.sendMessage("prefix" + "name" + e.getMessage());
}
}
``` jank it
Is it no longer AsyncPlayerChatEvent?
😂
a 5head solution 😂
Make priority monitor as welo
im not following anything
Well
i just took a random guess at what the event was
that makes chat messages unreportable which will make people upset on servers
I have yet to run into a person that actually uses the report system.
^
Can a item stack store block data? Like furnace item stack storing inventory contents
?pdc
ty
ehhh
i wonder if paper implements other pdc methods
I like this approach pretty much
if you want to get the data similar to a shift click in creative that keeps in inventory you have to use the BlockStateMeta
or something along the lines
declaration: package: org.bukkit.inventory.meta, interface: BlockStateMeta
To each their own. I'm of the belief that since I pay for hosting, I, or my staff team, should be the one who handles player management for my server.
Good point tho.
i know only one server actively supporting it
its MCCI
Yeaaa, I noticed that when I tried to join.
Man that's such a shit argument too. Mojang pays for the auth servers lol
self hosting yggdrasil is a good idea indeed
the problem is players dont know how to use it on their end
Well how about my server rules? If I allow some toxicity because I'm an anarchy server, why should my players be punished?
Your server rules are entirely irrelevant in the grand scheme of things
Your rules are worthless to Mojang. They have their own overarching rules that take priority
You follow them or you don't play the game
theres also that one project ely (dot) by, its an alternative for mojang services
You talking about the EULA that they hardly enforce?
And for the millionth time, you can allow toxicity all you want
It's like with the U.S.A there are rules that count for every state (Auth server or something like that) and states can make their own rules but they cannot overrule the whole thing(your server)
You are allowed to do that. They're after genuine death threats, personal harassment for things like ableism and racism
No server should be allowing that. Period.
"Fuck you" will not ever get you banned
Never said that I did. I don't support that kind of behavior, but shittalking should not be a permanent bannable offense.
i just joined some server and me chatting somehow kicked all players lol i wonder what caused that
Probably the server owner for not updating to the minor version that fixed it
Or installing some horrible plugin that disregarded chat reports causing the issue
.1?
Or .2 or something. There were a couple versions that fixed kicks like that
Oh yeah
Yea, I get that, but take the weed issue for example. Many states are ignoring the federal ruling and making it "legal" in those states. Just because there are rules doesn't mean that everyone will follow them. The weed issue is one thing, but look up blue laws.
back to development
Minecraft isn't a government entity
Didn't say it was.
Mojang isn't the federal government and your server sure as shit isn't a state 
I keep getting a weird issue where once I've removed the player from a muted list. That when the player talks next, they get instant kicked with an invalid packet signature error. Any ideas?
I was using it as an example to explain the hierarchy of things. You should ofcourse not take it to the fullest...
Clearly went over his head.
Idk. Any time I see somebody complaining about chat reporting, they're bringing out some weird claim that's been debunked and disproven time after time after time and it's exhausting. There are full blown wikis that dismantle a lot of the talking points that get brought up as "fact". Unless you are an active supporter of people praying on children, racism or any other form of discrimination, or personal harassment, you should be in support of this feature. Those that have been raising the alarm over "WE'RE ALL GONNA GET FALSE BANNED" have been really quiet over the last few months after realizing that they have not yet been banned for saying "shit" or "fuck".
I think you fail to realize that those people haven't said anything because they likely downloaded a mod that removes that feature.
And anybody claiming to have been false banned on Reddit or whatever the medium may be should always be taken with a grain of salt because people really like to hide what they actually said to get them banned
I don't know why we escaleted so much now. We should calm down accept / tolerate anyones opionion of this and get back to the actual topic of this channel.
More like they aren't provided a reason why they are banned.
What version are you on?
This will lead nowhere other than conflict
I believe I tested it on 1.19.2
Proxy?
No
How are you putting them in the list? Also what are you doing with the player from that list when they get unmuted?
And how are you muting them?
Lots of variables here lol
Worth noting also that 1.19.3 is a lot more forgiving with chat chains
Array list
Remove them
Re: @worldly ingot
setting the ChatEvent to cancelled
how to accept accents in chat?
Sorry, as much as I want to drop this, I can't let this go. (This will be my last argument though.)
Unless you are an active supporter of people praying on children, racism or any other form of discrimination, or personal harassment, you should be in support of this feature.
This is an even shittier argument than what's been transpiring.
Just because people disagree with the feature does not mean that you get to automatically quantify them as a pedo, or racist, or harasser. This tactic of categorizing people as horrible human beings just because they have a different opinion or oppose something that you agree with is objectively wrong.
Person to person, we can agree on a lot of things. We can also disagree on a lot of things, as we are now, but just because I disagree with a certain thing, does not automatically make me a person who does bad things.
I've been very clear that I don't support those kinds of behaviors, however I disagree with the reporting system as a whole. It's that simple.
Anyone able to help me make the following:
A datapack that makes a recipe that gives you a "bronze coin head",
then a recipe for 9 bronze = 1 Silver, then gold then platinum and so on..?
I am too stupid for datapack making.
You are using the AsyncPlayerChatEvent right? Not the deprecated PlayerChatEvent?
So what's your proposed solution? Because that's the groups of people this system is solely targeting
What is your solution to getting those types of people off of Minecraft? There's no reason for them to be playing it
Not playing it, rather using it as a medium to facilitate their actions
Most servers have those things in their rules but they can get banned on your server and move to the next. If they're not banned immediately on the next server they join, who knows how long it will take for the staff to recognize what is going on beneath their noses
As far as I'm concerned, those against the chat reporting very much have a "out of sight, out of mind" approach to dissenting against horrible, horrible people and that's just a terrible way to handle it. If your friend is casually racist, you should not be shrugging it off in the hopes that they don't do it again in the future, you should be sitting down with that person and have a talk with them (temp ban on Minecraft) or cut them out of your life entirely (permanent ban)
there is a way to make players share inventory instances?
Not really. The best you can do is mirror inventory contents. e.g. one slot changes, slot changes in the other
You'll want to listen to a few different InventoryClickEvent and other inventory change-related events like PlayerDropItemEvent
that seems like a massive dupe exploit
nothings a dupe exploit if implemented correctly :P
Sure but that may not be relevant if the goal is to link two inventories together for some other purpose lol
Is anyone here experienced with the TAB plugin if so please tell me
?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 can help depending on the question
Ok
Honestly, I don't have one because it's a complex issue that goes deeper than just Minecraft. It's not unreasonable to compare the problem with other services as well. Minecraft may be one medium, but there are plenty of others that are cheaper and have far wider reach. cough this very platform cough
I agree that those type of people shouldn't be playing the game, but with the community creation of mods that get around the system, what would prevent those people from downloading them and continuing business as usual? If they download those mods, then what's left for the report system to do? Absolutely nothing since it can't be used as it was intended. Hence opening the door to false reports for various reasons.
I'm not saying that I have the solution to the problem, but when I see a system that is clearly flawed, I'll speak my mind about it.
I don't think that the people who disagree with the reporting system are using the "out of sight, out of mind" mentality. They just have a different perspective on the matter.
but with the community creation of mods that get around the system, what would prevent those people from downloading them and continuing business as usual?
Theenforce-secure-profilessetting that Mojang added to the server.properties file
Whereby if you install one of those mods you can't join the server
That servers are intentionally turning off because they think they're going to get banned for saying "fuck"
That still doesn't solve the problem for the servers who don't condone that behavior, but that still turn it off.
I'll admit, the reaction may be a bit inflated, but it's not entirely unjustified.
enforce-secure-profiles 
"I don't condone this behaviour, but I will allow it without consequences"

Also, if it was that simple, then there shouldn't have been a setting.
It should have just been forced onto people.
I think it's extremely unjustified because people decided to, instead of listen to Mojang who refuted many claims, listen to YouTubers that benefited from the increase in views that fear-baiting got them
The reason they made it an option was because of complex issues like proxies that would have (and still sort of do) seriously struggled to implement it
1.19.3 made it significantly easier to implement and support now and Velocity is on its way to having it officially supported iirc, BungeeCord will likely follow suit
Offline mode is a setting too. Not having that be an option would squash the simplicity of cracked accounts but it's invaluable to proxies and the ability to test without being burdened by the authentication servers
Mojang's most recent changes in the .3 minor make it drastically easier for servers to actually support chat in a more reasonable way and I fully expect future major versions to improve upon the chat reporting feature. The chat reports give a tool to victims to take control over those that would otherwise be controlling them
It's a shame some servers are removing that tool from them due to misinformation
Question: could this topic be discussed in the general chat? I don't see how this discussion helps someone with coding problems (And I'm kinda afraid people won't see my help requests with all the other activity c: )
Yea, I'll switch over there.
Nobody's asked a programming question yet and we've dropped conversation when one is asked
See ^
You're welcome to ask
i asked, but made a thread for it due to your discussion :p
basically it's a question regarding accents in a property file
make sure its utf-8 encoding
Was just about to suggest the same. Read in UTF-8
You may be reading in default platform encoding which will vary and is usually a lot more restrictive than UTF-8
I think the default encoding on W11 is UTF-8 btw, but better to be explicit because you never know
@worldly ingot is it too late to make a thread here or should we continue in #general?
It's fine. I've got a few things to get done anyways so I can't really continue
Does anyone know how I can get a list of objects that implement Serializable from my FileConfiguration
there're base methods that allow me to get a single serializable, but im not sure if #getList would work for them
You should be able to just call getList() which will get you a List<?>. There's no getSerializableList(), but maybe there's room for a PR if someone wants to make one
In the meantime, you should be able to just cast what all is in the List<?>
Awesome, thank you
?cla if you havent already and want to make a pr
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
TIL that keys named on and off on snakeyml are converted to true and false when reading with bukkit
Can confirm, had this happen to me once and it confused the hell out of me. I found that if you put the key in quotation marks, it'll treat it as the actual word.
"yes" and "no" as well iirc
am I tripping or does calling ItemStack#setType completely resets all enchants, including unsafe ones?
nvm I'm tripping
forgot enchanted_book has glow by default
ay it works
resource pack stuf
that example is a lot more complex than you think :p
it's all stored in db
and some other stuff
import org.bukkit.ChatColor;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
public class damage_splash implements Listener {
@EventHandler
public void onDamage(EntityDamageByEntityEvent event){
if(event.getDamager() instanceof Player){
Player p = (Player) event.getDamager();
p.sendMessage(event.getEntity().getName());
if (event.getEntity().getName().contains(ChatColor.RED + "❤")){
Pig pig = (Pig) event.getEntity();
// round the health
int health = (int) pig.getHealth();
pig.setCustomName(ChatColor.DARK_GRAY + "[" + ChatColor.GRAY + "1" + ChatColor.DARK_GRAY + "]" + ChatColor.RED + " Wild Boar" + ChatColor.GREEN + pig.getHealth() + ChatColor.WHITE + "/" + ChatColor.GREEN + health + ChatColor.RED + "❤");
}
}
}
}
``` How would i make this so it'll work on every mob with a heart symbol in it's display name?
I can't figure a way to get the victim's hp unless I define it as a specific mob so im stuck lol
man wants to loop through all entities
looks to me he's just changing their name when damaged
Anyone here have knowledge of IF Inventory Framework?
Im having MASSIVE issues w/ it and cant continue further til I fix this bug.
didn't someone already tell you to ask in their discord
no one can help you here
no I will not phrase that as a question. Someone already told you to ask in their discord
and it is very unlikely anyone here can help you
I did, litterally noone there is online and I had asked 24 hours ago.
guess its time to make your own :P
Yea but im lazy lol
tbh my menu engine shares a lot of similarities with IF
except mine works with layers and IF works with panes
is your opensource or nah
alr
boys it's cold outside
stay warm and remember, I don't charge for setting your house on fire
especially if you're imillusion
Flights to Europe are cheap this year
is import net.minecraft.server.v<VERSION>.EntityZombie equals to import net.minecraft.world.entity.monster.WitherSkeleton but in 1.17+?
I want to be sure 😅 nms confuses me
Hello, is there any way to change the name above the player's head?
So I’ve been running an SMP server for a few years and am creating a new one. I’m planning to code my own plugins for the server. Should I develop different plugins for different things, such as friend requests, land claim, etc, or have all of that in one plugin jar?
@signal cape Yes, but it’s not particularly easy
Question how will I preserve the level, and mob name but only change the hp?
@signal cape You can do so by editing a player’s game profile in packets.
there is no wrong or right answer to this
@torn shuttle What would you say is the most common way?
it's hardly common for servers to be fully developed in-house in the first place
The total code is going to be quite massive, so that’s why I thought I might want to divide different parts into differing plugins
That's probably going to be the smarter move in the long run.
@kind hatch Your profile seems familiar LOL
I was thinking the same thing,
I actually had to double check if you weren't him
I'd just go with very large modules that can be put on multiple servers where you would have a baseline module and then maybe another additional module for survival, one for creative and so one
having to simultaneously develop maintain and debug several projects isn't fun to me
The only issue with multiple plugins is that even though there are differing parts they are very interconnected. For example the friend system works with the quest system so multiple people can do a quest together.
I can interconnect different plugins of course, but they share a lot of data between them
imo as long as you don't have a reason to split them up you could just not do it
Databases will help reduce some of that interweaving, but some modules are going to be tightly coupled together.
I mean ultimately videogames are usually just one large project and odds are the codebase of your server won't reach the levels of complexity of something at that level
thanks for the info
Hmm, how do I preserve "[1] Wild Boar 100/100♥️" and update the part in bolded on attack?
@torn shuttle @kind hatch Well, thanks for the help guys!
Wait a second
You should learn about making class names Capitalized
Set the display name on creature spawn and update it when entity got attacked.
import org.bukkit.ChatColor;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import java.util.Arrays;
public class update_mob_name implements Listener {
@EventHandler
public static void update_mob_name(EntityDamageByEntityEvent event){
if(event.getEntity() instanceof LivingEntity){
Player p = (Player) event.getDamager();
String[] entity_name = event.getEntity().getName().split(" ");
String final_name = String.join(" ", Arrays.copyOfRange(entity_name, 0, entity_name.length - 1));
String display_to_mob = final_name + " " + ChatColor.GREEN + Math.round(((LivingEntity) event.getEntity()).getHealth() * 10.0) / 10.0 + ChatColor.WHITE + "/" + ChatColor.GREEN + ((LivingEntity) event.getEntity()).getMaxHealth() + ChatColor.RED + "❤";
event.getEntity().setCustomName(display_to_mob);
}
}
}
``` This is what I came up with, is it not optimal?
is there an effecient way to make a sort of map (using chat with green and white squares) which shows the claimed or unclaimed chunks in a certain radius around a player when they use a command?
I have all the player's claimed chunks stored in a database
I cant think of a way other than checking every single chunk one by one and then adding its color to the "map"
That's fine but consider using EntityDamageEvent instead, because entity can be damaged by fall or something else for example.
Thanks for the input! Anything I can to make it faster?
will you run into issues trying to add items to an inventory of a chest if the chest happens to be unloaded
or will adding the item load the chunk
@wary kettle Are you keeping a strong reference to the chest?
Why are you casting it to a player? Event.getDamager() can be any LivingEntity so cast it to LivingEntity
If it's not a player and you try to cast it to a player you will get errors
Well I just deleted that part entirely used it to send me message of how their display name would look like. But since I changed it to instanceof EntityDamageEvent sometimes the first hit doesn’t update display name
to the inventory of the chest but not the chest itself
Nothing will probably happen then.
Probably, not really sure it will save the chest tho so u might just be adding to a trashcan
damn :/ ig ill have to test it for myself
Is there anyway to get maven dependency of MythicMobs?
I tried to find it during few days but failed 😦
bruh use java naming scheme
I used chatGPT to help me make a queuesystem for my minigame plugin
I have yet to see how it works
I want to set a block to be a specific age of Frosted Ice, but I can't find anything online about how to do it.
The way to get frosted ice at a certain age with commands would be:
/setblock ~ ~ ~ minecraft:frosted_ice[age=2]
It doesn't seem to be BlockState or BlockData and it doesn't have its own class like Slab does. Does anyone know anything about this?
Hello I have to find a way to send clickable message in 1.19
iI’m currently using ClientboundSystemChatPacket
But it seems to have some issues with the plugin ventureChat
Do you already had this issues?
Is there a way to solve this or do I have to use theirs API if they have one( haven’t looked at it for the moment)
Thanks
Use the api to send chat components
Not sure why you've been using packet? This has been part of the api for years
I don’t think that the spigot API work in 1.19 I think it stopped in 1.13 or something
If I’m not mistaken
No it still exists
I use the api for lower versions
I used it in 1.17, idk about 1.19
It exists all the way back to 1.8
Ok thanks I’m going to find if I can it work
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
re-ping frosted ice question cuz maybe it got lost
Frosted ice is ageable
Cast the block data to https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/Ageable.html
declaration: package: org.bukkit.block.data, interface: Ageable
holy moly I never would have found that, thank you so much!
uwu

thats a teleport?
dismounting a vehicle calls PlayerTeleportEvent, yes
no idea why
Makes a little sense
.
nah just lazy af
well check the chunks and display them in chat?
so there is no better way yeah?
what do you expect
well it was worth asking
I mean, a dismount moves the player. So a teleport is a fine way to dismount.
yeah but there was no TeleportCause for this until yesterday
Can even be fancy and dismount to the side facing the animal/mob or smth.
Yeah he just replied to me saying it made a little sense to use it.
i expect a leapfrog off the vehicle
I love how I only have to change one line in my pom to make my plugins support 1.19.3 lol
Back in the day it was 0 lines.
only works in creative
that works fine in survival too
for me no
?paste your code
ye I was settings setFlying
yes now it works with AllowFlight
thx
np
I found a really good vector
sweet spot for minigames server
pvp server
want it ?
lemme send the vid
IIRC the default jump velocity is roughly 0.6
the video is 1.6GB
cuz recorded in 165fps
bruh cant show you
wanna join my server to test it out ?
woah buddy I sure love putting boxes inside of boxes
I just cant' seem to get enough of that
no thanks
I put your dog into a box after I shot it
did you shoot the box afterwards
I buried it, then I shot at the grave
whats that
and then I screamed "get rekd"
do you still have the gun
I sold it on ebay to get rid of the evidence
the buyer's name was oliver193 or sth similar
I cut my hands off after that
I am writing this message with my left foot
i took them
Oh but thats too sus
i have alex's hands on my desk rn
well I can at least appreciate your dedication to the cause
no, u

how did you cut of ur hands
did you get a new dog meanwhile?
with no hand ?
uh, no
I asked my bf to cut them and he called my best friend, then she cut them off with a razor blade
it was a Gilette Mach 3
Turbo
he wedged a knife between the floorboards and slammed his wrist through it
++
idk anyone
md_5 is the owner of this server lol
and he's cute
who is him ?
I am him
im saying "him" refering to alex
yo I have a question guys
?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!
how can I set a skin for cracked player
what version
no I have original
what version
"nobody wants to spend money on buying minecraft" is a bold statement to make about the most sold game of all time
I asked "what version" twice and I won't ask a third time
1.19
he'll shoot your dog, run
he hasnt shot my dog yet
I have ak 103
in 1.19 you can create a new PlayerTextures object, then apply it to the player IIRC
how
but does your dog have an ak 103
declaration: package: org.bukkit.profile, interface: PlayerTextures
Bro has mac
basically you get their textures, then you do setSkin(URL)
hell yeah brother
no fucking shit
mac is nice
thats that easy ?
you might also have to send a packet to update it, I am not sure. And a player will definitely NEVER see their own changed texture
it's only visible to others
never let them take away your dog's right to bear arms
great, it's working
thats berm peak
if your code doesn't work at first, lower your threshold for success until it succeeds
with no survivors?
yes, and with no evidence
Wouldnt say no evidence
we need to go back to the defcon talks about how to instantly destroy server racks
7a1c00 of jvm.dll. Would only need to look at jvm source at that offset to know why it crashed.
Integer.parseInt(DaddyMD5.baseXX("LVIC", 2))
oh man I should've already gone to bed
@tender shard tell me a bedtime story so I don't have any nightmares
How to store two values with same key? I want something like, i used hashmap for one value but how to do it with 2?
item:
slot: //key
name: //val1
action: //val2
typical java question
a) you can't, that's not how keys work, b) sounds like a typical yml question unless that format is just for some other thing
FileConfiguration#set("items.slot", value)
you create a value object to hold all the data for the key
you can make multiple different objects that have the same inner keys or you can create maplists which have anonymous keys but you can't have two identical keys
okay thanks for advice
or you multimap
I can tell you my pudding joke
but it takes about 30 minutes to tell it
I'm surprised you haven't quit your day job yet
and it's a two part joke, usually it's followed by the "couple goes on honeymoon and eats spaghetti"-joke
otherwise it makes no sense
I quit my job twice already but always started it again
actually I started it again a few weeks ago
were they still recruiting at the comedy graveyard?
that summarizes it up
as everyone probably knows, I'm a tax lawyer - yikes
so "comedy graveyard" is a pretty close match
theoretically speaking, how many tax lawyers would one have to kill before taxes stopped existing?
none, we are there so you pay less taxes
hm
you'd have to kill the government to stop taxes
don't forget about bill and his buddy warren
java.lang.RuntimeException: java.sql.SQLFeatureNotSupportedException
at dev.wonkypigs.cosmicvaults.Handlers.VaultHandler.lambda$createNewVault$4(VaultHandler.java:148) ~[?:?]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3498-Spigot-b081915-10ba1be]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.18.2-R0.1-SNAPSHOT.jar:3498-Spigot-b081915-10ba1be]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.sql.SQLFeatureNotSupportedException
at org.sqlite.jdbc4.JDBC4PreparedStatement.setBlob(JDBC4PreparedStatement.java:125) ~[sqlite-jdbc-3.36.0.3.jar:?]
at dev.wonkypigs.cosmicvaults.Handlers.VaultHandler.lambda$createNewVault$4(VaultHandler.java:141) ~[?:?]
... 5 more
>
getting this error when I try to set BLOB in a local .db file
statement.setBlob(3, serializeItemsArray(vault.getContents()));
anyone know how I can fix this?
what DB do you use?
SQL
do you know which version the server runs?
oh sorry, I meant the mysql server
where exactly can I find the version...?
do you have ssh access? if so, just do "mysql -V"
or you can query it
SELECT VERSION();
it should return sth like "5.7.22-standard" or sth
should print sth like this
however you must run a REALLY OLD version of mysql if it doesn't support blobs. alternatively, you could just store your data as string or sth instead?
I dont run into the issue when I am using a not-local-file db
like when I connect to the one on the xampp server, theres no errors
wdym with "not-local-file"?
if you are talking about files, are you maybe using sqlite instead of mysql? o0
oh yeah you use sqlite and not mysql
hm that's weird though, because sqlite ofc also supports blob datatypes
which version of the sqlite driver do you use?
oh I see, 3.36.0.3
its pretty much my first time using sqlite
wanted to make the plugin compatible with local data storage
yep
try changing the version to 3.40.0.0
then see if it still happens
3.36.0.3 is over a year old, but it should still work, I don't really have any idea. but I only got the source for the latest version, so please try this, if it still complains then we can check the source and see where it's coming from
latest is as said, 3.40.0.0
kk ima compile and check
it's beautiful, now I can go to bed
don't go to bed yet
I need you
it's only 12:34 in germany
you cannot go to bed now
you all do, and that has never stopped me before
it's 11:34 am in portugal aka bed time because I have dnd in 7h
I'll give you a one star review on spigotmc if you go to bed now
he has do not disturb in 7 hours
btw I was literally just browsing your plugins for inspiration :p
like 2 mins before I asked the question here
lol
better not check my todo list
the backlog alone is waaay too long D:
imagine having backlogs
imagine having plugin ideas
I have a ton of ideas
for example a tax plugin
players have to declare their income every X ingame days
if they don't do it properly, they are either jailed or fined
how about we leave that to the IRS
ofc the plugin checks whether the amount they declared is income matches with their vault income
thank god I don't live in the united states lol
okay another idea
an insurance plugin
admins can build a hospital. whenever a player dies, they respawn there, then they get a huge invoice, unless they bought insurance before
if they bought insurance though, the hospital will still mock you for certain types of death. you need to get an insurance that covers your actual cause of death
e.g. if you buy an insurance for void death but a creeper kills you, you still get an invoice
and if you don't pay it in time, then some headhunters will start to haunt you
my prime strategy right now is to just build a popular plugin type and try to add a small twist to it
oh that's easy
just make another lifesteal plugin
or skyblock
or a backpack plugin
the plugin which is throwing errors is a vault plugin
or, and this is actually what I wanted to do, is this:
after that i might just go for lifesteal
a plugin that lets you spawn vanilla structures like villages, desert temples, etc with a command
e.g. /spawnstructure desert_temple
but that requires deep NMS fuckery
oh I have another idea, and that's actually easy and useful
allow players to choose their own color for their chat name
e.g. /chatcolor ff0000
and then their name is black in the chat
(only the name, not the message)
could also have a fancy GUI for them to choose gradients and stuff
I got another idea - when a creeper explodes, it should ofc destroy stuff - but it should get automatically repaired within like 5 minutes or so, so the blocks basically get rebuilt slowly over time
I think theres a plugin for that already
if I remember correctly
yes but they are all shitty, don't work for chests and stuff
or they are made for 1.12 and below only
dont tell me you are also going to recover all chest contents
well that could be toggleable ofc
can you even do that
noooo
just get the blockList from the explode event, then cast the chest to Container, then store the inventory in a map or sth
iirc I just used a Map<Location,BlockState>
same error
heres the code
I want to commit unalive
im gonna make that
which line throws the exception?
and please paste the full exception again
?paste
I love that idea lol
btw my most popular plugin (chestsort) is also a stolen idea
I stole it from QuickSort which wasn't updated to 1.13 back then
how do you even "advertise" your plugin
it sounds fun tbh
the INSERT INTO is throwing the error?
like how do you get people to know about it
I didn't do anything, I just uploaded it and then it "kinda" sky-rocketed
you hire a plane to draw the name of your plugin with clouds
same for angelchest
statement.setBlob(3, serializeItemsArray(vault.getContents())); to be specific
thanks, will try
so I just gotta hope that people like it
ah I see. let's check the source, one sec
and share it
which class exactly is "statement"?
PreparedStatement
send the full class name pls, including package
i feel like for plugins its really a lot more "make smth good and people will use it eventually"
100% true
import java.sql.PreparedStatement;
like for games you cant really say that but i feel like for plugins it is more htat
ok lemme check
I guess its time to start copying every single plugin I see and put whatever twist I can onto it
and just try to make it better in general
please call getClass() on your statement, then print out the full class name. because PreparedStatement is just an interface
we gotta check the implementation
Its from sql package in java
it looks like your JDBC driver simply doesn't support setBlob
plugin.getLogger().info(statement.getClass().getName()); this?
aight lemme build and run
yeah but we gotta check which impl they use
PreparedStatement is just an interface
some drivers apparently do not support setBlob
Well no. Sqlite for example doesnt
but it should, blob is a supported datatype in sqlite, I checked their docs a few minutes ago
Which makes sense because sqlite is just flat file binary storage
btw is there a somewhat fast way to test out my plugin with versions 1.13-1.19? currently I just have local test servers for all the versions and I test one by one which is very annoying
do you use NMS?
org.sqlite.jdbc4.JDBC4PreparedStatement
in this plugin no
if you don't use NMS, and if it works in 1.13, then it'll work in 1.19 too
^^
ah, alright
you could also do some unit tests e.g. with MockBukkit
neat
this is the class btww
yeah that should work in theory
long story short - I'd just use strings or byte arrays when it complains about blobs
stupid work around, but that would definitely always work
is byte array actually an option
what data do you actually save?
no, probably not
just go for strings
well serializeItemsArray() basically outputs a byte array
you could use Base64 e.g. but that leads to about 33% bigger data
you could just base64 that shit
Can i make a furnace block lit in my inventory?
whatever works for storing full inventories...
i dont think so, at least not without a resource pack
sure, one sec pls
cuz players will be able to have as many vaults as the server owner allows
@misty ingot https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/ItemSerializer.java this is how I turn an Inventory into a base64 string
Hello, Is anyone else having an error where the server cannot save chunks on latest 1.19.3 build ?
https://paste.md-5.net/qipemucedi.coffeescript
Then i just tp the player to the world
Error:
[11:27:17] [Server thread/ERROR]: Failed to save chunk 0,0
java.lang.NullPointerException: Cannot invoke "net.minecraft.resources.MinecraftKey.toString()" because "minecraftkey1" is null```
what is "minecraftkey1"?
I uhhh don't know 😅
hmmm you never defined that var yourself?
I can show you the full error also
Have fun with overly vague errors or problems lol
Yes, and no there isn't its teh same error for idk 50 chunks
if that's indeed the full stacktrace, then it's a vanilla bug I fear
the whole stacktrace only shows NMS classes
so I guess you'll have to report it to mojang 😛
Have you tried updating?
The thing is, yesterday it was working i created y world nicely and today i rebuilt the 1.19.3.jar of spigot using Buildtools and poof not working anymore
what's your /version ?
That's what caused the issue i guess, and i cannot seem to get the version i was on which was working
You can do --version commit id
This server is running CraftBukkit version 3625-Spigot-d90018e-585ab5b (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
You are running the latest version
To build specific commit versions
ohh, the thing is i don't remember lul
okay gimme a sec pls, I'll build it myself and check the current version
but thanks for the info
?stash
thanks
do you maybe also have a .jar you could share, so I can try out your .jar myself?
yes, here or dm ?
you cannot send files here because you are not verified, so just DM it. friend request is not needed
okay
Of its a recent updated odds are someone probably forgot something in a recent pr
@tender shard your dm are locked ^^
did you get that from PH's discord?
no
huh weird, it's actually open. well then just FR me
gif finder
got it working now?
the only downside of base64 is that everything becomes like 33% bigger in file size
but tbh, who tf cares lol
works on the local db
nice
testing on the server one now
it will work
doesnt hurt to check
basically, I dont trust myself
even if I know that the code is right
[17:44:46] [Craft Scheduler Thread - 0/WARN]: [CosmicVaults] Plugin CosmicVaults vv1.0 generated an exception while executing task 8
java.lang.RuntimeException: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'CONTENTS' at row 1
at dev.wonkypigs.cosmicvaults.Handlers.VaultHandler.lambda$saveVault$2(VaultHandler.java:89) ~[?:?]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3498-Spigot-b081915-10ba1be]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.18.2-R0.1-SNAPSHOT.jar:3498-Spigot-b081915-10ba1be]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'CONTENTS' at row 1
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104) ~[mysql-connector-java-8.0.27.jar:8.0.27]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql-connector-java-8.0.27.jar:8.0.27]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098) ~[mysql-connector-java-8.0.27.jar:8.0.27]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046) ~[mysql-connector-java-8.0.27.jar:8.0.27]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371) ~[mysql-connector-java-8.0.27.jar:8.0.27]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1031) ~[mysql-connector-java-8.0.27.jar:8.0.27]
at dev.wonkypigs.cosmicvaults.Handlers.VaultHandler.lambda$saveVault$2(VaultHandler.java:86) ~[?:?]
... 5 more
something went wrong
getConnection().prepareStatement("CREATE TABLE IF NOT EXISTS player_vaults (UUID varchar(50), VAULT_ID int, CONTENTS TEXT)").executeUpdate();
storing base64 in CONTENTS
Is the vault EXACTLY the same
nope
Then that can explain the error
well I am adding items to the vault
so base64 is working out for sqlite and blob is working for mysql
data is too long
how did you setup the column / db / table?
you gotta keep in mind that some itemstacks can be REAAAAALLY long, e.g. books with a thousand pages
once u look as if ur actually an adult sure
how old are you again?
roughly
somewhere between 19 and 23
then I'm way older than you are, so shut the fuck up bruh
bruuuuh
bruuuuuuuuuuuuuuuuh
alex is 16
I am 27
i was referring to this not the way you were talking
not anymore
I paid 40$ for that profile pic
some dude from the philippines drew it for me
that's why noone pays you 40$
thats more because i dont provide any services and less that i dont want to do it
imagine getting money
couldnt be me
how do you all even pay your rent if noone pays you
what rent
government does it
i have a bridge
that's reasonable
only rent i pay is fighting for my life
how can I afford food? I can't :)
spigotmc pays my rent and servers, and for all the remaining things I do my shitty tax lawyer job
oli paid for my dinner like 2 nights ago
oliver193
ooh
the one with the pathethic api
I remember that person
@opal juniper when do you pay for mine
I paid him back but still
no fuck you
I mean
right now I'm good
Imajin
godcipher also exist
how much
at least 2$
so in total he made $60
that's not enough to go to jail
to go to jail you have to tax-fraud at least 100k€ or sth
well i do
are you working for a company???
yeah
even I work for a company, what's the big deal
well im getting paid very well so idc
thats fair
I work for 3 different companies. One is my own, the other one is a f,lying instructor company, and the third one is a lawyer company
only downthing to work for someone is to work for someone
so when I manage to do that, probably everyone can
sometimes
VAT is basically "sales tax"

hm
also known as gov. scam
wasnt there like a 10000€/year or so minimal amount of money u have to make before paying taxes in germany
yeah
no
8852€
but that's only for income tax
everything you buy in the supermarket is taxed with 19 or 7%
basic stuff like food is 7%
everysthing else is 19%
what about the other taxes
like
rent tax or whatever
rent tax? or do you mean "income through renting sth to someone else"?
rente
you don't pay taxes for that, actually those payings are even deducitble from your taxes
do you have a normal 9-5 job? if so, you get a huge letter at the end of every year
this huge table on a DIN-A4 page
you can deduct all those "rente" payments from your declarable taxes
we germans call it ALTERSVORSORGE!!!!!!!!!!!11111
*eleven
im still studying
Tax is prolly not the same everywhere
man germans a hard language
is this your first "study"? if it's the second one, you can also deduct the payments for that
1st
ok then you cannot deduct it
but you can do an Einkommensteuervorauszahlung, in case you ever make money with the job you are currently studying
yeah
you don’t need it
Can u #general thx
Imagine you now study IT stuff, and you pay 300€ per semester for this - you can then, when you finally make money ih 3 years, deduct all that stuff you paid to study
but only if you do an Einkommensteuervorauszahlung now
hmu in DMs for more details
might do later
TLDR: in germany, you just pay a SHIT LOAD of taxes for literally EVERYTHING
You do that in lots of countries
im broke
btw, you pay like 1 Euro of taxes per liter of fuel for your car. Without calculating some extras
just dont pay any 
prison is taxfree
ohhh ok
but they do not know how to use the code then
also I need to use google
then you start with dealing code snippets in prison
build your own computer with starlink internet access
and voila
LMAO
but arent german prisons like a normal appartement anyways
aight
no
well there are many prisons where its just like a wohngemeinschaft
with everything you need
otherwise trade informations about your inmates for a computer
then learn youtube judo so you dont get beaten up
drones
aren't they gonna get shot down?
and aren't my windows full of iron bars?
just turn the drone sideways then
then go for subway
no
long and small
I do not like subway
thats what she said
I want mcdonalds
not your problem if you let them deliver it
OH WAIT actually its just 25 miles
its cold then
microwave it
and I want mcdonalds not subway
burgerking>
no
but subway is unbeatable
mcdonalds >>>
peter pane or pizza bulls also very good
why did i think of subway surfers when i saw subway
youre just too old
Is there something wrong with this code? Because for some reason it's turning "$51.28M" into a Memory Path or something https://paste.md-5.net/tuwilaxubu.sql, I'm trying to replace every character with unicode.
private String parse(String message, List<Placeholder> placeholders) {
String result = message;
for (Placeholder placeholder : placeholders) {
result = result.replace(placeholder.getPlaceholder(), placeholder.getReplacement());
}
return result;
}
seeing $51.28M makes my eyes bleed
idk it just makes my eyes bleed
So, this is a weird bug. I'm writing a plugin where other entities can ride on the player and the player should be able to interact with them using a lead. The problem is that, when I use a lead on a sheep that rides me, the game will unmount and leash it.
Even if I cancel the PlayerLeashEntityEvent, the sheep changes its state on interaction. While it's still mounted, it now stays in the position where I tried to leash it.
What I'd want it to do is to simply ignore being leashed when riding on me.
public void cancelLeashing(PlayerLeashEntityEvent event) {
final Player player = event.getPlayer();
if (getBaseVehicle(event.getEntity()) == player) {
event.setCancelled(true);
Bukkit.getLogger().info("Cancelled " + event.getEventName());
}
}
Probably around the same here in denmark
cant u just cancel the interact event
The exact same thing happens.
idk then sorry
on a different topic who do i ping for issues with buldtools
If any of the staff reads this, atm --rev latest is generating 1.19.2 instead of 1.19.3
^^
and it still says remapped doesnt exists
Hey ! Do you think that this piece of code is clean ?
If not, why ? I don't get what's good code and what's not haha
public static void magicClockUse(PPlayer pPlayer, ItemStack item) {
Player player = pPlayer.getPlayer();
if (pPlayer.getMagicClockLocation() == null) {
// Case of the 1st use
// We enchant the clock
ItemMeta itemMeta = item.getItemMeta();
itemMeta.addEnchant(Enchantment.DURABILITY, 1, true);
item.setItemMeta(itemMeta);
// We set the teleport location for the councerned player
pPlayer.setMagicClockLocation(player.getLocation());
player.sendMessage("§6" + Main.getPlugin().getConfig().getString("MagicClockTimeTravelBegin"));
Bukkit.getScheduler().runTaskLater(Main.getPlugin(), new Runnable() {
@Override
public void run() {
if (pPlayer.getMagicClockLocation() != null) {
// What runs after the end of the effect
player.sendMessage("§6" + Main.getPlugin().getConfig().getString("MagicClockTimeTravelEnd"));
MagicClock.removeOneMagicClock(pPlayer);
player.teleport(pPlayer.getMagicClockLocation());
pPlayer.setMagicClockLocation(null);
//TODO Animation retour dans le temps
return;
}
}
}, 20*(2+3*pPlayer.getGadgetLevel("magicClock")));
} else {
// Case of the second use
player.sendMessage("§6" + Main.getPlugin().getConfig().getString("MagicClockTimeTravelEnd"));
MagicClock.removeOneMagicClock(pPlayer);
player.teleport(pPlayer.getMagicClockLocation());
pPlayer.setMagicClockLocation(null);
//TODO Animation retour dans le temps
}
}```
What about playerinteract whilst looking at sheep?
I cancelled playerinteract, playerinteractentity and playerleashentity at the same time
Looks fine
It takes some time before the latest version of the game becomes the latest version in buildtools. It's kind of like a grace period to ensure that most bugs are fixed beforehand. As for the remapped versions, I'm not sure about that. It may be trying to use the remappings for 1.19.2 instead of 1.19.3
The method translateAlternateColorCodes(char, String) in the type ChatColor is not applicable for the arguments (String, String)
what the hell ?
I am doing: ChatColor.translateAlternateColorCodes("&", title)
Chars use single quotes and only refer to one character.
String s = "MyString";
char c = 'A';
tf is that shit
It's how you differentiate.
Its java
Hello, why the hell am i getting this error?
Caused by: java.lang.NoSuchMethodError: org.bukkit.entity.Player.sendTitle(Ljava/lang/String;Ljava/lang/String;III)V
player.asPlayer().sendTitle(ChatColor.translateAlternateColorCodes('&',title),ChatColor.translateAlternateColorCodes('&',subTitle),fadeIn,stay,fadeOut);
yes
