#help-development
1 messages · Page 955 of 1
Was thinking that as well. The teleport interpolation might work while spectating.
Can I make smooth animation with that like not a tp ?
Hm
Sure, small teleports are interpolated by the client automatically as movement. (i think)
Camera movements bad but regular velocity good
Ok thx
yes luckily
No one knows? (yeah, Queens of The Stone Age)
but head movements are weird on armorstands
You might be able to modify the name of merchant inventories with packets
humm okay thanks
InventoryView#setTitle no?
You know how to work with them?
I can probably cook something up
Can you tell me why I can't find anything on the internet
Let me take a look at the protocol real quick and well see then
My test code
public static void createNpc(@NotNull Player player, @NotNull EntityType type) {
final PacketContainer packet = new PacketContainer(PacketType.Play.Server.SPAWN_ENTITY);
packet.getIntegers().write(0, 2004); // Entity ID.
packet.getEntityTypeModifier().write(0, type); // Set EntityType.
// Set location.
packet.getDoubles().write(0, player.getX());
packet.getDoubles().write(1, player.getY());
packet.getDoubles().write(2, player.getZ());
// Set Direction.
float yaw = player.getYaw();
float pitch = player.getPitch();
packet.getBytes().write(0, (byte)((int)(yaw * 256.0F / 360.0F)));
packet.getBytes().write(1, (byte)((int)(pitch * 256.0F / 360.0F)));
try {
Anarchy.getProtocol().sendServerPacket(player, packet);
} catch (Exception e) {
Anarchy.getInstance().getSLF4JLogger().error("Send player packet NPC.", e);
}
}
the prefix is under 16 chrs tho, or do you mean that thats total including name? cus it was working fine yesterday and i dont think i changed anything that would effect it
public static void runChickenTasks() {
new BukkitRunnable() {
@Override
public void run() {
for (Player player : Bukkit.getOnlinePlayers()){
PetRegistry.getChickenPets().forEach(((uuid, chickenPet) -> {
if (isPetInsideInventory(player, uuid)){
PetLevelSystem.addExperience(uuid, 1, chickenPet);
}
}));
}
}
}.runTaskTimer(CoolPets.getPlugin(CoolPets.class), 20L, 20L);
}```
Is this correct usage of a runnable?
This is the spawn packet, metadata is not defined here
Print it out
it would probably work, but the usage could be improved
?scheduling
Imagine not memorizing the entire protocol smh
I don't know how to work with packages, I'm doing it for the first time
Ew no
Could you show a code example of how to spawn a creature with metadata, for example, if it is a certain type of inhabitant and without gravity?
Cool, villagers are a weird case
Give me a sec getting out of bed
Yes
Yes, Ok )))
I hard eyeballed some of those. Let me know if it works:
public PacketContainer createVillagerMetaPacket(int entityId, VillagerType type, Villager.Profession profession, int traderLevel) {
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
packet.getIntegers().write(0, entityId);
List<WrappedDataValue> dataValues = new ArrayList<>();
WrappedVillagerData.Type wrappedType = WrappedVillagerData.Type.valueOf(type.toString().toUpperCase());
WrappedVillagerData.Profession wrappedProfession = WrappedVillagerData.Profession.valueOf(profession.toString().toUpperCase());
WrappedVillagerData wrappedVillagerData = WrappedVillagerData.fromValues(wrappedType, wrappedProfession, traderLevel);
WrappedDataWatcher.Serializer villagerSerializer = WrappedDataWatcher.Registry.get(WrappedVillagerData.class);
dataValues.add(new WrappedDataValue(18, villagerSerializer, wrappedVillagerData));
packet.getDataValueCollectionModifier().write(0, dataValues);
return packet;
}
yeah looks about right
I hate what i did for the enum conversion. But i couldnt find a mapper for them
As far as I've seen from the link, it looks fine. What could be improved that you see?
as I say that, I read this haha: ```However using the BukkitScheduler is syntactically cleaner and slightly, negligibly faster if you were to pass a lambda. This due to that lambdas compile down invokedynamic which slightly faster than invokeinterface or invokevirtual.
Hm. I think the WrappedVillagerData needs to be converted to an nms object first...
Also I don't think your conversion is gonna work
ProtocolLib has been wonky when it comes to metadata lately, call getHandle
Cannot resolve symbol 'VillagerType'
Good
is it really gon work

Its a conversion from bukkit to PLibEnumWrapper. Not from bukkit to nms.
So it might work.
wait that's the wrong one
that's 1.13 villager wtf
transitive deps go brr
yeah we good
packet.getEntityTypeModifier().write(0, type); ???
Your conversion will probably work fine
We don't need that, it's not the spawn packet
Ok
The modern entity metadat packet just takes 2 fields:
- Entity ID (int)
- Data values (List<DataValue>)
You send it after sending the spawn packet
IDeally both in the same tick
public PacketContainer createVillagerMetaPacket(int entityId, Villager.Type type, Villager.Profession profession, int traderLevel) {
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
packet.getIntegers().write(0, entityId);
List<WrappedDataValue> dataValues = new ArrayList<>();
WrappedVillagerData.Type wrappedType = WrappedVillagerData.Type.valueOf(type.toString().toUpperCase());
WrappedVillagerData.Profession wrappedProfession = WrappedVillagerData.Profession.valueOf(profession.toString().toUpperCase());
WrappedVillagerData wrappedVillagerData = WrappedVillagerData.fromValues(wrappedType, wrappedProfession, traderLevel);
Class<?> nmsType = WrappedVillagerData.getNmsClass();
Object nmsObject = wrappedVillagerData.getHandle();
WrappedDataWatcher.Serializer villagerSerializer = WrappedDataWatcher.Registry.get(nmsType);
dataValues.add(new WrappedDataValue(18, villagerSerializer, nmsObject));
packet.getDataValueCollectionModifier().write(0, dataValues);
return packet;
}
Here is the packet using the unwrapped nms object. I think this is the right way.
But try the other impl first.
No, just that most wrapped types have their own get method
@echo basalt @lost matrix
You are cool, how do you know that?
I don't understand anything about it (
Could I PM you for some similar package information?
Instead of getting the serializer for WrappedChatComponent you call getChatComponentSerializer
Experience, just ask here
Yeah if you can get the serializer directly from here then its fine.
after setting my skin with the PlayerProfile class, it won't show the new skin.
Code:
PlayerProfile profile = player.getPlayerProfile();
PlayerTextures textures = profile.getTextures();
try {
textures.setSkin(new URL("https://textures.minecraft.net/texture/21534c9bea4a10745128f0d7d5bd8fb1848ac82c793323be5c0612a91dd58bbd"));
profile.setTextures(textures);
sender.sendMessage("Changing skin should have worked.");
} catch (MalformedURLException ignored) {
sender.sendMessage("Changing skin failed.");
}
There's no getVillagerData serializer though
whatever trial and error
But if there's a method use the method
It's just that mobs have many different functions, for example, invulnerability, gravity, placing an object in the hand, and so on. I would like to know how it can be done or where I can find out such data so that I can do it myself and not distract you
Pretty sure you need to send a respawn packet
Thats what made me believe that we need an nms serializer.
Anyways we will find out soon.
oh, how would that work?
Well..
You set the profile
And then you respawn the player
It'll flicker a bit iirc
try player.spigot().respawn() first
Alright packet time
o_o
Allow me to pull up some cursed 5 year old code
In germany we would say: "Tu' dir keinen Zwang an."
(I hope Illusion is not german, otherwise this would be kinda weird now)
I'm not, smile is
Nah I'm portuguese
[00:29:51 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'npc' in plugin FOX-ANARCHY v1.0
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R2.CraftServer.dispatchCommand(CraftServer.java:1005) ~[purpur-1.20.2.jar:git-Purpur-2091]
at org.bukkit.craftbukkit.v1_20_R2.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.20.2.jar:git-Purpur-2091]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:265) ~[purpur-1.20.2.jar:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:338) ~[?:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:322) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2279) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$20(ServerGamePacketListenerImpl.java:2239) ~[?:?]
at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.2.jar:git-Purpur-2091]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1351) ~[purpur-1.20.2.jar:git-Purpur-2091]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:193) ~[purpur-1.20.2.jar:git-Purpur-2091]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1328) ~[purpur-1.20.2.jar:git-Purpur-2091]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1321) ~[purpur-1.20.2.jar:git-Purpur-2091]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1299) ~[purpur-1.20.2.jar:git-Purpur-2091]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1187) ~[purpur-1.20.2.jar:git-Purpur-2091]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.20.2.jar:git-Purpur-2091]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: field
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:921) ~[guava-32.1.2-jre.jar:?]
at com.comphenix.protocol.reflect.accessors.MethodHandleHelper.getFieldAccessor(MethodHandleHelper.java:83) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.reflect.accessors.Accessors.getFieldAccessor(Accessors.java:84) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.EnumWrappers$FauxEnumConverter.getGeneric(EnumWrappers.java:972) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.EnumWrappers$FauxEnumConverter.getGeneric(EnumWrappers.java:953) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.WrappedVillagerData.fromValues(WrappedVillagerData.java:53) ~[ProtocolLib.jar:?]
at ua.imfoxter.mc.foxanarchy.sections.npc.edit.NpсPackets.createVillagerMetaPacket(NpсPackets.java:61) ~[FOX-ANARCHY-1.0-all.jar:?]
at ua.imfoxter.mc.foxanarchy.sections.npc.edit.NpсPackets.createNpc(NpсPackets.java:40) ~[FOX-ANARCHY-1.0-all.jar:?]
at ua.imfoxter.mc.foxanarchy.sections.command.npc.CommandNpc.execute(CommandNpc.java:40) ~[FOX-ANARCHY-1.0-all.jar:?]
at ua.imfoxter.mc.foxanarchy.sections.command.Command.onCommand(Command.java:50) ~[FOX-ANARCHY-1.0-all.jar:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
... 23 more
never met someone portuguese before tbh
?paste
plox
final PacketContainer villagerMetaPacket = createVillagerMetaPacket(2004, Villager.Type.JUNGLE, Villager.Profession.ARMORER, 0);
try {
Anarchy.getProtocol().sendServerPacket(player, villagerMetaPacket);
} catch (Exception e) {
Anarchy.getInstance().getSLF4JLogger().error("Send player packet NPC.", e);
public static PacketContainer createVillagerMetaPacket(int entityId, Villager.Type type, Villager.Profession profession, int traderLevel) {
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
packet.getIntegers().write(0, entityId);
List<WrappedDataValue> dataValues = new ArrayList<>();
WrappedVillagerData.Type wrappedType = WrappedVillagerData.Type.valueOf(type.toString().toUpperCase());
WrappedVillagerData.Profession wrappedProfession = WrappedVillagerData.Profession.valueOf(profession.toString().toUpperCase());
WrappedVillagerData wrappedVillagerData = WrappedVillagerData.fromValues(wrappedType, wrappedProfession, traderLevel);
WrappedDataWatcher.Serializer villagerSerializer = WrappedDataWatcher.Registry.get(WrappedVillagerData.class);
dataValues.add(new WrappedDataValue(18, villagerSerializer, wrappedVillagerData));
packet.getDataValueCollectionModifier().write(0, dataValues);
return packet;
}
I see the problem. One moment
wait a second, let's say i shamelessly copied those methods @echo basalt (hypothetically ofc), should i be able to access all those classes if i have nms "enabled"?
Bc it cant find SkinData or ClientboundPlayerInfoPacket
SkinData is my own thing
ahhhhhhhhhhhhhhhhhhhh
Rest yeah you need to have it remapped
?nms
i did that, i was just confused. thought SkinData was a spigot thing loll
What about ClientboundPlayerInfoPacket?
yeah it's nms
XD
InventoryClick
InfoUpdatePacket is the one.
oh thanks
ik, is that why the inventory doesn't get updated an it's kinda bugging out?
there is no Action.REMOVE_PLAYER tho
Or do you want to remove?
want to get this to work lol
ClientboundPlayerInforRemovePacket
@junior cradle So this is throwing an exception. Which indicates that we might have encountered a bug in ProtocolLib
Unless...
Wait let me double check sth
Isn't it just Player#setPlayerProfile and Player#respawn ?
What shall I do?
i tried player.spigot().respawn(); and it didnt work
but tbh respawn() should work as far as i understand the CraftPlayer code
wtf
Maybe the problem is in the id entity?
Did I come up with it randomly? 2004
Binvix hello
Nope the problem is that ProtocolLib doesnt find a converter for their enum wrapper.
Im trying to find a way to circumvent this.
How to get highest block (not bedrock) in nether?
get the nms type directly
Start at the top and iterate until you hit a block that isnt air.
make sure you find air first
unless you want roof
I think bukkit have method which do that or isnt?
The problem is that the nms type needs reflections for its fields
What is height map and can i use it for resolve my question
anyway, fuck it for today. it's like almost 12am i got work tomorrow. gnight yall
But i guess i could bypass this static method by emulating it?
Well, I hope everything works out for you
The highest block that blocks motion or contains a fluid.
MOTION_BLOCKING,
The highest block that blocks motion or contains a fluid or is in the
MOTION_BLOCKING_NO_LEAVES,
The highest non-air block, solid block.
OCEAN_FLOOR,
The highest block that is neither air nor contains a fluid, for worldgen.
OCEAN_FLOOR_WG,
The highest non-air block.
WORLD_SURFACE,
The highest non-air block, for worldgen.
WORLD_SURFACE_WG,
cancelling first worked 🥹 🎉
ty soooo so much
CommonPlayerSpawnInfo apparently isnt a thing
I want to generate a server resource pack using plugin, is there any examples/tutorials? Cause I dont even know where to start
ping me once you answer. i'll see it tomorrow, thanks <3
@civic sluice
I use Gson for the .json model files. And the sound and font files.
You basically have to tinker a lot and make sure you implement the appropriate resourcepack structure.
Its quite a big undertaking.
has anybody managed to get http://hotswapagent.org to work on their mc plugin?
for me it directly crashes the server once I hit the reload classes button
Aren't you on 1.20.4?
no https? sus
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fffd6a6ac46, pid=13976, tid=16496
#
# JRE version: OpenJDK Runtime Environment AdoptOpenJDK (11.0.10+5) (build 11.0.10+5-202103242225)
# Java VM: Dynamic Code Evolution 64-Bit Server VM AdoptOpenJDK (11.0.10+5-202103242225, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# V [jvm.dll+0x46ac46]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\Ahmed\Desktop\Sprac test\hs_err_pid13976.log
#
# If you would like to submit a bug report, please visit:
# https://github.com/AdoptOpenJDK/openjdk-support/issues
#```
it was never secure xd
Well, I will try to do it. Btw If I will "generate" resource pack in plugin folder, how to make it work on the server? Will absolute path to it work like link?
No
Hm
You need to spin up a little http server
Im starting a simple http server and serve it
Can I do it using just by plugin?
Like plugin is making resource pack spinning up server loading there a resource pack, and use it after that?)
Sure, you can start an http server in java, lol
Thats one of the main use cases for java in the first place
Ok thanks!
good ol' jetty
https://paste.md-5.net/vonusulula.java
So I've got a preexisting itemstack (chicken_pet), every second that it's in a players inventory I have to modify it's meta to update the exp and level. What I'm wondering is if the process of this function thread safe?
are you calling it from differnet threads?
The thing I'm concerned about is after the modifications, I have to reinstate the itemstack to players inventory
Im doing it the good old fashined way XD
blocked
what?
what is that?
runTaskTimerAsync is not on main thread
1.19.4
Oh ya know static abuse with util classes :p
Then y'll get no support.
I mean... that still pretty recent, no?
And even then what significant changes occurred between these periods
lots of API
Maybe deprecation of methods but beyond that anything else?
Majority is quite similar aint it?
Have no 1.19.4 server impl setup and the change seems to be drastically. Anyone else is free to give support.
Updating to 1.20.4 and taking the updated snippet will be far easier and faster.
For this one thing, yes. Not for the rest of my plugin 💀
new BukkitRunnable() {
@Override
public void run() {
try {
Islands dbIsland = islandsDao.queryForId(islandUUID);
if (dbIsland == null) {
dbIsland = new Islands(islandUUID, 1);
islandsDao.create(dbIsland);
} else {
if (dbIsland.getMinionCount() <= plugin.getConfiguration().getIsland().getMinionLimit()) {
dbIsland.setMinionCount(dbIsland.getMinionCount() + 1);
islandsDao.update(dbIsland);
} else {
Bukkit.getScheduler().runTask(plugin, () -> {
event.setCancelled(true);
player.sendMessage(MiniMessageUtils.colorize(plugin.getConfiguration().getIsland().getReachedLimit().replaceAll("\\{PRFX}", plugin.getConfiguration().getPrefix()).replaceAll("\\{COUNT}", plugin.getConfiguration().getIsland().getMinionLimit().toString())));
});
}
}
} catch (SQLException exception) {
plugin.getLogger().severe(exception.toString());
}
}
}.runTaskAsynchronously(plugin);
``` Hi i am making a plugin and I want to cancel an event. ReachedLimit message getting sent to the player but event is not getting cancelled, I think problem is about async and sync tasks but iI cant find what causes it.
If I remove all the code and only put event.setCancelled(true); it gets cancelled normally.
Is there a way to prevent anonymous classes without making a class final?
Because i would love to PR that to spigot for BukkitRunnable right about now.
At the time you are cancelling the event, its already long processed. Probably a few ticks in the past even.
You cant retrospectively cancel an event
i asked chatgpt once and he made an annotation processor with @notanonymous and it was supposed to throw an error instead of compiling when instancing anonymously, i couldtn get it to work tho
So what can I do to fix it?
https://gyazo.com/eeed30a7351a17173931d700f095b2d6
Hey cool I did it
There is nothing to fix. The entire premise of this code is problematic.
I suppose sealed maybe?
u seal it and then delegate to some subclass
Far from perfect
And may have retrocompat issues
but yea
Just off my head
I just want those monster anonymous classes to stop 

Noice
So how can i change the code to prevent this problem?
Which problem exactly?
Checked out my WorldBorderAPI project in version 1.19.4.
Have fun: https://paste.md-5.net/nesenipuli.java
Problem is I cant cancel the event.
And you never will unless you completely change your approach.
Either you prevent any IO (like database access)
or you always cancel the event and update the result manually after checking async. (Which will appear like lag depending on the event)
https://gyazo.com/eccf937fb42c771dfd4dc374e3fa0945
Odd thing is how the message only sends when it gets to level 2+, level one occurs at 100 xp
public static void addExperience(UUID petId, int xp, ChickenPet chickenPet, Player player) {
int slot = findPetInInventory(player, petId);
if (slot >= 0) {
int currentXP = petExperience.getOrDefault(petId, 0) + xp;
petExperience.put(petId, currentXP);
int newLevel = calculateLevel(currentXP);
ItemStack item = player.getInventory().getItem(slot);
ItemMeta meta = item.getItemMeta();
List<String> lore = new ArrayList<>();
lore.add(ChatColor.GRAY + "Experience: " + currentXP);
lore.add(ChatColor.GRAY + "Level: " + newLevel);
meta.setLore(lore);
item.setItemMeta(meta);
player.getInventory().setItem(slot, item);
if (newLevel > chickenPet.getPetLevel()) {
player.sendMessage(ChatColor.GREEN + "Your Chicken Pet has leveled up to level " + newLevel + "!");
chickenPet.setPetLevel(newLevel);
}
}
}```
So if i cancel the event immediately, then check asyncly and make event.setCancelled(false) it will be fixed right?
Not that I know. BR is bad anyways.
No, you can not do that.
What are you trying to do?
I am trying to put minion limit to skyblock (superiorskyblock) islands, I am listening for PreMinionPlaceEvent then i am making db checks, if player have more minions then the minion limit i am cancelling the event if not i am updating the minioncount from db.
Minions can only be placed while the island is loaded, right?
Wdym by loaded?
a player needs to place minion
so chunks will be loaded
Then dont do any DB requests like that.
When the player joins, load all his data from your DB into memory and use it sync.
When he quits, save it back to your DB.
No reason for random database lookups on runtime.
hi
Hmm, Ok, how can I load the data from DB into memory (I am using OrmLite)
im making quests thing
i want to have a certain block for mining quests, should i use Material, Block or ItemStack
for private Block block;
and this
public QuestBuilder setBlock(Material material) {
}``` im making a builder pattern for it so..
Use BlockData or Material
@lost matrix Did it work?
Depends on how granular this needs to be.
The most modular approach would be adding a Predicate<Block> to be honest.
But you probably want a simple quest system. So Material should be fine.
uh
Nope
I don't like this structure
why not
Let him cook
sure I guess let him cook
what will happen if server crashes?
._.
But ideally you should have an aggressive separation of concerns
i think i'll do burnt food
Data is gone
Peridocally save it to minimize risk
For a quest system to be nice you need to split it into
- Quest objectives
- Quest Metadata (display name whatever)
- Quest requirements (Permissions, playtime, previous quests complete)
- Quest rewards (Commands / Items / Whatever)
And you can add more fancyness to it like restrictions (You have an hour to complete this)
an hour!!!!!???
an hour to complete a quest
should i make a class for each thing?
oh lmao
Recomendation for good GUI lib ?
Each objective should be able to render its progress for a given player
And some other stuff
?gui
Or something like Triumph. But ive gotten out of touch with libraries honestly.
🤔
Wait, no trigger type? When do track the progress?
Magic
startTracking probably registers it somewhere...
I was gonna make it open source as part of like a job interview thing
and then I got commissioned to make a quest plugin that was basically 1:1 but needed a couple changes
which was mostly just nuking all the menus and making it linear
so I said fuck it and cashed in
Ah you throw every single objective on your event bus
Correct
And when I reload I dispose the event bus, create a new one and do stuff
I can also dispose individual uh
subscribed listeners
a few years
Im not gonna throw SOLID at you for this...

But i would argue that the single responsibility is cowering in a corner right now
Yeah the objective system is a little dubious but the end result is fairly clean
rest is flawless though
It looks nice
I also have an item filter system for a lot of the uh
item related objectives
I overengineered the fuck out of it
sometimes that's where it belongs
I hope they all inherit from Predicate<ItemStack>
They do
Alright
This is important for serialization
(who's gonna serialize a predicate)
If you want to serialize an item quest objective, then it probably contains a Predicate<ItemStack>.
Which can be serialized if its an actuall runtime implementation.
I guess you could just keep your server running forever?
So nobody has an instance of a Quest, they just have the progress for that quest. (which gets thens serialized)
Works if you dont have quests generated on runtime. Really depends on the server concept.
You can just have multiple quests set up and then set them on demand?
No clue what you mean by runtime generated quests
I did want to make a quest menu and it'd just create objectives that could then dump their settings on a config
Eg daily random quests. Which could have compond objectives.
configure & reload quests
Quest reloading is a thing
Compound objectives can be made by just proxying stuff
Randomly generated quests uh yeah you just make a factory method that generates settings within the allowed params
Per-player objectives yeah that gets more complicated
Someone has experience with GANs or VAEs? Im thinking about applying latent diffusion on a voxel space.
Basically instead of generating images with text, you would generate buildings, trees etc using a prompt.
But im uncertain about the auto encoding into latent space and how to create semantic groups in it for interpolation
Ill ask my ML prof tomorrow if i can hog the Leibniz data center GPUs for this XD. They are unused for the next few weeks.
imagine having experts around you smh my head
Why use research equipment when I can convince the customer to install a 4090 in prod
lul
Yeah generation might be a problem honestly. Diffusion on CPUs is slow af.
Maybe if i have a really small latent space.
Well see. Im gonna hit the hay. See ya
yo smile, is this something private or an api you have for subcommands?
looks like acf
acf?
yup
i just checked source code and it is
A modern approach to inventory GUIs isn't an api?
lol
No it‘s basically a tutorial
hi, is there any way to check whether a PlayerInteractEvent directly results in a block place?
Not easily
You’d have to check if the held item is placable, and then if the placement location is valid
What's the end goal?
Because you use the text field for text displays
yes but it is a Nameable so why wont it show?
I don’t think any display entities show their custom name
ye but i want to know why...
the text fields are nice and all but i kinda dont wanna have to remake what already works
Idk ask Mojang
People I can't get hotswap to work on my machine
tried 1.8.8 - 1.20.4
not all in between just both those vers
tried java 17 and 11
nothing works
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff800a1552a, pid=5784, tid=12316
#
# JRE version: OpenJDK Runtime Environment JBR-17.0.10+1-1087.23-jcef (17.0.10+1) (build 17.0.10+1-b1087.23)
# Java VM: OpenJDK 64-Bit Server VM JBR-17.0.10+1-1087.23-jcef (17.0.10+1-b1087.23, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# V [jvm.dll+0x4d552a]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
JNI global refs:
JNI global refs: 113, weak refs: 22797
JNI global refs memory usage: 1539, weak refs: 229865```
always this
not wot
use it?
not hotswap?
hi i'm working on playerrespawnevent with folia but nothing works, do someone knows why?
this isn't the right place to ask for paper stuff
what kind of changes are you doing that you are trying to hotswap
Well you're asking for jvm crash help on a minecraft development server
all long as they aren't method additions/deletions, the regular debugger in intellij attached to the normal java process works fine
honestly this was just String changes
thats all
you don't need anything "extra" for that
I haven't bothered setting up using jetbrains' runtime directly, but apparently if you use it, you can do that
im already running the JBR jdk
XX:+AllowEnhancedClassRedefinition
got that already
well idk, I was just reading that from a medium article. I've never set it up myself
idk if remote debugger or direct matters here
also the usual situation with relocations and what not not working with debugging
I attach remotely and it works fine
Using the jetbrains jdk 17 and the jetbrains runtime stuffs
How do ppl save minigame maps to a database
If I iterate through all online players inventories to check for my custom items async, is that alright?
I dont think you can do thqt async
hmm
Is it a bad idea to iterate through all inventories on a task even if I'm only doing minimal functions
Depends on how often and what ur doing there
SlimeWorldManager
Ok, so not worth it to code it by myself?
uh no
public static void managePlayersWithPets(){
new BukkitRunnable() {
@Override
public void run(){
List<Player> currentPlayersWithPets = new ArrayList<>();
for (Player player : Bukkit.getOnlinePlayers()){
boolean hasPet = getChickenPets().entrySet().stream().anyMatch(entry -> isPetInInventory(player, entry.getKey()));
if (hasPet) {
currentPlayersWithPets.add(player);
}
}
playersWithPets.clear();
playersWithPets.addAll(currentPlayersWithPets);
}
}.runTaskTimer(CoolPets.getPlugin(CoolPets.class), 20L, 300L);
}```
I'm creating a list, adding all players found with a pet, clearing a constant list, and adding all players with a pet to the constant list. Every 15 seconds
You should rather have a pet with some form of roght click to equip and track it thst way
I wouldnt track pets like that
like a cosmic soul gem?
Idk whats that?
It's a pvp gem where you use souls to allow activation of certain enchants
But in the sense of tracking activation of soul use, you right click
Ok
In conclusion, i wouldnt recommend using a runnable for that. You could also track it on item pickup it serms like your pets are Items, check if some1 has picked up a pet and then add them
This would be much more efficinet
Or track the inv changed overall wenn using chests
The point was to avoid having to write these things haha
What event should I be using?
I was thinking of just doing inventoryClickEvent, any time you right click -> toggle on/off, I wasn't sure how to detect right clicking it in your hand? PlayerInteractEvent?
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event){
Player p = event.getPlayer();
GameState currentGameState = plugin.getGameState();
if (currentGameState.toString().equals(GameState.SEEKING.toString())){
plugin.getLogger().info("Equal");
p.setGameMode(GameMode.SPECTATOR);
}
}```
Why is this outputting Equal in console but not switching their gamemode to spectator?
try set on next tick 🤷♂️
👍 ill try that
is this the best way to tell the difference between a fake block and a real block? i know that if i do location.getBlock it'll be AIR for fake blocks and whatever for real blocks but my packet listener isn't fast enough to call the event before the block is gone so it's always AIR
https://paste.md-5.net/amijoduxat.cs
why are u comparing enums as strings
if (currentGameState == GameState.SEEKING)
should work perfectly
nvm i got the packet event to call abit faster by making it async and now i can check if location.getBlock is air or not
🤔
Are you checking that async?
And does that mean that you're using the hashmap async?
i was calling the event synchronously before so when the listeners received the event the block would already be gone but now since it's async it gets called before the block is gone so i can check if the block at that location is air which means it's a fake block
without using hashmaps
if that makes any sense
wait what? in a project 'PlayerEvent(Player, boolean)' is public and in the other project it isn't
both use 1.20.1
oh that's spigot and that's paper oops
Can someone tell me how to deal with java.lang.NoClassDefFoundError: org/apache/commons/collections4/map/ReferenceMap?
It think has to do with the dependency, but neither implementation nor compile works rn. I already had this a few years ago and fixed it with using shadowing, but I dont know how it works in the newer gradle versions.
Because accessing game features outside of the main thread is unsafe and may lead to problems
show your pom xml
thats my build.gradle https://pastebin.com/jTK7h95K
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
just with gradle build task
I haven't use shadow with graddle but I think there is a shadowJar task
ah i restartet eclipse and now there is a shadowJar task. but it still doesnt work sadly
Hey
Can you open your generated jar file with a zip software and check if the apache collections is included in it?
thank you btw
its not included
whew
how about u just start using maven lol
makes your life 10x easier
felt
Depends on the language(s)
ill help u for free
what do you need
idk started with gradle and stuck with it
oof
so did i but then i switched lol
idk i'm having fun with gradle
what better stream api or removeIf in bukkit
so do I as long as it works
do u know by any chance how shadowing works?
you set your tasks to depend on shadowJar and reobfJar
tasks {
named("assemble") {
dependsOn("shadowJar")
dependsOn("reobfJar")
}
}
what is reobfJar for?
uh it might be a paperweight userdev thing i'm using
shadowJar {
relocate 'a', 'b'
//minimize()
}
tasks.assemble {
dependsOn shadowJar
dependsOn reobfJar
}
this is how it would look in groovy ^^
you can use minimize() but it can break reflection-y stuff
it breaks some library for me lol
cant I also use ?
enableRelocation true
relocationPrefix "..."
}
ah ur right wait
but for some reason eclipse doesnt cry when reloading
it just still doesnt work lol
can you send me your current setup
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
;-;
first up, you're using kotlin script in groovy
second up, you're using it wrong
sadge
tasks.named('assemble') {
dependsOn("shadowJar")
}
tasks.named('shadowJar') {
enableRelocation true
relocationPrefix "///"
}
shadowJar {
relocate 'a', 'b'
}
tasks.assemble {
dependsOn shadowJar
}
try something like the bottom one
you can't use kts in groovy
just by the way. the relocation even worked
?nms (for me)
i want to translate from turkish to english
What do you want to translate ?
my plugin!
ooooh damn i'm out for turkish. no knowledge there, sorry
its in turkish language
i want to translate from turkish to english
can anyone help?
so you need someone that speaks english?
please........
sure i can help
no, i can use google translator
but I dont know how to translate
tf
did you make the plugin yourself?
does the plugin have a config for text?
then how would you be translating it? lol
u got it in a repo or smt?
copy code
I dont have much knowledge about that tbh
u can easily get the source from the jar but i wouldnt recommend that
iirc that's copyright infringement
ask the dev for the source code
depends
he lost it!
what.
plugin or mod now?
how tf does he not have the source anymore? what kinda dev is that?
a interesting one. would love to see what his room looks like
my guess is that its not his plugin lol
blud you DMd me and then ghosted me

But yeah the entire plugin is like 6 classes and all the messages are hardcoded on the main class which is good and bad
Sorry, can you please copy paste that here
This is my main I'd actually @echo basalt

Please @echo basalt
what the fuck happened here
Maven or gradle?
gradle
Show build.gradle
only changed the things rad told me after
okay what
I changed nothing and it randomly works now.
just got another coffee and tried it again
I think I might need a therapy now
well gotta reverse the jar if u have permission from the owner
wdum with prefix? the identifier?
well an nbt tag without an identifier wont work
Why do you even want to do that?
why are u using nbt for that
u said to make ur plugins compatible
i mean if you have multiple plugins working with the same custom items or the same tasks in general they should just depend on each other on code level
makes everything 10 times easier
how did you setup nms
you need to do more than just adding it to mavne
read this
?nms
100% forgot to run remapped BuildTools
yh that was my first guess loo
confused me in the beginning as well but makes total sense
I'm trying to store Inventories with items in an sqlite db. I know I somehow have to use JOIN but i can't wrap my head around it ffs
tbh maybe i should actually create a relational db model
i know the basics of sql lol
Then you should know you don't need a join
if i'm honest this was thinking out loud without thinking why i would write it here
wait what?
Item table and Inventory table
join the items into the inventory, no?
(also iirc it was said on this discord lollll)
why item.getOwner always null
context?
Afaik owner is set for example when u use /give but your inv overflow
bruh
Owner is not the one that dropped the item
I guess that's Item#getThrower
declaration: package: org.bukkit.entity, interface: Item
others can't pick those items up at all?? or is the ownership removed after some time?
save singular itemstacks
as?
hash for example
oh nice this work
actually now that we're at that topic: hashes.
Are they so unique that they even store the values of an object?
Like: if i were to store an ItemStack as a hash and i would give you said hash, would you be able to create the exact ItemStack object from said hash?
wdym by "add"?
you have to execute BuildTools by running this command in your command line
no, hash are one way
You have to serialize and deserialize the itemstack
download the BuildTools.jar, use your terminal, to the BuildTools.jar-Location (preferrabely in its own folder bc it will generate several folders and files) and run said command
but that would just store a maaaaassive string in the db, i doubt that that's the intention of a database, is it?
I was just talking of hashing
But indeed SQL databases are not meant for that
But serializing an inventory to SQL database would require 3 tables
3?
One inventory (id, size, name, ..)
One items (id, type, name, lore, amount, echants, tags, ...............)
One "link" that link item ids to inventory id
Not really you can serialize whole inventory to one string
Hi
Yeah but you're losing the utility of SQL in this case
can't you just use a foreign key, since it's 1:n?
But we have to admit it's easier
You can too yeah
it is easier, but i don't want this to be easy, i want this to be somewhat efficient
There is no reason for linkage table, it's not n:n relation
(which is also the reason that eventually there will be 2 releases of the plugin. one with mysql and one with sqlite)
I think the one string would be more efficient
But tbh I would just base64 it
Cause you need only one fetch
the bytes of the Inventory? mh i think i'm past that
did that before, did funky things fsr idk why
i doubt it
this fucking inventory thing has been plaguing me for months now lmao
Why? It takes more time to get content from database then deserialization
json isn't meant for data storage
how would you serialize the inventory with Base64?
also that would yet again just be a massive string, no? 🤔
Base64 string would have size at least 100 characters. But that would takes less disk space then X Rows in database
yes
do this
i have a class for that somewhere but i forgor where exClry
honetly just ask gpt lol
he will make you a good method
tbh fuck gpt for coding, lol. made too many shit experiences with it. 3.5 and 4
thanks. i remember now again
one question to ByteArrayInputStream#read... i'm guessing it automatically goes to the next index after executing a read statement? (just to understand how things work)
yes, it is iterator
Hi, Im making new plugin and want to ask for opinion on coding. Plugin will contains some class witch will store some values in map. There is my question: should I make this class static or I should get one instance in main class and access that instance probably with static getter from main class? In past I made class like this static.
The most clean way is to using Dependecy Injection https://www.spigotmc.org/wiki/using-dependency-injection/
dont static
the only methods and classes that should be static are utils and maybe manager classes
So second option in my question bascily. Bcs I made some plugin previosly and I made that class static so... I saw most of plugins is not doing like that, thats why I asked.
It is manager class kinda
yh we hate static abuse lol
Basicly this is sniped of the class:
private Map<Material, Double> materialValues = new HashMap<>();
public void setItemWeight(Material material, double weight) {
materialValues.put(material, weight)
}
public double getItemWeight(Material material) {
return materialValues.get(material);
}
this is static abuse? so I was wrong when I think its not lol
Do you see the word static anywhere?
I didnt type that... I was to lazy lol
this is example
if that should be static or not
how often do you use thhese methods outside of this class
It shouldn't
And you shouldn't have static getters on your class
And I'd advocate for not even having a static getInstance of your main class (singleton)
depends, that value will be set and getter by command
And instead just Dependency Injecting everything
just leave it like this then
public class MyPlugin extends JavaPlugin
{
@Override
public void onEnable() {
PluginStorage storage = new PluginStorage();
CommandsListener listener = new CommandsListener(storage);
listener.onCommand();
}
}
public class PluginStorage
{
@Getter
private Map<String,Object> map = new HashMap<>();
}
public class CommandsListener
{
private PluginStorage plugin;
public CommandsListener(PluginStorage plugin) {
this.plugin = plugin;
}
public void onCommand()
{
Map<String,Object> myMap =plugin.getMap();
}
}
You can pass instance object of the class that has this map to your command listener
yes
It should be encapsulated by another class
public class MyPlugin extends JavaPlugin {
private MyManager myManager;
@Override
public void onEnable() {
this.myManager = new MyManager();
}
public MyManager getMyManager() {
return this.myManager;
}
}
public class MyManager {
private final Map<UUID, Whatever> dataMap = new ConcurrentHashMap<>();
public Whatever getWhatever(UUID playerId) {
return this.dataMap.get(playerId);
}
...
}
hmmm, I was thinking to do in main class like this:
private static RealWeight plugin;
private static WeightManager weightManager;
@Override
public void onEnable() {
// Plugin startup logic
plugin = this;
weightManager = new WeightManager(plugin);
this.saveDefaultConfig();
this.getCommand("weight").setExecutor(new WeightCommand(this));
this.getCommand("inventoryweight").setExecutor(new InventoryWeightCommand(this));
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
public static RealWeight getInstance() {
return plugin;
}
public static WeightManager getWeightManager() {
return weightManager;
}
or just make that #getWeightManager to not static. I would use RealWeight.getWeightManager() in other classes but thats probably bad practice
yeah, I was typing kinda same, lol so I should get rid of static methods in my example
public class MyListener implements Listener {
private final MyPlugin plugin;
public MyListener(MyPlugin plugin) {
this.plugin = plugin;
}
@EventHandler
public void onWhatever(WhateverEvent event) {
this.plugin.getMyManager().getWhatever(...);
}
}
you know instead of doing (plugin) you can just do (this)
and also
please save default config first
i bet theres stuff in your config you need so
if you save it last
that
kinda doesnt make sense loo
Its good enought if I send my main class for ex. to CommadClass and then I will do in command class like this:
private final RealWeight PLUGIN;
public InventoryWeightCommand(RealWeight plugin) {
this.PLUGIN = plugin;
}
@Override
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
PLUGIN.getWeightManager(); //DO SOMETHING WITH THAT
return false;
}
its thaat oke<
why is your onCommand listener in your main
yeah that should be affter that manager lol
why not before the manager if i may ask always easiest to place it first
so I can do that nice, I was thinking abou sending that Manager as well but sounds kinda pointless to me
it does not rly metter if plugin = this; will be first or config I think
yh but u said after manager lol
what u mean? is not?
.
it is here
ah nvm
nop lol
thought this was 1 class
nop that private final RealWeight is variable so I will be able acces plugin in that class
mhmhm
I need to get that manager thats why Im sending instance of RealWeight to command class
basicly to do this but in command
so I did that wrong when I made my previous plugins and class like this was static lol, thanks that why I asked to not make same mistake again
and probably in that case... I will not need getInstance() thats bad practice as well isnt it? if not I can do RealWeight.getInstance().getWeightManager() in other classes but I guess thats wrong as well
So I was doing thinks wrong lol. Thanks guys for info!
Btw. It is wrong if I will save data from .yml file to Map? Or its okey to access that file every time to get something? Someone told me Im saving values twice basicly If I will put it in the map
so its good to put them to map? oke thanks
Yes
Just use the FileConfiguration class?
You should probably impl a command to reload thr values tho so the config can be chsnged on runtime
why would you need that if you store them in a map anyway?
ofc I will do that, but I was asking if I need that map or I will just get it from file all the time like file.getInt() or smtn like that
if someone will update file to update map
k so to map thanks
Use the FileConfiguration class to store your config
Using a map is overcomplication of simple things
well if someone externally updates a file you can't immediately update code, no?
ohh
that's what you meant by update command
I will, but @inner mulch its basicly saing I should not lol
i see, i misunderstood
No, they said you should store the FileConfiguration instance and not call Plugin#getConfig every time
I wouldnt do that He is porbqbly saying that cuz its a memoryconfig
I would still use maps
i agree
Why would you
maps are quickkkk
Maps better
The FileConfiguration class exists for the purpose of making config files easier
Ok
Storing it in a map is absolutely pointless
I had same fight with someone who said: "but that values are already in ram and u are basicly saving them twice"
???
Also why FileConfiguration instead of YamlConfiguration? I suppose we're talking about yaml files?
FileConfiguration is the bukkit implementation or whatever, it allows you to automatically serialize and deserialize bukkit classes afaik
And that thing most likely stores a map internally too, so you are just making things harder by using a map
YamlConfiguration is also from bukkit
¯_(ツ)_/¯
Just use FileConfiguration
Store the FileConfiguration in a variable, retrieve it whenever you need access to the config and override it whenever you call a reload command or whatever
I had exact same fight with someone when I used map like what is here rn
Lol no
Or somethign
You are literally overcomplicating stuff for no reason
There are classes that do everything for you
It makes no sense to use a map
Ok
oh god, just ping illusion or 7 at this point lmao
A map will not give you whatever this is and it will also not let you get values by .get("thing.something.key") but rather .get("thing').get("something").get("key") or something like that
fair point, there IS a map stored in MemorySection
Yep
touche
It abstracts the shit away so you don't have to strugle with casts and deseralizations
BUT it's still important to store the value of JavaPlugin#getConfig in a variable to not keep reloading it
That's what I've been telling from the start lol
I have this plugin for pvp that gives certain players the ability to strike lightning. i implemented it using the bukkit's strikeLightning method. Is there a way to disable the AOE damage done by the lightning for the caster? afterall I would like the lightning to do damage all other players except the caster, so I wouldn't like to change the implementation to the strikeLightningEffect and just setDamage
yea
just wanted to repeat it so ppl get the point (bc who would scroll all the way up to there)
PlayerDamageEvent. Check DamageSource, Damager, Damaged -> cancel the event
is it PlayerDamageEvent?
It's something like that
okay thanks! that way would be fast to add here too
You can't get the striker like that since the strike is thrown using the world instance
I have a method for it already though!
I think it is EntityDamageEvent
Since lightning is an entity, couldn't you give it some pdc/metadata to identify the sender?
that's what i was thinking of
Is it ?
it is??
I have the UUID's in concurrent hashmap
yea lightning is entity
nms entity tho, no?
nms?
indeed
bukkit entity
declaration: package: org.bukkit.entity, interface: LightningStrike
Doesn't bukkit wrap all entities
Then you can set the causing player @tired star
That's not
probably not?
declaration: package: org.bukkit, interface: World, class: Spigot
Doesn't require the source
I had a weird problem with that getCausing player so I did the UUID handling a bit differently
You need to set it afterwards? And it doesn't take some lambda to modify the entity before spawning? Oof
Maybe there is a way to spawn it using consumer ahah
Yeah I think this is because I think this entity lasts 1 tick so spawning it then setting the player is too long
Did you know sleeping issues can be solved by sleeping, not only coffee? :)
bro i've been working (more or less) for almost 4 hours lol
dude my minecraft girlfriend kept me up all night
couldnt get much sleep
Boy every moment I have the time to look through the python code of a game I'm reverse engineering I do that, I'm tired of looking at python code but what else can I do lol
minecraft girlfriend ???
:DDD
o_o
shes a real woman, trust me
Well
o_o
Give them time, maybe they both are real and will come together lol
that's a great time for illusion to come here hahahahahhaa
tbh that would be cool
this is some interesting programming help
Right after the config discussion ended
but if i'm honst i thought he was joking ^^'
Ye, I hope they notify us if that happens lol
:DD
xD
Lol
we should all gather and do a boys trip to thailand
this uh could be a real struggle for programmers!
this is a great community
Or to alex's appartment
where I'm bringing in money by talking about girls I met online and ppl are betting me 50$ I'm getting catfished
before that we've been talking about if it makes more sense to store the value of JavaPlugin#getConfig in a variable and get the data from there or if everything should be loaded onEnable into HashMaps
easy grocery money right there
and ur winning?
how do you see through them!
lmao
I shipped this chick a minecraft tshirt and she sent me a cute pic while wearing it
that's proof
ezpz
HAHAHA
fiddy bucks
Yk that meme where there are three different guys and they all are on a graph which goes up and then down and then the first is dumb, the middle is average and the third is like some linux hacker
And the minecraft store took so long to ship that I got the tshirt for free
well how much did the shirt cost
free $50
Well you make a config wrapper class
and never mention getConfig ever again
free tshirt, free 50 bucks AND a cute pic
because it shouldn't be a thing
bro won
hell yeah
ignore the shitty wonky formatting I forgot to ctrl + alt + L
lol no
That'd straight up crash my pc given the amount of times I touch decompiled code
save?
i always do ctrl + alt + l, o when i finish a file as well
Have you decompiled ic2c yet?
oh
no
I have
Have you seen griefprevention's code?
i constantly hammer down ctrl + s, save the code + automatically format it
sounds like an eclipse issue
To be expected lol
do u use intellij?
I never have to be worried about saving code
cuz intellij keeps that code safe for u without saving ever
so still saving data from file to map at the end lol
i know, it's a habit
Called autosaving
but it only saves upon tabbing out or changing the working file
i have some sort of fucking autism, ican't stand if my code doesn't constantly look nice
(let's not talk about my kamehameha-if-phase)
there is a few more events at which it saves
write nice code automatically
...
Yeah that was like a one-off in the last solid 9 years
What is the best way to store inventory items in the database?
When the player makes any changes in the inventory or with Bukkit.runTimer() every 1 second?
idk if that's impolite, but how old r u illusion?
turned 19 a couple weeks ago
EVERY SECOND???
main thread no balls
damn uhm happy late birthday ig. you're more than a year younger than me o_o
bro is a nerd
I've been coding for over a decade
(everyone younger and better than me is a nerd obv)
dw about it
you started young young, holy
and you had a childhood, holy
no
ayy that's my boy
And making a request to the database every second will not load the database
All the more so I will grind everything to base64
(that's a good thing, it's impressive)
It's crazy what years and years and years of experience brings you
10 years ago I was writing shitty code
Nowadays I am paid pennies to fix even worse code
crazy indeed
tbh i also started like when i was 13 or sum
6
but that's "only" 7
whoah
10 years ago i was happy without problems
o_o
check out this banger
i'm not that intelligent ig xD
HAHAHAA
I dont even remember what I did 10years ago
Got paid
OH MY GOD
ilussion pov
what even is this
Only a decompiler and a hatred for the universe
ahhh the guy from earlier
:d i wouldnt do that unless i would get free kebab or smth +8$
oh no
