#help-development
1 messages · Page 1308 of 1
if it were my previous code would handle it i think. this one: java final Block block = event.getClickedBlock(); final Player player = event.getPlayer(); final Plot eventPlot; if(block != null) { eventPlot = PlotManager.getInstance().getPlot(block.getChunk()); if(ProtectionUtil.canPlayerAffect(player, eventPlot)) return; event.setCancelled(true); }
ill set the event to always cancel just to be sure it isnt issue with detecting
yeah cancelling the event with no conditions doesnt do it either
ill try cancelling BlockPhysicsEvent
.
it may be used for detecting but cancelling doesnt work
yeah cuz it prevents me from doing literally anything else
so, PHYSICAL interaction just isn't triggering is what you're saying
no well it is
but it doesnt seem to correspond to redstone ore lighting up
because cancelling it with no conditions at all prevents other things but not this
that might just be a bug, though it's hard to say
maybe thats intented idk, but im just looking for a way to make it work
you could cancel the BlockRedstoneEvent
i already do
it only works for certain redstone components like dust, repeaters etc
doesnt even work for pistons
i mean i do it on a condition so ill try with no condition
i forgot its not cancellable lol
so no thats not it
it might just be that the redstone ore lighting up is a client side effect, but let me check just to be sure
i m pretty sure that it can be detected by detectors but i didnt bother to check my bad, lemme just check that
but i think since 1.13 its server side
yeah that's it
Just tested it myself, the effect only shows up for the player walking on the ore
It desyncs from the client
Probably only triggers once on the server but multiple times on the client or smth
causing them to go out of sync
I wonder if cancelling block physics altogether does anything
probably not
Probably client prediction then
I don't get what I am supposed to be looking at lol
The ore not glowing after the player standing on the ore
It however glowing on the Dummy account
since they are on the ore
ohh
so, yeah it is a client side thing
@rare ether sadly there's nothing you can do about it
an alternative would be to layer it with a block display of the block so that it never looks lit up
ill check with a detector now, if its only client side that fine
i didnt consider it could be only client side mb
the current changes so a detector would in fact detect that
yeah i just checked my code works, its just client side glowing now
I mean normally, not when the event is cancelled
so the playerinteract one is actually the one
in the future ill try some packet shenanigans to fix it client side but its find if its just cosmetic, i shouldve looked on the other client im testing this on but i didnt think about it
sorry for wasting everyones times lol
and thank you guys so much for the help ❤️
there's nothing in the server you can do about it, even with packets
but as said, you can put a block display on top so that it doesn't loop like it is lit up, if anything
are you 100% i couldn't fix the client-side prediction by sending an update which says that the ore has stopped being lit up?
i think id work but i have an easy way to test that theory
give me a minute
the thing is, the server has stopped lighting the block, but the client just doesn't see it that way
lemme tell you sth
because these are two possible scenarious
- the block actually gets lit up and everyone gets and update from the server and sees it
- the effect is just client side, because its just client prediction and server never sent anything
right now the second thing is happening
HOWEVER
both things are happening
You could probably sendBlockChange to the player to stop it from glowing
Probably gotta have a 1 tick delay though
if it is client side it'd glow regardless of whether it is a fake block no?
though I guess that would revert the state change maybe, worth a try
i just did an experiment: Player1 triggered the ore to light up. Player2 joined after 15 seconds. both players saw the ore stop glowing in the same exact moment
so
Not it you set it to the unlit state
there are two options
either server sends an information about remaining glow time to the player joining
or
it sends a packet after the glow effect stops
if its the second it should be possible
thats why im asking if you're 100% sure @sly topaz
It’s the later
is there a quick way i can do this rn? i have little experience with minecraft protocol but i thought it might be possible
that's perfectly fine
sendBlockChange is an API method
Player#sendBlockChange to be more specific
Just do a quick Material.REDSTONE_ORE.createBlockData(), set the lit property to false, and then sendBlockChange the block data
im just sending the state of the ore after cancelling the event, lemme see if it works
idk what happened but the detector sees it again lol i broke sth
Bukkit.getScheduler().runTask(YourPlugin.instance(), task -> {
var data = (Lightable) Material.REDSTONE_ORE.createBlockData();
data.setLit(false);
player.sendBlockChange(clickedBlock.getLocation(), data);
});
okay so as someone has mentioned earlier the method for detecting the change by looking for a block below is mediocare at best and when walking off an edge of a block the event can still pass
.
the client side fix though: event.getPlayer().sendBlockChange(blockBelow.getLocation(), blockBelow.getBlockData()); worked
but i still have to think of a reliable method for detecting when the interaction happens, ill try BlockPhysicsEvent maybe
i think it fired but PlayerInteractEvent doesn't provide the block for physical interactions according to javadoc
so i have a flawed method of detecting it
I am not sure what you mean
I do not
if PlayerInteractEvent fires for it consistently, then just cancelling it + sending the block change should be good
okay, and how do i check what block the player interacts with
isn't clicked block the block interacted in this instance
it seems to be
it actually seems like it is, i just tested that
ill report it cuz the docs should be more clear about it
it clearly says in the description that its the clicked block
it is the clicked block though, you're clicking the block with your ass pressure
hahhaha lol hard to argue with that
(for those who don't get the joke)
getClickedBlocks works, why did i even bother writing that detection lol
i actually wanna report that because the name is needlessly confusing
do i just do that on forums?
?jira
what do you imply by so called "ass"?
Is the issue that you don't click with your ass?
I guess it could be getInteractedPosition or something
But it's been that way for 15 years
i think it'd just be great if the description in the doc mention that it also covers not clicked blocks
Okay, thanks ❤️
it is a running joke that when the player triggers something by stepping on it, it is because of ass pressure
didn't think I'd have to explain it lol
Maybe you don’t
can i not use placeholders for for skins
on fancynpcs
and also my deluxemenus dont actually work
my warps menu dont do shit
Sounds like a question for #help-server
--- a/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java
@@ -159,9 +159,9 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
}
/**
- * Returns the clicked block
+ * Returns the block that was interacted with.
*
- * @return Block returns the block clicked with this item.
+ * @return Block returns the block interacted with.
*/
@Nullable
public Block getClickedBlock() {
@@ -169,9 +169,9 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
}
/**
- * Returns the face of the block that was clicked
+ * Returns the face of the block that was interacted with.
*
- * @return BlockFace returns the face of the block that was clicked
+ * @return BlockFace returns the face of the block that was interacted with
*/
@NotNull
public BlockFace getBlockFace() {
@@ -180,7 +180,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
/**
* This controls the action to take with the block (if any) that was
- * clicked on. This event gets processed for all blocks, but most don't
+ * interacted with. This event gets processed for all blocks, but most don't
* have a default action
*
* @return the action to take with the interacted block
How's this?
Since the getClickedBlock name is actively misleading a little nudge by saying something like @return Block returns the block interacted with, even if the interaction was not actually clicking on the block or some adnotation with similar meaning is in place imo. But the rest are imo fine because their names do not suggest anything else than they actually do. I really appreciate you making this changes ❤️
/**
* Returns the block that was interacted with, even if the interaction was
* {@link Action#PHYSICAL} rather than clicking on the block.
*
* @return Block returns the block interacted with.
*/
@Nullable
public Block getClickedBlock() {
return blockClicked;
}```
that's perfect 
Hello can someone kindly explain the RegisteredServiceProvider class pleasee
server is on 1.21.8 when players join in 1.8 scoreboard is on half cant see another half of scoreboard and world on 1.21.8 is mach deaper so when i dig hole for factions base and player form lower version joins can see anything evrythingis black
pics https://postimg.cc/tZ3Zzbbk
paying for help
any kind of saving is synchronous
it is a class that is used for the service provider API, would be more helpful to understand what you're trying to do with it though
is this your plugin you're talking about? Because if not this goes to #help-server
I'll give PacketEvents a look, thanks for the tip!
i think i got the gist of it, ty though 😄
how does storing PDC look when there's multiple worlds?
for the player
what i mean is - is it tied to a world or copied over as soon as player travels to a world
or kept in one
If you attatch a pdc tag to the player it would be kept when changing world
It's tied directly to the players data not a specific world
Did anyone work with Scarpet? ``` __on_use_item(player, item, hand) -> (
if (item~'id' == 'minecraft:flint_and_steel' && player~'name' != 'Panyel',
(
player~'send_message'('⚠ Only the realm master can use flint & steel to light portals!');
cancel();
)
)
)
sir this is spigot
Spigot? I thought this was Spanish class
Uncultured spigotians
uncivilized spigoter who cant use the right channels
No i
fk. o meant no u
Anyway, my bad, I mistook this discord for the admincraft one
Have a good kne
have a good kne too brah
What the fuck is Scarpet?
What!?
Where do these server implementations come from!?
Ah it's a gnembon creation lmao https://www.curseforge.com/minecraft/mc-mods/carpet
Anybody willing to make a Server Software with me (fork), that focuses on performance and stability?
is there nothing existing that works for your usecase?
I wanna do it myself, with privace stability performance etc.
well decide, alone or with ppl
I want to make it with 5 devs max mby
Will it be in Rust at least ?
Java 💀 its minecraft
"its minecraft" ok and ?
If you can make minecraft in rust, ok fine
there are server softwares for Minecraft Java client that are made in different languages
anyways I was just making a joke
Anybody willing to make a Server Software with me (fork), that focuses on performance and stability?
(Language = Java)
(DM me)
self-made I said
Did you read what it is?
No, it says that in the readme
Do you understand what "writing my own server" means?
If you wrote your own server, paper / spigot plugins wouldn't run either
I said FORK
🥄
._.
Best I can do
Ima ask it somewhere else
If you fork, you're not gonna be able to improve/ make it more private tho
facts
I may use Minestom
But not many people will use it because it had no paper support
Yea, if you want a fast and efficient/ private server, you're not na wanna add another layer on top of another server software
np xD
If you force an interaction entity to ride the player, could the player interact with it?
wdym interact w it
Like will it register your left and right clicks if the entity is riding you
You could try it 👀
idk how to code it and vanilla mc doesn't allow entities to ride the player
so why u asking
i don't remember if you can punch your mount while riding it
at a baseline i'd assume yes but i would also understand it not doing that
easy way to check; jump on a boat or on a horse and try punching it
if the entity is riding on the player on the other hand, i don't see any reason why it wouldn't be punchable
Man is talking to himself
paper
you wont get anything faster with couple of people than paper which has massive community anyways
if you really want performance you need to make your own server with something like minestom
which in some cases can give you 10-20x performance gains due to how there's situations when something is not needed in NMS that wont be in there
?nms
@tender shard can I copy your old blog post onto the wiki?
👀 Did i use AI for that
honestly tools like skript are not that bad. Its like DSL for bukkit api
it costs efficiency but it allows for best stability across server versions and technologies
for simple things like chat commands, static guis i think its even better to move the functionality to such DSL's or to datapacks
like utility features, since those would be the most stable across server versions the most and those things won't cost as much in terms of performance
or for example you could extend skript parser with expressions to support your server core functionality
like persistence layers, economies, actions etc
that way the game logic itself wouldn't be coded into the game server software itself but in readable format that's easy to port across server versions since those skript files would be linked to proper apis at runtime
its actually the same logic as gta does with mission stuff
it doesnt actually code those missions into the game code, it has its own DSL to script those things outside of the game core engine
for example older gta games had .scm files which carried opcodes for mission stuff
Pfft, why use skript when you can use JShell
because jshell is general purpose, and skript expressions can be domain driven
if you hate skript you can make your own DSL
What’s wrong with general purpose
its just that skript has community support
with DSL you describe only what the current functionality supports
with general purpose you can do whatever you want
it just simplifies syntax
a lot
i'll categorize this take in the same folder as "we should all move away from plugins and use datapacks"
you could
i just prefer domain specific abstractions (DSL, config files with schema validation) over general purpose ones (API's in general purpose langs)
im not sure about stability icl
I mean it should in theory be as stable as the Bukkit api
thats pure idealism
Hence the in theory
the one thing skript is good for is quickly rigging up something quick and dirty and terrible for, say, a one-off minigame on short notice
even then if you have a decent framework to start with, just rawdogging it with quick and dirty and terrible java is probably going to be faster
i mean maybe for like single threaded, straight forward features like a tp command or something skript would suffice... but anything else you'd quickly be quite limited
sure you could do economies, but how do u handle async saving/loading of the data w skript?
there's a lot of syntactic sugar and convenient "qol" things like persistent and global variables that make jerryrigging terrible shit easy and fast
that's the thing you would build an expressions which would be parsed to do persistence to a database
async saving? who cares
save main thread?
I would rather use JShell for that
the goal is to get it to barely run as soon as possible with as little effort as possible
elaborate
Scripts syntax is horrendous to me
As someone who is used to more traditional programming syntax
you wouldnt build something abstract like persist variable1 to database but expressions like:
persist player Dovias inventory
persist player Dovias winning status
or if you want something more high level you wouldnt even expose such things in the skript expressions themsleves
never would i use skript for anything proper or run it on a production server
how the expressions would be interpreted that would be up to server's software
having DSL for game actions allows for hotpatching of certain features without restarting the server
for example
Hypixel should make their mini games in skript
just like you do websites with components nowadays with tools like react or astro you could build your game logic out of DSL expressions
minigames would work really well actually for such case
that's for frontend, sure u can compare that to like some declarative gui framework language or whatever
we try to come up with something new every week so writing a skript for it and then tossing it in the trash is quite economical
yes I mean thats for persistence, I more meant lets say you wanna callback on once an io op has been invoked
it depends on how big software is actually. some ERP solutions have their own DSL languages
for example Microsoft have X++ for Dynamics 365 ERP to control things programatically
or AWS having lambda expressions
the point of DSL that it abstracts the logic out of the software for good that shouldnt suppose to be
essentially turning your software into rule engine
ye but like x++ is completely out of scope for game dev
Grand Theft Auto San Andreas missions internally are coded using .scm files which contain opcodes for certain actions in game
unless its changed last years
that's why DYOM mod and Cleo exists
for example
its not as if those missions are hardcoded into gta_sa.exe executable
gta_sa.exe has interpreter for those opcodes and does actions depending on those values from those .scm files
IF IS_BUTTON_PRESSED PAD2 RIGHTSHOULDER1
AND flag_create_car = 1
AND button_press_flag = 0
IF IS_CAR_DEAD magic_car
DELETE_CAR magic_car
ELSE
IF NOT IS_PLAYER_IN_CAR player magic_car
DELETE_CAR magic_car
ELSE
MARK_CAR_AS_NO_LONGER_NEEDED magic_car
ENDIF
ENDIF
flag_create_car = 0
initial_car_selected = 0
button_press_flag = 1
ENDIF
A lot of games have scripting systems for quests
But that’s different from the core game logic
bro .scm is not the same as x++ respectfully, they were designed for different purposes
unless there's some terminology im not familiar with here
that's just an example
the point of is both are DSL for specific needs
X++ was made to control Dynamics 365 software
keyword specific needs
.scm was made for controlling missions ingame
different domains, different syntax
both allow for flexibility high enough to be executed at runtime
i spent many years exploring and trying out various solutions to scripting quests
among many others, betonquest
which is probably turing complete and very flexible
but at the end of the day no scripting language is as flexible and robust and convenient than an actual programming language
in my current quest framework, everything is declared in java source
JavaSkript?
do we even have a lts way of running javascript in java anymore
didn't nashorn kick the bucket?
nashorn back in the days
either way, it's the best architecture decision i think i've ever made; i have type safety and generics, all the benefits of object oriented programming, linting and compile-time-errors and a wide array of things you would have to struggle to get working with a scripting language
but as said like, sure you can have some expression that is interpeted, but as soon as you need fine grained control over things like concurrency, api between plugins etc then ur skript will just become a layer of cumbersomeness
and yes this includes abstracted persistence where i just toss shit into a record or a state class and gson magics it into whatever storage medium is configured
fine grained control should be handled by server software not the skript
no one's saying that you should put your data inside .csv lol
not talking about other ecosystems and environments given they require other premises
yes but where you do draw the line
sure for something simple as a tp command its pretty obvious
but economy, that can depend
unfortunately perfect foresight is rare to have, so "the server will handle it" only works to handwave the problem to the extent where you're working with incredibly tried-and-tested systems
where you see the actual functionality and the technical part
if you know the functional requirement you can base where to draw the line on that
what if this changes back and forth as you go deeper and accumulate more dev cycles
where the line isnt constant
business requirements change, tech requirements change inevitably
if you get slowed down by the changes back and forth then it mean it deserves to be inside a DSL and not be hardcoded into server software logic
like if you've ever tried to build an api that you have to use in another project, you'll know this problem
unless you have perfect foresight, your skript side of things will invariably end up requiring things you weren't able to predict in how "the server will handle it", and now you're weaving between the two to fix and patch this and that and refactor the interfaces and it'll be terrible
yes but then you again land in the issue where too much of your stuff is in DSL, so you when you wanna extend and add to the software, you're restriced by the ABI and API of whatever the DSL provides
the same applies with deprecated features overall
what's the deal with skript in this case idk
you cant avoid a problem that something is not working as expected
even in super battle-hardened systems where the interfaces are very mature and a lot of people before you have already hit those roadblocks hard enough for them to be refactored out, you will often spend a good portion of your time doing workarounds around "the server will handle it" because you happen to need a specific behavior
how designing a DSL is any different than designing an API itself. Gradle DSL is just an suite of API built on top of groovy and kotlin
some DSL use their own rule engines
some dont
im talking about Skript for the Bukkit API
or whatever similar shit
Gradle itself is an entirely different story
you refactor both layers. its the same story as refactoring an API
you remove or deprecate those expressions
you can avoid this in either case
the thing here is that groovy and kotlin are more or less isomorphic
i've never seen a plugin which has completely stable configuration file across various server versions, neither the DSL would be in such case
skript is not isomorphic to Java
so removing/modifying may have to be done if you use skript, meaning full recompilation, but it doesnt have to be the case if you wrote it in java
well i've seen one
le configurate versioning
you're bringing a point that maintaining one layer is easier than two, sure, that's a valid point but with that you decouple your logic from actual software which powers that logic.
I would personally consider using multiple custom DSL to achieve whatever I want, depending on the type of the feature
one for quests, one for commands, each for minigame type
I mean sure, that could work
in high level syntax sense
essentially i've reinvented datapacks
but in custom syntax
im just saying skript in particular, since that was kinda what fired the topic
well yeah skript is more general purpose. Im just saying skript is a good candidate just because it has already lots of apis for handling expressions
and you can modify skript to remove specific expressions you dont need
it leaves the hardwork of syntax parsing for skript devs not you
the only expression i need is the member reference .
everything else is just syntactic sugar
which, sure, is nice, but i'm not changing languages just to be able to add to a list with +
ye i suppose, the other thing that's a bit problematic with having ur own dsl languages, assuming u're not using something more known is that u dont have any editor highlights, tab completions or static syntax analysis- tho thats less of an issue its still somewhat if a QOL lost
on the other side your DSL would already be simple enough to grasp since it would be quite limiting in terms of what it does
that depends on the level of complexity regarding ur DSL
so about gradle dsl
for example simple dsl for commands (@ symbol means specific argument type, it it doesnt have one its literal, () means positive action, {} negative action, based on that keyword server software searches for a registry with specific action.
actions can be registered via different plugins for example:
- gui plugin could allow you to register action to server core which opens a gui
- command dispatcher plugin could allow you to register actions to server core which allow you to execute collection of server commands
pvp @player(pvp_toggle){pvp_player_not_found} @boolean(pvp_toggle_state){pvp_invalid_state}
I like what Skript has built in terms of an stdlib, however the implementation leaves things to desire
based on those registered actions, command registration plugin scans the syntax and applies the dispatching
by utilizing mojang's brigadier
how does skript impl work?
minimalistic and extensible
does it compile to jvm bytecode, or does it just compose a set of functional interfaces?
latter one
It doesn't compile to bytecode, no
yea and well... invokedynamic is quite fast
it just parses the syntax with a rather clunky parser and then matches it to given expressions/effects/sections/events
makes sense
in part that's why it works well, since everything is interpreted, makes for easy hot-reloading and all
rather clunky parser
what is meant by this?
like the lexing and parsing is happening in one stage or?
I can't imagine parsing English to be very elegant :D
There’s a version of skript that does compile to bytecode
It has a slightly different syntax though, and much less adoption
It’s called ByteSkript
I know about that one, it was made by one of the Skript maintainers it seems
but it doesn't retain compatibility with OG Skript syntax so it has no adoption, not sure if it works properly either
skript could really make use of dynalink
Just ask chatgpt to update it to support the OG syntax
but that also implies compiling to bytecode, albeit it's still very dynamic
What could go wrong
it doesn't feel like making it compile to bytecode would be all hard to hack into the current codebase, if it were to be in a similar fashion to what python does
does pressing the drop item key while not looking at your inventory fire the inventoryclickevent with the drop_all/one_slot action?
Just a question I have, might make sense with a pretend scenario: suppose we want to have a command which attempts to perform block modifications over a region, and this is run by regular members, i.e, we should respect claims provided by other plugins. For simplicity, we can analogise this to "WorldEdit for normies".
How would you ensure that every single block within that range, atleast from X, Z (disregard Y, as most claim plugins include alll Y ranges), is modifiable by the player running the command? Of course I am aware you can simulate a BlockPlaceEvent, with bogus data, providing atleast a Player and Location (and awiating its cancellation. - external), but is this really efficient? Iterating over the entire region, and firing an event per block?
fire the bukkit event to change each block and only change if the event is not cancelled
and again, as I asked, is that really the smartest solution?
Right, but you're also iterating over an entire region, which would be O(n), is there nothing smarter?
Alright, sounds about right.
If you are using something like world guard you can use math to find what border over laps and what regions are overlapping as well as how far the modification extends outside the region.
You need to learn graph math or vector math if you want to take the math approach and this requires no iterrating
🫃
that would require me to assume all claims are WG regions, not player-made claims
It's either building against specific protection plugins to use optimized queries like whether your edit volume overlaps with a worldguard region, or using generic spoofed events that work with any plugin but perform poorly
Generally, building directly against protection plugins is better, but it's good to have the event trick as a fallback that an admin can enable from a config if they have unsupported plugins
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
ok i have Problem
[11:07:37] [Server thread/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'ExcellentServerManager-2.6.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/luckperms/api/node/Node
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:127) ~[paper-1.20.4.jar:git-Paper-496]
at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.4.jar:git-Paper-496]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.4.jar:git-Paper-496]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:38) ~[paper-1.20.4.jar:git-Paper-496]
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.20.4.jar:git-Paper-496]
at org.bukkit.craftbukkit.v1_20_R3.CraftServer.loadPlugins(CraftServer.java:507) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:274) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1131) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-496]
at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.lang.NoClassDefFoundError: net/luckperms/api/node/Node
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Unknown Source) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:78) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at
- paper, I would advise you go to their discord
- do you depend on Luckyperms in your plugin.yml ?
- please tell me you do not have 1.6k lines long class
Is this a good way to check if two block locations are adjacent?
locationA.distanceSquared(locationB) == 1.00d
I couldn't find a built-in method on Bukkit api
Use Manhattan distance (sum of axis differences)
you are right lol. I already had that method somewhere and forgot about it
return Math.abs(a.getX() - b.getX()) + Math.abs(a.getY() - b.getY());
Don’t forget the Z
I don't need the Z in my particular case, but thanks for reminding me. It's for stuff on a 2D plane
public boolean areAdjacent(Block a, Block b) {
return (Math.abs(a.getX() - b.getX()) +
Math.abs(a.getY() - b.getY()) +
Math.abs(a.getZ() - b.getZ())) == 1;
}
This should work
it's called Manhattan distance because of taxis 🚕 lol. it's fun
Hello, is there a way to update or set water to not flow just in one direction, but be able to flow in other?
For example I have this code:
@EventHandler
public void onBlockFromTo(BlockFromToEvent e) {
Island island = ((IslandStore)plugin.getIslandStore()).get(e.getToBlock().getLocation());
if(island == null || !island.isIn(e.getToBlock().getLocation())) {
e.setCancelled(true);
}
}
If I place water on the edge it calls this function just once and will not flow in other directions where it could flow?
you can't change the way the water flows by cancelling an event, however you can change it by modifying the terrain
what you can do is probably is place barrier blocks in the server side so it flows the way you want and send block changes to the players so they don't notice these are there
not ideal, but that's probably what you'll have to do
it is either that or directly modifying the server logic that deals with that, which wouldn't be easy on Spigot
It might almost be easier to toss out the vanilla water flow logic altogether and manually place blocks to create "flow"
But unless you really need this for some reason, I wouldn't bother, it will be super involved one way or the other
I do kind of want to recreate terraria style water logic at some point
or are they seperate blocks
Yes, it's a block property ranging from 1 to 8 iirc
Bubble columns are separate blocks, for whatever reason
It can exist without magma or soul sand yes
no i asked
if it could exist without that
seaweed in it
but then i forgot
u only place the seaweed
to turn it into a source block 😭
I'm not really aware of any association between weed and bubbles
yeah ik there isnt any
yk when u place the water at the top
and let it go down
but then u place seaweed
all the way to the top to convert all the water into source blocks
Haven't heard of it but yeah that probably works
Waterlogged blocks can't tell apart source and non source blocks
I don't remember
Probably
u put water at the top
it flows down
then u climb up with seaweed
which turns it into a source block
after u break the seaweed
I think I last played the game before waterlogging was a thing
But that makes sense yeah, sounds much easier
Seaweed was added in the same update as waterlogging
I don't think it has a not waterlogged state, no
I tried to do this, but it seem to not work. Barrier is set, but I want for player to instantly send packet that there is air. For some reason it does not work:
BlockState blockState = block.getState();
blockState.setType(Material.BARRIER);
blockState.update(true, true);
loc.getWorld().getNearbyEntities(loc, 20, 20, 20, entity -> entity instanceof Player)
.forEach(player -> ((Player) player).sendBlockChange(loc, Material.AIR.createBlockData()));
you can just do Block#setType
as for the block change, I got no idea, maybe it is because it happens at the same tick?
try wrapping it into BukkitScheduler::runTask
also, you could just use Entity::getTrackedBy instead of nearby entities
Entity::getTrackedBy will not work, because I don't have an entity 😄
Also is there no way to set block server side without sending to player?
I had assumed you were doing this in front of some player but yeah
there is not, no. Unless you're willing to use PacketEvents
Will try that
packetevents documentation for reference: https://docs.packetevents.com/
they said dont support that version
yes
i have
if you want plugin github
https://github.com/qhtaniwaft5r
my discord :
https://discord.gg/2PRRXePSV3
if you want to DM me come to this User
@.5_05 - qhtaniwaft5r
hey so can someone help me figure out why this runnable task in this class that sends a message when a player is blocking only triggers when a player is looking at a block?
https://pastes.dev/3kUcQalFSI
isnt that what isBlocking does?
isBlocking implies there is something in front.
otherwise, could you not use interact event
I assume not in a BukkitRunnable, right?
or ig i should say not in the scope of the class
You don’t have to look at a block to block
#show heading.where(level: 3): it => {
if it.numbering == none {
return it
} else {
let (body, numbering, level, ..args) = it.fields()
let content = heading(
..args,
numbering: none,
level: 2,
outlined: true,
text(counter(heading).display() + " " + body, size: 1.333em)
)
block(spacing: 1.5em, content)
}
}
man this is such a smart hack
it converts markdown typst headings:
###
into:
##, but leave styling from ### heading, meaning that table of contents will behave as heading is TOC level 2 when actually TOC level 3 heading was typed. neat
basically operator overloading but in markdown 😄
which is why im so confused
Hi, I have used Spigot Buildtools to download spigot file and added it to my Eclipse external libraries in Java Project. I can not import org.bukkit.plugin.java.JavaPlugin;
What should I do now (Im on version 1.21.8 - JDK 21)
Did you add spigot-api
Which jar did you add to your external libraries?
Are you using Maven/Gradle?
Im not using Maven or Gradle
I do not know where to download it
i think im missing the shaded spigot api
If you are using external libraries in Eclipse you do not need the API
I added the Jar from buildtools
You built Spigot with Buildtools so you should have the full fat jar
but you only really need the API
Is there a reason to not use Maven? It would make life so much easier
Idk how to use it…
?maven Create a new Maven project in Eclipse, then follow the instructions.
The home of Spigot a high performance, no lag customized Bukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
May I ask. Where can I download spigot api
You ran Buildtools so you already have it
Spigot/Spigot-API/target/spigot-api...
in the folder you ran buildtools
Oh okay, thank you so much
Hello, I want to create my first Java plugin using the Maven extension in Visual Studio Code. I haven't used Maven before, and the documentation seems insufficient. Where should I start?
honestly no one i think apart form maven packaging devs knows how it works from end to end 😄
you mostly go to maven central repository on the internet, search the package you want to and copy the xml configuration declarations inside your own pom.xml
unless you're working on some kind of CI/CD pipeline or custom packaging there's usually no need to configure it thoroughly
everything mostly works automagically
you just tweak some xml tags sometimes and thats it
This is a pretty good place to ask AI to summarise how it works. The main thing you have to worry about is dependencies and repositories, the rest you sorta learn as you go
@mortal hare @drowsy helm
So, should I use Visual Studio Code or IntelliJ IDEA? Code completion is great in VSCode.
IntelliJ
It’s much better suited for java
But you can get away with vscode
At the end of the day it’s just a preference thing, IJ just has a lot more java specific tools
code completion is also great in IJ
there is also netbeans
md_5 and myself use netbeans 🙂
my personal favorite is the text editor
damn neovim is enuff
configuring it to make it work is cancer
im not questioning if it works
im questioning the brittleness of the configurations across version upgrades
i use vscode just because extensions and lsps are primarily designed for it
Tbh I only installed one lsp and thats it
meanwhile LSP in neovim are just ports of vscode ones which might be not fully compatible
Yuhp
wonder if it'd be possible to back that with jetbrains' intellij engine somehow
i mean possible yes, but the wiring is probably bleh
yeah I mean that's how they made Fleet, the engine is its own module, but the wiring is the fun part because it doesnt use standard lsp protocol
looking for a dev that knows what theyre doing and has time
protocol protocol
I liked the part where this channel was called “hiring-developers”
But thanks.
no other channel with developers activly chatting
?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/
....light... mode..??
The Netbeams and Eclipse interface reminds me of the design from 2008. 😅
As a student, I have a Copilot Pro subscription. It predicts and displays the code I want to write in Visual Studio Code. Does it do this in IntelliJ IDEA?
I have no knowledge of Java. I want to improve my Java skills by developing plugins myself. I will use my familiarity with other languages.
if you're on paper, you can get Chunk::getPlayersSeeingChunk; entity tracking distance and chunk sending distance are different
Then I don't recommend using it even more
😅
there is a copilot extension for intellij iirc
After learning about class structures in C#, I will try to write my own plugin. After all, they work on the same logic in all languages.
that said yeah i'm not sure if learning with copilot is the best idea
I downloaded it, but I couldn't log into my Copilot account.
programming is like 10% knowing the language and 80% being able to research the libraries/frameworks you have to work with
copilot entirely does away with the latter
I last wrote my helloworld command in 2016 using Eclipse. 🤣
I was a little kid back then, I didn't understand.
It's better to learn the language without any tool assistance. Shouldn't really be using AI unless you can write all the code it's capable of generating to make your life faster
I only started using AI in the last like 9 months or so after 10 years of writing the code on my own
The area where I use Artificial Intelligence is very limited. I only use it when I get stuck on errors.
After learning about class structures, I will try writing plugins with IntelliJ IDEA.
be sure to ask it to actually explain out the errors in depth rather than just tell it to "fix the errors"
Basically, a Hello World, then I'll test the authorization system. I'll open the menus and such.
I'm asking about the problem. I activated Copilot Pro a few days ago. I haven't opened my membership. 😅
asking an actual person is probably still the best option but an ide-integrated ai is definitely easier to communicate with, since it'll see your project and the errors without you having to pastebin everything
My main field is 3D and CGI. But I still have a lingering interest in writing plugins for Minecraft.
w flash
Hello, I added support for nexo to the plugin, and since then I've been getting this message. Can you advise me on how to fix it?
Note: this artifact is located at AlessioDP repository (https://repo.alessiodp.com/releases/)
add this to your repositories
Also that’s not nexo
i searched for "byteflux libby bukkit maven coordinates" on google, in case you want to try and solve future similar errors on your own
I searched up “why does the unresolved dependency error occur when compiling my project in IntelliJ” kek
Why is Java so hard without an ide
Well all languages are mostly like that
lua and python has less keywords for example they would be easier
Because imports
Nobody memorizes them
Just import all modules. Problem solved
can someone help me pls. I added the spigot api jar but I cannot import JavaPlugins
Eclipse in the big 2025
anyhow, are you using maven/gradle or just the IDE's classpath functionality?
Im not using maven or gradle
I would recommend using gradle, as you'll eventually find yourself using it anyway
okay I will try
as for your current issue, I am not familiar with Eclipse's build system features so I can't really help much in that regard, but if you do end up using gradle then we can go from there
ty ❤️
I am having a really strange issue that I cannot pinpoint. On my 1.21.1 test server, this code works fine and has worked on production in the past.
if (clickedItem.getType() == Material.TNT) {
kitsSelected.add(p);
p.closeInventory();
kitsSelected.remove(p);
ItemStack stone = new ItemStack(Material.STONE, 64);
ItemStack tnt = new ItemStack(Material.TNT, 32);
ItemStack wind = new ItemStack(Material.WIND_CHARGE, 3);
ItemStack slab = new ItemStack(Material.SPRUCE_SLAB, 4);
ItemStack redstone = new ItemStack(Material.REDSTONE, 16);
ItemStack lever = new ItemStack(Material.LEVER, 4);
ItemStack bread = new ItemStack(Material.BREAD, 16);
p.getInventory().addItem(bread);
p.getInventory().addItem(new ItemStack(Material.TRIDENT));
p.getInventory().addItem(wind);
p.getInventory().addItem(new ItemStack(Material.WATER));
p.getInventory().addItem(new ItemStack(Material.IRON_PICKAXE));
p.getInventory().addItem(stone);
p.getInventory().addItem(tnt);
p.getInventory().addItem(new ItemStack(Material.FLINT_AND_STEEL));
p.getInventory().addItem(slab);
p.getInventory().addItem(redstone);
p.getInventory().addItem(lever);
p.getInventory().setHelmet(new ItemStack(Material.IRON_HELMET));
p.getInventory().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));
}
But, though I am getting fully working results on my test server: only 3 of the items in the code are actually given on the production server, also running 1.21.1 (with viva version for 1.21.8 clients). And its only this kit in particular, the others work as intended.. the others are identical code and work flawlessly.
im not sure if its the way my production server is setup that is affecting this or if there is something I am missing
I know on production it gives trident, pick axe, and wind charges as the three items.. not sure about the armor
OTHER KITS have a lot of these items that are not being given here...
im actually so lost and shocked that this is happening
yeah that's not something we're going to able to diagnose from that
but what I can note is that you should avoid calling close inventory in the click listener
at face value this should work but you probably knew that already
Yes it absolutely should. I am not sure how to go about diagnosing and fixing this issue.. maybe try naming the kit differently or changing the order of the items? but it doesnt make sense why it works on my test server and not production
print the inventory contents to sysout in between each add, and then maybe a tick later
ideally plug the thing into a debugger and see who's messing with the inventory but that might not be good on a production server
Making a copy of prod and debugging there is an option
yeah that's the big guns
Could start by making sure that it's not just client server desync
I think that's the best way to go about it yeah. In theory I shouldn't have to add a slight delay with all the other kits working as intended but maybe its a weird quirk with spigot in this specific kit. 🤷
eg. heres a working kit for anyone who might have a better idea with the why .. that stuffs always interesting to me:
if (clickedItem.getType() == Material.IRON_CHESTPLATE) {
kitsSelected.add(p);
p.closeInventory();
kitsSelected.remove(p);
ItemStack bread = new ItemStack(Material.BREAD, 16);
ItemStack stone = new ItemStack(Material.STONE, 64);
p.getInventory().setItemInOffHand(new ItemStack(Material.SHIELD));
p.getInventory().addItem(new ItemStack(Material.WOODEN_AXE));
p.getInventory().addItem(stone);
p.getInventory().addItem(bread);
p.getInventory().addItem(new ItemStack(Material.WATER_BUCKET));
p.getInventory().addItem(new ItemStack(Material.IRON_PICKAXE));
p.getInventory().setHelmet(new ItemStack(Material.IRON_HELMET));
p.getInventory().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));
p.getInventory().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));
p.getInventory().setBoots(new ItemStack(Material.LEATHER_BOOTS));
}
Anyways thanks for the help!
btw you can just do p.getInventory().addItem(new ItemStack(Material.STONE, 64)), there's no need for the random intermediate variables
Even better, #addItem() takes varargs
player.getInventory().addItem(
new ItemStack(Material.WOODEN_AXE),
new ItemStack(Material.BREAD, 16),
new ItemStack(Material.STONE, 64),
new ItemStack(Material.WATER_BUCKET),
new ItemStack(Material.IRON_PICKAXE)
);
does anyone have code snippet or examples of how to shoot a ton of fireworks (randomized, like a celebration)
Could break down the problem into parts which should make this problem easier:
- You need a min/max point to generate a random x/y/z for your firework's position
- You need a list of colours you want to randomly select from (one for the fade, one for the firework)
a. Optionally, you can select multiple colours. Up to you - You need a list of patterns you want to randomly select from
Put those all together into a FireworkEffect.Builder and you're good to go
is there any dutch developer here who i can contact?
?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/
No
is there a way to send fake packets for a bunch of blocks to the player at once or something?
i have a full region which i want to swap out for fake blocks for a player and i think looping through each x,y,z might not be the best way
there's sendBlockChanges on paper at least, i think it also exists on spigot
on either world or player, i don't remember
probably player since they're spoofed only for a specific player
Player#sendBlockChanges does exist in Spigot
it requires a Collection<BlockState>
so to get all the blockstates do i still just go through every x,y,z? (but then the packet is sent only once, at the end)
Yes
well damn
It may still send multiple packets - in fact it probably will - but it will send less
But computers are good at iterating over numbers. You should be fine
i tried doing this async and that didnt exactly go very well either
Yeah, async world reads aren't perfect. That's the reason we have chunk snapshots
well yeah computers are pretty good at numbers but what about a large number of players?
thats my primary concern with it being sync
actually, thinking about it, i dont think a few hundred players will do that much
sending the packet should be async
You might do it just once then save it to a variable
i am running it sync but even then its giving me this error
[18:29:14 WARN]: [HypingKOTH] Global task for HypingKOTH v1.0-BETA generated an exception
java.lang.NullPointerException: Cannot read field "captureTreeGeneration" because the return value of "net.minecraft.world.level.Level.getCurrentWorldData()" is null
Collection<BlockState> blocks = new ArrayList<>();
for (int x = region.getMinimumPoint().getBlockX(); x <= region.getMaximumPoint().getBlockX(); x++) {
for (int y = region.getMinimumPoint().getBlockY(); y <= region.getMaximumPoint().getBlockY(); y++) {
for (int z = region.getMinimumPoint().getBlockZ(); z <= region.getMaximumPoint().getBlockZ(); z++) {
if (region.contains(BlockVector2.at(x, z))) {
Location loc = new Location(hill.getWorld(), x, y, z);
if (loc.getBlock().getType() != Material.AIR) {
blocks.add(loc.getBlock().getState());
loc.getBlock().setType(material, false);
}
i ran it async then realised i cant (it was giving me the same error) so i made it sync and im still getting it
Is world where region is from loaded?
It's better if i divide the code in functions for example for the
p.sendMessage(ChatColor.translateAlternateColorCodes('&', m));
i make a function to something like that:
p.sendMessage(ChatColor.translateAlternateColorCodes('&', m));
}```
or that i leave the code as the first one?
I'm not saying that only for messages and stuff for like getting stuff in the config so that the code can look cleaner and that it's "easier" to reach faster something that i usually need / use
you should use HEX instead of normal &
if you just want to send the default block state, you can create that from the material without having to do world reads
i need to check the block i am replacing before replacing it
so i need to do world reads
the problem is solved now, i was using the wrong scheduler
what's an efficient way to place schematics into a set place?
I assume it'd have to be nbt format but idk
depend on fastasyncworldedit and use it to paste the schematic
no point in reinventing and maintaining an incredibly hacky nms wheel
or i suppose more ideally, depend on worldedit rather than fawe, so server admins have the option to choose between the slow but reliable worldedit or fast but hacky fawe
I mean it’s not actually that hacky when using NMS
The game has a built in method to load an NBT file, then you just need to parse the data
well yes but async this and that is always hacky
?
depends how efficient and what you are willing to sacrifice
also if you are running the server or not
just a small build
i assume there's a way to do it within the api itself with nbt files (?)
maybe worldedit has api that supports it i dunno
you will need to parse the NBT data yourself from the schematic and then set the block data using the API
The api can use the vanilla structure format to do it, yes
But not the schematic format
would schematic format be better
wouldn't say the only difference
schematics can't save some things if I recall unless you make a custom version, but structures can essentially save all data
Though I believe fawe can export to the vanilla format for any size
i just have a small structure i'd like to paste using a command im coding
but have like 0 knowledge on how to or which libraries can help
well then I probably wouldn't worry about efficieny
and just worry about coding the ability to do the thing you want 😛
(trying to make a minigame; although maybe just having a structure block in the world and pasting to reset the stage would be way easier)
efficiency doesn't matter if you can't even get something working you know >>
I can save you some trouble here
delete the world the minigame is in, reload said world
the lobby of the minigame is the default overworld
minigames or game is a separate world that you can unload, remove and then paste the master world and then load up
and now everything is reset and you didn't have to mess with any pasting
hmm
oop intent isnt to reset between games
it's to reset stage between rounds
within a singular game
same concept
you just use a different room in the lobby world
so they appear as if they are somewhere else
or you could just use a different world for that too
used to run something like 100 minigames at a time per server
hmm i see
im trying to minimize the amount of change that happens from the players' side so it appears smooth
also breaking it up like that also allows you to run the minigames and the lobbies on different servers too
hmm
IE scaling becomes easier
players don't really care if they get teleported
as long as the teleporting isn't taking like 5 minutes lol
and given the recent updates its easier to transfer players between servers as well
or well its more native
am pondering
also minigame worlds are extremely small, probably no more then a few megabytes lol
which is also nice because you can stuff these worlds into a database
ah
well to get them small you have to prune the excess world to what you need
but the nice thing of having them in a database is that it didn't matter where the servers were located they always had access to the worlds and the data needed for them 🙂
so no worrying about accidentally deleting files from some MC directory 😛
We know a thing or two because we have done a thing or two here, anyways there is a lot of options at your disposal
yus
is there any victory code i could peek at for minigame ending celebrations
fireworks/particles/sounds when someone wins the game
someone here might have something
I don't have any of that stuff, or at least publicly available
right now i just randomize all the effects which leads to varried results; idk if i should just hard code how the fireworks spawn
just make everyone dance
shouldn't be that hard with display entities and armorstands etc lol
Hi people
I'm trying to help someone with world generation but I don't know entirely know how Minecraft vanilla handles chunks with trees and structures
do you have a question
@chrome beacon@thorn isle@wet breach@hybrid spoke
Firts Plugin 🥳
😁
I'm currently using IntelliJ. I'm used to it.
looks pretty much alright, only nitpick i have is that coreCommands should be CoreCommands; java classes are always UpperCamelCase with a capital first letter
cool! but why did i got pinged 🤔
You helped me that day. I wanted to show you that your help was not in vain. 😊
Ahh okey
ohh, i didnt remember! nice, keep it going!
😊
first
nice
on my phone thought it said flirts
and was like, oh, who is this spamming a flirt plugin

well there was a spammer earlier today so I was thinking there was another person spamming but just pinging people XD
i'm glad the marriage plugin fad is all but dead
How do take into count chunk borders with tree generation?
there is a nice tutorial its for roblox studio
but same chunk generation
if i find it ill send it to u
Putting everything in same class is bad practice
You should up plugin class instance
I see you command class mb
You use a populator instead
we're writing our own b1.7.3 server
some of it is taken by bukkit / fork
The way the modern game handles it is by doing population for a chunk once all 8 neighbour chunks have been generated
chunks at the decoration stage can write to adjacent chunks at a lower generation stage
Not back then :p
e.g. if a tree generates at the edge of the chunk, it will write those leaves and suchlike in the adjacent chunk the tree crosses over into
once the blockpopulator stage for the adjacent chunk runs, it will see those blocks and not spawn a tree or any other decoration that would conflict with them
strictly speaking this makes chunk generation non-deterministic and dependent on chunk generation order, but what can you do
I am currently working on a plugin, that has custom helmets. How can I make the helmet have a armor trim?
You need to create each of the model and texture for the armor trims then uhh
Do that first I'll respond with the rest later 🙏
So you need to create an extra texture pack for that???
For custom items yeah
Unless you use default minecraft stuff you need a texture pack
iirc
Yeah obv?
How else would you make your custom helmets
If you are asking how to apply an armor trim to a vanilla helmet it would be
i think its with ArmorMeta
declaration: package: org.bukkit.inventory.meta, interface: ArmorMeta
yeah there look set trim
declaration: package: org.bukkit.inventory.meta, interface: ArmorMeta
Ok, change of plan😅 . Can I connect a texture I made (its a crown btw) with a specific (netherite) Helmet you can't obtain in survival(/without the plugin)?
And if yes, how can I do it?
ofc u cant ❤️
If I have a cool idea it obviously doesnt work -_-
You could spawn item display crown when player is wearing the "special" helmet
Command blocks/Data packs 🗿
Yeah then no way
No, I want to do it with a plugin😅
The Item shouldn't be able to be obtained in vanilla without commands
So players dont get an item with a crown texture without it being a crown
yeah so just use the custom model data or item model of the item
then give an item with that item model with a command
players cant het it
afaik, with 1.21.5, itemstacks in packets are now hashed to cut down on duping and desync. I can't remap items from incoming client packets because I can't read the item data, haven't figured out how to fix this in a week, any ideas?
what are you making? mod, plugin etc
a test snippet i made:
https://gist.github.com/braulio-dev/6595c19ecdbbe9d812471558b40c5dda
basically im making a packet-based item system, which just serializes a custom item type's ID and the item's individual data into its PDC and then re/maps it on packet events so lore, item name, attributes, etc can all be updated in real time. this also allows for a pretty neat versioning system and reduces the need for backpropagation for items that are 'outdated'
or just update the item when the user interacts w it 🙏
this implementation worked in 1.21.4, but in 1.21.5 items are hashed and i can no longer map them back to their 'original' state that the server holds.
server -> maps item ✅ -> client receives -> client sends packets -> remaps items ❌ (this doesn't work anymore, because the item sent by the client is hashed) -> server receives
mythic has an item updater as well
https://git.lumine.io/mythiccraft/mythiccrucible/-/wikis/Item-Updater
that's my initial thought but there is no identifiable property an item possesses once its sent back to the server in its hashed form
just amount, type, and components added/removed (not useful)
yeah idk
wtf lol
cache the slot contents BEFORE you send them
then use the slot index from the packet to look up the item that you cached
since mojang made it like area 51 i think the only work around is you keeping the data alive and then use it
other than that idk
do any of you nerds have experience with nms containers
for some reason dragging looks weird and it tries to pick up items for a tick
that menutype guy thats no longer here might
removing a sendAllDataToRemote fixed the weird behavior
I wonder how much this is gonna suck
How can i do a thing to all players in 10 blocks arround a pos?
a thing
idk like killing them
and how to add a api LIKE WORLDEDIT to my project
Could someone help me? On my server, I have a ping of 90, but when I enter survival mode, it goes up to 9000. This only happens in survival mode. There's no problem in the lobby.
i've multiple message that i want to send on different line it's better to do x p.sendMessage or there is a better way of doing it?
Can someone help me create a plugin that links different attributes
what does that mean
i'm assuming earth, fire, water, air - maybe? 😂
Bro wants to become the avatar
you know how to code, right?
My account has been compromised and my email address has been changed, so I can't handle this myself.
Where should I contact the administrators?
?support
Thank you
I have a plugin, that has crowns(netherite Helmet with Protection 5) but somehow it didn't show any armour points. I believe it gives armour tho.
Do you mean it doesn't show the blue text on bottom
But still gives you armor points when you equipt it ?
or do you mean it doesn’t show the chest plate icons?
applying any custom attributes to an item removes its default attributes
if you're on paper, you can check with /paper dumpitem
seems their memory is low and thus they can only remember limited things
Offline = gone
It’s like when you hide the lollipop behind your back from a toddler and they think it’s gone
or when the pentagon tried to claim 2.3 trillion dollars disappeared by staging a catastrophic event to make people think it was gone.
this is completely false on both accounts
you are misrepresenting a speech that happened a day before 9/11. The 2.3 Trillion dollars didn't just disappear as in like it vanished. What was being referred to was that the accounting of 2.3 trillion was lost through undocumented transactions, outdated systems and the sorts
but I don't expect non-citizens of the US to actually know this and just misrepresent or misquote stuff all the time
okay thanks Reuters.
I’m not.
its not a 9/11 argument and am not going to comment on that
I am referring to the 2.3 trillion dollar thing
because you are misrepresenting the facts and trying to say something happened that didn't
I’m completely aware that it really happened like a year prior. And it wasn’t money that went missing suddenly, it was a statement of like decades of untraceable funds.
I’m just fucking around
Plus there is already way more viable counter arguments for 9/11 other than just the 2.3 trillion thing.
Patriot act
what about it?
someone speaking facts
Probably a ruse to enact it.
Like yk how whenever congress wants to ban a firearm modification, like idk a supressor, there’s suddenly some kind of shooting involving that EXACT modification so they can skew voters into agreement.
congress never banned supressors
that was an example.
I don’t know if it’s congress or what but you see these legislators get together, talk about how they wanna ban sometging and then suddenly there’s a real case, and it gets banned.
you mean state representatives and you are referring to states banning something. Completely different then congress. States have their own legislative systems in which they can pass laws on stuff for their state.
Like the luigi mangione ghost gun. How the body or, some portion of it was 3D printed. Right after there was a bill put forth to ban ghost guns.
So California for example, can ban something, but it doesn't mean its banned in the other 49 states
Yeahhh
ghost guns were already banned
Federally?
yes
oh we in the wrong channel 😭
You can not assemble or produce a weapon without a gunsmith license and weapons must all have a serial number on them and reported
that has always been the federal law since a very very long time, well before 3d printing was ever a thing lmao
Oh right
Wait then why would Oregon need a law for it just last year if there is already federal legislation on serial numbers?
Guns that do not have a serial number on them, also known as 'ghost guns', are now required to have a serial number added to them, according to a change in laws for Oregon gun owners.
If there was anything that was done, was that the law that existed was broadened to specifically ecompass 3d printed weapons to ensure someone couldn't use 3d printing as some kind of loop hole which it never was but just in case
because in order to charge and convict under federal law, you have to prosecute in federal court
which requires a federal prosecutor who is not the same person as the state prosecutor
IE, federal prosecutor could technically choose to not try the case even though the state wants that to happen
therefore, state law that mirrors federal one so that you can be charged under state law
oh
Erm can we switch back to 9/11. that’s something I can actually regurgitate 4chan conspiracies on much easier.
It just so happens not a whole lot of states actually had a lot of state laws on this matter
HELLO KIDS TODAY WE WILL BE PRINTING A FEDERAL CRIME
YAYYYYY
Anyone know how to properly fetch a users total payment (spent amount) amount from the tebex api, been trying for a few hours and keep getting met with 403 error.
I've read their docs, and so far I have still had no luck
wouldn't you have this info already?
otherwise its good that you are getting forbidden message
???
if a user buys something from you, you should have the payment amount sent to you right?
no duh, however I am working on a plugin showing tebex logs, and history for server admins
I mean I could but wouldnt it be easier to not store all that data, and have the tebex api that can do it, do it itself?
obviously it won't let you
manipulated by who?
Are you slow?
then I guess you just suck at security or you are worrying about something above your station
by the goblins silly
And you suck at answering questions, your reply has nothing to do with what I asked but ok
You already store the data
When a purchase is made
they are currently not, the Tebex site does, but its not allowing them access to said things which only leaves storing the info themselves
They don't want to store said data because someone with magic access will manipulate it
its fine maybe he is just better than us
Anyways the proper way to do this, is you have a service that pulls the data or stores it whenever it recieves it and puts in the DB
no one should have ssh access or the sorts, but even if they do you can make it so they can't alter with that
you make another user for the DB that can only read but never modify
this is the user you use if you want to read the data and thus ensuring it can't be manipulated
again as I said either you suck at security or you are worrying about something above your station
what did you try
something forbidden obviously
they have an endpoint to retrieve payment, so there shouldn't be any issues on that regard. If you're getting a 403 then that probably means your game server secret key is wrong
they want to get the history of payments
as in to figure out overall what a user paid
so like, the ability to grab all payments a user has ever made and then get a total for that
they have an endpoint for that too: https://docs.tebex.io/plugin/endpoints/customer-purchases
well, for the active ones
doesn't seem like they have anything for expired ones
yeah, so wouldn't help in grabbing the overall
which they would need to just keep track of that themselves
joy joy_cat rofl
which isn't all that hard
you forgot the colons
you could probably get it from their API by using the sales endpoint but that sounds annoying
possibly, but wouldn't know. I don't use tebex. However I did present them a solution which they arbitrarily said was no good lol
I suppose what you said could be another
looks like they already ragequit the server