#help-development
1 messages · Page 1153 of 1
My last plugin worked perfectly
Do note the if and read the rest of my messages
This worked thanks.
@worldly ingot u were helping me with this yesterday. i removed the null check and the location is null https://i.e-z.host/uum247f8.png
?paste
Whats the problem
read my msg
Which line returns null
Which line.
Whats survival location
Read the log
its being set in the cmd
But what is it
wdym what is it
What you put inside of it
the location of the player
Is it static or a changing value
changing
Put the log here
buddy the location is null
i have a null check and it returns
in my movement listener
below the cmd
Just send the damn error
lemme make it error then hold on
where and how are you registering the listeners and command?
in my main class like a sane person?
how
java.lang.IllegalArgumentException: Cannot measure distance to a null location
at org.bukkit.Location.distanceSquared(Location.java:506) ~[patched_1.14.4.jar:git-Paper-245]
at net.hyperiongames.sciutils.command.GameModeCommand.onMove(GameModeCommand.java:58) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor3.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.14.4.jar:git-Paper-245]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.14.4.jar:git-Paper-245]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.14.4.jar:git-Paper-245]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1103) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.PacketPlayInFlying.a(SourceFile:126) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.PacketPlayInFlying$PacketPlayInPositionLook.a(SourceFile:18) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1029) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1022) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1006) ~[patched_1.14.4.jar:git-Paper-245]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:929) ~[patched_1.14.4.jar:git-Paper-245]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]```
is there any plugin that enables such colors on the tab in chat and other plugins?
ah alr
so they are two separate maps, the instance that is registered as a listener never sees the map of the instance that is registered as a command
how do i fix?
create the GameModeCommand once
or, arguably, the correct design choice is to split out the command from the listeners from the map
and DI the map around
Based on the question, you dont want to code your own. Usually EssentialsX + EssentialsXChat could give you colors, but you still need a rank handling plugin like LuckPerms to make a prefix. TAB is good for tablist
is there any API to generate random nicks?
hey y'all, I'm looking into updating a plugin from minecraft version 1.12.2 to version 1.22-- what will I need to look into? I've got a fairly good understanding of java, but have never worked on a minecraft plugin before
what is the plugin
i could port it
i have one but i wont include the nick list
The Spigot part of the plugin should continue to work
I wont say no, but I'm happy to do it myself-- is there documentation anywhere on what needs changing?
The problem is most likely going to be WorldGuard
just change the methods and classes
as in what it's using from WorldGuard?
and adapt the logic to the newest ver
if it uses nms then nms too
nms?
Zupa at least take a look at the link they said before trying to answer
i did
i'd start by trying to just change the spigot version in the build file
and see if it works
Then you would know it doesn't contain any nms
i now see
I'm sure
is there any specific reason you need to use this
A large part of the plugin is depending on the WorldGuard plugins internals
Olivo can you help me with adding a newly registered enchantment to /enchant tab completion?
update tags packet in reconfiguration doesnt seem to work
What version are you on
1.20.4
best way to test?
k
if it does
try it on the actual server and see what breaks
if it doesnt youll have to rewrite the shit thats deprecated
im sure a lot has changed since 2013
or whenever it was updated
2017
The easiest approach would just be to make your own command
but i want the vanilla one
recreate vanilla one then
also for the enchant to display on the client
so it can pull the name and add it to the lore
you have to handle that urself
You need to put the lore in yourself
:/
as far as I'm aware
yup
why
client doesnt recognize custom ones
I think that was a 1.21 thing
Yeah
well it does receive the tag
and as it uses a translatable compontent
so it should display it right
sucks
Registry syncing problem is the biggest issue
whats registry syncing
Resource packs didn’t work
hm? They don't?
Enchantments were sent via numeric ID
I was talking for 1.21
Ah
Then yeah
You don’t even need to use a translatable component
Iirc it can be any component
ig
which packet is enchant info sent with
doesnt matter
It's synced with the registry
client doesnt recognize anyways
which doesn't happen on 1.20.4
just add the lore yourself
Yes you can manually add lore
and tab completion?
Make your own command
bruh
its like 10 lines of code
It probably does
idk
but it's not worth the effort of injecting and messing around with the vanilla commands
but seems like brigadier takes the tab completion from the registries
from what i remember it should
I mean if the event fires you can just customize the list of completions returned
tab complete doesn't fire for commands at all, only args
yes but you have to to capture when command is ran
which will just end up being more code than registering your own command
so you've already injected your enchantments
i registered them
i dont even get the point of using the vanilla enchantment system
just create your own
smh
so much easier
im not trying to make my own
im trying to add to the vanilla one
its the whole point
which is a mess to do
^
You're better off updating
did they remove registry freezing in 1.21
i dont think its a mess
what about the problems youre experiencing?
You will need to rewrite the thing when you update anyways
why
making your own framework for everything >>
ill just add code to check field names
You're messing with internals that are changing
sir
?
ive worked with vanilla enchantments myself
theres a reason why ive made my own
okay last question
would it be theoretically in any way possible to make the automatic lore and tab completion work
with the original command
how then
create the command urself
Coll already told you what you needed to do
if you really want to keep the vanilla command
update?
tab complete event
tab complete event doesn't fire for pretty much any vanilla command
the client has no reason to ask the server for something it already knows about
Yeah I had a feeling
like available enchantments
oh well then you have to make your own command
The docs don’t say that tho
like I said ealier
I can’t PR it unless I test it!
And I’m too lazy right now
anyone knows something about the twitch API?
What can y'all suggest to replace squirrelid, seeing as it has a few old vulnerabilities
?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!
?paste
https://paste.md-5.net/feyologawi.java
I have this code which works fine but when I join another channel, mc messages doesn't show on the chat but I can recieve from the stream
Haven't heard of that lib before. You're better of checking what it's used for
uuid library
A uuid library that does what?
Don't connect in the constructor
That's a bad practice
yeah ik, just messing with code not trying to make something big
ever heard of java.util.uuid, or wherever its located
looks like it manages player profiles, but haven't seen much o fit yet
So are any of your debug messages firing
then why do you want it if you dont know why you need it
all are firing
They are updating an old plugin
With questionable code
the code works perfectly but the twitch chat recieves nothing
hmm
what @chrome beacon said
Hm yeah I'm not sure then
fair
What would be the best way of marking specfic blocks with extra data? My casino plugin needs to make some blocks in the world (like 5-10 blocks in total) be designated as crates where people can right click with a key to open it and get rewards.
Basically I need some way of saving the ID of a crate (all the settings for each crate is defined in config) in each block, so that the server knows which crate the player has just clicked on. At first I was thinking of having an array with block coordinates, but maybe there's a more performant way to embed data directly into the blocks, so I don't have to loop an array each time a player right clicks on any block.
?blockpdc
Learn about CustomBlockData here:
https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/
Thank you. Is there any way without using a library? (I'm on 1.8)
dw I found out
so, what's the difference between bukkit.worldguardplugin and bukkit.worldguard?
Like obviously they're different classes
but
in terms of their function
i think one is the javaplugin derivative
and one is just the entrypoint/bootstrap of the system
for example if u wanted to move to another platform, it wouldnt be the plugin derivative calling the entrypoint, it'd be some other platform specific class
just guessing
I think I get it
WorldGuard is the core class which is platform agnostic. WorldGuardPlugin is a Bukkit JavaPlugin
If you looked at the source for the WorldGuard class, you'd find zero references to Bukkit types
Is PersistentDataContainer#get() a safe operation?
Describe "safe"
Will it give an error?
if?
not has the key
go figure it returns null
They're an interface
The whole point of Dependency Inversion (check pins, click and scroll down) is to hide logic
how do i make that golden plate that boost me inwards and works basically like tnt explosion
An interface is a sort of "template class" that defines the methods / basic structure of a class without defining an implementation
Yeah it is on the green I in the left
Oh i understand
Each class that inherits the interface then implements the methods
In this case you're seeing the interface, not the implementation of it
That's an Interface
Dependency Inversion is the pattern of making your public API a bunch of interfaces and making its implementation elsewhere
Effectively hiding any implementation details
?spoon
Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.
Let's break it down real quick
In short, what you want is to apply some sort of "force" or movement when a player steps on a given block
When player steps on block -> See if it's the right block -> Apply the given movement/force (aka a velocity)
bro's cooking
I cba spoon feeding
Lol
There are 2 ways to see if you're stepping on a block
You can, for example, have a task that runs every tick
Or you can make a listener to see when the player moves
Seeing if it's the right block is fairly trivial
And launching the player towards a location might involve some basic math depending on how you want to do this
You can, for example, launch the player in the direction they're looking
Or in a hardcoded direction (let's say exclusively up or exclusively to the north)
And that's where basic vector math comes:
Something I'm wondering about
??
??
??
??
💀
Pretend I didn't ask
Like lag/delay?
Yep
Do you want me to explain how the tick cycle works or what?
Actually, what I'm wondering is this:
Does Player#isOnGround update everytick?
I believe it's decided by the client
When the client moves they send a boolean in their movement packet indicating whether they're on ground or not
So it includes many systems after a while, for example, when someone dies, death is added, after a while there is a slowdown etc.
Yeah it is
Alright my boy wants the explanation to the server tick loop
-# 💀
💀

can i anyway send a packet AS a player?
Let's explain it to him
By the way, I couldn't establish an API connection between my 2 plugins
Do you have any suggestions for this?
Or I can do it using placeholderapi
💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀 💀
Plugin1 ==>placeholderapi ==plugin2
-# 💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀
Adding any additional code for the server to run adds more processes for it to do, so in short yes it does slowdown/lag your server. But realistically you need a lot of plugins/bad plugins/bad hardware to notice a lag spike or performance degradation. You essentially have to have too many processes to do in a tick cycle. Is this something you’re currently experiencing?
No just wondering if it happened after a while
I have a plugin 13mb
WHY 🙄
tysm
😃
In short when you're playing multiplayer (or even singleplayer, as it just runs an internal server) you have 2 "sides":
- Client
- Server
The client connects to the server, they shake hands and then the server tells the client what block's what through packets. Packets are sent through the network and the network has a delay, which is called latency.
The server and client work under a fixed tick loop. This is separate from the client's FPS / Rendering loop, as the rendering loop is usually uncapped (it'll render frames and push them as they're ready), while the fixed tick loop is capped (usually to 20 ticks per second), meaning the server will wait the remaining time once a tick has finished execution to maintain the 20TPS.
For example, if there are 20 ticks in a second, each tick has at most 50ms to execute in order to maintain the target TPS. (1000 / 20tps = 50mspt). If the tick only takes 13ms to execute the server will wait the remaining 37ms before iterating the next tick.
A tick processes every packet received by the target at once, and between ticks packets are accumulated. This processing consists of ticking every entity, running damage calculations etc. If you die in this tick, it'll be accounted for and add a tiny little processing time. It only becomes a problem if your total processing time goes beyond the MSPT target (50ms).
Because the plugin kit system includes all the pvp systems and worldrdit like systems.
avg spigot shader
💀
hey is there any way i can send packets as a player?
you can kinda pretend the player sent them
He explained it like he was explaining it to an idiot
checks out
I read
I'm explaining with the goal of covering all existing bases and removing any existing assumptions
Yeah i mean that
Illusion something incorrect you said in this:
@echo basalt Could you give me a brief summary of how to integrate the two plugins
I have a plugin, I want to get the kills amount in the data.db from my other plugin to use it.
-# 💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀💀
that's the long explanation
this is wrong in so many levels
Let's start by splitting data into a 2 states: In memory and In storage
Warum
Data has a lifecycle and it should only be fetched from storage when it's "cold", like when the player is just logging in or they're offline
or the server's starting up or whatever
In short to integrate "2 plugins" you need to start thinking of what plugin relies on the other
A depending on B is fine
B depending on A is fine
A and B depending on each other can be problematic
I understand, I understand, to summarize.
add the target plugin to your project and expose some sort of API that you use yourself
MyTargetPlugin.getInstance().getKillTracker().getKills(myPlayer)
type deal
^ don't do this btw it's ugly ass code
Hey illusion I know you don't like me but would you mind sending some knowledge my way on managing minigame lifecycles?
I'm confused about this.
You have my minigame guide on my github
Ah forgot you even had that
Deciding when to create a game instance is very much similar to deciding on how to scale your cloud or whatever
You can create a game when a matchmaking request is sent but that introduces latency
You can have buffers but you need to scale them based on demand
If you have too many you're wasting resources, if you have too little you're prone to latency during spikes
Hmm
Have you ever made a plugin that hooks with Worldguard / Protocollib / Luckperms?
It's like that but you're hooking with your own
i need a plugin that has 5 legendary weapons that can only be crafted once
?services or make it yourself
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/
nope
im guessing youve used placeholder api then
yep
hi everyone
im trying to make a simple plugin to add like custom crafting recipes to my server
im not too experienced in Java but like i know enough to write code in it
i cannot for the life of me find any resources that provide a simple plugin template
and i really dont want to rely on intellij/eclipse for their weird gimmicky plugins to create a template for you

oh i cant send images
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
i have a directory in plugins called Recipes/, and then Recipes/plugin/
from looking around i gathered i can probably name these folders whatever i want?
unless theres some need to do like
Recipes/net/lunarsnow/lunarsnow/
most people do have a package yes
yeah
oh right
jar file
wait is that real?
do i have to compile it every time i make changes
well yeah i just thought it could be interpreted since jar is literally a zip file with compiled java code lol
?paste
i mean the intellij plugin just sets up everything so it saves you time configuring the gradle/mavel and etc, but if you really want to go that path there are very detailed guides here on how to do that https://www.spigotmc.org/wiki/spigot-plugin-development/
im not big on IDEs and it wouldnt really work for me since im editing this over SSH and stuff
.java isn’t compiled, that’s the raw source code
thank you ill look at that
Compiled code is in .class files
im referring to the .class files
yeah
does anyone have any good code for Player#isOnGround? this is what i did lol https://paste.md-5.net/xaweyetuzi.cs
yeahh.. this is what i was saying...
it just tells me i can create a plugin using these extensions to intellij
theres no "heres how a plugin is structured and how to make one"
i have to use the tools they want me to use
Get the players location, subtract a tiny bit on the Y axis, get the block at that location, get its collision shape, and then check if your location is within that bounding box
is there a blank project i can look at for reference that uses these
i really just want to write code and thats it lol
most people use an ide which aides in the process of creating the projects
how do i actually get the code of an interface?
find the implementation
how can i do that?
it depends on the project
i know, i dont want to and am not really in a situation to be using an IDE for this
I did LivingEntity#isOnGround() and it takes me to Entity.class interface
a lot of people test stuff on a local server then push it to remote as needed, you can also code locally and push as required
it would be in craft bukkit then
The implementation is inside CraftBukkit
again i just want to be able to write the code without reliance on specific tools
Yeah, in CraftPlayer
create the project and use javac to compile as needed then
is CraftPlayer#isOnGround Exploitable?
Yes
this looks good, thank you c:
The client controls the onGround Boolean
LivingEntity#isOnGround
For some reason
same method
np, i hope it helps
So there's no non-exploitable bukkit function to get if its on ground?
No
.
https://paste.md-5.net/xaweyetuzi.cs i did this
Alternatively rayTrace down from the players location a tiny bit
this should work
how much is a tiny bit?
0.00001 to 0.4 units ig
0.01 should do fine
wouldnt using tags be less spammy?
It’s not
wdym?
The player could be hovering slightly above a slab but still be in the same block as the slab
isAir would be false but the player is not on the ground
declaration: package: org.bukkit, interface: Tag
does api-version in the plugin.yml relate to the minecraft version?
yeah
The plugin just won’t load on an older version
thats a little dumb
why
the point is to specify the minimum api version it supports
is there like an option to ignore the version
if you want it to work on an older version you use an older api version and tell it thats the minimum
what (and why?)
so, I got updates-- how do I test my plugin?
well if i am a server administrator and i use a plugin thats the wrong version, it may or may not work but i get no feedback if its the wrong version this way
most plugin pages say what version they support
that's not how it works
and you get an error if its an unknown/newer version
im not sure, but its fine it doesnt affect me
oh thats better
spigot is forward compatabile, all older api versions will work on a new server version
thats lovely
All I'm going to say is please target API verison to the lowest miencraft version you plan to target or you'll continue to get more and more errors over time :>
unless ur doing something with nms it will work from that version up until a version that implemented changes to the core funcionality of what your plugin depends
Luckily 1.8.8 is the best 😃
its server specific so i only have to account for the version of the server
i use 1.8.8
💀
just for the pvp?
same
its more like consistency
Good luck developing 💀
i have my public server on 1.8.8 and use viaversion so everyone can play together
okay that's wild as fuck because building on newer versions is just objectively better
they can build the same on every version up to latest
you can always just not use the new blocks and still continue on newer version
u can use viaversion in latest version
some ppl dont want to reconfigure their mods 10 million times for every server they want to connect to
or create new instances
do you know how small 1.8.8 player base and server base is?
I feel like there is this illusion its a majority
when in reality its not even close
There is no harm in it being old, it is still a very preferred thing for pvp, think about it this way, if you ask pubg mobile players, they all wish the old pubg came, this is the logic, people got used to the old version, it is great for pvp
/attribute @p generic.attack_speed base set 2048
yeah I'll admit it ain't even that simple lol
you have to do a full rewrite to restore 1.8 combat
with all of the public exploits out there unless you are dealing with a totally custom server software, staying on older versions is just asking for trouble
then what
my friends often like get into arguments and then go connect to hypixel for 2 seconds to do a quick duel and then come back
I feel like an old turtle when I enter pvp in new versions
nah, ppl just care because of cooldown
KB is different too though
I wish it were that easy
but its not even about the pvp lol
so is regen etc its a lot more than cooldown
I’m sorry but 1.8 is just nothing when you compare it to the 1.21 features when it comes to just features alone
then ?
using 1.8.8 for any reason outside of PVP is legit insanity
💀
We're just in love with that version
lol
like everything i explained
anyway its just my personal choice for my personal server
i'll admit i like both pvps, but ppl are losing so much by never updating
why isn’t there a ?1.8 yet
for which i will be writing custom code for
?1.8
Too old! (Click the link to get the exact time)
1.8 is just so lacking in features its a pain to actually make stuff in
There is
Oh lmao
what kind of server
💀
wo 1.8 is almost 10 xD
survival hangout build kinda thing
almost as old as neon
DID YOU SEE HYPIXEL IS GOING TO PORT TO 1.21?
I wonder how many 1.8 servers don't patch all the exploits
I feel like you could just go around on a hacked client and crash so many servers
they have had different versions for a while actually, but this is just for Skyblock that theyre updating
99.99999999999999%
Looks good, I'm setting up a minigame style directly
Right.
spigoteers be like i use 1.8 becos its more performant like Yeah no duh its got like 99% less features than the latest version of MC
have had
yeah, the incredible amount of content they can achieve just for the skyblock alone is insane
Skyblock be like 80% of their playerbase tho
I've been in love with this for 9 years, 2 months, and 19 days
yes LOL
more, lol
all cuz of the pvp
came out the womb and started playing minecraft
the funny thing also being that mojang has done rewrites to actually improve performance in some areas. I bet you 1.21.2 chunk loading will be faster than 1.8.8 chunkloading xD
they rewrote that shit and its pretty solid now
whats the next? ppl not updating to +1.20.5 cuz of the NBT? 💀
octree going brrr
The thing is this is cap lmao
or not updating 1.13+
nah 1.8 will exist in its little corner forever
its just a sad place, but whatever you just reject support and move on
not if mojang doesn't want to
It's been about 11 years since I played Minecraft, don't worry I'm not that young
actually even in mojang doesn't want it to
mojang can control everything
i wont ever play over 1.19 because of chat reporting, but im not sure yet if thats been resolved or if they dont care anymore
people pick random versions and dont like updating
No they can’t
well not everything
Idk what power you think mojang has, but no matter how hard they try they could never kill 1.8 they could never kill modding etc etc
You know they can disable that rightttttt with plugins
Even if Mojang removes 1.8 from the launcher and disables it from authentication
1.8.8 for pvp or whatever, 1.17 because of the chunk gen then 1.18 because chat reporting
i havent heard anything about it in a while but i also dont want to associate with that stuff
People will just get it elsewhere and make offline servers
when i play in 1.20
it doesn't even properly work on the server you know that right as soon as you add a chat customization plugin boom chat reporting disabled
i think it makes a ping too idk
What
but theyll change the programming
hola emily
cat-fall-epic-embed-fail-fail-funny-gif
ezgif.com-gif-maker.gif
it might be just a bullshit reason but i dont think im missing out on much lol
💀
people will port it to javascript to run it in their browsers...
I remember that panel xD
ACTUALLY
wha
theres a server called McPY (abandoned)
eaglecraft
Kek, they already have
eaglercraft is funny
That is minecraft server ported to Python
oh my god
lol minecraft in python, but python is so slow they had to inline everything in C
why lmao
oh wait now its just minecraft in C
assemblycraft when
i could get behind minecraft server in C
someone already did a mc server software in bash
minecraft in rust
I developed the animal kingdom war game, I think it turned out great
(1.8.8) better
Congratulations your server now runs a bit faster
muh cpu cycles
Unfortunately it takes forever to update, isn’t even fully feature complete, and plugins don’t work
congratulations your server nolonger has a billion dollar company maintaining it!
congratulations you spent a year working on something that will be outdated next year when they update the game again
damn md_5 has a lot of money /j
slow 💀
oh my god i spent like 10 million years talking and not actually doing the plugin
Honestly I wouldn't wanna work on a plugin if it targeted the 1.8.8 API either
I'd probably just alt f4 out of my IDE and never code again
what if you got paid 800$
I'd need more than that honestly
I wouldn't do many 1.8 plugins for less than a thousand
not having my library is devistating
i mean thats the case on basically any running software nowaday, everything with an userbase gets updated eventually
You legally owe me a cut of the profits now
unfortunately for you ur library is mit
you are so lucky we haven't merged to main or I would screenshot insights so hard right now
smh
The other day my grandfather was playing in version 1.20 and he was barely able to move with his cane, then I brought him to version 1.8, now he is running and throwing his cane at the players' heads
we are both the pineapple and weve both contributed to pineapple
Shots fired
Added lines: 28253, Removed lines: 14212, Total lines: 14041
[miles@aurora Pineapple]$ git log --author='The-Epic' --pretty=tformat: --numstat -- "*.java" | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "Added lines: %s, Removed lines: %s, Total lines: %s\n", add, subs, loc }'
Added lines: 1940, Removed lines: 128, Total lines: 1812
unfortunately I can't squash dev though
it has merges from forks
can't squash past that i don't think
squash it anyway
for main: fr.maxlego08.template.Template cant i just set this to something like Plugin and just put a Plugin.java at the root of the project?
sorry we don't support 1.8 here 😂
sure, but its still recommended to have a package
fr.maxlego08.template
what does it do though
identify your code
you can replace the entire thing to me.<whatever>.<pluginnameorwhatever>.Whatever
its already identified, its in my directory i have named "Recipes_plugin_leahmc"
lol
i guess, but i dont see the reason to add so many subdirectories
its not that much work i just wanna know why i have to do that lol
well its the standard naming convention but honestly you can do whatever as long it compiles into an usable thing
i think ill add a src/
but thats it
thanks
wait no but
does that make since since its just being compiled as is
it doesn tmatter lol
if you don't intend for anyone else to see your code you can do whatever you like
yeah okay
most code structuring is for everyone to read and understand
how should i compile this?
a build tool is normally used, could use javac
and should the root directory be at the root of the compiled plugin or should i do like Recipes/*
I'm using MCBE
whats the javac method
im getting conflicting stuff on this
plus javac just says invalid argument to -cvf lol
you cant do that with only one command block since it only accepts one command
Oh
just put two commandblocks connected with redstone
Okay
So how would you recommend for the chain block?
Basically it should function like this
Tp
Then print name
i use a buiild tool and make my life easier so couldnt tell you
okie
Any build tools for MCBE XBOX
Like it would be nice to have something like land claimes
place one commandblock with the tp command, take the signal with a repeater and add the other command block to the end ?
@latent rampartI found a very good suggestion
helloo
Take the signal? Repeater?
Couldn't just use a command block joint to another?
Also my as it the same way
Should do a. Chain them use /execute
The the title
?
Shouldn't it be simpler?
😭
Nvm
Got it to work
How to make a command?
Like make a scoreboard list of commands and do /warp
could use chain command blocks
well ill sugest the plugin path for that since i dont know much about commandblocks and their effectiveness
still going to need two tho
yeah
this is cursed
is this okay for listening for send of packets?
package com.frsvn.skyblock.packets;
import com.frsvn.skyblock.customevents.PacketEvent;
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import org.bukkit.Bukkit;
public class PacketListener extends ChannelDuplexHandler {
@Override
public void write(final ChannelHandlerContext ctx, final Object packet, final ChannelPromise promise) {
Bukkit.getPluginManager().callEvent(new PacketEvent(packet));
}
}
yea right?
?1.8
Too old! (Click the link to get the exact time)
How do people not know redstone on god
Might be worth to make the event cancellable
also you want to call super.write or it won't like it
ye
k
I got the groups that a player has in Luckperms, I also got the weight value, but why can't I get the prefix?
I am coding a chatManager
ask in luckperms discord
I won't send it, you can search it on google
?paste
Answer back with fourty-two
our most powerful ai yet
did you tell it 8?
i wonder if it's trying to get you to solve a captcha for gemini /conspiracyJerk
What's the best way to completly blind a player
Shaders possibly?
Pocket sand
a big display entity right to their face
Would text displays be better than block displays for that
i think it's sort of a captcha against farm bots
a capcha any ai can both detect and answer? what a concept
maybe, but bots aren't good at reading language yet no?
yes they are, its called AI
But farming ai with ai wouldnt make sense
i dunno, why else would it do that then?
how do i remove atributes of a sword in
private static ItemStack createItemFromConfig(Map<String, Object> itemConfig) {
String materialName = (String) itemConfig.getOrDefault("material", "STONE");
Material material = Material.getMaterial(materialName.toUpperCase());
if (material == null) material = Material.STONE;
ItemStack item = new ItemStack(material);
ItemMeta meta = item.getItemMeta();
if (meta != null) {
String name = ChatColor.translateAlternateColorCodes('&',
(String) itemConfig.getOrDefault("name", ""));
meta.setDisplayName(name);
List<String> lore = (List<String>) itemConfig.get("lore");
if (lore != null) {
for (int i = 0; i < lore.size(); i++) {
lore.set(i, ChatColor.translateAlternateColorCodes('&', lore.get(i)));
}
meta.setLore(lore);
}
Boolean showAttributes = (Boolean) itemConfig.get("attributes");
if (showAttributes == null || showAttributes) {
} else {
}
item.setItemMeta(meta);
}
return item;
}
https://www.spigotmc.org/resources/addon-screeneffects✨-for-itemsadder.90258/updates
Do they use a resource pack for this?
Because it's exactly what I want
no its a plugin
A plugin might need a resource pack
i have seen plugins without resource pack that can hide attributes
item flags
add the item flag hide attributes to the meta
oh yea
That code is open source, you can check how its done
It's not a particularly complicated feature. It's really just a title that has a character which covers the entire screen. That's it 😅
You could accomplish the exact same thing with a resource pack and the /title command
?paste
https://paste.md-5.net/uyipigacin.java
WHATS THE PROBLEM
You tell us. What's wrong? lol
First, let's see if this is possible.
The rank plugin appears on the left side of the player's name, after doing this I pulled it in the chat format as {bk_rank} in essentialsx with placeholderapi
But the rank did not appear 🤔
Have you registered this expansion? new BlocksinRanksExpansion().register(); in your onEnable()?
does essentials support papi placeholders like that
I would assume it does, but I don't know the format for it
if you dont know try /papi parse me %bk_rank% and see
if it outputs what you expect it to
if it does then its an essentials issue
^ Good debug command. If it's showing what you expect, then the issue is your Essentials config
Yea
any1 else having problem with download spigot 1.21 jar ?
tysm
I think placeholderapi supports % mostly but it does not support essentials like %bk_rank%
so check the result of it, if its correct you know its an essentials issue and to contact them about it
Got it, I'll test it, thank you
Hey all, does anyone perhaps know why closing the chest lid programatically does not actually close the lid? Opening works fine, but closing (including forcefully updating the state after) does not seem to do anything. (1.19+)
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i could imagine that its some weird clientside packet thingy holding the chest open for the player
otherwise where do you call the code?
Hey does anyone know how to remove the first part of a command when typing it? It looks so cluttered
/myhome
Instead of
/homes:myhome
Remove any command containing : https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerCommandSendEvent.html
How to get advancement namespaced keys for Bukkit.getAdvancement?
I dont think that new NamespacedKey(myPlugin, "minecraft:story/root") will work
what's a good i18n API that works with MM/components and preferably works both on Paper and Spigot
there's no way someone hasn't already made one
Bukkit.getWorld(name) 🤔
lol whats that
ahh its an app
yuh
but it says premium, so i prob have to pay for it no?
it is useful
it's not
where does it say that?
when i type the name in the app page
💀 you don't have to add it
ohh got it
idk
This doesn't show to how to remove a command, only how to getCommands()?
Is it just me or are the docs not that good?
prob you
Docs are fine
just remove any command that contains a : from the Collection returned by getCommands()
The Collection is mutable
I get that part but I don't get the actual removing part
Like what is the function for removeCommand(arg)?
modify the Collection. Delete entries you don;t want
don;t
Ohhh so it's a write/read
you are not removing the actual command. You are modifying the List of commands the client will be told about
Something like getCommands().removeIf(...
what error does Bukkit#getWorld give if world doesn't exists?
null
This is what I thought I was going to run into
Collection<String> commands = event.getCommands();
commands.forEach(command -> {
if (command.contains(":")) { commands.remove(command); }
});
Doesn't work, only removes it from the new collection
just getCommands().removeIf(cmd -> cmd.contains(":"));
Oh I misunderstood what "getCommands" meant. Thank you that worked :)
how to get advancement by it's name using Bukkit.getAdvancement?
I also have a question that has deluxetags and uses version 1.21+
?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!
who is responsible for CraftBukkit and where can I ask internal questions about it?
Do you have cafebabe just to paste Q&A messages?
yes
craftbukkit itself is abandoned, spigot currently maintains it. you can just ask here
CraftBukkit died back in 2014 iirc you'll be asking here for that stuff
How does work Bukkit.getAdvancement? I mean, I can use whatever plugin for namespaced key that it needs? Will Bukkit.getAdvancement(new NamespacedKey(myPlugin, "minecraft:story/root")) work?
that confusion is never going to go away, md should've rebranded the whole thing to spigot back then
craftspigot
NamespacedKey.minecraft(String)
while he's there he should get bitbukkit.org
There'd be less confusion if it weren't for the get website tbh
They still distribute CB
Oh, thanks! And if I have achievment from some kind of datapack?
NamespacedKey.fromString
Thanks!
So, NamespacedKey.fromString("minecraft:story/root"); should work?
Just for example
yes
thanks
you can do NamespacedKey#minecraft too, or NamespacedKey.fromString("story/root") will assume minecraft namespace as well
Or even better NamespcedKey.mineacraft("story/root")
so I came to this because I have problems in intellij lol
I want to run a test server or a spigot server in general and created the run configuration seen in the image.
After using it I noticed that typing into the console, e.g. stop or similar stuff doesnt work, but if I run the
jar in the console using java -jar ... works fine and the input works as well. Then I looked into spigot and
saw that CraftBukkit is responsible for the console input using jline. Then I saw it uses a pretty old version of jline.
Why is that? I could reproduce the issue with this simple example:
public class Main {
public static void main(String[] args) throws Throwable {
ConsoleReader reader = new ConsoleReader(System.in, System.out);
reader.setExpandEvents(false);
System.out.println(reader.readLine());
}
}
it is stuck at readLine when using a Jar Run configuration in intellij, but in console it works fine.
At this point I have no idea where the real issue is and thats why I cant tell where this "question" is
appropriate.
I used fromString just to understand will fromString("namespaced:key") work
What's a good keyword or tutorial to understand how to save player data created with the plugin?
in this case I wasnt sure because the channel description just says "spigot and bungeecord"
this is more of an issue with IntelliJ integrated terminal being the worst
that said, you should probably delegate run tasks like those to your build system rather than IDE-specific configurations
Is it possible to add advancements by plugin (without nms) or world, or it's only datapack possible?
in this case I am not sure though, I know intellij terminal isnt the best but might even be an issue with jline, who knows
and CraftBukkit uses a very old version of jline
like ConsoleReader doesnt even exist in newer versions
I found achievment manager and then realised that it was dependency
UnsafeValues
You can input JSON
CraftBukkit actually uses the latest version of jline that still has ConsoleReader, thats probably why they never upgraded
but there is probably a reason it doesnt exist in later versions 🤔
So, there is no spigot API to deal with it
right?
I mean, you're barking at the wrong tree
even if Spigot uses an old version of jline, the probability of that being upgraded any time soon is unlikely
yeah thats what I thought
that said, people have successfully used run configurations for running a spigot server before, so I'm unsure of what the specific issue might be here
let me try it myself first to confirm it isn't an issue with your environment
they might run it on a different target maybe?
It's been a while since I used run configurations at all, don't even know what that option is lol
not sure
ah, no that is irrelevant
yeah so running the server works
I just have problems inputting stop or stuff like that
I could find a fix actually
using the shell run configuration
Hi, I've been looking around and I haven't been able to find a way to allow the player to ride an armorstand and be able to move it around by moving WASD while sitting ontop, is there a way to do it? The version it needs to work on doesn't really matter imo and any help would be great
@sly topaz thanks for your help
the JAR Application run config worked just fine for me so I don't know what might be wrong in your setup tbh, but if you already found a workaround then that's good
huh
this is the run config for reference
hm thats weird
but you dont even have the run on ... option lol
you use ultimate or community edition?
community
You had it open...
english only
yes
thanks
?
hi, how could I get the dropped items during BlockBreakEvent? I dont see any methods that do this
You'd want to use the BlockDropItemEvent instead.
How would I be able to create a sign ui similar to openInventory?
I see there is a player.openSign() but I don't know how to create the sign class itself
You place a sign in the world where the player is and then get it's block state
hm debugging doesnt work with this workaround :/
Yes it would you just need to do remote jvm debugging
Why would this be opening a blank sign?
Sign sign = (Sign) player.getWorld().getBlockAt(player.getLocation()).getState();
sign.setLine(1, "^^^^^^");
sign.setLine(2, "Type new home");
sign.setLine(3, "name above.");
sign.update();
player.openSign(sign);
Probably since update is asynchronous so it technically happens after I openSign?
But how do I workaround that?
You can't make world changes async
Nothing with the world can be done asycnhronously :3 so don't do that please
There is no work around
hey there
i have 2 plugins: milestones and pickaxe
pickaxe uses milestones
and im using plugman to reload the plugins
don't reload
Hey have you tried never reloading ever don't do that that's bad!! :3
if you ever type /reload this kitty will be sad and attacking you
Wait, I can't make a fill a sign and open it in gui at the same time?
thats why i type /reload confirm