#help-development
1 messages · Page 1319 of 1
can you help me with this?
1.8.9 I want to make a plugin but the minimum version is 1.12.,
my best advice is to give up
remember how i said you should pray all the repositories referenced by the build script are still up?
well, 1.8 is so old that they aren't anymore
so you'll have to find alternate repositories for them, build/install the dependencies yourself, or hunt down the dependency jars and install them locally
The server I'm playing on with my friend is currently 1.8.9 factions required.
will you teach me how to do it, bro
i can't, i don't use 1.8 and i don't know where the things you need are
but if you find another 1.8 person they might be able to point you at the jars you need
hm
looking at nms, it doesn't seem like we have api for triggering item "use" like reeling back a fishing rod? i only see it getting called from the void handleUseItem(ServerboundUseItemPacket packet) on the ServerGamePacketListenerImpl
am i missing something or do i really need nms/reflection for this
xy is that i'm writing an auto fishing rod
Teach the villagers to fish
Not sure about specifically reeling in
But you can at the very least fake it by sending whatever packet makes the players hand move and fake it from there
i suppose... but setting up protocollib or packetevents for that might be more effort and breakable surface area than reflecting into it
i don't think you can trigger item uses in the api, like, at all?
looks like that's the case yeah
hopefully running the serverside logic for it without being prompted by the client won't desync things
it does look like the server sends a game event for the fishing rod being reeled in to the client at least, so it hopefully won't
the fishing event has a state for this
but not sure if you could trigger it though
since that would come from the client?
yeah, looking at the code paths to the reeling-in logic, the only path seems to be from an incoming packet
could always create a fake packet I guess and toss it into the incoming queue lol. But it would really depend on why you need this
i'm just trying to add a custom item/enchant that'd auto-fish for the player as a kind of a twist on the popular "afk zone" thing
and ideally have it play nice with custom fishing plugins, so i'd rather not spawn a random fish item and toss it at the player manually
the link i fear the most
?howold
**Syntax:
**```
?howold <text_final>
Created via the CustomCom cog. See ?customcom for more details.
?howold 1.8.8
Minecraft 1.8.8 is 10 years, 3 months old.
there we go
a child basicslly so not that old
golden age
Hi, how do I connect my Discord to my Spigot account?
Don't ask in every channel
style of the model?
reply style
ah
they're back with the weird corporate bff style that people with what I assume are serious mental illness like and everyone normal finds extremely offputting
Hello - I am trying to code it so placing spawn eggs on spawners doesn't change the spawner type
I want players to be able to place the eggs ontop the spawner
How are they going to set the spawn type if you don;t allow the use of eggs on them?
As far as I remember eggs are not placeable
You would need to intercept the interact event (cancel) and place a spawn egg as a DisplayEntity
Basically I dont want them to interact
I want clicking a spawner with an egg = egg mob is spawned
basically players want to be able to place creeper eggs on spawners
but the issue is it is currently changing the spawner TO a creeper spawner
Cancel event; spawn mob
As in manually spawn the mob and remove the item?
Got it, was hoping it would be a simple event cancel lol
For spawn mob. Any easier way then checking block face manually.. then having top = math to spawn ontop, side = math to spawn on clicked side, bottom = spawn with math -1
There’s no event for changing spawner type. It just knows you interacted with that block holding an egg.
You could cancel the interact event with the spawner and egg and players would spawn the creeper against a block next to the spawner
Tried that - cancelling the event doesn’t use the egg
I’m confused what you just said
You’d check that the player is holding a spawn egg, and then check if they interacted with a spawner block
Does your spawner plugin not cancel the egg changing feature?
After canceling that event you could use code to check if there’s air above the spawner and then use code to spawn that mob there
if there any easy to to get the player velocity without having to track it myself
Isn't there a getVelocity method
Of course if you mean, eg, walking velocity, that has to be tracked
Hey guys how can I properly use libraries in plugin.yml?
I've tried set the dependency scope as provided in the pom and add this in the plugin.yml but it's still giving me errors.
libraries:
- tools.jackson.core:jackson-databind:3.0.2
- org.redisson:redisson:3.52.0
that looks fine, what kind of errors are you getting?
Uhhhhhhh, I tested it again and now it works fine, smh.
It was few days ago last time I test it.
Have you ever tried prebuilding projects with intelliJ before writing them?
It basically creates a ready to code project.
like a project template?
the Minecraft Development Plugin can create a basic plugin structure
or you can make your own maven archetype
How to merge 2 players hitbox?
cause im making a handcuff plugin
cuffed player will tp to police left arm every 5 tick
i wanna make it like if police wanna goes to a way with 1 block wide
and makes cuffed player suffocate in the wall
canceles his movement
do u know wdym
Then just clear that item urself
Yes, and that plugin doesn’t only make the structure it builds out the libraries
You basically can create the project and begin coding, all the turmoil is of the way.
yeah its by far the easiest way to get started
private Sound parseSound(String s) { if (s == null) return null; try { String norm = s.trim().toUpperCase(Locale.ROOT).replace('-', '_').replace('.', '_').replace(':', '_'); return Sound.valueOf(norm); } catch (Throwable t) { try { return Sound.valueOf(s.trim().toUpperCase(Locale.ROOT)); } catch (Throwable ignored) { plugin.getLogger().warning("Unknown sound name for PvP config: '" + s + "'"); return null; } when i try to compile the jar it shows an error that says that Sound.valueof is going to be removed what can i use to replace it?
Read the warning or documentation
sth like this
Registry.SOUNDS.get(NamespacedKey.minecraft("entity.creeper.whatever.idk"))
?paste
Looking to paste something? Try a code block or one of the following websites:
- https://pastes.dev/
- https://sourceb.in/
- https://mclo.gs/ (best for server logs)
?
obviously they are looking for a CompTIA+ certification...
How about no
@sullen marlin Sorry for the ping but I built the latest server jar for they who shall not be named and the head fetching works. There is something going on with fetching skull owner profiles in spigot.
is it possible now to make a nickname plugin with PlayerProfile?
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
Pretty hard to investigate anything without reproduction code or a stack trace
Have you tried the crystal ball
It doesn't throw any error logging, no exception, no failed event pass, nothing. Where in the spigot code would I even trace back to?
The only logged error is
[03:23:12] [Server thread/ERROR]: [BlockProt] Failed to set skull head for "sourgummybear2": The skull profile is missing a name or textures!
Used another server framework and it's fully functional.
Like I said above, it seems like it may be an issue with how spigot fetches profiles on the backend.
@stray compass What code did you use to make the profile
What’s the minimum setup needed to reproduce said bug
bone stock spigot server fresh folder with nothing changed
only plugin
doesnt work
Not my plugin: https://github.com/spnda/BlockProt
https://github.com/spnda/BlockProt/blob/master/spigot/src/main/java/de/sean/blockprot/bukkit/CachedProfileService.java seeing the fact they have this makes me feel like it might be a spigot bug
It's working on paper and pre 1.21.10 spigot
it cant be the way the plugin is fetching the profile or it would universally be dysfunctional.
do you get a stacktrace with the error saying it cant load it
No, just that line I sent.
There was another person in here having an issue with fetching offlineplayer details.
But it was a bit different
Smite me down if I'm wrong but I'm thinking it's probably spigot.
?paste
Looking to paste something? Try a code block or one of the following websites:
- https://pastes.dev/
- https://sourceb.in/
- https://mclo.gs/ (best for server logs)
I am getting this werid bugs when I am manipulating PlayerProfiles it is occuring when I leave the server: https://pastes.dev/HoY0z4dLyN
my code: https://pastes.dev/qtncEnqQjc
?whereami
That message is from the plugin, not Spigot. The plugin is hiding the exception, making it impossible to debug.
Bukkit plugin to protect your chests, furnaces and more with a modern GUI approach. - spnda/BlockProt
Yeah I'm aware, I'm just going to give spigot a few more updates before I try it again. It's bound to affect something else that doesn't hide the exception thrown by the framework. Paper is functioning with it as is for now.
I wouldn't be so sure it's a Spigot bug, but whatever
Is it possible to show NPC / EntityPlayer in tabs when in a different world?
It is
For some reason it 'despawns' or removes from when on world switch
when switching back to the world with the npc it shows back
How are you making NPC
how do i capture all packets getting sent to the player in protocollib (ALL PACKETS.)
Why would you need that
im making a plugin that works with a anticrash so when people try crashing the server it fake times out them
by blocking all the packets sent to the client xD
Basically we get to participate in a little trolling
lel
code: https://pastes.dev/BCbQ0nr8aW
error: https://pastes.dev/Pf7fp5NtJJ
I am experementing a bit with packets to change skin/tab name/name tag etc..., and I am getting this error
Try updating ProtocolLib
Server version?
latest too
I'm a little busy will look into the code later
Using the latest release or dev build?
latest realease
its ok take ur time
Try a dev build
ProtocolLib?
Yeah
Error sending packet clientbound/minecraft:player_info_update io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:player_info_update'
I used the dev build and I can't even log in
nowdays with nms being as accessible as it is, and even more so now that mojang is dropping obfuscation, i don't really see much point to using protocollib
just ask
Look, let's imagine the following
We have a hologram plugin
And we can configure the names of the holograms
But first comes the name, and then comes everything else about the hologram: text and everything else you want the hologram to have.
How to first access the name so that the plugin can then access all the hologram properties
let's rephrase the "name" as "id" or "internal identifier"
from there, you can have a configuration section in your config for each hologram id
e.g.
spawn_welcome:
text: Welcome, this is the spawn
location: world;1,3,4
here, spawn_welcome is the id of the hologram, and Welcome, this is the spawn is the contents of the hologram
to get the section from the config, you'd do config.getConfigurationSection(id), where id in this case would be "spawn_welcome"
Thanks bro
I always wondered how some plugins did that and I couldn't do it myself lol
Now I can make my hologram plugin for my server on version 1.8.8
Xd
there is a few ways to do this. First question, is there a lot of properties that can be defined for these holograms?
It depends
From what I can see, current holograms are made with an entity called "text display".
ok, lets imagine in future then, is it possible there will be lots of definable properties?
This entity was added in version 1.19.4
yeah don't care about that as it isn't relevant to what you decide
if these holograms are going to end up having lots of things you can configure as made by you
then I suggest going with each hologram gets its own yml file and the name of yml file is the name of the hologram
this lets you do things like recurse a directory for all the holograms
It can be created, but I would say it's the least optimal thing to do.
not sure what you mean, files are not inoptimal or optimal in of themselves
Wouldn't that fill up the server with unnecessary space?
how much space you got? 10gb?
these days its customary that servers have like 1TB
you are not filling 1TB with yml files unless you changed how large a block sector is to some insane size
HAHAHAHAHA, well I'll make it so that in the config file you can choose between a file with holograms and another one that generates a folder full of YAML files.
it doesn't really matter whether you have a file-per or a single big config
Anyways, you shouldn't always think in terms of optimal. The way I am suggesting is for ease of use without compromising on optimal
personally i don't really see a hologram definition getting big enough to warrant its own file, but you can do that if you prefer
Well wasn't sure if they intend to just keep adding features or not. I know when I helped create Holoapi there was a lot you could define so separating your holograms to per yml file helps with organizing
instead of just one large yml file. Thats all lol
and yeah there was servers that had like 100 or more holograms sometimes
my favorite approach is a blend of both, sort of like how mythicmobs does it; multiple holograms per file, but an arbitrary number of files
ah nice
e.g. you could have a spawn_holograms.yml that had the spawn related holograms
and other files for other things
makes sense
22:38:02] [Server thread/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'LifestealCore 2025.08 (3).jar' in folder 'plugins/.paper-remapped'
org.bukkit.plugin.InvalidPluginException: java.lang.VerifyError: Inconsistent stackmap frames at branch target 381
Exception Details:
Location:
dev/norska/lsc/LifestealCore.onEnable()V @52: goto
Reason:
Current frame's stack size doesn't match stackmap.
Current Frame:
bci: @52
flags: { }
locals: { 'dev/norska/lsc/LifestealCore' }
stack: { 'dev/norska/lsc/LifestealCore', 'java/lang/String' }
Stackmap Frame:
bci: @381
flags: { }
locals: { 'dev/norska/lsc/LifestealCore' }
stack: { }
Bytecode:
0000000: b800 632a 2ab7 0067 b800 6db5 006f 2ab8
0000010: 0075 b300 772a 2ab6 007b b600 7fb6 0082
0000020: b800 8699 0014 1288 b800 8e12 90b6 0096
0000030: 749b 000b a701 4912 98b8 008e b500 9a2a
0000040: b600 9eb6 00a2 b600 a72a b600 aa2a b600
0000050: ad2a b700 b02a b600 9eb6 00a2 12b2 b200
0000060: b403 2ebd 0092 59b2 00b4 042e 2ab4 009a
0000070: 5359 b200 b405 2e2a b600 b8b6 00be 53b6
0000080: 00c2 2ab7 00c5 2ab7 00c8 2ab7 00cb 2ab7
0000090: 00ce 2ab6 009e b600 a22a b600 d12a b600
00000a0: d5b6 00d8 2ab6 009e b600 dc2a b600 e101
00000b0: c600 37a7 00ca 4c2b b600 e412 e6b6 0096
00000c0: 101a 1100 9c60 1100 9464 1100 8e60 107d
00000d0: 1068 6011 00d5 6411 00a4 6082 a000 0ba7
Does anyone know how to fix this problem?
?whereami
Either you have a corrupted jar or papers remapping corrupted it
woo
got a headless omarchy setup now as a secondary pc that I'm spinning up as a non-production dedicated server
now that's fancy
it's also a really good pc too
Can someone ELI5 how armor points actually work?
The wiki said each armor point equals 4% damage reduction.
So 20 armor points = 80% damage reduction.
Wiki also said the maximum valid armor point is 30 (achieved via command). I tested it in-game, and it's indeed having a difference. But 30 × 4 would be 120%? The math doesn't add up or am I missing something?
Depending on the incoming damage, armor will be less effective. Toughness decreases the amount of "uneffectiveness". Damage reduction is also capped at a max of 80%.
Anything else can be extracted out of the formular stated in the wiki, altough there is also a further, bigger explanation on there too
Is there pdc or something similar in 1.12.2?
No
hello so for a chunk visualization command i used invisible ArmorStands with a block on it but i did some testing which larger area and all those entities make the server lag is there a way to make them client sided only?
There are better ways of outlining than spamming armor stands
such as structure blocks or particles
Could even use a shulker with its size set
If you're on version with Display Entities, then those
You can transform the model however you want - stretch it in one direction to create a line
You can also use heads for solid color
Unless you mean something like "making a scaled down version of a chunk"
Which would still lag even with Display Entities, but less.
How i can get the skin texture signature without mojang services because the server will run in offline mode?
is there any way with commands or anything to place plants on any block without them instantly breaking?
kind of like how debug stick works on changing a block until it's adjacent block is updated
if you try to place foliage using code will it automatically break or nah
(if it's not on a supported block like grass? )
if you do Block::setType and pass false for the block updates parameter, it shouldn't break
until something else triggers a block update
how can i make a chunk be always loaded
oh shoot that was fast
add a chunk ticket through the World api or use the /forceload command
I knew I would find some wisdom here
what have u worked on in the past that gave you such wisdom
I'm mainly trying to make a plugin that lets players place plants on any block so this will help
hm I was thinking
like someone places a short grass on mossy cobblestone and wants to place another short grass right next to it, it'd trigger a block update
is there any way to cancel that out or do I need to add listeners and then a whole system for that 😭
but this helps tho ty
You can listen to the block physics event and cancel them breaking
But that event is pretty spicy
Hi guys please help to fix not showing join and quit message
how can i disable server messages like [Server: Loaded template .....]
That's not a Spigot message
Disable plugins until you find which plugin
Or could be your server panel
Whats the issue?
but i need this command
Whats the command?
Surely the message is from the plugin with the command then lol
the jar it's alright
private void checkUpdates() {
Bukkit.getScheduler().runTaskAsynchronously(this, () -> {
try {
String currentVersion = this.getDescription().getVersion();
URL url = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + RESOURCE_ID);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
String latestVersion = new BufferedReader(new InputStreamReader(con.getInputStream())).readLine();
if (!currentVersion.equalsIgnoreCase(latestVersion)) {
getLogger().warning("====================================================");
getLogger().warning("A new version of RepairIT is available: " + latestVersion);
getLogger().warning("You are using version: " + currentVersion);
getLogger().warning("Download at: https://www.spigotmc.org/resources/" + RESOURCE_ID);
getLogger().warning("====================================================");
newVersion = latestVersion;
} else {
getLogger().info("RepairIT is up to date. (" + currentVersion + ")");
}
} catch (Exception e) {
getLogger().warning("Could not check for updates: " + e.getMessage());
}
});
}
}```
idk if i did it right
and yes ik that the plugin only checks if the version is different
but i dont think this is a problem
where are you changing the version of the plugin?
pom.xml and plugin.yml
okay
When I open this website it returns 1.0
which is different from the 1.1 that the java code returns
The endpoint doesn’t update that quickly
You should parse the versions to actually check if the api is returning a newer version
private boolean isNewerVersion(String latest, String current) {
if (latest == null || current == null) return false;
latest = latest.trim();
current = current.trim();
String[] latestParts = latest.split("\\.");
String[] currentParts = current.split("\\.");
int length = Math.max(latestParts.length, currentParts.length);
for (int i = 0; i < length; i++) {
int latestNum = i < latestParts.length ? parseIntSafe(latestParts[i]) : 0;
int currentNum = i < currentParts.length ? parseIntSafe(currentParts[i]) : 0;
if (latestNum > currentNum) return true; // newer
if (latestNum < currentNum) return false; // older
}
return false; // same version
}
private int parseIntSafe(String s) {
try {
return Integer.parseInt(s);
} catch (NumberFormatException e) {
return 0;
}
}
Is discord not parsing that properly
Why tf does it say “Java” at the top in raw text
did you put it right beside the backtick?
There was a space after my bad
You ever tried guava juice?
Or guava nectar
Dude it’s so fucking good
c# stdlib my beloved
It maybe uses nms
it looks to be doing a lot of reflective nonsense
what does it even do?
if it's just storing and dropping different inventory contents per player, there shouldn't be any need for nms or reflection or protocol nonsense at all
using reflection to access NMS?
Spawn Mannequin with player inventory data before death and despawn and open inventory it after someone right clicks it.
declaration: package: org.bukkit.entity, interface: Mannequin
I'm pretty sure you can do it with a datapack
Do mannequins have inventory data
probably armour + main/off hands
Well yeah, all LivingEntity have that
well that's inventory data, is it not? :p
I assume they meant the full 27/36 slot inventory
i-
who out here riding they friends
bend over
WHAT!
what defines as MMO game in today's world?
is Minecraft MMO given then fact that most of the action is being done on multiplayer servers with high player counts?
if not why i keep finding academic papers referencing it at it is
whilst i believe MMO is more like a game like WoW or runescape where you cant even play a game without a server connection
im confused
MMO isn't particular to a game, rather its in the name. Massively Multiplayer Online. So anything that allows massive amounts of players to play at once together.
so you have RPG MMO's, RTS MMO's etc
technically you can say minecraft is an RPG simply because you can roleplay and it has stuff to facilitate that especially its adventure mode
that's a very far stretch
however, I agree it is not an RPG in the sense of what we know an RPG to be
i don't know, i feel like that's stretching it a bit
not the worst thing i've found whilst doing research for my bachelors thesis tbh
i'm not sure if there are video games that would not be a rpg by that definition
Look at DnD its an RPG
besides like Pong
i've found a research paper on explaining freemium models in integrals
i swear most research i can find online is so trash that i trust plain google articles more than this
well, no the game has to have components that would facilitate an RPG not just the mere ability you as a player able to role play in chat
is monopoly a role playing game
i guess
because you roleplay as business entities?
but you role play as S T E V E in minecraft too
i would say monopoly is much more a role playing game than minecraft, because playing a role is part of the game
minecraft is a sandbox game
you can roleplay with legos, too
doesn't mean it's a rpg
wtf is rpg then
nobody knows
yes minecraft at its core is a sandbox game, but it facilitates rpg even when you add community customizations
it feels that everything that falls under runescape game logic falls under rpg category mostly
addon's don't count
if addons count then skyrim is both a 4X game and a virtual reality porn game
how did we end up from minecraft to vr porn
Hey the lusty argonian maid was always in the game
Bethesda knew what they were doing
lol
afaik RPG does not mean RP in a game, even if RP is a core aspect of that game it doesnt make it an RPG
like rpg and rp are linearly independent
@wet breach I was selling internet at a store like 10 minutes from your house the other day
lol nice
i also think mmos are easier to define by providing what an mmo isnt, for example in the games industry, u usually differentiate between coop and mmo, or lets say solo/singeplayer gameplay vs mmo
Unfortunate how many people hate spectrum over there lol
@mortal hare
id also say thats wrong, minecraft itself isnt really an mmo on its own as a base game
I am not sure if I should be putting this here or not but I was looking for some help with creating a plugin development. I know VERY little about this, so I was looking to comission someone. It is for a PvP Duel/Wager system on my paper survival server, I have all the details and desires written out in a google doc so if you are interested please dm me a portfolio of some of your current work and we can try and find a reasonable price for something like this!!
well that is because ever since they acquired time warner cable, they are just horrible. Horrible service, prices and equipment
the only reason you even go with spectrum is because either the alternatives are worse or there is no alternatives lol
if you mean the server portion has to be modified to allow it, then sure but the server is not the game itself
so it technically meets the definition of an MMO. As it means massively multiplayer online and to meet that is first player numbers and second all players in the same playable/viewable world and can all interact with each other
Currently, the server population is dominated by servers that host more then 20 players so that counts as it being such a game
if a door doesnt have a blockstate, what holds if its open or closed?
It implements the Openable interface, so you can just check its BlockData to see if it’s open or closed
jfc
thats what i get for trying to make structure data human-readable i guess
hm? if BlockState uses BlockData for its........ data, how come not all sub-interfaces use BlockState?
not every block needs a server-side state object
Hi is it possible to remove the sound that is played when u break a block ?
Block State is the data for the block to interact with the world AKA The state of the block in the world. BlockData is data specific to the block. As was stated, not all blocks would need to have a state.
thats not whats confusing me here
the stopSound methods "might" make it possible
not sure tho
are you saying things other than BlockState have setBlockData methods?
Well all blocks have Block Data. Not all Blocks have a state.
But because not all blocks have a state, is why you wouldn't have all sub-interfaces use BlockState because it may not be there
but BlockData is always there
ok so it looks to me like the blockdata (by default) is just the physical state of the correspnding material, but whats up with those rotation and mirror methods? if they exist, why is there no methods to manually change the rotation of the blockdata?
im not sure if, if i work with no other plugins involved, i can discard the blockdata when doing structure work
declaration: package: org.bukkit.block.data, interface: Rotatable
thats what null is for kek
no, it will still return a valid BlockData
just, no specific sub-interface
as it has no specific properties
of such a block, would getAsString(true) return an empty string then?
ah. turns out i cant read
is there a way to figure out if it is no sub-interface?
i dimly recall some weird way of asking 'is it an instance of this class exactly'
hm, what for?
one slight problem here is that it's a big interface hierarchy, and the implementing classes are on the server so you can't simply do blockData.getClass() == BlockData.class
what's wrong with storing the result of getAsString as it is?
if it has blockData besides the material, that string needs to be stored. its one entry per block
if it doesnt have blockdata, i can just index the materials, and then be like '6x3'
and given that most blocks are without any extra data, and this is something that can be generated by players... probably a good idea to compress the resulting data like this lol
6x3 🤔
yea. six times index three
<Format>;<Block 0, Block 1>;0,5*1,0,1,0
so that i can do this instead of having to store a long aah string for each block
i thought there was a method in Material to get the blockdata Class it uses, but i must be mistaken
i vaguely remember seeing that somewhere
but it could be in craftbukkit
or it could be itemmeta rather than blockdata
you think the tags thing could tell me if a block has weird blockdata?
i doubt it, unless you start tagging them yourself which kinda defeats the point
what are you doing again
one does exist in BlockType.Typed
but ruh roh @Internal
'if i store this block as 'Location, Material' do i loose any data?'
if not, is 'Location, Material, Direction' enough?
serialize the blockdata and see if it has any fields i suppose
that works too i suppose lol
if you want human readable serializable form, use the whatever api facility that gives you the blockdata as it's used in /setblock
e.g. minecraft:oak_log[axis=y]
it already prints blockdata as string, im convinced its that. but this isnt the goal here, i want to compress the data
most blocks can be identified by just their material
so instead of twenty characters, i want to compress that to two at most
that'd be minecraft:dirt[]
i mean, ideally you'd index all block types regardless of whether they have additional properties or not
no? the facility is going to give you minecraft:dirt[]
feels clunky tho ngl
or probably just []
if you want to compress it, it won't be human readable
if you don't need it to be human readable, use gzip or whatever
or just use the worldedit api to store schematics
myes, no point reinventing the wheel
or the regular minecraft jigsaw structures
oh hey
class.getInterface spits out the exact one
the logic i would need to write to properly move the data from other parts of what im working on would probably make this more complicated, not less
good time to learn interfaces
and not as in the java class type, but as in the programming concept
either way, if you really want to homebrew some schematic format yourself, do something like the following
have a header table that lists every blockdata involved in the schematic in its full form, so you can serialize it correctly, and assign them to an index
then in your data itself, for each block in the schematic, append n bits containing a number pointing at the index of the blockdata that is in that location
n bits being the bits required to represent your highest index
this is kinda sorta how the game does it
you could also have an index table for the properties if you wanna go further
well, im assuming here that most of that blockdata is going to be unique excluding rotations
and once you're done you run it through gzip or your compression algorithm of choice
but indexing it initially should work pretty well
sql already uses zlib
you're storing the schematic in a sql database? 💀
id rather avoid shoving the resulting data into an item
aka 'oh hey bookban'
my solution for data i dont know the size of is UUID index in PDC of item -> SQL database with that uuid as key
whar
unless it's cross-server on like a velocity network, flatfile will serve you better
this really isn't where sql shines
isnt the access time in those determined by the entry count?
no
you have a directory with a bunch of files, the name of the file is your key and the contents of the file are your value
ah move the problem to the OS, gotcha lol
it'll be as fast as your filesystem is at looking up a random file, which will most likely outperform a mysql server fetching a blob from an index
noted
if you do want a database, something something nosql is probably the go for this
but if it's just a local thing and you don't need a database you communicate with from multiple places, flatfile will be simple, effective, understandable for server admins, and require no setup
well there is some item metadata that needs to be put into a relational database, but the structure data isnt part of that, so good point
I am not sure if I should be putting this here (and if you know a better place to put this, please lmk!) but I was looking for some help with creating a plugin development. I know VERY little about this, so I was looking to comission someone. It is for a PvP Duel/Wager system on my paper survival server, I have all the details and desires written out in a google doc so if you are interested please dm me a portfolio of some of your current work and we can try and find a reasonable price for something like this!!
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
ty :)
np
@worldly ingot If you have time.
Done. Enough chaos.
NamespacedKey recipeKey = new NamespacedKey(plugin, "aa-atk");
player.discoverRecipe(recipeKey);
recipeKey = new NamespacedKey(plugin, "ab-");
player.discoverRecipe(recipeKey);```
is there a way to change the order in the recipe book? it seems random but idk, datapacks can change the order of the recipes in the recipe book
Recipe group maybe?
what's that?
Does bukkit have anything analogous to ChunkPos from NMS?
Isn’t that just 2 ints
https://pastes.dev/yBNThAtaJh
This code updated the tab list corrrectly but no skin modifications are set, tried removed the player using packets and re adding him but didnt work ( players removed from tablist and no skin changes) no paper part is broken I guess it's a packet issue
or worse, a long
why do you use a null with a ternary? thhats just lazy
The docs say it’s two ints!
im trying to deserialize an itemstack with some vanilla tags on it, but spigot seems to throw an error: Caused by: java.lang.IllegalArgumentException: Specified class does not exist ('Consumable')
The code responsible for serializing the item is ```java
FileConfiguration config;
ItemStack item;
config.set( "item", item );
and the deserialization is:
```java
ItemStack item = config.getItemStack( "item" );
while the actual content of the serialized yaml is yaml item: ==: org.bukkit.inventory.ItemStack v: 4556 type: IRON_INGOT meta: ==: ItemMeta meta-type: UNSPECIFIC consumable: ==: Consumable consume-seconds: 2.0 animation: BLOCK sound: minecraft:entity.generic.eat has-consume-particles: true effects: []
is there something im missing? i'm running the latest version of spigot too: This server is running CraftBukkit version 4563-Spigot-6e369ba-5e06940 (MC: 1.21.10) (Implementing API version 1.21.10-R0.1-SNAPSHOT)
it doesn't appear to have made it past the YamlConfiguration.loadConfiguration call though
Yup. Just wanted to see if bukkit had its own thing for that instead
It's part of the recipe
Sounds like a bug but idk why serialisation would work
spigot breaks serialization confirmed
spigot breaks confirmed
Consumable is missing in CraftMetaFactory registerClass calls, so it can't find the alias:
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java#50-60
Serialization works because it doesn't depend on the alias being registered to find the class
honestly, one could just make an annotation processor to automatically register these instead of depending on one manually having to do it
What should i do to make a replay plugin?
So... how to play them
Yep that's what I would've expected,will fix
Hi all, https://hub.jeff-media.com/ - when will this website be operational? Who will help? I can't compile the plugin I need from the github.
idk ask @tender shard
fixed
Man md_5 is so good
long outage man
they knew I had something to upload
they don't want the good plugins to get updated
spigot down ?
didn't I just do a support ticket
with you in it
maybe not, I don't know what happened today that everyone decided to open a ticket
it's ticket Tuesday my friend
you are the second person to tell me this
I'm glad I'm not original
what do i have to do when it says "nag {author} of {plugin} for not relocating the {library} package"
Time to relocate
Relocate it
why does it need to be relocated too
You relocate to prevent conflicts with other plugins
so do i relocate it to my own group id i guess?
Yes
forgive me for asking for a spoonfed solution but how can i do that? i seem to be getting a lot of different answers from google
using maven
is that something you do in the dependency itself or in the plugins
how you do it with maven using relocation
the excludes are not necessary, but handy to know about if you want to exclude something specific when shading 😉
occasionally you end up with some transitive dependencies trying to be shaded in and you just don't want them lmao
how can i get the default entity stuff such as size, height etc from an EntityType? I want to know if the entity can spawn there (if it can fit)
Anyone have any idea why an Arrow retrieved via EntityShootBowEvent always has fire ticks set to 0 even when it's shot with a Flame bow?
EntityShootBowEvent is called before the projectile is actually spawned in order to be able to modify it or cancel the event altogether
Even delaying by a tick it still returned 0, all the other attributes like Pickup Status, Critical, Pierce, they're all set and I can get those properly
It's just fire ticks that for some reason returns 0
What a clown
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
When I pressed him he said “fuck up now”, public relations final boss
fire ticks are only set after the arrow hits
the reason for it being on fire even when that is not set yet, is because of HasVisualFire is set to true
which gives it the appearance of being on fire, without it being actually on fire
havent touched plugins in over a year, so could someone please help me with this error:
[ERROR] Failed to read artifact descriptor for net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT
[ERROR] Caused by: The following artifacts could not be resolved: net.md-5:bungeecord-parent:pom:1.8-SNAPSHOT (absent): net.md-5:bungeecord-parent:pom:1.8-SNAPSHOT was not found in https://maven.enginehub.org/repo/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of enginehub-maven has elapsed or updates are forced
[ERROR]
[ERROR] -> ```
1.8 should be buried at this point xD
ahah unfortunately thats what im having to work with
The home of Spigot a high performance, no lag customized Bukkit Minecraft server API, and BungeeCord, the cloud server proxy.
changed to this, however same erorr
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository> -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>```
its on teh public repo https://hub.spigotmc.org/nexus/#browse/browse:public:net
I checked getVisualFire as well and it returned NOT_SET
any clues why my blockdisplay isnt glowing?
location.getWorld().spawn(location, BlockDisplay.class, (display) -> {
display.setGlowing(true);
display.setGravity(false);
display.setGlowColorOverride(Color.WHITE);
display.setBlock(block.getBlockData()); // Said block is just some dirt block
});
i might have a clue
Are they able to glow?
its actually something very different
gson is having trouble serializing bukkit colors
ive made a wrapper around it
That sure is a lot of colours of the rainbow
yep
Real shit
i dont get why people still bother with anything less than 1.12.2
and even thats pushing it
I don't understand why people still bother with anything less than 1.21.5
Real shit
.8*
excuse you
i get 1.8 and 1.12.2 are like "mod-stable" versions bc they either had a pretty long run (1.8) or the game just kept getting constant big changes after it (1.12.2) but like
no point in 1.8 even for pvp
because we got blockhitting back
thanks to components
in items
fwiw maybe its bc it was hypixel but blockhitting felt like ass playing on 1.21
granted im also... out of practice
but it did feel less like it used to
if hypixel doesnt forward the hitbox to newer versions it might be a slight disadvantage
but idk much about hitbox changes across versions
i know one server im playing on compensates hitboxes
what does hitbox have to do with it
it would be a matter of the hit registering as being blocked or not
player reach and player hitbox has remained largely unchanged iirc
except for the addition of crawling and changes w sneaking
it loses a little height yeah
new code
BlockDisplay displayy = location.getWorld().spawn(location, BlockDisplay.class, (display) -> {
display.setGlowing(true);
display.setGravity(false);
display.setGlowColorOverride(org.bukkit.Color.WHITE);
display.setBlock(block.getBlockData());
});
System.out.println(displayy.isGlowing());
System.out.println(displayy.getGlowColorOverride());
true
null
testing it on blocks like stone dirt etc.
dont even worry about that
wdym 💀
lol that's funny
whats funny 😢
Color.WHITE is argb 0xffffffff, or -1 in decimal; the glow color override being -1 means it will use the default color which is the player's team color, but the api will read that -1 in the display entity as null
but its literally asking for a bukkit color
or use 0xfffefefe lmao
is it a known problem or sum
idk
-1 being the "default" to use the player's team color is an intended game mechanic
yeah literally anything else will work fine
the thing doesn't even make use of the alpha value
what a scam
so 0x00ffffff will work fine as it's still white
ill add a dirty workaround just so configurers arent confused
if (white) gray();
can i make the blockdisplay invisible yet still glowing?
using barrier would break shapes
You can if you make a texture with like 1 alpha
Since the game won’t actually render pixels below like 25 alpha, but it’ll still use them to calculate an outline
since glow is see-through-walls ill try making the display .001 smaller
barriers don't glow
oh lol
for regular glowing blocks we usually use shulkers or something
and maybe scale them with attributes
i just put a slightly smaller blockdisplay of the block type
inside of the block
99.99% accurate
It's ok you're allowed to admit 1.12.2 was the best version
thats weird
Did you try checking a tick later
Yep, both return NOT_SET
maybe a bug then?
I can't really explain if both settings are not set lol
What about fire ticks
Returns 0
any ideas? I am leaning towards it being a bug at this point because fire ticks being 0 is typically normal until it hits a target and then ticks are set. But the visual should be set though otherwise where is it getting its flaming appearance from?
Actually does look like fire ticks is set after 1 tick & visual fire stays NOT_SET
Guess I'll delay by a tick for that
weird thats the only thing that gets delayed
Yeah I was more saying it's strange that fire ticks is delayed while things like the arrow's Critical and Pierce are set before the event is called
I blame dinnerbone! ¯_(ツ)_/¯
I'm okay with that! Shame on dinnerbone. Thanks lads 
I was pretty sure it was but you would know more then me at this point probably lmao
You don’t
Block displays only support block states, not NBT data
Use an item display
ahh
System.out.println 💀 This
Hey, anyone else is having an issue with items with "org.bukkit.craftbukkit.v1_21_R6.inventory.components.consumable.effects.CraftConsumableApplyEffects" not deserializing ?
They're being written correctly (cant paste image of the file, but it is written correctly)
But when trying to load them I get
[16:54:55] [Server thread/WARN]: at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:60)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequenceStep2(BaseConstructor.java:464)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequence(BaseConstructor.java:430)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlSeq.construct(SafeConstructor.java:574)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:576)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:210)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:552)
[16:54:55] [Server thread/WARN]: at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:597)```
[16:54:55] [Server thread/WARN]: Caused by: java.lang.IllegalArgumentException: Specified class does not exist ('org.bukkit.craftbukkit.v1_21_R6.inventory.components.consumable.effects.CraftConsumableApplyEffects')
Using the latest spigot
I don't think you are using the latest because this was fixed 3 days ago
Re-run BuildTools and it should be resolved
yeah I saw that, but it doesn't fix my case
[16:59:38] [Server thread/INFO]: Checking version, please wait...
[16:59:39] [Thread-3/INFO]: You are running the latest version
Can be reproduced by serializing then deserializing this :
give @a mushroom_stew[custom_name=[{"text":"Super Regular Mushroom Stew","italic":false}],lore=[[{"text":"This one is not suspicious","italic":false}]],food={nutrition:1,saturation:1},consumable={on_consume_effects:[{type:apply_effects,effects:[{id:instant_health,duration:1,amplifier:1},{id:absorption,duration:160,amplifier:1},{id:regeneration,duration:80,amplifier:2},{id:speed,duration:160,amplifier:2}]}]}]
Should all these files https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/inventory/components/consumable/effects be added to the list in CraftItemFactory.java to fix that issue ?
Since only CraftConsumableComponent was added
Yes I think they should all be registered. Could you open a bug report on Jira?
?jira
Thanks, I created a ticket https://hub.spigotmc.org/jira/browse/SPIGOT-8094
Thank you 🙂
i was thinking lately rn, what if you designed minecraft server around the idea of linux virtual file system
like expose ABI which would allow to manipulate chunk level control codes with read and write methods and then build everything on top in user-level implementations,
ofc it wouldnt be such a simple ABI, but theoretically this would allow to make platform independent plugins and functionality which would run on both bedrock and java editions
this sounds like minestom but without strict java-based API
lets say you implement chunk writes/loads and other stuff which is needed to be fast in something like C, expose ABI to interact with the chunks, and then build API's dedicated to specific languages to compile user-space programs which manipulate those chunks with control codes
like JVM bytecode, but custom to minecraft iself
But java and bedrock don’t have the same chunk format
well you can make intermediary one inside the implementation.
there's i reason i stated theoretically. they're never going to do this as this would require large rewrites of both platforms
dovidas says something along the lines of "i was thinking" or "why don't we"
wall of text
despair
have fixed
this has been fixed btw
if I have an Entity object, unload the chunk where it is and load it again and then try to get the same entity from it will the be the same Entity or not?
in a way that oldEntity == newEntity
Probably not
Use UUID instead of storing a reference to the entity
it won't be ==, but it will probably be equals, and the old entity will return false for isValid()
it generally isn't a good idea to hold onto entity references that escape your scope or persist for over a tick
This is correct
Well, actually, it might not even be equals() because it compares the entity id, not the entity's UUID
So no it won't be equals() :p but its UUID will match
looks like on paper at least CraftEntity actually compares the nms entity instance with == for equals
Which afaik is functionally equivalent to comparing its numeric ID
so yeah it definitely won't be equals if the backing entity gets unloaded and recreated
Not that holding onto an entity instance is a smart idea
easy way to leak memory for sure, much like with players
generally speaking, whenever you work with entity instances that weren't created in the same scope you're using them in, you should always at least check isValid()
even if it's on the main thread and expected to happen in a single tick; if execution leaves your scope, someone could delete it through the api
i do though frequently use entity reference sets/maps managed by entity add/remove events since identity things are nice and efficient
hey so i'm having a little trouble with the usage of the bossbar, i made all but the style that i assigned to the bossbar doesnt apply, and i added it in both sides, i also tested the other styles and nothing
Could be a bukkit bug
Anyone know a tool to manipulate maven repositories locally? Specifically to delete all the old SNAPSHOTS/only retain one of each
mvn versions:purge-local-repository should do it
or mvn dependency:purge-local-repository -DsnapshotsOnly=true if you only want snapshots gone
if you're running your own repo server just use nexus/artifactory cleanup policies, way easier
I saw that but it purges everything, I want to retain a single local version
Yes I basically want a cleanup policy but locally
yeah maven doesn't have "keep latest N" built-in. your local repo is just ~/.m2/repository with predictable structure though
script approach (most reliable):
find ~/.m2/repository -type d -name "*-SNAPSHOT" | while read dir; do
cd "$dir"
ls -t *.jar 2>/dev/null | tail -n +2 | xargs -r rm -f
ls -t *.pom 2>/dev/null | tail -n +2 | xargs -r rm -f
done
keeps newest jar/pom of each snapshot, nukes the rest. safe because maven redownloads on next build if needed
or use this plugin:
mvn de.dentrassi.maven:maven-repository-cleaner:0.1.0:clean-snapshots -DkeepLatest=1
How can I check if the killed entity on EntityDeathEvent is either Monster and Hostile not Item, ItemFrame and ...?
you would need to check the entity class of the involved entity against those that it can be that are not your goal. note that item and itemframe entities are not considered living entities, which is what entityDeathEvent uses.
you likely wish to exclude passive mobs. Possibly the Tag interface has a way of doing this quickly.
thanks
ok so i have a rater self-inflicted problem
im storing data in shulkers. my ender chest now takes about 1-2 seconds to load in the contents. is there a way to only send the data of shulkers when the player hovers over them?
you can't interpret the tooltip packet easily, but you can strip the NBT data when sending the inventory and only include it on hover
use InventoryOpenEvent to catch when the ender chest opens, then iterate through the inventory contents and strip shulker box NBT before sending to client:
@EventHandler
public void onInventoryOpen(InventoryOpenEvent event) {
if (!(event.getInventory() instanceof EnderChestInventory)) return;
Inventory inv = event.getInventory();
Player player = (Player) event.getPlayer();
for (int i = 0; i < inv.getSize(); i++) {
ItemStack item = inv.getItem(i);
if (item != null && item.getType().toString().contains("SHULKER_BOX")) {
// Send stripped version, store real version server-side
ItemStack fake = item.clone();
ItemMeta meta = fake.getItemMeta();
if (meta instanceof BlockStateMeta bsm) {
bsm.setBlockState(null); // strips container contents
fake.setItemMeta(meta);
}
// send fake to client, you'll need PacketPlayOutSetSlot for this
}
}
}
then use PlayerItemHeldEvent or a custom hover detection to send the real NBT data only when needed
but honestly if you're storing that much data in shulkers you're probably hitting the 2MB NBT limit per chunk. might want to rethink the data storage approach entirely
well, its nesting inventories for specific items
lemme just check something rq
hm. my playerdata is 49kb
is the ender chest stored elsewhere?
No
It seems like the SpawnChangeEvent doesn't get called when someone runs the setworldspawn command
I checked everything and i can't seem to find the problem in my code
Do you have a plugin intercepting the command?
Looking to paste something? Try a code block or one of the following websites:
- https://pastes.dev/
- https://sourceb.in/
- https://mclo.gs/ (best for server logs)
where you register the listener and the listner itself
@EventHandler
public void onSpawnChange(SpawnChangeEvent e){
System.out.println("[MyEasySpawn] Spawn Location change detected");
}
}```
Registration :
``` getServer().getPluginManager().registerEvents(new SpawnChangeListener(), this);
Nothing wrong, IF thats the actual code you are using
yep
spigot version?
.10 had some pretty large changes around spawn points of worlds so
that might be introduced a bug
minecraft version is 1.21.1 but i don't know for the spigot version
I mean. 1.21.1 is unsupported anyway
even if there was a bug in spigot, you won't get a fix pushed for it
Bro doesn’t pay his staff, plus was told twice about not asking for staff in Discord
looking for people to give me money for free
would you like to give me money for free?
This reads like I have dyslexia. What does it mean
Is jitpack down? I cant access it
Can someone enter the page? or is it my problem
If you mean jitpack.io, it's working fine for me.
yeah jitpack.io
Yeah typo, it's up for me
Well, I cant access it for some reason
it's very finicky with certain artifacts
I use the 1.20.4 spigot API for my plugin but in 1.21.10 the new windcharges don't work right with the EntityExplodeEvent. The blockList contains blocks near the explosion but in vanilla the wind charge does not break blocks. Why is the blockList not empty in this case?
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/EntityExplodeEvent.html#blockList()
declaration: package: org.bukkit.event.entity, class: EntityExplodeEvent
because it still "explodes" them, it just doesn't destroy all block types
it will press buttons, shatter pottery (i think) and clear out some sensitive blocks
that said i agree it's kind of misleading and unexpected, i know it has caused issues in many plugins
Yeah but it also contains blocks that are not effected by wind charges like dirt or beacons. The discription says it only contains blocks that are destroyed by the explosion
I mean is it intended or?
i don't know, honestly
i could see it either-or, but judging by that description, probably not
at the same time, we do need an event for the wind charge explosion and the blocks it "affects", to e.g. make the explosions interact with custom blocks
so perhaps it should be split into its own event altogether, and only the actually destroyed blocks should be included in the current explode event
that's how i'd do it, but i'm no insider to know whether there's some rationale behind it being this way right now
okay thanks
choco might know, and knowing how it always goes, choco probably also has a pr doing something about it that was never merged
https://hub.spigotmc.org/jenkins/job/BungeeCord/ Thank you God!
I couldn't stand the velocity anymore
interesting
declaration: package: org.bukkit, enum: ExplosionResult
Look at methods other than blockList (ie above)
Maybe the docs should say "affect" rather than "destroy" now
hi
does anyone use hikari cp?
is it possible to silent the console messages?
they appear sometimes, later on
HikariPool-2...3..4..5..6.7.8
probably can set a logger somehow
what recepture is renaissance book?
Huh
the revive command isn't working for me
What revive command
Is there any equivalent for BlockDropItemEvent for dettached blocks?
For example, if I place a button and break the supporting block
The button will drop but BlockDropItemEvent isn't fired for the button, only the support
your father pins you to the wall like Jesus, you bitch
your dad is hitting you with an Ethernet cable
i think i had to do this manually with blockphysicsevent when i last did something like this
I can prevent it from dettaching with the physics event
I just want the item to not drop
iirc i marked the positions with the physics event and then listened to EntityAddToWorld for items appearing in those spaces during the rest of the tick
that's cursed
myes
Can I see? :3
god knows if i still have it anywhere, i've changed machines like thrice since
i'll take a look
huh
have you tried BlockDestroyEvent?
i think that fires for the button
Hi,
why is Bukkit#getOfflinePlayer(UUID) deprecated and what should I use then to get a offline player with the name?
Are schedulers executed after or before events?
Question doesn't make sense, what exactly are you trying to do
i believe they're run at the start of the tick but i'm not sure
I think so too, but that's not really the question
Ah sorry, I am using 1.18 API
🤔
by game events i assume they mean event listeners called by things happening during the tick
It's not deprecated in spigot 1.18 either
@Deprecated
public static org.bukkit.OfflinePlayer getOfflinePlayer(
String name
)
Gets the player by the given name, regardless if they are offline or online.
This method may involve a blocking web request to get the UUID for the given name.
This will return an object even if the player does not exist. To this method, all players will exist.
Deprecated
Persistent storage of users should be by UUID as names are no longer unique past a single session.
Params:
name – the name the player to retrieve
Returns:
an offline player
See Also:
getOfflinePlayer(UUID)
you were linking the UUID method, but i guess you're talking about the name method
i wonder
I think the documentation explains it sufficiently
Do you have a question not explained by it?
No, I understand the reason but I am curious how to handle commands like /dosomething <PLAYER> when I need to handle with the Offline player object
When the player leaves - I check if the player is in combatPlayers and if so, I set their health to 0.
Yeah, but I don't like using deprecated methods if there is an option to do it without them
My question is whether this could cause race problems - I was thinking that if player1 == player is false, it would remove the player from combatPlayers, and only then would the PlayerQuitEvent be called, and within that event the player would no longer be in combat, thus causing a race problem. But this can't happen since for Bukkit.getPlayer(id) to return null, it means the playerquitEvent has already been called, right?
but if there isn't one, i will ofc use it
no thanks :O
im fine with getting the warnings... was just wondering if there is a better method to use
Why do you need an offline player object?
multiple use cases. for example, I want to give them items
oh thats OnlinePlayer
Giving items to offline players is not possible with OfflinePlayer
i am so lost today
.
just use Player. no?
but there the method is also deprecated
Do you need to give items to offline players?
There is no OnlinePlayer yeah :=C
I think I should get some sleep
no, I don't need to
just use Player
someone know answer me?
I do
If I have a Player instance representing a player, and that player is online, and then on a later tick I do Bukkit.getPlayer(player) and it returns null, am I guaranteed that the PlayerQuitEvent for that player was called previously?
or the player is dead
wdym dead
iirc dead players don't have a corresponding valid Player instance
but yes, if it returns null they're not online or are maybe dead
i'm not 100% on the dead part
I doubt that part about death
but that wouldn't make any sense. A dead player is still a player
This looks like AI to me
ok make sense
but no
But your logic is good
you can try it and let me know if it's the case or not
it's not logic, it's memory
i remember it specifically because it's something that you would be 99% sure is false
ddr5?
Does anyone know?
if it returns null, the player is not online, or possibly is dead
you can ignore the possibly is dead part if you want
well maybe since the player is null?
and if the player is not online now but was online previously, then at some point in between the quit event has fired
wdym
oh yes
this is what i am asking
I'm developing a combat plugin and I'm worried about race problems
races are only really a concern in multithreaded environments
Where's the md5 in these situations?
if you're using the listeners and the scheduler, you don't have to worry about them
yea ok
you convinced me
thank you
!!
The more I study, the dumber I become
DDR3 :(
DDR2 :(
Dance dance revolution 2
flashbacks for germany
thats just every Windows version
What’s wrong with xp!
macos ftw
i like it, that's all it needs to win me over
the customer is always right, in the matter of taste...
Hello, how can I get the loot table corresponding to a chest ?
How do I like make rpg class work like I don't know how to make it work..
Depends entierly on what you want it to do
It's part of the Chests BlockState
Get the state cast it to Chest and then call getLootTable
Any of you nerds know the packet structure for light data? I'm trying to individually light a block
have u consulted the wiki
the wiki is confusing as fuck
and this light data class is used for both updating entire chunks and blocks
and regions or something
is it possible to light an individual block
it is
and light data is split into nibbles fml
is there really no easy way to set a block's light without it spreading
yeah i'd probably just sendBlockChange light blocks
unless you want the client to not do light updates, but that's pretty fragile as it might just decide to do them anyway due to a clientside update
I don't want the light to scatter
crazy my client just crashed ok
aand this doesn't work.. amazing
or maybe it works too well
at least the light didn't scatter 😉
lol
this is only slightly insane
uhh
we're having weird light artifacts!!
I can't tell if the client is fighting me or not
Might be from the client trying to do its own thing =/

