#help-development
1 messages · Page 710 of 1
i dont know the answer to your issue
You saw it ?
yeah
Oh yeah, it's working, thanks!
I have a issue with create a fake player in tab
or that lol. It won't be set then though if the event gets cancelled
I use Mojang Maping, ProtocolLib and both method not work or have compatibility problem
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
.
I'd just use mojang maps and send the packets normally
It's compatible with spigot 1.20.1 ?
Because it's seems the method for make it, disapear at 1.19.4
ur probably writing the packet in an invalid way
which method do you think has disappeared?
btw I'd do it like this, then translate it to mojang maps: https://stackoverflow.com/questions/66529920/add-fake-players-on-the-tab
?switchmappings
if you're talking about the method to get the ServerGamePacketListenerImpl, you don't need it
you can just do ServerPlayer#connection#send(...)
Ok i work on it, wait 5 minutes
nah my favorite quiz show starts in 5 minutes
well it starts in 20 minutes but I must not be late
These 2 imports :
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
Cauz problem, because only availble at 1.19.2
?code
?paste
my code look like this https://paste.md-5.net/onuzolisuh.java
What is the name please ?
Im beginner on method Mojang Mapping, can you tell me what import i must put for replace :
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
And how do you find these information
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
I will bookmark this website, very usefull
Ok im maybe stupid , but i don't arrive to adapt this code to 1.20.1 : https://paste.md-5.net/onuzolisuh.java
Ohh
I didn't do that : https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is obviously written for 1.18.2. If you use another version, you of course have to replace every occurance of “1.18.2” with the version you actually use. What...
Do i do this on IntelijIdea ?
ow to use Mojang mappings
First of all, you have to run BuildTools and tell it to get yourself a nice, fresh compiled spigot version with the Mojang mappings:
java -jar BuildTools.jar --rev 1.18.2 --remapped
It does not matter in which folder you run BuildTools as long as it’s on the same computer that you use to code your plugin. BuildTools will install all dependencies to your local maven repository. You can now adjust your pom.xml to use the Mojang mapped .jar, and to reobfuscate all needed method/class calls at compile time:
Or with Git on empty folder ?
Have this func:
public void startTimer(){
long delayToNextRestart = 21600L;
new CustomTask().runTaskLater(this, delayToNextRestart*20);
}```
But this task runs not after 6 hours, how i need (6x60x60 = 21600) but earlier - after a hour
what
what?
what you said makes no sense
Don't use ticks to count a delay time for long duration tasks
lol
ticks != a unit or measurment of time
yeah it depends on the tps
ticks can get delayed by the server performance
might want to make a real time scheduler or smth i dont know if theres something better
or use epoch
best to use system.currenttimemilis
but you can schedule a real time task list to be updated every 5 ticks or smth
your calculated 3 hours on 20 ticks per second could end up being 10 hours due to lag
use a ScheduledExecutor for accurate timing
eg, every monday at midnight```java
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
public void schedule() {
LocalDate nextDate = LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.MONDAY));
long midnight = LocalDateTime.now().until(nextDate.atStartOfDay(), ChronoUnit.MINUTES);
scheduler.scheduleAtFixedRate(()-> { /* Code here */ }, midnight, TimeUnit.DAYS.toMinutes(7), TimeUnit.MINUTES);
}```
cant run on the main thread tho
ty, will try
but ig thats not a problem for this
yeah shoudl be long
why not primitive the fuck
Its just sample code so not intended to be used as is. ie, the thread pool in the method shoudl not be there
lol
the pool shoudl be a Field, the Long shoudl be a long, but as I said, its just a sample
i can use here LocalDateTime instead of LocalTime?
why? but yes
ahh plushours()
is there a way to change the knockback of a tnt (not just setting the player's velocity)
without mixins or cancel+reimplement
im so confused i got this code to set my language level in grade
var targetJavaVersion = 17
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
withSourcesJar()
}
yet compilation still fails with (use -source 16 or higher to enable pattern matching in instanceof) any1 know why?
are you compiling with intellij
you need to set the different thing in the project don’t you? try compiling directly with gradle or using the gradle sidebar
you need to compile with gradle, right side of ur screen gradle, tasks, build, build
parent too?
oh is this modules
yeaa
ah, use java toolchains
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
idk what kotlin syntax for that is
i can just use #set on languageVersion
welp still same problem
one sec ill go ask the ai
its happening in task javadoc btw
the ai just says to use #set instead of =
you dont
or itemstack
Translatable components if you’re using chat, but if not, you can use BungeeChat’s TranslationRegistry which has all en_us localizations
Working on support for components in all areas of spigot
.
anyone got a code sniped that can do math in a string? ive been trying for like 2 hours to find something
wdym do math in a string
whats the string, a number, an expression, ...?
i have a string like " I want 20+4 apples" and i want it to return " I want 24 apples"
for any kind of string?
you sure this is not some sort of XY problem?
yes but only simple math nothing too complicated
?xy
Asking about your attempted solution rather than your actual problem
i just wanted to ask if anyone has a code sniped for it
cause every one i tried doesnt work
may i know what you needthis for?
a plugin
i just want it for the chat
like
a person says
can you give me 2*64 wood
and it says can you give me 128 wood
bold example but you get the idea
you gotta implement some sort of language model if you wanna translate "can you give me wood" to the server actually giving wood
not a simple thing
and about the math thing
hmm
i dont want anything to happen
i just want the msg to be replaced
i dont want the server to give you wood
okay
btw i think you are looking for the term code snippet
im thinking
The main prpblem is anything i find only works for strings that only include numbers without any words etc
there are some edge cases
yeah bc thats what's usually done on math expression
in this you gotta somehow extract the expressions from any kind of string
yh and i cant figure out a way how to x)
regex maybe
also what if someone types
-1+2
would the server interpret the first - as a neg sign or as a hyphen
neg sign
also
someone's name may only be a number
people saying their ign in chat could get messed up
i gotta relearn my regex tbf
but i get what you mean
also what ab
i thought of it only to be a small feature but its so complicated the more i think about it
names like "0xAda" ||👋 if you read this btw|| would those be interpreted as numbers
yeah like its not something that simple
uh i mean it could but theres no operator so it would just ignore it
hi
(0xada=2778)
i meant to the actual person that has that ign, she's here
oh x(
its a hexadecimal number
but hi to you too
yh i dont want to do complicated math just the basic operators + - * :
then you prob should just find some regex that matches math expressions, get them into an array, evaluate each one and replace
So long as you have no spaces in your math section it's simple to use regex for it
you could just
remove spaces from the whole string
the problem is figuring out the regex
validate on each element of the array
its on that page I linked
return text.matches("((?:(?:^|[-+_*/])(?:\\s*-?\\d+(\\.\\d+)?(?:[eE][+-]?\\d+)?\\s*))+$)");
if thats true you can just get teh value
if it does you could go with another regex (maybe) and remove all spaces that are not [ adjacent to one math char and one non math char ]
to use the second regex afterwards
at this point i might just code an ai to do the math
code an ai?
i lost all hope
guys, im making a something to support arabic chat in minecraft as you can't write it
now the server reverse the " reversed " message of the arabic chat
Like
https://cdn.discordapp.com/attachments/1145654541354811453/1149415846851137647/image.png
https://cdn.discordapp.com/attachments/1145654541354811453/1149412329964970054/image.png
might give it a try
u tryna parse math?
.
Any tips for auto exporting + reloading with Maven? It seems Spigot keeps a lock on the file so I have to shutdown first before Maven can replace the plugin. I don't recall having to do this before.
?paste
Yes, I know about /reload confirm. My point is the jar file has a lock on it so it can't be replaced.
wait what
https://paste.md-5.net/awasasasav.cs this a simple math evaluator that supports plus, minus, divide, multiply
made a whileee ago so no guarentee
you cant delete a file while spigot has it loaded
i mean you can force it
technically
if you have administrator perms
try opening your IDE with administrator maybe
if you replace a file thats just deleting and putting in a new one
This is the #help-development, I'm developing new versions.
Maybe because I'm on Paper?
oh
uh
there's plugman but that thing stopped working for me recently
and idk i dont experience paper locking my plugins
I'm on Windows. I'd send a screenshot but can't. I get the The action can't be completed because the file is open in Java(TM) Platform SE binary. Or Maven: The process cannot access the file because it is being used by another process.
Manually shutting down each time is getting old, fast.
oh im on linux
?paste urpom
you should be able to override it
just made a regex (after relearning a bit) that might be good enough
for detecting basic expression
@valid burrow
add it to the code if you want
cant be worse then nothing
ive never tried regex before
so
i cant really tell if it works or not xd
wdum
Generally avoid trying to help with stuff you got no idea about
nw
@valid burrow mind if i just implement left to right evaluation
instead of following actual math rules
like doing 2 + 6 / 2 = 4
sure go ahead
use 14 brushes math parser
link?
b
i can coppy
trust me
imo its like way too complex/feature rich for my very very basic regex
@tardy delta look at that, your project is complex. What a nice compliment 🙂
i havent seen fourteen in a while
he doesnt have an updated name, did he stop using discord or something
idk
but overkill (and if you gonna go for correct math you might as well go for proper matching regex)
he comitted to math ex parser 4 days ago so he isnt dead
lol
crunch on top 
why is -1 not an expression?
God said so
ly2
oh yeah forgot to match that
you can do 0-1!
what's the regex meant for anyways
1+(1)
it prob can
maybe with (?R) but that's uhhhhh
even if it can it would certainly be pushing it
yeah arithmetic expressions are context free, not regular
ill do it once i figure out how to properly use github
the way i do it rn is rather
well
uh
unprofessional
sure
eyyy
they shouldve emailed you about it
https://github.com/sieadev/allTheBasics/pull/4 @valid burrow
bump #2
i think someone had the same issue a while back and came to the conclusion no
i would just add data to the tnt and change the velocity of the player once it blows up
yeah no my problem is what do i set the velocity to
oh wait
im dumb
the event is fired before the velocity gets added
so i can just add the custom velocity
https://imgur.com/a/E5tv10W whats this btw
i thought for some reason it would get added later (and as such merged with already existing velocity)
had to use java class version 9
not class version 9
source version
oh oke
java 9 language level
that, thanks
the uh code wont work
if you compile with java 8
for java 8
you can upg to java like 17
bc
its required to run mc server at 1.20 anyway
so
¯_(ツ)_/¯
yh i though i already did that but apperently its on 8
what happened to ur drvoss discord
i got termed
oh damn
apperently i commited credit card fraud
i dont know how
but
well
it gone
and support kept ghosting me so i gave up
lol
yh i was mad at the beginning but not much i can do about it now so
i just accepted it
getting my acc banned is the 1 reason i dont like owning big servers
yh from now on i have 1 account for server rights and 1 account that i actually use
i looked into it and it seems to be allowed
so thats just the way i do it now
yeah id do that
1 acc that owns it that literally just sits there, while my main is just visual owner
mhm
just gotta remember to log into it once in a while so that they dont deactivate it xd
well ill go to sleep have a good night yall
they deactivate accounts?
gn
if they dont get used for like 1 or 2 years yh
i really gotta sleep now
gn
How do i query the dimension (type) a player is in? The only method i can find is deprecated, and i refuse to believe it's impossible to query the skybox a player's staring at
I mean i have some truly terrible ideas
boolean overworld = player.getWorld().getFullTime() == Bukkit.getWorlds().get(0).getFullTime();
boolean end = player.getWorld().getEnderDragonBattle() != null;
``` but there ought to be a simpler/less janky solution
Ah
environment
How do i pass a boolean as a reference? AtomicReference?
World#getEnvironment
yea i realized lol
You shouldn't really ever need to pass a boolean as a reference, but if you absolutely need to then yes you would use an AtomicBoolean or some other container that has a single boolean value
?paste
Here's the alternative
https://paste.md-5.net/qomurisulo.java
which i probably will end up going with
Uh my IDE (intelliJ) crashed, anyone able to translate this into english?
https://paste.md-5.net/tujojoveja.makefile
This looks like those java 11 errors
tbh probably nothing important
that doesnt help me in not causing it again lol
wouldnt matter if it wouldnt BSOD crash me too from time to time
something something IRQL_DRIVER_NO_LESS_OR_EQUAL
tbh i have no idea how java can cause a core error in windows but ok
How can I create a sql column if it not exists? I figure that if you use SQLite, you don't need to do that check, you can ignore the exception but what about mysql server?
pretty sure you either risk a lot of DB errors or create it with the table
look into the ALTER keyword
I'm trying to make an update for my public plugin and there are some database changes so I want to ensure the user of my plugin doesn't have to do anything to update my plugin.
Yeah it's for column.
Does anyone know how the combination cases for swtich statements are handles? Is it more like an 'a or b' check, or more like a fall-through?
Right now I just force the mysql to add the column and ignore the exception.
Can you explain more
It will fall though until a break; statement
Maybe give an example?
ah i meant how something like this is handled by the compiler
switch(second){
case 1,3,7,9,12: function_a(); break;
case 2,4,5,6,8,11: function_b(); break;
}
Like, is it turned into something like a if(condition or condition), or more like
...
case 7:
case 9:
case 12: function_a(); break;
I'm asking because I am wondering how this would compare to just doing if() else if() with or-conditions
is there a slime world manager for player data?
like stores player data in mongo too?
...isnt this, like... the whole point?
no NetherWartsState is just an enum
i mean how do i access it lol, i knew that part
its not funnily enough
declaration: package: org.bukkit.material, class: NetherWarts
not the enum itself
but the MaterialData class which uses it
declaration: package: org.bukkit.material, class: Crops
oh hold up that sdeprecated aswell
lol
declaration: package: org.bukkit.block.data, interface: Ageable
guess you just have to use Ageable
do i have to set it back? I can never remember whats a ref and whats a copy
I will make a special gui, but it looks bad when I put the items, can I throw the items behind the gui, so that the items stay in the background even if I drag them
yeah you do
what are you trying to say
you dont want items being dragged around?
also can i just say i can see the difference between 60 fps and 144 fps and it's impossible to play minecraft in fullscreen mode cuz of that
update: Mojang bad, some random guy on github has a programm that enables borderless fullscreen
no Example I created a gui with deluxemenu, the items in the inventory of the special guime appear, how can I throw it to the back so that it does not appear, how can I bring the inventory or gui to the front
I'm sorry, my battery's dead. 😄
items under inventory are like this
that looks aggressively like bedrock lol
a no I did it with this deluxe menu it took me 3-4 hours I am using java 1.17.1 for my server
I don't like bedrock, it's pretty bad.
😄
ask on #help-server if you're using deluxe menus
I do recall talk about splitting large tasks (for example world edit stuff) into batches. Is there a way to do batches dynamically - speak, given a list of required operations and a delta time left in the current tick to calculate until the current tick's 'time limit' is reached which does not require delta calculations?
damn, maven-central is slow again today
uploaded omething an hour ago and still, nothing
it's only available on staging yet
It is really cool, right? You can just switch to discord while in fullscreen without any lag or bugs and these weird closing animations
bah i dont care about that
i care about the fact that minecraft feels like it actually runs smoothly in fullscreen
'cant see beyone 30 fps' my ass
i can SEE the difference between 60 and 144
You can indeed
But I have to clean the dust out of my laptop because it now only gets me 60 unstable fps instead of 120 stable
I wonder my two servers about changing gamemode after re-join. One server, after re-join, gamemode doesn't change, but the other one, after re-join it change to survival.
is this a development question?
At first, I thought it was because of my coding in a plugin, but since I apply the same plugin to both servers, so I remove that message and yet still chat here.
this is a good read on that https://www.spigotmc.org/threads/guide-on-workload-distribution-or-how-to-handle-heavy-splittable-tasks.409003/
yea no
it right at the beginning is like 'static final time'
I'm looking for a dynamic solution
its still a good read
Actually, why doesn't mc use delta time for tps? Is there like a solid reason for that?
i know how to split tasks. I'm curious if there's a way to handle em without having to check delta time remaining every time a batch finishes
the problem is that runnables rely on the ticks themselves
and that event kind of would too
actually
does spigot attempt to sync the ticks with seconds?
or is there some internal 'tick started at this nano second' value?
im not sure doing this dynamically is at all feasable or even worth the trouble
you probably woulnt even be able to use bukkit's scheduler
sicne you would have no idea if any tasks are being ran after yours
so you coulnt even do sync work
I figured out that one right at the start. The problem is that while i can easily check time passed, i don't know how to check time available and i really don't want to guess
thats also why i asked about if bukkit keeps track of the start time of the tick
i could at least guess from that
the only way i thought up i could time it is by doing so much that it causes lag, and just check in the runnable the time passed since the last time it was called, and be like 'more than 20 ms, you're causing lag'
but that doesn't account for... well, lots of things. Would make actual lag spikes worse, too
you could also do very hacky shit
having a scheduler ran simultaneously which updates a timestamp
i guess you have some sort of chain for your runnables
so you could check between each runnable if you still have time available by comparing the timestamps
i mean that way i could restrict which runnables run but i still dont know how much time i have
what exactly are you trying to do
to evaluate how long your chain needs beforehand?
figuring out how much processing time i have available
i can do the other stuff but not that
and what do you need that for
so that when i do large tasks i can assign close to the amount of unused time
why dont you just dont give a fuck and run the tasks regardless
cuz for some of those things a stable 20 TPS is required
granted they're unlikely to actually bite into the processing time, but I'd rather not need to worry about that when I'm working on other things
just add them up
if the current tps is 18 use 2 more ticks
or am i getting something wrong

i need the game to keep running at 20 TPS, AND to get as much of the workload done per tick as possible
which means i need to know how much time i can spend on stuff like that
one of the ideas i had was to double the workload each tick until its done or causes lag, and keep track of the maximum time passed before lag occured, but they're all jank like that
I'm convinced there's got to be a better solution than eyeballing it using system.nanos
and what is your workload? why cant you go async
You can send block update packet then do the sync operation.
hm true
then dont use the full capacity and rather find a good mid value to have a buffer
so it also works on 18 tps
and doesnt cause lag spikes
yea the problem is some servers are using 20% and some 200% of their time-per-tick
so i'd have to do it half-and-half anyways bleh
no
Is it possible to create custom recipes that can be not crafted by default, and can be added temporarily? I would rather not have to do checks in the CraftItemEvent
Specifically, i would like to avoid having to add every single recipe that cannot be crafted by default to the CraftItemEvent
Is there a way to add a player a Custom view like the creeper sight except via NMS ?
Don't think so, that's usually just shaders
okay thanks
Just add and remove them?
?
Add the recipe then remove when the temporary is over
ah i meant, for specific players
No
can i at least mask it from the recipe book?
You can add the recipe and add a Permission via the CraftItemEvent and If the player dose not have it set the reuslt to null
You'd have to use "vanilla" methods for this is my guess
Like replacing the glow shader and then switching between different "views" by color
But all of those would require a resourcepack
yeah i expected that but tanks
If you do not mind this, you could go to the Minecraft Commands discord server and ask for directions
can you send me an Invite ?
Thanks
In a completely utterly unrelated note... paper just added the foila async scheduler to the paper api...
The one that isn't reliant on the main thread 👀
im not going paper
shrugs
My point was that clearly its possible...
Be the change you wanna see
Way I figure it is folk who have fundemental issues with spigot either move to paper or legit add the features they wish were in the spigot API via PR
E.g there is one mad lad who I got a ping about from my old inventory holder thread.
He has legit made a pr to fix the issue. Mad lad
I think sometimes we all focus too much on the cool fun plugins and not enough on cleaning what has now become the equivalent of a hoarders attic
wait, do you mean that guy that was screaming about how inventory holder thing is so slow ?
No a guy who watched the thread and made a pr to fix it
ah
Hey, I try to make a sorted tab with hex color prefix but when I try (picture) this is the result: https://paste.md-5.net/aquzuforig.pl
And from what I saw made the inventory system just deadass better
I mean it is a hex color so one would assume
tried it but still aint working
Like legit it's the little things like that though.
Kf I was the maker of that code I'd of added custom exceptions sk this poor bugger would know exactly what the issue is
now a different issue tho
progress
the way you're setting the color for the team is wrong
@peak depot once you find the problem I'd humbly suggest you make a pr for it adding custom exceptions so the next guy who does what you did, they'll know without the headache
It needs a chatcolor from Bukkit but I try to to work arround it to use the hex function from bungee api
sadly some ppl (including me) do not create PRs simply due to not wanting to dox themselves (the CLI or whatever)
ye don't
cleary that is not working
Can't you fork and then pr directly from github?
spigot is not on github
just build it
?stash
itll put out the whole code in a folder
but what else could work tho since it doesnt come with a converting method
https://laby.net/post/PqXxvZcU that thing were currently is Admin I want to make to VIP with said hex code
?whereami
~[paper-1.20.1.jar:git-Paper-171]
oh lol
wow
actually why cant we just put all the paper patches as spigot prs lol
fuck no
wait lemme try on spigot
Because they have fundamentally changed approaches.
Md_5 and the paper devs are like divorced parents and we are the kids who have decide if we wanna go to mum or dad's for the weekend
I mean sure, they do have some fancy API stuff
But I greatly disagree with their decision to "fix" bugs that are in the game intentionally
And not giving us a way to disable it
But let's not start this again :D
Md_5 is the mum, strict and stern but mostly sensible.
Paper devs are the cool dad with the ferrari and ice cream for dinner, but without the real life grounding mom has
Tell me I'm wrong 👀🤣
no i mean shit like this
also apologies for the ping i forgor to disable it
they're both broke tho
why do i need to remove the item for two ticks before the player stops using it
like seriously wtf
They are both built on bukkit of course they are broke
https://paste.md-5.net/goxibaviqo.cs still the same issue
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
still the same code I send earlier but here again: java vip.setPrefix(net.md_5.bungee.api.ChatColor.of("#FC46AA") + "VIP " + ChatColor.DARK_GRAY + "| "); vip.setColor(ChatColor.valueOf(net.md_5.bungee.api.ChatColor.of("#FC46AA").toString()));
Team colours can't be hex I don't think
so no work arround right?
Ye, you can't do it this way
There is a different workaround for this.
I think it was just straight up replacing the players name with the colored version
Prefix will work fine though
would still retain the non-colored player name, no?
Wild take. Do a pr?
For making some of their features optional
wild take. boycott paper
Or hell a library that works like that old soviet american airlock design
they straight up rejected this
when it was brought up
so I don't think they would accept a PR
I found from both parties (md 5 included) that folk dismiss shit out of hand as they assume you won't do it
Just human natute
Nature
Sounds like a fun project that could end up being transfered to a library one day if it's rejected as a pr
Paper, spigot, and hell technicslly even Bukkit literally exist due to disagreements between devs and the api devs.
If its good enough for them
Then again I'm a optimistic lmao
But someone needs to make PagePour eventually :L
Someone be that grizzled ol' nan who gets mum and dad to stop fighting for 5 mins and think about the kids lmao
*I'm all out of analogies 🤣
well im out of fucks to give and just do what works
ive a policy of writing for spigot so that it works on everything but magma and folia
oh not again
softspooon
Thats sorta my point.
Devs do that all the time.
It's what most of us do.
If that isn't a sign that both sides of the aisle should get out of their arses and come to some mutual compromise, for the better of let's be real, everyone, I don't know what is
Not like that has been attempted in the past
i mean I've written plugins to re-cause feature-like bugs soooooo..... ive no leg to stand on here
"This future I do not accept it, as an error only becomes a mistake when we refuse to correct it"
It's failed before it will likely fail a few more times.
But let's do what we do best in both communities.
Fling crap at the wall till it sticks haha
No
I doubt anyone has the time for that
There are always people you don’t like, or well don’t work well with
So for volunteer-based projects people just work with those they like
That’s how it plays out usually
Let’s just say even I wouldn’t subject myself to work with those who use lombok, already eliminating a good deal of potential collaborators
fucks lomboc
bungeecord moment
Wtf is wrong with lombok?
Stopping entity from unloading
Like ong what's the issue with Lombok?
Im too tired to take this rant rn, maybe another time
lombok is cool
seriously what is lombok
@Getter
private String conclubeRant;
framework for useful annotations
that @contract stuff?
I prefer it by its real name.
BoilerPlateBuster
@smoky oak see that there?
i thought you were making fun of the dog lol
That's your getter. Your entire getter.
ah

"Properly" what does that even mean?
mutability by design 
not use lomboc
I'm gonna break some grand illusion you have lad.
Even String is a class , just one written for the main jDK.
The entire language is based on idiots like us making new libraries.
Wanna do something properly? Remove all annotations from spigot... hell write spigot from scratch.
Bukkit scheduler? Nah fam java wasn't designed for that. Use thread
why are they package-private
I can't tell if that message is a pun or targeted at me
tf are you talking about
It's targeted at mobs do it properly line
There is no "do it properly" in java
It's libraries on libraries on libraries
lmfao
yea not worth a convo
Lombok does its job and the end result isn't bad
I beg your pardon?
But the code you're running is dubious
and that's the main argument that everyone says
It's hacky
And spigot isn't? 👀
shit let's all switch to minestom and convince all the server owners to run that one jar
Lmaoo
NO
But jokes aside that's my point.
It's all dubious bodge job hacky ways of adding functionality. Hell it's what java is built around 😅
I'm fine by using lombok because while I am crazy about code quality
I'm only concerned about the quality of my code
Run essentialsx all you want
your loss
at least java is fast now
some people are simply masochists and we need to be fine living with that
spigot does some hacky stuff
but not a ton
Paper meanwhile uses asm for event listeners
i really hope you mean java bytecode and not actual asm
because making that 1 class is faster than the combined overhead of invoking the methods via reflections throughout the server's lifespan
or some shit
I stand by what I just said. Everything is hacky.
Lombok is no different and I genuinely don't understand why people hate it
If we can accept all the BS in spigot and paper and other libraries
eh i wouldnt say i hate or dislike it, just that it looks weird
It seems idiotic to hate Lombok for the same reason
It helps speed up development if you actually know what you're going
Managers that are injected rather than singletons look weird. But it's like the cornerstone of both communities lol
happens when you are not used to clean code ¯_(ツ)_/¯
i have created an boss bar how do i assign it to the entity so it shows the health of that mob
Like @Getter'ing the entire class rather than each variable individually
?
Wait are you pro or against lombok?
@chilly hearth
heh
Also what delusional opinions you even on about? Lmao
watch out bros defensive
I play Raz in defence mode and lay down a card face down. Your move kaiba
GodCipher uses ignore
i draw the last piece of exodia
Is the Shadow realm having to do prs on CoreProtect code?
no that's just hell
Lmao
Where's the lie tho?
I've said to intelli he should host a competition like a plugin jam and give the winner a year's ultimate or something lol
"Who can streamline lookups the cleanest"
is someone talking to me?
dont think so
ok
😭
mans just wanting to flex his projects
Truly I have strayed from god
yeah bro let's host a plugin jam about who can make a multi-platform skyblock core 
as if everyone here has the capacity and knowledge to write one
fuck are you doing pretending you ever were anywhere close
I mean I am a member of the spigot discord 😭
That'd be such a monkeys paw.
Gets plugin jam, it's that monstrosity
is it ok to run a mysql query every tick on the bungeecord side
the query is mostly simple just grabbing data
is it ok to check your mailbox every second for a new letter
yea why
Why ask then
sry
conclusion, its dumb and you should do some proper caching
🤯
Misunderstood the assignment and made a 1 mil element String List of JavaPlugin instances
😔
Imagine being a 2nd rate duelist with a 3rd rate deck
anyone know of any website templates that look like this that are free
How could I convert a location's direction to euler angles? (Trying to set armorstand rotation for the head)
if number then angle = 180- direction
If lower than 0 then it is 180 - direction
what
Oh wait yeh lol no if needed
180 - direction works
If yaw still works as I remember
player.performCommand(command); how can I prevent console from logging this trash after prefoming command?
By doing the command functions through code instead of performing the command
Why are you doing it like that
player.sendTitle btw
onComment:
- /say ${event.user.nickName} -> ${event.text}
onGiftMessage:
- /title @a title {"text":"${event.sender.userName}","color":"gold"}
- /execute as @a run summon minecraft:sheep ~ ~ ~ {CustomName:"{\"text\":\"${event.user.nickName}\"}",CustomNameVisible:1,Color:${event.user.followsHost}}
onLike:
- /title @a title {"text":"<3 ${event.sender.nickName} ${event.totalLikes}","color":"green"}``` I'm doing config that reacts on certain events
ah
You can use a wrapped console sender then, which delegates everything BUT the messages to the original sender
That should work
Bukkit.dispatchCommand(Bukkit.getServer().getConsoleSender(), command); like this?
not exactly
but you got the spirit
So what you want to do
Is make a new class like NoMessageCommandSender which has a constructor which just takes a CommandSender, and implements CommandSender, then just run every method as the CommandSender you received in the constructor, but leave any sendMessage as empty
ignore CustomSender it's just a wrapper
Caused by: java.lang.IllegalArgumentException: Cannot make io.github.jwdeveloper.spigot.tiktok.core.FakeSender@621cb59d a vanilla command listener
at org.bukkit.craftbukkit.v1_19_R3.command.VanillaCommandWrapper.getListener(VanillaCommandWrapper.java:86) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at org.bukkit.craftbukkit.v1_19_R3.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:44) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
... 11 more```
?paste
hmm what do you think why this is not working?
I don't think you can implement CommandSender directly
That's why in Ike's example he has a Builder class that just returns a new CommandSender
?
Is there a way to get the response from Bukkit#dispatchCommand()?
Well thanks for this idea, but it still sending stuff to chat...
The easiest way to solve your problem is to do this and then set /gamerule sendCommandFeedback false in game.
You're not really going to be able to hide it completely unless you re-make the title yourself.
By calling sendTitle
Although maybe setting sendCommandFeedback to false might hide it from console too, not sure.
thanks, for this I think it will be good enought
anyone know the permission for gamemode switcher (F3+F4)?
interesting question
it has no permission
so op only or what?
yes
weird shit
yep
The actual changing is still based on the same perms
it will just say "no permission" when not op
Time to make a mod
Is there no way to do so?
Commands don't return messages, usually they just send messages directly to the player. You'd have to intercept it.
But if I directly use the console? I, as the one who typed in the console, see the message. But I ain't no player
Well same concept though, in code the command isn't telling the caller "hey I sent this message", it just sends it.
But even messages like player's ** gamemode set to ***?
Yes even those, they're just sent. What are you trying to do?
I have a discord synchronization plugin that can execute minecraft commands from discord. I want to return the minecraft console response.
Ah, you can just read console directly then.
And how to do so?
I'm not entirely sure, but you should be able to hook into it. Do some research on Google and see what you can find.
Wow, I already did and found only half-rare solutions, not really explaining anything
That's why I asked here
I think it comes down to setting up a logger, idk how you can defer the normal console to it though
that's the problem
I can send you example
https://github.com/GoksiOrg/TabbyControl/blob/main/src/main/java/tech/goksi/tabbycontrol/TabbyControl.java#L39-L40 you also have to register it
But I think problem would be that you can't actually be sure if message is from actual commabd
Maybe someone send chat exactly after command is written
It's not reliable
yep thats shitty
but if there isnt any event with a response..... what TF should I do
you should do what you should
?
oh and btw this project doesnt help at anything, but it generally seems to be VERY COMPLICATED to do such a simple thing
guys, I'm making a little minigame for my server and I need to have destructable blocks (placed by player) and undestructable blocks (not placed by player), ik stuff about copying over builds to have a lot running in one world instead of making several worlds, but how would I protect the undestructable blocks?
I thought of using block pdc, but pdc isn't a thing on this ancient version I decided to use for whatever reason
Why not just have a list of locations of the blocks everyone places and then after the game ends, iterate through and delete them all
IMO it's better if you just completely reset the world but if you don't want to mess with that then that way would work too
Hes asking so that players can place and break their own blocks, but not of the actual premade map
Im thinking of like putting a persistantdatacontainer on placed blocks indicating theyre playerplaced, and on block break event check if the block has the cobtainer, let them break, if it doesnt then cancel
This probably isn't very efficient, as im not the best at this, but just like some help or ideas on how u could do it better/ similiarly. Hope this idea could help
as I said, I can't pdc
Well u asked how to get console output
I showed u exactly how
No, it's log4j
but why not just use sl4j
it is already in Minecraft dependences
just setup the build shit and done lol
slf4j is just an API, it doesn't actually do any of the logging itself
log4j is (one of many) implementations, the actual logging framework, config etc
and log4j is a Minecraft dependency as well
what event would i use to see if a hopper attempts to push items into an inventory? and can i check if it attempts to move items even if there is no inventory? please @ me with responces
however it is very easy to use and just adding a plugin that alao bundles log4j is bloating ngl
Log4j is included in spigot
imagine having multiple plugins that bundles every time the same jar
then whats rootlogger
I already told u?
where?
.
but then why use it if it is in spigot
Sorry I'm afraid I don't understand
I'm using it to intercept every message logged into console with filter
what?
im saying why use a library that includes log4j if spigot already has it
why not
why yes
for access to any the extra stuff or changes
Where am I including it?
why not
It's not shaded lol
then whats the point of it
Have you noticed <scope>provided</>
its included in minecraft
its like spigot api its provided
so it works but it doesnt bloat size
so whats the point is of rootlogger
why include authlib if spigot already has it
even though you prob need it for custom heads or whatever
To add filter to every logger possible
It's basically what name said
rootlogger
why depend on spigot at all if you dont shade the entire server jar into your plugin
pov: minestom
root has nothing to do with filtering
Tf is this dude on
root is user on unix systems with highest privileges
...
rootlogger is different
Yeah ur right
kittech rootlogger is a library
Dude is high af
root is also the way a plant attaches itself into the ground
a rootlogger is a keylogger obviously
wtf does that have to do with coding
ok rootlogger is library but it says nothing what it does
Nah its user in Unix systems
allows you to add a filter to ALL loggers
Do you know figurative meaning of word root
just sarching up "rootlogger" first result is "Root logger is the highest logger in the log4j hierarchy similar to Object class in Java."
i didnt even have to search up what it was
just the word rootlogger
it has multiple meanings
in general though its the base level of something
for the plant its the base of the plant
in unix its the base admin account
Can someone help to do a ffa plugin
for this its the base of the loggers
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!
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/
E
what's the oldest spigot version that would support this plugin.yml feature?
am i able to set persistent data in worlds? in 1.20.1
yes
yes
tganks
Bukkit.getWorld(worldName).getPersistentDataContainer().set(new NamespacedKey(plugin.getPlugin(plugin.class), "plotType"), PersistentDataType.STRING,plotType);
So will that work ^
That depends on if your variables are not null
ok thanks again
You can get a location through a player, but vice versa, how can you get a player by location?
accuracy is important
if I want to copy over a certain area, do I loop through all of the possible locations and copy each?
you say me?
no
ok
I'm asking my question
a what
if you want copy zone use WG schematic
and what is that
this save structurse in file
and uhh
end you can paste this in another place
I have two coordinates
I don't have this schematic thinga
I'm asking how I copy over a whole area
oh