#help-development
1 messages ยท Page 133 of 1
okay, but i need it to remove pack from another proxy server
i want to remove pack from another server connected to proxy
in lobby
then install your plugin to remove the pack on the lobby server
i don't understand your question or what the issue is
if i connect to lobby on subserver with custom rp i still have it
Remove it before they switch servers
Or just send an empty one when they join the subserver
indeed
but how?
there's no pack remove packet
Player#setResourcePack
Sam told you how
that's why I said to send an entirely empty pack
Hi, how can i get all the files under a directory?
so i can't do it other way?
no
okay, thx
File#listFiles or something iirc
ty!
what is exactly reason for Bukkit.getOfflinePlayer being deprecated ?
what can i do if i want to get player by name that currently isn't online ?
it is deprecated because there is a lot of functions that don't work due to player being offline
is it ok if i just want to get its uuid ?
you would need to lookup their UUID, if they are in the cache or playerdata it will retrieve their name
and you should be able to do that from offlinePlayer
yeah, was looking for that, thanks
you can cast offlinePlayer to Player just fyi, but don't be surprised if things don't work just have to be careful lol
You don't even have to do that. getPlayer() does it for you 
How can i do this, i don't understand...
You could also store the inventory instance
You should hold the inventory instance, or InventoryView
The beauty of Maps with int values
You're calling #get() on a Map where the key doesn't have a value
int value = map.get(key); will throw an NPE if the key isn't mapped because it will auto unbox. Solution would be to use Integer value = // ... instead and null check that, or just check if the map contains() the key first
o/
?main :c
Also static instance variable :c
how can i put a inventoryView in a hash map ?
?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
Why do you want to do that?
to save my bagpack
InventoryHolder ?
hmm. i can put this in a hash map ?
Yeah
and the Inventory have all contents ?
yes
you replace the folder Files.copy(rootFolder, Paths.get(updatesFolder.getPath()),
You do know if you download your jar to a folder called update in the server root, the next restart it will be auto copied into the plugins folder
Be patient, if someone knows how to help, they will, we're not getting paid here โ ๏ธ
You alreay have the code just specify the other folder
?paste
there a better way to do this
cuz it should work but i feel like im being really stupid
how can i get all the keys and values in a pdc?
u cant since namespaced keys are unique to whatever set em
u can look at the data tho
/entitydata iirc
what if i get all the namespaced keys using pdc.getKeys() and then i do a for loop and get all of the values?
u cant
or rather
u cant access all
im unsure if you can loop through the internal keys, but you definitively cant loop through the keys other plugins have set
oh no i didn't need to see other plugin ones
yea that should work
honestly you should try it instead of asking here
probably faster
okay
i recommend just printing out the namespaced key's names to either console or chat to check
whats the code to convert a resource into a fileconfiguration again?
You probably want to convert it to a memory config instead
ah thats annoying
my codes using fileconfig
also
its supposed to read in actual configs later
this is temporary so i dont have to edit stuff in two locations
Okay bukkit was designed by a moron
Yaml configuration extends file configuration, but can be loaded from a string through https://hub.spigotmc.org/javadocs/spigot/org/bukkit/configuration/file/YamlConfiguration.html#loadFromString(java.lang.String)
wat
so i do that file thingy that gets the inputstream as string and pass it to that?
that sounds wrong somehow
Nah
How do I add string in config like this from config?
I know I wanted to use this: but wouldn't it appear like this?
YamlConfiguration cfg = new YamlConfiguration();
try {
cfg.loadFromString(new String(getClass().getClassLoader().getResourceAsStream("myresource.yaml").readAllBytes(), StandardCharsets.UTF_8));
} catch (IOException e) {
System.exit(-7643);
}
Can I ask what does -7643 means?
whats that exit code
After Redhat filed JDK-29456 the exit code now only lets the JVM explode
You need to change the getClass() to something else then
Sadly there is no easy way to get the caller class of something
dug up some old code
public InputStreamReader getResourceReader(String filename) {
return new InputStreamReader(getResource(filename));}
private FileConfiguration getBakedConfig(String configFile){
return YamlConfiguration.loadConfiguration(getResourceReader(configFile));}
basically identical
yea but it works in a static context
new File() will give you a handle to teh servers root
it doesnt
You can just change getClass() to SomeRandomClassWithinThePlugin.class
Class.forName(Thread.currentThread().getStackTrace()[2].getClassName())
dunno what world ur in but it loaded the config section
unless it returned null
no error at least
Well those method are not static
not sure why you are dead set on needing it static
cuz i have a separate handler class
which in turn aint extending javaplugin so why should it be an object when its just supposed to hold methods
getResource() is as little of a static-able method as getClass() (Although frostalf did show a decent workaround)
static doesn't mean it won't be an object
there is a downside to what I showd
Performance?
and that is, it won't filter out if the caller came from the same class
you need to do some looping to filter such things out
hm yeah, but for getting the classloader of A class within the plugin it should suffice
since you have a better understanding here is what the indexes refer too
I should say might be more beneficial for you
index 0 = Thread
index 1 = this
index 2 = direct caller, can be self.
index 3 ... n = classes and methods that called each other to get to the index 2 and below.
i know but how to place them
i aint using code i dont understand unless the code i dont understand is math
I meant to some degree with "caller" - "caller of the method getting the caller"
lol
lol
getResource() does it under the hood anyways
im serious look up Q_rsqrt
HOW CAN I ADD STRING HERE?
the only other method that is generally just as efficient and sufficient to get the caller is this
sun.reflect.Reflection.getCallerClass()
oh, well I believe some good yt video explained it thoroughly
theres a difference between watching a video explaining it and understanding it
0x5F3759DF
mye I mean knowing all steps from top to bot is probably a bit much
but understanding the general concept wouldnt be too hard Id say
yep
its not accurate but generally good enough
i know what it does but the IEEE bullshit is where my brain turns off
obviously not, we even discussed fixed point vs floating point too
but floating point arithmetic isn't all that hard really and all the IEEE does is just defines a standard way of doing it, but there is multiple ways to do it
I got a little problem so in the consol it says it cannot find the class Main.java this is my main class I specifide in the plugin.yml main: me.jockerlight.addon.Main
generally should avoid calling your main class Main
second, odds are the package path you are putting, probably doesn't match what is being compiled
yeah it gives me an error when trying to compiole
generally when errors are encountered during compiling, it stops the compiling process. Probably should fix that problem first ๐
JAR creation failed. See details for additional information.
Resource is out of sync with the file system: '/SKLO/plugin.yml'.
Resource is out of sync with the file system: '/SKLO/plugin.yml'.
hax
u clearly dont belong in this channel if thats ur reaction
Thanks
@fluid river the majority of that standard is about floating point arithmetic
small portion describes how to round and interchange the data but otherwise its mainly for floating point arithmetic lol
i meant
integers also use ieee754
I calculated sum of numbers in my textbook
on my informatics courses
with direct/reverse codes
and ieee754
It was a mess
rly
get number transfer to 2 system get mantisse and exponent
Change exponent when needed
by fucking redoing entire number
for conversions, rounding and what is a valid floating point format even if you don't use the digits on the other side of the sign
add and transfer
When I use my own dependency which also runs .sendMessage
it doesn't appear on players side, any ideas why?
to different precision
but like integers don't actually have to follow 754
but still i used it for ieee754))
idk how to translate the things i learnt to english
it is only necessary for precision and interchanging
?
well as long as your machine is built for ieee754
You can't escape it
But i outsmarted machines and can do it with pen and paper
?
I have plugin 1 which is the dependency
there are some commands registered and they do some stuff and then print some message
but when I use the plugin as dependency and try to use the command, nothing happens
And yes, I have the plugin 1 in my /plugins as well with my plugin 2
i don't rly understand
humans are turing complete
If you've worked in retail you'll know that not all humans are in fact, Turing complete.
tryed almost everything the consol still says that it cannot find the main class ._.
``Cannot find main class me.jockerlight.addon.Addon'`
Remove the .java
Hi, when i do this lines :
ItemStack clickedItem = e.getCurrentItem();
if(clickedItem == null){
p.sendMessage("Clicked == Null");
}else{
p.sendMessage("[" + clickedItem.getItemMeta().getDisplayName() + "]");
}
My minecraft send me "[]" when i click on a item, but if i click on a item who i changed the name of.. its working
still doesnt work Cannot find main class `me.jockerlight.addon.Addon
How did you build your jar?
wdym
How to hide command suggestion from some players?
By giving the command a perm they don't have
yee but that will still show when typing / into chat?
How did you make your plugin jar?
I exported it in eclipse
Could you show how you did that
I cant upload pictuzres in the chat here
!verify
Usage: !verify <forums username>
or DM me
ok
I dont want to hardcode the permission into plugins.yml
what should I do except that?
Uh then figure out how to mess with spigots method. Reflection probably
ironic you mention retail, but really any industry where you have to interact with customers. Retail you tend to get a bigger variety though ๐
not sure how you have your commands setup, but the easiest way is to actually make use of sub commands
and then yon can easily implement permissions for those additional sub commands that don't need to be in plugin.yml
will so you how I do permissions
show*
well I have primary cmd with sub commands
but also some sub commands are registered via Custom Command Map
removeTutorialView removes the suggestion?
I believe it was stated that the easiest method was using a permission the player doesn't have
you stated you didn't want to hardcode perms in plugin.yml
gave you a solution that doesn't require adding perms to plugin.yml
how would i go about making a healthbar above each mob and player
But i cant get the display name of a Oak wood for example, but the item has a name ....
can you do ItemStack#toString ?
idk if it is overriden
The best way would be to use chat components
Instead of getting it as a string
Using chat components is easier on Paper
i meant something like this [||||]
like above each mob's head
and when you damage it part of it goes red
ah
then how do i do that?
is that possible without a plugin?
or no it needs a plugin
Hey, i've got a problem on my server i'm attempting to fix with a spigot plugin, i migrated from a world with the y=0 world limit to the new one, but my server is still on 1.17.1, just using a datapack to add the world height and generation features etc.
My issue here is, Maps seem to never render correctly, it Seems all the Rendered Pixels are inside the ground, and not from a normal Birds-eye view.
Does anyone know good way to solve this besides just copying the normal MapRenderer render function to a new MapRenderer extending class and changing it? Thanks
i assume it's MapDecoration not returning the correct y level inside the vanilla Map render function
any efficient way of checking if a location is in simulation distance
aside from checking if a player is in getNearbyEntities using simulation distance
https://paste.md-5.net/oyikuvotef.java so i'm trying this for healthbars, but it only updates on my second time attakcing the enemy
which is weird
af
Hello I am looking for a programmer [with payment ๐ธ ] who can help me with a project for Minecraft the project is a RolePlay like GTA 5 FiveM
The server will be in Turkish language it would also work if you leave a YML so that we can translate it.
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
Can you more specifically define "updates"?
do you mean as in the healthbar is not visible, or do you mean it only changes its value after two hits?
and does every hit after the second work?
yes it only changed after 2 hits
and yes, every hit works after the 2nd
could it be that entity.getHealth() is not with the damage subtracted?
since the event could be cancelled or changed
It would be suitable for monitor priority
(and make sure it's minimum is at 0)
?
its irrelevant rn
its been a few hours and I fixed it already
dont really know if i should ask here but i need some cool in game minecrfat sounds lol
If you have a decent mic you can always make them yourself
How can i check if a player has his inventory open?
I wanted to check if it was closed and i done it like this if (player.getOpenInventory() == null) { but it isn't working
nothing, it isn't working
oh, and so how can i make it check if a player has his inventory closed?
Me to
before tring that i will search something else online or ask to a friend, thaks ๐
^^^
using .equals(null) will send you straight to jail
is there a way to change an items max dura
anyone know what to put for the type parameter in NearestAttackableTargetGoal
nms btw
shouldnt it show a class even if it doesnt have javadoc
Try opening that class and check
needs to be LivingEntity but idk what entity to put
target type
trying to make it attack players but they apparently dont extend LivingEntity
oh i was using craftplayer
ig that doesnt extend livingentity
Use getHandle on CraftPlayer
its a type parameter
?
welp i somehow made myself immortal
ServerPlayer should extend LivingEntity. You can get it with CraftPlayer#getHandle
i did /kill and did the taking damage effect
but took no damage
ok now i need to figure out how to make an EntityInsentient like literally nothing casts to it
more a question for you why would you ever do that
lol
it makes absoslutely 0 sense
not only would you never need to do that its also a bad practice
you know I wasn't sure the answer of this myself till i just looked it up like 10 seconds ago so here is what I learned
https://stackoverflow.com/questions/4501061/java-null-check-why-use-instead-of-equals
equals throws a NullPointerException
if you want a predicate to always be true it'd defeat the purpose of a predicate in the first place
just don't use one
how would i go about creating a Mob from an Animal
stupid idea ik
but how would i make it so i can change the goals of normal creatures
yes
also why cant i get EntityInsentient imported or anything
like it doesnt show up in the ide
but its there
is there a way to change an armors max dura
or decrease the chance of it taking dura damage other than unbreaking cause that caps out at a certain point
use rng to make it less of a chance it takes durability in the durability change event ig
hm good idea
thats gonna a pain lol
should i rerun buildtools
Yes
running (Mob) ent to a LivingEntity makes this error https://paste.md-5.net/uzufiquran.log
trying to use Mob bc i cant see EntityInsentient anywhere
n -> true works
But iirc there is a singleton for such functions that maps a given set to a singleton set
For boolean values at least
Maybe it was guava or just java std
Same story for identity functions
You can use x->x
Or Function.identity()
it's possible to check if is an entity into a bounding box?
What
i wanna check if an entity is inside an area and execute a code from there
can be this
found the actual source of my pains
int var9 = 128 / var4;
if (var1.dimensionType().hasCeiling()) {
var9 /= 2;
}
Is in here somewhere else nvm, that is just max map size
hardcoded height, just unsure how to deal with this...
i'd need to reconstruct the whole function or do some sort of bytecode injection and i am not well versed enough in spigot plugin development to even know if that is actually a thing
Does anyone know a wiki or something that explains to me how to create a variable, for example I want to create a variable that contains the life of the player and that I can use that variable on my server without the need for the PlaceHolderApi? ๐ค
uh where ru doing this in? A handler, a command?
in a command to put it in an ItemStack
...
you wanna put someone's health in a command in an item?
like in the name of the item?
What I want is to create a variable that contains the life or something else of a player, nothing else without using the placeholdeapi!
Hello i need some help please-
lmao i need to know who named this
Im trying to sign up and I filled all the stuff out but it tells me That i did not complete the CAPTCHA verification properly ;-;
I'm not doing the cooldown formula right am I gun.cooldowns.get(uuid) - System.currentTimeMillis() >= gun.cooldown * 20L ๐ฅฒ
system current millis is probably never gonna be lower than your gun cooldown in ticks, so yea
its says Verification: then there is nothing there its just blank
@EventHandler
public void onPlayerMove(PlayerMoveEvent event) {
UUID pUUID = event.getPlayer().getUniqueId();
if (spawnmap.get(pUUID) != null) {
spawnmap.remove(pUUID);
event.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', "&cYou have moved! You will no longer be teleported."));
}
}
I am trying to make a /spawn cmd where they can't move and I have this checker but it triggers if they even just move their mouse. Is there a way to make this if they actually move like move over a block or around on a block or hit any w, s, d, and a keys if that is their move forward, move backward, strafe left, and strafe right key binds?
Nvm i figured it out just had to go onto a different web page
compare event.getTo() and event.getFrom(). if they're equal, then the player is only moving their cursor
uh what
what's confusing
"wololo" is what the spell is called internally lol. It's a reference to https://knowyourmeme.com/memes/wololo
so I say in an if statement (event.getTo() != event.getFrom()) in my code before I check and it'll work?
Yes, though you should use the #equals method and not the == operator
so (!event.getTo().equals(event.getFrom())
oh
why
does it make it faster or smthin?
or is it just easier to read
or what
No, the equals method is oftentimes overridden so that it works slightly different from ==
hm
also upon further inspection, it also uses yaw and pitch values, so you'd be better off comparing the x y and z values directly
My bad!
== compares referential equality whereas equals() is overridable and can compare member fields
ok
Which is why you often can't check if player.getName() == "Username"
because they're not the same instance
so this wont work?
Yeah, but this will instead
Location to = event.getTo();
Location from = event.getFrom();
if (to.getX() != from.getX() || to.getY != from.getY() || to.getZ() != from.getZ()) {
// ...
}```
ah ok
so event.getTo() in a PlayerMoveEvent is where they moved and event.getFrom() is where they moved from?
also if this is true, does a playermoveevent happen when they stop moving or after a certain time of moving for or happen when they have moved a certain distance because if it happened right when they started the to and from would be exactly the same
It's based on movement packets sent by the client, so no, to and from won't ever be the same, and it can be called as many as 20 times per second throughout the entire time the player's moving
so the minecraft client tells the server that the player using it moved?
well yeah. that's pretty much the basis of every player event.
oh yea cus u have to tell the server u moved to move im dumb
so uh I tested the code and it doesn't work
@EventHandler
public void onPlayerMove(PlayerMoveEvent event) {
Location to = event.getTo();
Location from = event.getFrom();
if (to.getX() != from.getX() || to.getY() != from.getY() || to.getZ() != from.getZ()) {
UUID pUUID = event.getPlayer().getUniqueId();
if (spawnmap.get(pUUID) != null) {
spawnmap.remove(pUUID);
event.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', "&cYou have moved! You will no longer be teleported."));
}
}
}
doesnt work. it sends me message you have moved! you will no longer be teleported even when you move your mouse a tiny bit
I canโt spot the problem. Make sure you are using the latest jar you have compiled
never seen someone do get(UUID) != null
ContainsKey
yeah just use #contains
can also just do
event.getPlayer().sendMessage("ยงcYou have moved! You will no longer be teleported.");
my IDE would look like shit if I'd use that translate & every message
Only if you are using ampersands
Or you can move the translate method into something like a colorize method which is far shorter and involves no section symbols
I used skript before this its a plugin that is like java but just is so slow
plugin that makes code easier
Itโs not like Java at all. You will have so much more fun with Java
yea well yk what I mean
u write code to change things in the server
just not rly codew
kinda like normal sentinces
There are few different approaches
You can have api( in real meaning of it), shared database etc
There is some thing called plugin channel, not sure if that is for bungee as I have never worked with it, but you can Google about it
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Oh you mean through the bukkit api
They try their best to not change things because otherwise it will break lots of plugins
So I doubt it has changed
I didnโt see a reference to armor stands changing in the past versions
Ther might be a tutorial on modifying these in the spigot wiki
How to Play Function Datapack for Players without command?
my players on the Server cant and should not use the function command. But i want to play a function for a player like the command does.
/function <functionname>:play
I googled a lot and cant find anything how to do it
I tryed using Bukkit.getServer().getDatapackManager() but there I only can get Datpacks and enable / disable them.
"TimerStartEvent may only be triggered synchronously"
Pretty clear, no?
it should be tho :/
Nope. Nothing changed in that regard.
Where is createAutoTimer called?
only when they do createAutoTimer()
new AutoTimer()
.setTimer(timer)
.setUpdateInterval(20L)
.removeTimeEveryUpdate(Time.SECONDS, 1)
.createAutoTimer();```
oh wait
im dumb
What exactly didnt work? Compiletime? Runtime?
Wrong import
What does this have to do with you importing the wrong class?
Show your imports
yes
Wait you didnt even import anything...
regarding armorstands
And why is your class name ArmorStand as well? This is bound to cause problems.
Rename your class and import ArmotStand. Your IDE should do that for your automatically.
Cool i guess? What should i make of this information?
Show your whole code
Rename the class
Then show your new code
Jep looks good. This works.
Then you fked up your pom. Or misunderstood maven.
Do you add any external jars to the project?
As a jar?
How do you compile?
How do you compile your project?
Ok good. Then all you need to do is change your dependency
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
What happens if you just clean compile?
How can one destroy his setup so badly?
Well then use 1.18 and call it a day. smh
I have this code and I want it to make a command cooldown but it's not working. I it registered in the main class. Can someone tell me why it doesn't work to make a 5 sec cmd cooldown for all of the commands?
public class CommandCooldowns implements Listener {
public CommandCooldowns(CoolPlugin plugin) {
Bukkit.getPluginManager().registerEvents(this, plugin);
}
HashMap<UUID, Boolean> map = new HashMap<>();
public boolean onCommand(PlayerCommandPreprocessEvent event) {
UUID pUUID = event.getPlayer().getUniqueId();
if (map.containsKey(pUUID)) {
event.setCancelled(true);
event.getPlayer().sendMessage("ยงcWait! You cannot execute commands this quickly!");
} else {
map.put(pUUID, true);
new DelayedTasks(() -> {
map.remove(pUUID);
}, 5 * 20);
}
return true;
}
}
wht is a DelayedTasks
wtf is that
you know bukkit has the scheduler
public boolean onCommand(PlayerCommandPreprocessEvent event) { ????
pretty sure they're doing it for any command
oh yeah it's a void
for method
but please just use the bukkit scheduler
not whatever DelayedTasks is
that is so I dont have to type out the whole thing
oh it's an abstraction?
public class DelayedTasks implements Listener {
private static Plugin plugin = null;
private int id = -1;
public DelayedTasks(Plugin instance) {
plugin = instance;
}
public DelayedTasks(Runnable runnable) {
this(runnable, 0);
}
public DelayedTasks(Runnable runnable, long delay) {
if (plugin.isEnabled()) {
id = Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, runnable, delay);
} else {
runnable.run();
}
}
}
its another class to make it faster
gotcha
What's the best way to make a selection type wand, like world edits.
So like the ability to select 1 point in the world and save it and then select a second point in the world.
I already know you get the locations from the player interact event, but im not sure how to save it
just have a map<uuid, pair<location, location>>
That was my thought, but how would I store both locations in the pair
sec
ill get you a class
@Getter
@Setter
public class Pair<L, R> {
private R right;
private L left;
public Pair(L left, R right){
this.right = right;
this.left = left;
}
public static <E,T> Pair<E, T> of(E l, T r) {
return new Pair<E,T>(l, r);
}
}
this is whta i use
how do you save the left and right side at one time?
wdym
if im not mistaken that needs both the input for left and right to create the pair, so how would I get both the input from the player right clicking the block and the player left clicking the block, if their two different events that would need to fire?
Pair<Location, Location> pair = new Pair<Location, Location>(location, null);
nvm I found a way to do it, with the way you said I dont think it would work if there were multiple people creating portals, the way ima do it just involves 1 more variable, one for right selection and one for left
I meant more so for the pair, im not sure how I would track it for that particular player, since all the info given is just the location and null
oke doke
I could just be being dumb but this other way seems easier for me to handle
yeah basically
its basically this, but a worse since its 2 maps instead of 1
question guys
Why i would like to summon armor stand with packets and not just armorstand?
i have seen people use packets for it (my goal is not to display different armorstand at same location to different players.
so is there really any reason to use the packets options
or hell nah?
using packets you can keep their movement smooth
it also means they don;t really exist on the server so less overhead.
i dont move it ...
but you have the downside that you have to update every single spigot release.
so in general there no really benefits with packets?
Depends on what you need to do with them
i will just display text above chests
like i did it before without packets
but i'm improving my plugin and optimizing somethings
so i was thinking it might be a think that i cloud change
it would allow you to display text to certain players
^
but thanks in general
AAHAHAHAH
My man accepted defeat
packets fucking confuse me
that version is almost a decade old
Well sometimes people make terrible codebases and when there's an update it's too much work and they give up
#1.19ONTOP
how can I get specific insights into plugins, like cpu usage and memory usage
spark
It has a build in profiler
ew that means I would need to make it a requirement for my plugin
stuff that
Well no just don't profile all the time lol
What's confusing about packets?
They're just bundles of data transmitted between the client and the server
first understanding them and trying to learn to use them
You should not internally measure your cpu and memory timings. This should always be done externally by a dedicated profiler.
Just send the client random ones and watch it crash
Packets send from Server->Client (clientbound) tell the client to render something new
Packets send from Client->Server (serverbound) tells the server that the client has done something
For movement
Client -> Server (client tells server to update its own position to new value)
Server receives packet, updates position internally, fires events
Server -> All clients : Movement packet (server tells all other clients that player X changed position)
ah thanks im sure everyone that read that is now a genius at packets
Just a basic example
Pretty much all communication through the internet is done via packets
my favourite way of helping people is making them do the work
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
love it
lol
blame the upload speed
But yeah, each packet has an ID that represents its fields and type of data
oh lol don't you need to make your spigot plugin modular to support every version
There are also multiple protocol stages used to separate different phases of the game (handshake occurs when attempting to join the server, where both sides communicate to establish some base rules)
The play stage consists of all packets that are transmitted during general gameplay
Once you leave the handshake stage, you can reuse some packet ids because both sides have mutually agreed that the handshake process is over
this feels like drinking protean but for your brain, also thank you for the crash course.
A very shitty way to visualize this, is to pretend like each packet type is a database table, where the table name is the packet id
and different stages are just different databases within the same server
any ideas for another grading class?
damn kinda reminds me of tron with a retro 3d lay out of code
are you trying to make a bootleg graphana / influxdb thing?
Sure. Ditch this and use spark.
Lmao
hahahaha...
Steal spark code
...
this would only be useful if you actually hooked into influxdb / prometheus
why?
because you have better, well-established alternatives otherwise
why do I need that?
Why do you need to make your own, bootleg crappy version?
thats actually usefull
ignore the fact that I made bootleg EVERYTHING
you are a pirate
Spark is good enough
its a small part of my plugin, its not the main idea
i might use spark for xp bar shit
also wouldn't I need to make spark a hard dependency?
no but i think its a cool idea
also i'm looking at the developer api and it doesn't show much functionality
so I would have to make spark a requirement for my plugin, and then use the little features that it mentions in the developer section
You can softdepend on spark and make the feature optional
so would I have to put the code above in a try-catch and ignore the IllegalStateException?
Doesn't Spark still have log4j infected dependencies?
no
No
care to elaborate on No?
You can not load any classes of dependencies which are not on the server.
This means you need to design you plugin in a way that nothing spark related
is touched by the class loader if spark is not in the server.
and I assume this will do for a check? java getServer().getPluginManager().getPlugin("Spark")!=null
yes
7smile7
what would work better an real armorstand or an packet armorstand?
it would work the same at the end of the day
(it meant to display same for all.)
The real one does drain server performance
Its an entity so it gets ticked every tick. There is a bunch of computing happening for every entity on the server.
damn straight
i might stick to holographicAPI
HD-API*
because not sure how gonna make everything work correctly...
Use DecentHolograms. Better than holographic dispalys
Yes its decent
HD has been going through a rewrite lately afaict
due?
100kb ain't much
My (personal) lib 33MB. Thats a lot of dependencies.
Let me check
bruh
mans shaded amazon s3
860kb
pretty decent overall
did you build without deps or did you just see the size of all the .java files added up?
Wait thats the unziped size
in jar format its 410kb
i dont think 100kb is not much
i got question guys either something that might sound wierd
100kb is nothing
you have some very inefficient 15k lines
very efficient
i made many utils to shortcut many things
so dont judge the book by its cover
๐ค
if i ask questions its because im not sure its doesnt mean i'm one of those Apes that hangout here
damn he is so smart and hot
dayem
smash
๐ฅต
pretty sure my zombies minigame only has like 4k lines
my util library is tiny
386kb compiled, not including resource files
plugin I started working on is already at like 240kb and I haven't even done much so far
my plugin is way bigger
then just a minigame
its a whole gamemode
well I do a minigame with client-sided blocks, custom nms entities and guns
๐ฎ well i didnt make guns
where the map is shared, but certain aspects are client-sided
i just forked crack-shot
nah mate mine is massive
well mine doesnt get into picture as well
my utils stats
typical
why would I need vehicles for that
to run over the walkers obv
what kind of kino der toten map has mf cars
My current project. Im about 5 weeks in now.
I'm not making cold war's outbreak
๐ฅต
how many hours have you put into that already
holy shit
200hrs maybe a bit more
ok you're working full time nvm
Semester break... My last job vanished after mojang announced their nft policies
lol
oh yeah those guys
So im taking another shot at a personal server project
server I worked for wanted to integrate nfts, they just happened to switch goals lately
about 30 hours in
not as much but I've been working sane-levels of time
nah bruh my project moves slowly
๐
and its like 2 weeks old
no longer can flex lol
I'm the one mf who got like 7 ratings for bashing on your spigot post

my spigot post is OP
either i made an pretty interface
someone suggested
it's hideous
hideous.equals?
original post was better lmao
20 minutes on ms-paint goes a long way
Hey, not really a dev question but how does this javadoc look
nah it took me 5 min
solid overall
?
looks good to me
ah ok
acceptable.
lmao it's going down
4/10
basic.
mediocre
why tho
the minimum.
๐ฝ
we're just playing with you lol
Not to mention all the work that goes into UI design. Or entity animations. Or building.
its actually really the minimum...
its fine
ye ye
I know
you have way too much ambition in your head
I don't know how to write those fancy long texts in english
oh man i love it
dayum
nah man 7smile7 is from the next level
not only do you make me doubt my abilities as a developer, you also make me wonder how much time I waste procrastinating
bruh i had to learn use blockbench
grab eminem lyrics for inspiration
I just paid some turkish dude to make fancy models for 15$
This
I found a russian guy who is volunteer
whenever I see good shit I am like "what in the hell"
like
ImIllusion i want to share something with u
acutally you know im not a builder and i build a huge map (DayZ)
I look at the time tracker and get happy if I work more than like 12 hours per week
This shit is what I can't write
but like standard JDK methods have like 96 paragraphs
That's great but I don't care
look at Map
doesn't even have comments on my side
That's just the fuckin class
and not everything went good
but yeah
i have to spend 15 min looking into good plots
oof
either no worldedit for them...
I'm not getting comments for java wtf
wtf is this
someone spent a long time just writing shit
my jdk might be a lil fucked
im adding a grading for mstp, what range would you consider to be A+
18+
within 5mspt
18 is still really good
yeh
i thought lower was better?
at 17 you start to notice it
lower is better yeah
mspt != tps
they're opposite
yeah within 20mspt
am I the only mf who obsesses over optimizing stupid shit?
and the server just does nothing for the rest of the tick if it has nothing to do
No my friend also does
and I hate that
he uses bytes for loops
like I optimized my canvas raytracing from like 3ms into 0.1ms
instead of ints
and still wasn't good enough
@echo basalt
yep that is fixed
are you okay with that?
what font is that?
make it comic sans
you need some more pink and green for good contrast
mix brown on highlights
Spot the difference
it's just a fucking line of method
4 texts changed or smt
I don't care about the image lol
idk what to put, my plugin works entirely in the backend
I don't even see border
and if u go crazy why i break market price
because this market price
is unreal
Skripts?
๐
mc plugins is my hobbie i love it
I survived middle school by doing 5$ commissions and starving myself
Am workin at โฌ500/5months (split between two devs, so the original is โฌ1k)
i make less
work in class
a hour
where in tf do ya'll pull the clients from lmfao
i make 0/hr ๐
I provide solid quality
KyTDK i make many plugins for free as well
which is why people pay more
fuck skript tbrh
my quality is not less then yours
sure it's my hobby but I still gotta pay for food
skript should be illegal already
^
proof?
my github page is full of private resp...
We can compare skillset, scalability, or plain old code standards
ByteSkript or smt
ur skillset is better.
any ideas how I can convert mstp to a percentage, like 5 mstp would be 100%
ever learned about the Rule of Threes?
and just standard percent calc
it's 3rd grade math
i dont remember such a topic
mspt / 50 * 100
^
thanks
That is actually creative lol
It's ByteSkript
so what is that
i think yeah i dont remember
also wasn't really referring to you, evan
i learn different shit
but this is basic elementary school math that goes a long way
later to 2 x , y
it basically makes a ratio between 2 numbers and multiplies that by whatever
off to learn how to type really long text
basic example is like
2L of water make 5kg of spaghetti
15L of water make ? of spaghetti
calculate
just an example, I'm not a cook
475kg
well
how did u calculate 475
5kg?
15/2*5
5 * (15 / 2)
15 * 5 / 2
wait how the fuck i got into 15 * 7
multiply diagonally
and divide by the other term
Answer is 37.5
since 15/2 = 7 (lets say its int no double.) then * 5
I just leveld up in maths
35
my autopilot brain read that as "off to learn how to type really fast text" and decided to do a typeracer game ๐
lmao
Oooh if you do int division it's 35 ye
really fast and long text
3.3 with the little hat
it really soundsl ike you failed math
5 minute crafts lookin ahh
well you know i finished highschool 5 years ago
or so
and math 6 years ago
afterwards time brain become sand.
you act like you're a middle schooler so I heavily doubt