#help-development
1 messages · Page 398 of 1
Looks ok to me yes
i dont do http requests in the main thread lol.
That’s good
I'm not sure if update() can throw an exception but if it does, then technically it's not handled there
But the docs don't say that it does
So i think you're ok
.get() method there throws an Exception.
but i am throwing the exception anyway, to worry about later.
Yeah but only if the future is cancelled or it completes exceptionally
It will probably throw one if he’s rate limited
True
Only if you smash it super hard.
^
you could implement your own caching to avoid the rate limit
but, in most cases, it doesn't come up
does the server not cache on its own?
whenever a player joins?
can i not use that?
it does
how do i get it?
According to google. 600 requests in 10 min is their limit.
that is so little.
there is 2 rate limits depending on what you are doing
yes; you can modify your code a bit for that
600 is for player lookups, and then there is another for general API
i assume server stores a player username because it also has to store stuff like player statistics?
Its mojang's?
Yeah
does the server not load it when it boots up?
May use namemc
public static String getPlayerUsername (String uuid) throws Exception {
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(uuid);
PlayerProfile playerProfile = offlinePlayer.getPlayerProfile();
if (offlinePlayer.isOnline()) {
return playerProfile.getName();
} else if (playerProfile.getName() != null) {
// server had it cached
return playerProfile.getName();
} else {
// have to request it
CompletableFuture<PlayerProfile> completableFuture = playerProfile.update();
playerProfile = completableFuture.get();
return playerProfile.getName();
}
}
Don’r think so @quaint mantle
I think there less limits
Hm? Maybe idk, i just took what google and wiki.vg said
oh.
the server caches it?
ok.
it saves it in the world data yes
i just randomly tossed in a uuid.
of a player that possibly never joined the server, ok then.
if they never joined the server ever, it will request every time
the server only caches it if they join once and leave
i dont think i need data of players that never joined in this case, so just the offline player object might be sufficient actually.
👌🏻
yea if they have joined at least once you shouldn't even need to worry about the profile. data should be in OfflinePlayer
iirc OfflinePlayer.hasPlayedBefore then you can probably check there data
can anyone look into my thread. im trying to resolve the issue since yesterday #1081219497140158485
How to remove recipes?
All or some?
some
?jd-s
RecipeIterator#remove
thanks
What's the best way to edit .jar plugin file? (add more function, edit public, private etc...)
get the source
recipe remove when reload?
This falls under the section: You can but your shouldnt
I'm not sure what you're asking
when server reloading then my custom recipe delete
How can I add sections in IntelliJ to like group pieces of code so it's more organized?
You speaking about packages?
or just visually?
In the tree view you can Show Members
Like I want to group different methods in the file itself
Ah fair
I can fold everything and move it around
am i correct in saying an srv record for http/https is _xmpp for server, _tcp for protcol, 10 priority, 5 weight, port, target domain
There's also Editor > General > Appearance I believe
Look for 'separators'
Prio on http is rarely used
Also not all comm protocols need srv
What is this for?
And what do you need xmpp for then?
classic 😄
why cannot my opponent execute commands still after i leave the server? https://paste.md-5.net/bapebamane.cs
because you remove both the payer and target from duels when either dies or quits
am i not understanding my code?
umm
wait when i do return; in CommandPreProccessEvent it cancells?
Duels.requests.remove(player.getUniqueId());```
public void onCommand(PlayerCommandPreprocessEvent event) {
Player player = event.getPlayer();
if (!Duels.requests.containsKey(player.getUniqueId())) {
return;
}
DuelRequest request = Duels.requests.get(player.getUniqueId());
if (!request.getIsInGame()) {
return;
}
event.setCancelled(true);
}```
um no returnign shoudl not cancel
if (!Duels.requests.containsKey(player.getUniqueId())) {
return;
}
so it wouldnt be cancelled right?
whats wrong
if they were correctly removed
when i removed the uuids it does not contain
didnt i?
^
hm?
bothrequest.getIsInGame() and Duels.requests.containsKey(player.getUniqueId()) is true in your onCommand if they can;t issue commands
yeah
but why
didnt i remove player's uuid from requests?
ill do some debugging...
did you? I see a remove but no clue what is behind the code you've shown
add debug so you can see
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
Block clickedBlock = event.getClickedBlock();
if (clickedBlock == null) {
return;
}
Material material = clickedBlock.getType();
boolean interactable = material.isInteractable();
player.sendMessage(material.toString());
if (!interactable) {
player.sendMessage("test");
return;
}
player.sendMessage("test2");
}```
Hello,
I wrote out this little class for my 1.19.3 server but it keeps saying "test" even though I click on levers, buttons and doors.
I also print the Material and it states that I am clicking in levers, buttons and doors yet it returns "test". Which means they are not interactable. Why could this be?
If I click on any other blocks it also presents me with "test".
In the documentation it states that it should work for the purpose I want to use it for, but I might've missed something?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html#isInteractable()
everything is interactable (as i know)
Is there a better way to locally organize a file? I collapsed it all to be sendable here
um use camel case for variable namesMaterial Material = clickedBlock.getType(); boolean interactable = Material.isInteractable();
It's like 300 lines long
boolean interactable = material.isInteractable();```
Hmmm but the documentation states it's only for chests/ovens etc. Are you sure?
no im not sure
but cannot you interact on blocks?
Ty I forgot to apply camelcase indeed, however this wouldn't fix the problem I assume :o ?
Hmmm for example I do not understand how you would react with Stone as it only has one "state"
where are you displaying that message as it's not in the preprocess
i added it
this code is yesterday's
wait ill upload you latest code
might be helpful
there was no message from the PlayerQuitEvent
wdym
oh right
ill add debugging
ill just print target's and player's uuids on both events
i think that l be enough
i think they arent same
QuitEvent isnt executing at all lol
I've implemented this yet the issue still persists hmm
issue was in this statement. one "!" missing. wasted 2 days. lmao
Can you get the ChatColor of a display name on an item using ItemMeta?
why didn't you use debug messages from the start 💀
does anyone have an idea?
I also noticed that if I click on new blocks like deepslate it sends me that it's "AIR"
missing API version in plugin.yml?
yah could be it
do you happen to have an example line?
api-version: 1.19
no idea what you are actually asking
add a random offset?
loc.clone().add(random, 0, random)
then get highest block
because when altering the location you may be inside something
create a method which takes a location and returns a cloned location plus a random offset
you can do all yoru safety checks in there
Man, updating a hologram still requires the player to reconnect
I wonder if maybe a good solution is destroying the current hologram and spawning a new one...
Seems like a big waste
Or, removing the lines and readding them without deleting the object
I got a tutorial for packet based holograms if you want
Man, up to this point I was using DecentHolograms as a dependency
It doesn't seem terrible to implement my own but...
Well DecentHolograms is not bad. They support updating lines on the fly.
Well, I'm trying to do pages with DH
And I just can't
It just won't update unless the player doesn't reconnect, so I assume, unload/reload chunk
DecentHolograms.update iirc
I've done all 6 different versions of it
hologram#update
hologram#updateAll()
hologram#swap
DHAPI#updateHologram
It just refuses to update unless reconnect
When I say update, I mean, change the page
There is still the possibility that you update the wrong hologram
So alternatively, I can just remove all the lines
No, impossible, using the same object
Hm
I checked the data for the hologram too
And it contains 2 pages, and the swap actually does execute. and it does swap. Only updates for the player view when I reconnect
?paste
These are my test cases
I've tried 20 things before that
Even thought it was a delay issue lol
Like I said, the page changes for the user view when I reconnect
Hm let me test that out
Ill just read the api real quick, all good
I wanted to add clickable holograms sincde it's literally done in 1 up to date plugin but I thought about a good workaround with just the 1 hologramClickEvent
Well their api works like a charm...
Really only a few lines
Wait... they even have native page support
Yes which I did use
Now I wonder
Is it better to implement my own
Or, is it worth it
DH is so used,
is there a way to compile and launch minecraft at the same time just like with modding?
something does not seem to work and i keep having to just compile the jar, stop the server, copy and paste it, start the server again, join the game, and keep doing it over and over.
it is kind of making me sick.
HD is more widely used
especially when debugging stuff that requires a lot of trial and error.
but I hope that people do switch to DH as it seems a lot better
yes you can start a server right out of your ide but not exactly sure how
?bing it
Bing your question before asking it:
https://www.bing.com/
bing?
bing.
bing?
this is painful.
no
its a configuration, no specific build tool needed
Bing your question before asking it:
https://www.bing.com/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
who the fuck cares
Hey im having a little problem, with my crate plugin. So atm im making a check if a player quits the server, but if there isnt anyone to load the crate stuff it does not work. But if there is a player to load it it works fine.. How would i fix this?
If that makes sense
Ask the Bing AI how to do it
is the ai actually good?
it's ChatGPT but connected to the internet
well it doesnt. do you have any code?
so it's actually godly
it is?
yeah
CMI's hologram implementation
and isn't as censored
You can not operate on unloaded chunks unless you force load them
Why do you need a player to load anything?
It's the only one out there that has clickable holograms which is updated. Was just wondering how they do it
can it write code and do math like chatgpt?
it literally is chatgpt
Well if i leave without loading the chunk it wont remove the stuff, but if there is a another player it removes it..
oh no i am already distracted.
kinda hard to explain
you can give the chunk a pluginticket so it wont unload
add a plugin chunk ticket until you have finished with the chunk
and once you removed the stuff remove the ticket
listens to click entity at entity
Either way, DH only supports single action per hologram and HD doesn't support any
because they use armor stands
Imma try that
That's not the issue tho
Because I wanted clickable buttons
There is probably a more resourceful way than keeping the chunk loaded.
For example remove the stuff the next time your chunk is loaded.
I wanted to have clickable stuff in the GUI like CMI does it ( Apologies for the terrible example )
You need click boxes and then work with vectors on those boxes.
The boxes can be accomplished by packet based invisible entities.
See but I don't think it's worth doing all that
*Because click on air are not registered
But how has no one done it
I got that in my personal lib 😛
Why out of everyone, cmi is the only one to have it
Ok that's just toxic
Leak 👀
You need click boxes and then work with vectors on those boxes.
The boxes can be accomplished by packet based invisible entities.
Is there a way to make a single onPlayerQuit. I use player.isOnline, and if the player isn't it removes, but this wont work if there isn't a player loading.
But if i try making a onPlayerQuitEvent i can't register the armorstand and all that.
I'm still gonna implement my own like in your guide
whats your end goal
Do you use CF in all your plugins smile?
all that you have asked can be done in the quit event
Well i can't get the armorstand unless i make if(!player.isOnline()) or how would i do that?
that question makes no sense
in the quit event the player will still be online
and there is no reason you can;t get the armorstand in the quit event
Okay so i have a armor stand. If a make a quit event i need to add
stand.remove()
But i can't if i dont have the stand?
then get the stand you want to remove
onPlayerQuit(stand); Like this right?
no
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming. https://media.discordapp.net/attachments/694661573125472256/998143126373941248/6n0v4g.gif
PlayerQuitEvent
Seems like it. No offense
ok bye, end of support from me
but i would still need to send the stand from the animation event?
and for that i need ìf(!player.IsOnline) in alot of places
You would need to pass it yes. You can not pass it to your eventhandler in the parameters
?basics
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
i know i know
no you don't, your questions are crazy and unrelated
How would i add it in a single place then.
you must already have yoru stand referenced somewhere
Yep i do
so you fetch that in your quit event
oooh
fetchign the stand has no relation to wether the player is online or not
best way to create custom inventories with cancelled clicks? for some reason when i did it with the oninventoryclick event and cancelled it, it create duping methods all over my game (might have to do with viaversion idk)
I like InventoryHolder based inventory designs
hi
how do i prevent it from glitching like previous times
I like an inventory Map<Inventory, Consumer> design
i am doing it for all my inventory GUIs, what do you mean?
Well, its hard to state the exact source of your problems without having any code to look at
ill provide some soon
Consumer which takes what exactly? Just curious
event
nvm, i am not familiar with the ? commands.
on this server.
i used a system where i put a custom tag on an item and just if u click any item it checks if it has that tag and if it does it cancels it
Consumer<InventoryEvent>
why did those idiots at mojang not just specify "tag": "coals" instead of giving me an unexpected array that breaks my parser
Why not :)
Ah okay
also wrapping a json object was a bad decision but atleast it looks cleaner
Fourteen I have an idea which might sound crazy
cuz im parsing an array of objects, not an array of objects and other arrays 💀
You shade in entire nms jar
So ingame you can send titles to players using /title command, and this covers titles, subtitles and actionbars.
/title <targets> (title|subtitle|actionbar) <title> /title <targets> times <fadeIn> <stay> <fadeOut>
Does anyone know how to send actionbar messages to players in spigot? I can only see methods for titles and subtitles.
And use its recipe classes instead of writing ur own hehe
uhm
Player::spigot
Then Player.Spigot#sendMessage(ChatMessageType, …)
still should have a minestom impl of the recipes, id rather use the nms recipe parser if that even exists
just lemme have fun lol
I was just joking a bit, cause their recipe classes kind of are coupled with other nms stuff
:>
heehee
are you making a minecraft mod?
nah, working on a server impl
@lost matrix Do you have any premium plugins?
Nope
He doesnt, but I bet he can turn Survival fly crystal into one, once it becomes actively developed on again
is that stuff thinking im on linux or what
Why have you decided not to make any with all your knowledge smile?
Premium plugins are effort taking
dont get me wrong, you can probably have some fun and earn great deal
He has the knowledge though, he could easily make one
I wonder if there's another reason
do you ever get an error that does not make sense no matter how many times you look at the code?
error at line 150 when my code has only 120 lines
you what?
That shit trolled the living soul out of me
why are you working with bytecode?
Ehm, cause nms stupid
nms?
Native minecraft source
How about you work a bit on your abc-formular solver. Make the script available inside Spigot and give it a 9.99 price tag.
Gonna be a hit.
yep.
Mnay reasons to use bytecode. Code inection is but one. I did a lot of it on teh game Neverwinter Nights
Lmao, in Skript also?
imagine having as much money as mojang and microsoft and still make struggle to make a good block game.
Very yep indeed
Its python. Thats basically scripting in my books.,
I think some limitations lay within the language of Java
I was expecting my javadocs and source code
But that will as time goes fix itself
Tha fak? Where is this from?
Fr
minecraft, a billion dollar game, owned by a trillion dollar multinational corporation with probably like 1000 employees working at mojang, all for a block game.
Premium plugin potential
still so terrible.
O shit, Eclipse user
probably not even too good.
I want this deleted but i dont know how...
Yeah, I feel like it would be cool if they developed a load balancing server software
And change description and title to "delete please"
Cause then people could have horizontally scalable servers
No, that’s a fine memory
Dont u dare
you could use nginx with bungeecord.
not sure how you are gonna get the players to sync up.
Sorry but bungee isn’t that… well, ehm, scalable
so it took a bit since i deleted the code and had to remake it, but here it is
?paste
Its fine tho
heres the code (the inventory and the event):
https://paste.md-5.net/cezicayelo.java
The issue is that it kind of works but sometimes i can both grab the item out of the inventory but also have it on my cursor, also then on any other inventory it just kinda makes some items dupeable. prob the even registering twice or smt
but you could use nginx though.
So that’ll just be involving redundant layers
What for lol
or any other reverse proxy i guess.
What does nginx accomplish in minecraft server
Yea
xd
it load balances.
^
Also yes
Redis could be quite necessary
(Presupposing its correctly configured)
Yea, and for message broking, probably rabbit?
Actually, it might not even be worth using rabbit
there are better message queues probably than redis though.
Just a simple socket
is this a json comment lol?
ive probably been doing too much html
is this an issue with via version?
it wouldnt surprise me if gson would load the comment into the json object too 💀
Yes
also why does my intellij sometimes take up 60% of my cpu and then freezes, any1 know that here?
because it is written in java.
just make sure you are not running background tasks.
Yes, redis wasn’t really intended to be used as a message broker, like its suboptimal because it sort of uses a hack implementation wise regarding how it deals with the messaging concerning the cache specifically (Hack might be the wrong word, couldnt think of anything better)
well im kinda hosting a server and a database locally on my pc, also a game
make sure maven or something else isnt running the background all the time probably.
so thats prob the problem
well the cancel works the same as before, the half duping thing is still there
i can send a video showing what i mean if it helps
Epic
man stealing the gui
How about you do this:
If a player clicks a gui -> cancel the event.
No exceptions. Simply cancel the event.
And drag is not fired if click was cancelled
Yeah good point
Wait you are checking the nbt tag of every item that was clicked? ...
alr
i can still grab items but i cant put them in my inventory anymore
oh i can
just not place
do u think its a viaversion problem
If you are experiencing ghost items then that could be caused by viaversion.
But cancelling the InventoryClickEvent will simply prevent a player from doing
anything to the inventory at all (At least on the server side).
https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/#message - With the parameter ALL Does this broadcast message to every server, or all servers except the current one?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Hello! What's the easiest way to create that 5/4/3/2/1 start Timer-Title?
?scheduling
To all players which are connected with this one proxy
Yeah, I know but, what's the easiest way
just run a task every second which decrements a timer and cancels itself when 0
Okay, I am kinda not familiar with the terminology. What does "this one proxy" mean?
There can be setups with multiple proxies. If you just have one proxy instance then you dont need to worry about that.
proxy being bungeecord
Okay
Smile, what if I give each armor stand a UUID and then check clickable with packets
The text width is too high for that
How can I get a BukkitRunnable Task ID?
Ah makes sense
Man
So let me get this straight smile
You get the middle of the hologram on click
And then use vectors to see where it clicked
Wait, and how am I supposed to handle the situation when there are multiple proxies? Does this render the BungeeCord messaging channel useless?
no no no, do it like this: java AtomicInteger countdown = new AtomicInteger(5); Bukkit.getScheduler().runTaskTimer(plugin, task -> { int time = countdown.getAndDecrement(); if (time == 0) { task.cancel(); return; } // broadcast }, 20);
If you are at that point then you will have a custom solution for that.
I for my part dont use the messaging channel at all. Everything is done
via Redis topics. But you wont run into that problem. Multi proxy setups
are a bit more complicated because you need a load balancing strategy and whatnot.
This pins the scope of your atomic to the lambda context. At that point i would def either create a concrete or anonymous class.
singleton array (:
ye i was thinking about creating a class too but too much type work
Why the clown :(
new BukkitRunnable() {
private int counter = 0;
@Override
public void run() {
if(--counter == 0) {
this.cancel();
}
}
}.runTaskTimer(this, 20, 20);
Something like this
var count = {0} hmm
How did redis come into the conversation?
apache MutableInt is also viable.
Didnt that get yeeted
😦
IntSets.Singleton lol
Or you do this and increment the counter via reflections
Object obj = new Object() {
int counter = 0;
};
XD yes but then you dont need reflections
Yeaaa
oh vars on class level arent working
Well, okay, what I want to achieve in pseudocode ```onSomethingHappened() {
Broadcast a message to every player on the server;
if (BungeeCord is enabled) {
Also, broadcast this message to every player on all other servers as well;
}
}
Alright i think this is the best solution:
var veryNecessaryVar = new CraftWorld(null, null, null, null) {
static transient volatile AtomicReference<MutableInt> counter = new AtomicReference<>(new MutableInt());
};
new BukkitRunnable() {
@Override
public void run() {
if (veryNecessaryVar.counter.get().decrementAndGet() == 0) {
this.cancel();
}
}
}.runTaskTimer(this, 20, 20);
if bungee -> broadcast on bungee
else -> broadcast locally
Wouldn't a CraftServer instance be better than a CraftWorld?
Why is this so different to just doing
int counter = 0
What's going on there that is different
It’s a joke lol
Ok bro I quit lol
the variable must be effectively final, since it gets mutated inside the lambda
I was actually so confused
Damn, that's inconvinient
Why?
could alwyays create an anonymous Consumer<BukkitTask> with that field
but uhh a record?
Cuz it will require me to redesign all architecture of my plugin
Well, anyways, let it be
I just had hope that there's a simpler way
Hi. I want to have entities(mainly armorstands in invisible which just display some visual things like a specific head). Is this gonna be realistic to be performant? And if yes, how would I minimalize the performance needed?
Note that this is a massive amount of entities, like 50-100 per chunk on a populated chunk
@EventHandler
public void onPlayerJoinEvent (PlayerJoinEvent event) {
Bukkit.getScheduler().runTaskAsynchronously(ChunkClaimsPlugin.getThisPlugin(), () -> {
new TrustedPlayersData(event.getPlayer());
});
}```
private static HashMap<Player, TrustedPlayersData> playerDataHashMap = new HashMap<Player, TrustedPlayersData>();
public TrustedPlayersData (Player player) {
this.player = player;
playerDataHashMap.put(player, this);
}```
it returns null when i tried to get the TrustedPlayerData object for the player key.
no way.
i forgot to register the event handlers.
i have been fiddling with this for a while now.
and it was this simple.
bruh.
i just tend to run things asynchronously.
There is no reason to run this piece of code async
whenever things dont need to run on the same thread as the game.
Nothing here is blocking
Async == performance 
is it not?
as long as you have the cpu cores/threads maybe?
i know it looks like a few lines of code there.
could probably do it on the main game thread but i just did it out of habit i suppose.
With making .put method async, you get exactly 0 performance boost
why?
Because... put is not blocking, it runs nearly instantly
blocking?
Yeah blocking, like network and io operations
meaning it already branches out into a separate thread on its own?
without me having to put it in a separate thread?
No lmao, it's just cheap operation
ok.
No
ik it might not be if you dont have threads available.
The overhead of feeding it to a thread pool which eventually runs async is bigger than the operation itself
async != multithreaded.
is it really?
yes
IO is recommended to do async because it's a blocking operation
but inserting data to a hashmap is not
Unless you're pairing that data with IO
which is odd
In that case, I'd use a ConcurrentHashMap
then.. is there a point to running stuff async?
javas concurrent package is godsend
Yes, for blocking operations
and that is it?
Disk io and network requests mostly
Heavy operations that can be multi-threaded too
For example making chunk snapshots and parsing millions of blocks
yeah i use it for that kind of heavy operation.
clearly inserting data into a hashmap is a heavy operation
regardless
If you actually want to do such crazy operations
The CompletableFuture class will help you
And before you decide to use other threads anything other than IO
Do a lil benchmark and see if the result is acceptable enough
as in
"if I run this multiple times will the server absolutely die"
and
it technically might be though. Probabilistically as well.
uhh no
CompletableFuture's run Async right?
So I can use Thread.sleep?
Noo pls
No guarantee if the thread pool is exhausted
If you want to use it, you are most likely doing smth wrong
Pretty sure you can just make executors that have a delay
Im waiting for some instance to be avalaible
HashMaps don't really promise O(1) lookup though, do they?
Doesn't complete just blocks the thread?
nope
its asymc
in that case it might be better to use async operations?
it's not async
you're still doing a while loop n the same thread
you're just... returning your instance as a future
which is braindead
I meant not CompletableFuture#complete im using #get to finish the task
Yeah, cf.comolete just blocks the thread until it's finished
not just that
logback gud or nah?
the while loop is a busy-wait type deal
like so
oh hell naw
Lmao
You can as well remove the CompletableFuture here and just return the Duel. Same effect.
but then the Duel won't have its Instance ready
I see that most guys here need coroutines 😂
Your code works exactly the same with or without a CF
Also have this code attached to it
Will it wait for confirmDuel to finish its execution before executing the rest of it?
you just have you completablefuture code wrong
the way u have it setup will still block the thread
Yes, it will block thread, no reason to run it async then
This will just block and wait for your method. No difference if you just return a Duel right there.
Then how shall I rework it, so it doesn't block the thread?
You can't just "return" smth if you are running code async
.
I mean bare result, not wrapped in cf
run a callback function.
That is not exactly return
yep.
this is one of multiple ways it can be done. just apply it to your implementation
reworked it like so
hope I got the point right
edited the CF guide to be a bit more explicit about errors
looks good from a quick look. can only go and test it eh ;s
would be lovely to have that on the spigot wiki
welp the problem is, I don't have a clear way to test this
so I just have to hope it will work fine
Sure
awesome :3
Any place in specific?
what is AFO assigned to?
Arrow For One
a minigame
under plugin development I reckon
i c
how tf
ehh it doesn't look that good
hmm, I can try to make it look a bit nicer once im done with my valo game
ye
there
dang ur coding valo? What a guy!
lmao
guys
i need help
io.netty.handler.codec.DecoderExepction: java.lang.RuntimeException
some nbt storage shit
cant join my own server
ill send the full error message rq
💀
Just click anything
You want me to click the cloudflare link?
tf I just clicked it myself
Oh now im in
Look at what it is
bruv the the text is so small i cant even read it
Too old! (Click the link to get the exact time)
Open the link
.
I still don't fully understand wtf it is after reading it
I think it's a sort of fork
it is
quaternions more like cringetornions
Ok but what does it do? What makes it worth 50 bucks...
xD
Just on 1 website it has 500 purchases at 50usd each
No clue that's what I'm trying to figure out
Like wut
Solid
What can possibly be worth even 50 bucks
Which, might I add smile
Read the one that says enterprise monthly, on the right side
So its a pure 1.8 fork which makes working with this version bearable
It has even more features
Meh
Is there a way to make vehicle?
How can I detect player moving and move the vehicle?
tf am i looking at
looool brush
I have no clue either
So it's a mix of paper, spigot, taco and their own
let them have fun ig
I just stumbled upon it and was hoping maybe someone here had heard of it before and had comments
pretty sure all the old faction servers used stuff like this
mainly for tnt cannon fixes/optimizations
This this is expensive
Wut
Then, besides paying to use it
You need to get custom plugins that can actually take advantage of it
But we have asynctabcomplete
I wonder if it's up to date with optimization features from spigot/paper too
Like I bet a bunch of this stuff is now implemented into spigot/paper directly
Oh man those are some cool EventHandlers tho hehehe
All the Non-Cancellable or Cancellable Events!
Error:
https://haste.limeserver.cloud/ofofuvojar.sql
plugin.yml:
https://haste.limeserver.cloud/cohabavega.http
what did I did wrong?
?plugin.yml
dang it works
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous names and nicknames of a member.
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
No
switched it to an exception and it works lol
still looking for a way to remove a path from a directory stream tho
?
what would this be in kotlin?
for (int x = -radius; x <= radius; x++)
this does not work ("For-loop range must have an iterator() method") and looking it up doesn't show anything useful:
for (x in -radius..radius)
a double
damn when from 545 to 824 recipes
?
adding step 1 doesn't change anything either
ah
wait
this works for some reason
private fun trampleCrops(player: Player, radius: Int) {
for (x in -radius..radius) { ... }
ye cuz its an int there
why can't i do it with doubles
how would you loop from -3.5 to 4.6 for example
kotlin fun bruh
it could work that way i agree. but clearly kotlin devs do not agree
ah it's a minor inconvenience
guess i could go with a while loop if i really had to
it's ok to use int for me now though
tyty
Guys how do i fix this: io.netty.handler.codec.DecoderExepction: java.lang.RuntimeException tried to read NBT tag that was too big; tried to allocate: 2097181 where max allowed: 2097152
i cant join my server
why would u even need to loop between 2 doubles values tho?, cant rlly think of a scenario i ever needed that
well i go through all blocks in a radius
in this case yeah it could be an int
you have an item in your inventory which is way too big for the server
most likely a book and quil bomb
because blocks are 1 block wide (makes sense)
yea
but what if they weren't
what version?
Heyo, anyone know how to setup bungee cord? the youtube videos arent telling stuff
what if they add horizontal slabs someday 😳
no its nbt chest filled with shulkers with swords and i cant rejoin
1.16.5
probably #help-server
i would want that
then i imagine you would just make a choice, either include partial blocks, or dont
oh mb
Can somebody help me?
Error: https://haste.limeserver.cloud/biquwuroha.sql
plugin.yml: https://haste.limeserver.cloud/cohabavega.http
theres way too much data on it the server cant handle it
but how do i fix it so i can rejoin i know the problem
you pretty much have to either delete your playerdata or modify it so you dont have that item stack
i deleted my playerdata
mb add something to your command declaration?
while the server was running or offline
description?
like, description: ""
offline
you should be able to join
cant a bunch of other things potentially contain this nbt tag @remote swallow ?
for the command decl
not one that big
no i cant
isnt playerdata u just delete the one file that has ur UUID
did you delete both uuid.dat and uuid.dat-old
Doesnt work either
you compiling utf8?
my full UUID: 5e970a62-309d-46c3-be43-3002bdd1c1ce
show your plugin.yml again plz
author: Lukas
version: 1.0
api-version: 1.19
main: wtf.pastix.Main
commands:
setlocation:
description: Command to set Locations.```
invalid CEN header (bad signature)
in world/playerdata delete 5e970a62-309d-46c3-be43-3002bdd1c1ce.dat and 5e970a62-309d-46c3-be43-3002bdd1c1ce.dat_old
compile utf8
i didnt have the uuid.dat-old i had the uuid.dat and another one wich i forgot
ok
probably this could help you
deleted them what do i do now
restart
do i start my server?
yes
ok
well now my playerdata is gone but i can play
not much else you could do
but luckily i had a stash where i saved my coordinates wich my e cheest only had items that were in the stash too
cause i had a massive area where i duped shit
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:166) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
maven or gradle
maven
in the properties tag add <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
is already there
that makes it weirder
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>wtf.pastix</groupId>
<artifactId>limeserver</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>Lobby</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>minecraft-repo</id>
<url>https://libraries.minecraft.net/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.3-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
<version>1.5.21</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.10</version>
</dependency>
</dependencies>
</project>```
where can i download bungee cord?
oki
Is bungeecord open source ?
I dont think so
https://github.com/SpigotMC/BungeeCord isn't that sources ?
job not jobs
ah
Its open-sourced
this would work for 1.16.5?
yes
yep
Ew, pterodactyl
bru
There is a Pterodactyl egg for Bungeecord
Eww
oki?
use this instead
man
finally got my quaternion rotations to work
all this because I was too lazy to draw a basic graph of what my issue was
what a waste of time
I wasted hours over hours on that and then just decided to use matrix multiplication shit lol
md_5 has a very interesting code style to say the least
if it was just a rotation I'd be fine with it but I needed a shortest arc quaternion solution
Im actually getting eye-cancer when seing brackets in the next line like in cs lmao
+1
also my issue was that I just forgot to apply the translation
and the spaces after parentheses
so it wasn't even the quaternion
it was me forgetting to transform it back to world values
Bruh
uh
im making a simple ring particle around the player, which should i use?
I got the rotations running but iirc the next problem is that its getting desync because the client has some weird shit to calculate player model rotations when the player is moving
check the api, they have different ways to color the particles
I think
Even reversed the client to find all the shit for body thresholds etc lma8
particles are a pain in genral
Agreed
yea one uses TransitionDust options and the rest use DUstOptions
but what is the difference between blockdust and fallingdust
yeah player rotations seem to be hit and miss
I was just rotating abstract cuboid rays
but hey
now I have proper rays implemented into my custom scripting language
in minecraft it just combines block_dust and falling_dust into one
they have a hitbox and aabb checks against the player hitbox
Im doing raytracing with it, I know the pain man
it's called gaming we do a little gaming
But movement keeps desyncing my boxes =(
yeah mc isn't exactly the most accurate game with that kind of thing
h
Well its just the client showing the model by calculating a lot of weird shit with movement and so on
Im syncing an exact hitbox with player limbs to the actual VISUAL model of the player
I do somewhat wonder why it is that sometimes modelengine decides that accurate rotations are for losers and makes my model parts fling off to the next postal code
lol
I think it has a rounding issue or smth
Since when does modelengine work for players to animate???
I wasted like 20 hours researching on that
I mean you can cheat them in pretty trivially
Gotta def. look on that someday
I don't think there's an "official" guide on how to do it but the theory of it is real easy
Have you figured how the movements affect the player model yet?
if u want textured dust u use block dust but if u want colored dust u use falling dust
sigh
just make a 1:1 model of the player, get the player skin, project that skin to the model (make sure you uv map it right ahead of time) and then whenever you want to run a custom animation just make the player invisible and spawn an invisible stand-in to pretend it's them and have that run the animation
because the client seems to have some formula depending on the camera, velocity and direction
never cared to look too deeply into it
Oh I did, at least I tried to lol
modifying the players is a pain, you can hardly ever get minecraft to smoothly play along
Its such a massive rabbithole you literally wanna jump out of the window
I guess I've implemented artificial hitboxes but man this is one hell of a first implementation of these
I actually got ALL the basics of syncing the model
And that with exact ray-checks and also with exact body-part detection
But movements? Yuck
How the heck does this garbage work
event.getPlayer.damage( 10 );
when I do this it does 5 hearts no matter what armor
How do I make it do "natural" damage where it's not just changing their health by 5 hearts
do I have to check for armor levels of the player?
Call entitydamageevent i think
hi , iam remaking my kit system , and i was wondering if i can use NBT library to check if player have a kit ? or ?
guys why does the enchantment limit cap at 255 instead of 32k
has it something to do with 1.16.5 or spigot
255 would indicate it's a byte index
Because Mojang decided to use a byte and not a short
im trying to make bows on my server but for some reason when you shoot the arrow just goes straight throuh the person... hitting ppl normally with hand or melee weapon works but for some reason bows just shoot right through ppl anyone know how this could've happened like certain code I might've accidently used or a spigot setting or something that I coulda used to mess this up?
Sounds like you might want to share your code
yea but I have a lot of code
I can show u the part where I handle damage events and stuff ig tho
Github 
can i change the cap to 32k instead of 255 somehow
https://hastebin.com/share/emiqiwemiq.java this is my whole damage/death event stuff
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
I have a custom hp system for rpg game
That's a 400 line event handler
ok
wdym
oh u mean + damage instead of enchantment?
just add lore and check if it has lore then do whatever custom enchant does if the item has that lore
No, you can make your own custom enchantments
how
whats the command
There is no command for it. you have to make your own plugin
You need to extend the the Enchantment.class and then use reflection to force bukkit to register your enchantment
👀💀
huh
just use lores..
Sidenote, doing so is 100% unsupported
Terrible way of doing it
but yes, it is
What
Don't detect items by name or lore 💀
Oh
No please, never check things vía their name or Lore, it's the worsg thing u can

