#help-development
1 messages · Page 1481 of 1
also classnotfound
i have a question can some one help me i am triang to make a villager unmovable but i am stuck because i use 1.8.8 and i am standing infront of a decision should i update all my plugins and my server to 1.6.5 or 1.12.2 or should i try to work with nms
this is the repo:
https://github.com/pemistahl/lingua
1.16.5
where is the kotlin class exactly
idk
the kotlin src isn't in it
then where is the kotlin class
i don't have it??
ok then another question would it wotk then with 1.16.5 and via version so that 1.8.8 player can also play?
kotlin/jvm/internal/DefaultConstructorMarker
where is this class
if it's not in the jar you download, then is it in your plugin jar?
no its not anywhere i realise now and i have been stupid. i forgot it was only there when i shaded
shade it in
look at the pom or build file of the dependency you're downloading
it will have the version information
it works now thanks
or you can see it in your ide as well, look at your maven dependency tree
yeah i got it
its not even there
i am gonna have to leave this now
sorry but i gtg
thanks tho
is there a way to temporarly block donning armour?
Hmm, can you elaborate a bit?
i want to block "suiting up" by clicking rmb on helmet
Oh you wanna block that achievement from being granted?
no xDD
oh I think InventoryClickEvent would do the work just fine
is there a way to get a entity by its custom name?
I think you can find ArmorEquipEvent on github, wait let me see 1 sec.
yeah i found smothing like this
discord helper
https://github.com/Arnuh/ArmorEquipEvent maybe this?
Doesn’t redlib have something like that
I can’t really remember tho
Yeah it does iirc
god cipher i remember you
Redempt is pretty handy
u helped me 4months ago
True
Hmm from API point of view no, although I guess you could map it out yourself. The problem is that multiple entities can have the same custom name.
ah ok ty
Where did pink go? 😦
Still got the pink crystal beside my name [:
I'm really disliking this Java 16. No injecting to the ClassLoader, no setAccessible.
you've changed..
Yeah I believe there was some change to encapsulation also.
Entity nentity = (Entity) arrow.getNearbyEntities(0, 0, 0);
If I am getting nearby by entities why won't it let me do
nentity.addpotioneffects?
Its going to make it impossible to do certain things
I don;t see any point in upgrading past java 11
isn't getNearbyEntities a list?
It's a collection iirc.
Hmm I believe pattern matching, better switches and sealed classed arrived after java 11 which I personally like.
hi im making a freeze plugin, how would i make it so if i use /freeze <player> itd cancel their move event if they move and if i use /unfreeze <player> they'll go back to normal
I've not seen anything that tempts me beyond 11
put them at /freeze in a list, /unfreeze remove them from the list. if they are in the list, cancel the move event
mhm
public UUID vials;
@EventHandler
public void arrowland(EntityShootBowEvent event) {
ItemStack bow = event.getBow();
ItemMeta bowmeta = bow.getItemMeta();
List bowlore = bowmeta.getLore();
if (bowmeta.hasLore()) {
if (bowlore.contains(ChatColor.GREEN + "- Vials")) {
this.vials = event.getProjectile().getUniqueId();
}
}
}
@EventHandler
public void arrowland(ProjectileHitEvent event) {
if (event.getEntity() instanceof Arrow) {
Entity arrow = event.getEntity();
UUID euuid = event.getEntity().getUniqueId();
Entity entity = event.getHitEntity();
Entity nentity = (Entity) arrow.getNearbyEntities(0, 0, 0);
if (entity instanceof Player) {
if (euuid.equals(this.vials)) {
nentity.addPotionEffects //wont let me add potion effects
}
}
}
}
}```
this is my code I still don't see how it's not working
Hmm project valhalla might drag your attention ElgarL if it ever arrives.
and how would i do that
Entity nentity = (Entity) arrow.getNearbyEntities(0, 0, 0);
We aren’t gonna spoon feed
getNearbyEntites is a collection of the entities within the squared radius 0 0 0
We gave you the pseudo
don't cast if you don't know what cast does
Unless you get really stuck after trying
nah
You can use a Set<Player> which contains all frozen players and would be your way of checking whether a player is frozen or not.
I understand that but if its getting entities in the radius shouldnt potion effects work in the entities in the radius
you're orange now
Yeah lol
Yup
look at your code again. you are CASTING a collection of entities to a single entity
casting doesn't do what you think it does
casting is you telling the IDE and compiler "trust me this works, I know it's this thing"
but the gig is that you actually need to fucking know that it's that thing
casting shit blindly is bound to blow up
how are you wizarding your messages into the chat without a NNYAJWAJSD is writing...
You should probably read on some basic java concepts but essentially the return type of Arrow::getNearbyEntities is Collection<Entity>
so in order to store it into a variable you would have to do something like:
Collection<Entity> entities = arrow.getNearbyEntities(0,0,0);
it won't magically turn your Collection<Player> into a Player
it will explode
it looks like it works without exploding in your ide because you're telling your ide to trust you on it
ripcord
ripcord lets you disable the typing notification shit
very cash money
apps didn't exist in 2009
apps are a modern age invention
it looks simple, and i like my things simple
not "let's remove some detail from the logo" simple, actual simple
no animated gizmos or flashing sidebars or popups or fancy useless bullshit
just the content
is there a way to get metadeta from a custom made trident that has been thrown?
Use a pdc
yea but u need a meta for that because pdc name = meta.getpdc something like that
Although - what do you mean by custom?
That’s what I was then wondering
holy moly im back my internet died
i meant where would i look
Cool
It still doesn't allow potion effects on "entities.addpotioneffect"
itd be an arraylist right?
Yeah in that case you'd have to loop over the collection
for (Entity entity : entities) {
entity.addPotionEffect(...);
}```
it's not necessarily an arraylist
there are other kinds of lists than arraylist
i'm not sure if it's even a list, it might be a collection, idr
public List<UUID> frozen = new ArrayList<>();
frozen.add(target.getUniqueId());
ok, so now to do the frozen thing, would i make an event that is called when a player moves and it checks if theyre in the list
call set.contains to see if the set contains a specific element
i'm sure you can put 2 and 2 together and figure out how to go from there
it says 2 variables are the same so I changed it to entity2 but still doesn't allow add potion effect
HashSet
Can you send the entire code snippet. I presume you changed some stuff since last.
thanks
public UUID vials;
@EventHandler
public void arrowland(EntityShootBowEvent event) {
ItemStack bow = event.getBow();
ItemMeta bowmeta = bow.getItemMeta();
List bowlore = bowmeta.getLore();
if (bowmeta.hasLore()) {
if (bowlore.contains(ChatColor.GREEN + "- Vials")) {
this.vials = event.getProjectile().getUniqueId();
}
}
}
@EventHandler
public void arrowland(ProjectileHitEvent event) {
if (event.getEntity() instanceof Arrow) {
Entity arrow = event.getEntity();
UUID euuid = event.getEntity().getUniqueId();
Entity entity = event.getHitEntity();
Collection<Entity> entities = arrow.getNearbyEntities(5, 5, 5);
if (entity instanceof Player) {
if (euuid.equals(this.vials)) {
for (Entity entity2 : entities) {
entities.addPotionEffects
}
}
}
}
}```
then you'd have to do this:
for (Entity tempEntity : entities) {
tempEntity.addPotionEffect(/* ... */);
}```
but yeah basically you can't call methods belonging to the Entity interface from the Collection interface
still won't allow, so then should I remove the collection?
your entire method would be something like this:
@EventHandler
public void arrowland(ProjectileHitEvent event) {
if (event.getEntity() instanceof Arrow) {
Entity arrow = event.getEntity();
UUID euuid = event.getEntity().getUniqueId();
Entity entity = event.getHitEntity();
Collection<Entity> entities = arrow.getNearbyEntities(5, 5, 5);
if (entity instanceof Player) {
if (euuid.equals(this.vials)) {
for (Entity tempEntity : entities) {
tempEntity.addPotionEffect(/* ... */);
}
}
}
}
}
Is it possible to change a nickname?
In spigot
On the website? Or within a plugin
Yeah
Yes
I believe its doable with API
ok
You would have to edit the message format to use the nickname rather than standard displayname.
hm
Does anybody know the best way to create runnables per entity?
Im currently using hashmaps, but this doesnt seem to work at all in my case
i have a plugin where when you run a command a chicken starts coming towards you and when he is close enough he gets removed
The close enough checking works with a runnable
but the runnable gets very fcked when there is more than 1 chicken
Ill provide the code
Sure do
?paste
here im detecting the close checking (if the chicken is close enough to be deleted):
https://paste.md-5.net/mazisakoqa.java
Here is the command class which calls the constructor which calls the runnable:
https://paste.md-5.net/avekodiwun.java
heyo, so this is what ive got https://paste.md-5.net/iferoviwuk.java im not sure what ive done wrong but it doesnt seem to freeze people
Here is the class where im first putting the data into the hashmap (uuid and a class) https://paste.md-5.net/asasoligog.java
public void arrowland(ProjectileHitEvent event) {
if (event.getEntity() instanceof Arrow) {
Entity arrow = event.getEntity();
UUID euuid = event.getEntity().getUniqueId();
Entity entity = event.getHitEntity();
Collection<Entity> entities = arrow.getNearbyEntities(5, 5, 5);
if (entity instanceof Player) {
if (euuid.equals(this.vials)) {
for (Entity tempEntity : entities) {
tempEntity.addPotionEffect
}
}
}
}
}
}```
you forgot the register the event
the problem is that the detector starts messing up when its more than 1 chicken, for example it only deletes one of them and the other chicken's runnable just keeps running
Like im not sure if im using the hashmaps wrong
or is it something else
I always mess up with those per entity runnables
np
Does spigot expose these fields somehow? https://imgur.com/oHiCV5I
does the entity keep there pdc from the item eg. a tridetnt called edward has a namespace key bob and it thrown does the thrown item or entity still have it meta from the edward item? or do thrown Edward trident has namespace key bob as Edward trident namespace key bob
how do i make pluginns
get a coding thing such as eclipse, start with basics, work your way up to bigger projects, keep moving forward
dont torture yourself with eclipse pls
um get ide. find something u want to make and do what ever u can to achieve like watching tutorials and other stuff
what should i use
intellij is good
compile and get the compiled code and put it in ur plugins folder
my plugins didnt export correctly with that
did you use maven?
If you follow this you should be able to get it to export right https://www.spigotmc.org/wiki/creating-a-plugin-with-maven-using-intellij-idea/
canyou recommend a tutorial too :)
heyo how would i carry across my public set to all my classes
You probably want to go with a dependency injection design.
I followed the blank plugin (IntelliJ with Maven) tutorial and later Using the Event API tutorial and from then on mostly used google and the spigot docs
Those are just tags. There is a Tag class with constants containing all the tags in the base vanilla game
If you don't know java I would suggest learning fundamentals in that before tackling Spigot API.
In that case, Tag.FENCES and Tag.WOODEN_FENCES
You can't get the Tag to which a block belongs though, unless you write a method to iterate over all the tags and find which ones contains a Material
Which should be easy enough given that there's a Bukkit#getTags() which returns an Iterable<Tag<?>>
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Server.html#getTags(java.lang.String,java.lang.Class)
Thank you!
public List<Tag<Material>> getTags(Material material) {
List<Tag<Material>> tags = new ArrayList<>();
Bukkit.getTags(Tag.REGISTRY_BLOCKS, Material.class).forEach(tag -> {
if (tag.isTagged(material)) {
tags.add(tag);
}
});
return tags;
}```
Just wrote that through Discord, but it should work fine
is it much slower than a normal HashSet contains()?
Tag#isTagged() you mean?
yes
It's based on a HashSet, so it's O(1)
Shoulda been EnumSet 😒
How could I make a click able text in a written book that will run another command?
heyo i have this freeze plugin: https://paste.md-5.net/abehileyav.java
i want an error message of your target isnt online or couldnt be found if a player just does /freeze without a player name or /freeze player name that doesnt exist, but i can only get one error message to work at a time
You check if (args.length == 0) after you request Player target = Bukkit.getPlayerExact(args[0]);
Therefore, if there is no player name specified you'll fire an IndexOutOfBounds exception as you're trying to access the index when it doesnt exist.
You should check if (args.length == 0), then you can use args[0]
I think it actually might be for the simple registries
Oh, nah. HashMap because it holds the NamespacedKeys as reference https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/Registry.java#185
aahhh thanks so much
@worldly ingot any chance you can add a wrapper in Spigots ClassLoader for addURL?
When java 1.16 hits we'll not be able to dynamically load jars without it
what do you plan on loading?
h2
there is this great project my friend created called slimjar
it can append to classloader in java 16
and also the new plugin.yml supports
dependency loading
1.16 lets you specify libaries in the plugin.yml
^
Downloads and loads them at runtime for you
Yeah, I download it at runtime
oh nice
Relevant commit
Goal of that libraries entry is to solve that very issue. And in the case where developers are trying to load .jar addons, they should be using their own class loaders instead of the plugin class loaders
But as far as libraries are concerned... if it's on central, the server can download it for you automatically and load it at runtime
md declined that. Let me see if I can find the reason
Ok
uhh.... Can I intervene to post a doubt about something here or you guys occupied lmfao?
Nope. Go for it
Now I just have to find what the entry in plugin.yml is 😉
is wiki updated for that commit?
Uhhh it might not be but the commit message has an example
In your case,
libraries:
- com.h2database:h2:1.4.200```
so group:artifact:version?
Yep
That's cool
What's your pom.xml look like. Maven can't seem to find that dependency.
Oh "Packets" is yours?
Just have to local install it to Maven is all
well it has one..
Run mvn clean install for Packets
;p
skip that question
I'm also curious. What would you define as normal?
like mvn install?
cause adding clean just regens the binaries
with the new source code
package only compiles a binary, it doesn't install it to your Maven repository
that cleans binaries and compiles into jar (from new sources)
Your computer has a local Maven repository which caches all the dependencies you've ever used while writing a Maven project
Additionally, you can install your own artifacts there
yup works....
Maven's install goal does that so you can use it in other projects 🙂
yes I know... thank you for notifying me about it..
but this is like a big instance where everything has to be updated to work correctly.
since all of them use sockets to communicate between them, etc, etc, etc.
not gonna bother you with that.
but thanks 🙂
May be worth looking into modular Maven projects if you haven't already
Can have a parent, then child projects
they are modules.......
oic
So im doing ```java
StringBuilder builder = new StringBuilder();
BaseComponent[] page = new ComponentBuilder("test").event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/bc hi")).create();
builder.append(String.format("\n \n➤ %s", page));
bookMeta.addPage(String.valueOf(builder));
Yeah, you don't want to String.valueOf() those
bookMeta.spigot().addPage(page)
You'll have to also append your \n\n>%s thing to the start of your component
You either use components or you use strings, you can't use both
BaseComponent[] page = new ComponentBuilder("\n \n➤").event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/bc hi")).create();
bookMeta.spigot().addPage(page);```
I don't think 1.8.8 has bookMeta.spigot().addPage(page)
It should 
I don't seem to see it
Then again, 6 year old version
my plugins are based on it.
betaMeta.spigot is all I can get
What options do you have available when you have bookMeta.spigot().?
isunbreakable() and setUnbreakable()
o.O
meta.addPage() is a thing in 1.8.8
Yeah but that's just strings
Doesn't support components
i.e. no hover events like jtx is trying to do
there must be some other way to do this
I mean you can update your server, but 
I know that's gonna be a hard no for most using 1.8
not new for a 1.8.8 user...
neither server owner
I just don't like 1.9+
I feel you.... lmfao
not my style
BookMeta itself has addPage
Also makes me angry that getTags returns an Iterable instead of a Collection
That could be streamy :(
for that version, it seems that BookMeta#addPage only supports string tho
and for spigot() yeah only those two methods exist
Not everything has to be streamed 
wym streamed
Ok... I found ur solution
o:
yea dont think the component api was supported in 1.8
it does.
for this task at least
So what's the solution
I found this while just googling it...
might be a good idea to look how it works and maybe do your own
or just use it as dependency..
hm
he even explains how to use in the spigot page.
so yeah, ur in the money or ur not in the money.
Is this the only way....
ugh
update and you get +10 ways to solving this
hey he doesn't want to update
^
who cares about updates (ok everybody, just being sarcastic)
the problem is with using this I'm gonna basically start from scratch and I've done so much
why would that be?=
I gotta change stuff
Wrong
Everything has to be streamed
also am I gonna have to use the jar as a dependency
If I can't write it in a one-liner why would I even write it
I.. don't know how to help ....
I guess I'll just have to watch this.
unless you look how spigot done to use BaseComponents in newer versions
and just go from there...
yea.... no
that's even more work I'd think
Would anyone have a good resource for hashing players ip addresses in a database and then also dehashing?
Can't find much on it with google, would rather see if someone has anything before I go and make it myself
Why dehash?
In my player object I store IP addresses as String to access quickly, id rather store it in that as the actual ip and in the database as the hash'd version
I haven't done much with hashing before so any pointers are appreciated lol
Can't really think of any hash you can reverse tbh
Best you could do is check if the hash is in the DB and if it is set the player object IP to the ip
Alright
Oh awesome, thanks.
for checking you'd use BCrypt.checkpw(password, hashedPass);
for hashing BCrypt.hashpw(password, BCrypt.gensalt())
Isn't every hash secure cuz u can't unhash a hash
It's more a security thing than anything.
md5 is insecure for example
There's no such thing as unhashing do u mean decryption
Lmao
Just pointing that out rn
I realized
where would i find plugin developers who i could pay to make me plugins?
?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/
thanks
np
either the NBT or json is wrong
I'm not using NBT
then how it's being set is incorrect
Hi. Does anyone know why only Premium Players on a offline server Bungeecord can see Player's Skin of others? I used "LoginResult.Property" and some things more to add a Skin on LoginEvent called. The Skin set to Player correctly (others Premium Players can see it), but Non-Premium Player cannot. They only see Player's Skin about TLauncher or nothing if they use another launcher. What could be the problem?
setAccessible still works??
damn, not high enough level to post on the thread to hire a dev
sealed classes, records, text blocks, switch expressions, pattern matching, shenandoah, foreign memory access, C++14 support for JNI (used to be 98/99), and a quadrillion extra methods everywhere to improve development productivity
I don't really see how I'm setting it wrong
besides, "no injecting to the classloader", that's a hideous hack, and there are many alternatives, safe and easy to execute
How are you setting it?
base64 is a hash you can encode and decode
bas64 is indeed a hash algorithm
if (args.length == 0) {
Book book = new Book();
Book.PageBuilder page1 = book.addPage();
page1.add("t");
page1.add("\n");
page1.add(" " + ChatColor.translateAlternateColorCodes('&', "&cTest")).clickEvent(Book.ClickAction.Run_Command, "/bc hi").hoverEvent(Book.HoverAction.Show_Text, ChatColor.WHITE + "Click here to be shown as blblbl").build();
page1.build();
Book.openBook(player);
return true;
}
since when, because I seem to have missed the party
that's like the one difference in the definition of the two (encoding vs hashing)
hashing is one way only
Base64
In programming, Base64 is a group of binary-to-text encoding schemes that represent binary data in an ASCII string format by translating the data into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding. Each non-final Base64 digit represents exactly 6 bits of data.
you are wrong on this
there is such things as two way hashes
ideally*
such as?
base64 is one of them
encoding isn't really a function
Base64 is an encoding and decoding technique used to convert binary data to an American Standard for Information Interchange (ASCII) text format, and vice versa.
encoding is a process.. it's a function
you put data in, you get data out, and it's reversible
therefore still a hash mechanism
hashing is (ideally) not reversible
the other hash mecanisms you are talking about, are not reversible and thus preserve the integrity of the data
okay okay
link me to sources saying that base64 is a hash algorithm
This seems to explain it pretty well https://crypto.stackexchange.com/a/29240
hashing isn't for the purpose to secure data, rather ensure the data in question hasn't changed
and?
@vagrant stratus
base64 is a mechanism to encode bytes into another range of bytes, which does not serve any of those at all
A hash function is any function that can be used to map data of arbitrary size to fixed-size values.
base64 fits that
it just depends how you are using base64 in whether it is encoding or hashing.
base64 has no business in being used for verifying the integrity of the data
The definition of hashing doesn't say anything about verifying the integrity of the data, just that is the problem most hashes set out to resolve
However there is other reasons to use Hash mechanisms though and doesn't have to be for data integrity
hashing isn't for the purpose to secure data, rather ensure the data in question hasn't changed
hashing doesn't say anything about verifying the integrity of the data
👏
don't need to
Hashing is generally implemented very differently depending on what it will be used for
It is very important for security and it secures data by effectively allowing you to destroy it while retaining a way to check if a new piece of data matched the original
But to treat that type of hashing as if it's the same as what's used for hash tables is a stretch
In essence they do the same thing but they achieve it in extremely different ways because in one case you don't care much about collisions and in the other collisions are fatal
Yeah one thing I recall in crypto is salt hashes
and call it a hash function
You can call anything a hash function
It doesn't even have to transform the data in any way
UTF-8 is a character standard
Hashing an int returns the same int in java
it's an encoding
The effectiveness of a hashing function like that is up for debate
it encodes data which you can later interpret however you like, just like base64
therefore utf-8 can be used for hashing
UTF-8 doesn't encode data
If you're using it for security you want to ensure the original data cannot be derived from the hash and collisions are extremely rare
Salt hashes
lmao
UTF-8 is a standard for defining the range of characters and their character points
it in of itself does not encode anything
I can’t understand that statement lol
sha-256 is just a standard it doesn't do anything to data itself only defines what should be done to it
alright not going to argue you semantics here
Tell me
If I have a "standard"
In which each number represents a character
Like 1=a, 2=b, etc
And you can take 1 2 3 4 and it is encoded into a b c d
Then it is an encoding
A caesar cipher is an encoding
utf-8 is just a glorified cipher so weak that everybody knows the key
It's an encoding and to say it's not an encoding is just willful ignorance
Literally all of these say "encoding" within the first sentence describing what utf-8 is
"encode" doesn't even necessarily have any security implications
Encrypt does
But encode just means to translate basically
Using virtually any method
Transform the data in any way and you have an encoding of some sort
both of you really should go to school for crypto then you would understand what is and isn't a hash function
"UTF-8 doesn't encode data"
lmao
This isn't the first time you've been a dumbass I've argued with you over stupid shit like this before
Lol
A hash function is typically just a function that turns some data into an integer that can be used for hash tables and such
I remember the global warming or climate change thing lmao but that was so long ago
Base64 is a hash function, feel free to disprove that if you want
A hash algorithm typically implies it's used for security (password storage, file verification)
wrong
.-.
I'm talking about the terminology, most things that are called hashing algorithms are used for security
While most things that are called hash functions are used for data structures
anyone any ideas?
ensure the data in question hasn't changed
(password storage, file verification)
wrong
@proud basin I think the book tag is invalid
Well doesn’t the function itself use some sorta algorithm too
What does it mean by book tag
Ngl we all need to learn English lol
There is one way hashes, and two way hashes also known as public algorithms
People don't usually call java hashCode implementations hash algorithms
They call them hash functions
typically one way hashes are combined with security because of their nature being one way
The only thing that is really important to qualify as a hash function is that, given the same input, it will always give the same output
Which is why the hashCode implementation for integers counts as a hash function even though it does nothing to the data
Given the same input, you will always get the same output
You are right it does count as a hash function 🙂
What's your point then oh my god
That base64 is a hash algorithm
That's not its purpose but it technically qualifies
It doesn't really accomplish any of the main goals of hashes for either use
For data structures it doesn't reduce the size of the data or "summarize" it, it tends to make it even bulkier, which isn't useful
For security, the original data can easily be derived from it, so it's not useful for that either
And again it's not any shorter than the original data so it doesn't have any use for file verification
So it fails at every purpose a hash function usually fulfills
It meets the technical definition of what a hash function does but if it can't be used for the same things a hash function is typically used for it's safe to say it's not one
On a technical level you'd be wrong to say it's not a hash function but that's just pedantry
Nobody in their right mind would use base64 as a hash function
most hash functions have nothing to do with security
They're used either for data structures or for security
Those are the two primary uses
Base64 is useful for neither
you are confusing hash functions with security for things like checksums, fingerprints, ciphers etc
Checksums use hashing algorithms
Which are just hash functions but more complicated and meant to make the original data irretrievable
Fingerprints, checksums, whatever you want to call them
They are hashes
no they use chechsum algorithms
Checksum algorithms are hash functions
When fed the same input they will always give the same output
But they meet a few extra specifications that make them useful for security
They give fixed-size outputs, they're irreversible, and they're not nearly as fast as the hash functions used for data structures
If you're gonna sit here and tell me base64 is a hash algorithm how the fuck can you say sha-256 is a "checksum algorithm" and not a hash function
You're just trying to change the words to make it seem like you have a point but you're just giving me bullshit
because sha-256 doesn't have parity bits or parity words
It's a hash function
A specialized one
But it is still a hash function
A square is a rectangle and you're not wrong to call a square a rectangle
therefore because of that, sha-256 is not a checksum algorithm
What are some reasons why it could be invalid?
how dare you call a Secure Hash Algorithm a hash function!?!?!?
No but please go on and tell me how sha-256 is not a "checksum algorithm"
is there an sql manager class in redlib
I've got no clue, you need to give us context on what you did to get this output
Yeah why
thanks
It's called SQLHelper not SQLManager but still
got it
You gonna use it?
yeah
Here's the wiki page
Enjoy
That's the problem idk what I did to get that output
We're gonna need to figure that out if you want to fix the problem
@waxen plinth you can use sha256 for the purpose of creating a checksum, but it isn't a proper checksum algorithm due the reasons I have explained
So sha-256 creates checksums
But it is not a checksum algorithm
A checksum algorithm not being an algorithm which generates checksums?
Do I understand you correctly
or you didn't read what I stated what a checksum algorithm has
It's almost like algorithms can be specialized for certain things
There are checksum algorithms that do that
Wait why are we arguing about checksum algorithms in the first place
When did I ever say anything about those
I just mentioned sha-256 as a hashing algorithm that can be used for checksums
And you started spewing shit about how it's not a "checksum algorithm"
By the way
The page for sha-256 literally lists it under the "checksum algorithms" category
Thinking about it more I think this may be giving that output ```java
Book book = new Book();
Book.PageBuilder page1 = book.addPage();
page1.add("t");
page1.add("\n");
page1.build();
Book.openBook(player);````
So on all counts you are a headass
oh yes wikipedia is such a reliable source all the time
.-.
you literally linked no sources at all
just whatever you pulled out of your own ass
neither have you @quaint mantle
This man is more credible than a vigilantly-moderated knowledge repository
except for the unicode standard on utf-8
sure I haven't
Fefo is a LuckPerms dev don’t mess with her
This code doesn't even look valid
What makes you think that?
@quaint mantle ah I didn't see that link
her*
¯_(ツ)_/¯
I can't speak for her but in my experience trans people don't mind too much as long as you accept corrections and show you're trying
I hope
spigot acc unlinking when
yeah 🙁
That read much darker until I remembered you used to have a heart in your nickname lol
pff bahahaha
is armor stand the only way to display text in the air?
and if so can I allow players to click through it
Any entity works
oh
I see
oh they have a hitbox thing I believe
I remember most entities not showing their name tags permanently when invisible even if setCustomNameVisible is true
ah that
so if I want text without or smallest possible hitbox, what should I use
Marker stands
^
They have no hitbox at all
wait they work?
Yes
p awesome
I've used them in holograms before
They do
it's probably just my memory
the entity itself is still visible
true
the name tag drops to its feet though 🤔 because, well, size 0 hitbox
Yeah set them to be invisible + marker and you're good
oh btw if I get the location of an entity, would it be top of the hitbox or the middle or what
Im trying to make hit markers
Always at the feet
Do you need BookMeta to have stuff written in a book?
The location of an entity is always in the middle on the X and Z axis, and at the bottom of the Y axis
So, the feet
Yes, I believe so
Meter* /j
I haven't heard of any BookBuilder so I'm assuming that's a library or something
Could that be the reason why im getting invalid book tag
Yes
bounding box is the same thing as hitbox right
Yep
hm I tried to make my own page builder but I guess It didn't work
is there a way to tell where the player hit the entity
or do I have to raytrace it myself
What are you trying to do?
Markers have no hitbox
like a little thing pops up when players do damage
What I would do is use invisible noAI size 0 slimes
Listen for damage events and cancel them
Oh
Why do you need to know where the hit landed on the entity then
And you want it to be shown right where they hit it rather than above the entity's head?
where else should the marker appear
Yeah there's no good way to do that other than do the math yourself
getX getZ getheight/2?
on top of the head you say?
what if it's like a giant
I feel like Imma have to do some raytrace bs
Get its bounding box
Get the vector for the player's direction
Yeah you're gonna have to raycast basically
doesn't World#rayTraceEntities (or whatever) give the exact hit location?
unless you are on that ancient version that doesn't have that method
Im on 1.16.5 :P
old versions is cringe except 1.8
how do I get the vector the player it looking at :/
getEyeLocation.getDirection
Is there a way to avoid the cursor resetting position when opening a new custom inventory from an already open custom inv? Trying to build a custom menu system for a plugin I guess opening another inventory after one was open isn't the right approach, as the cursor jumps back to the center
event.getEntity().getWorld().rayTraceEntities(p.getLocation(), p.getEyeLocation().getDirection(), 7).getHitPosition().toLocation(event.getEntity().getWorld());
would dis wok
Wow I didn't even know that was a thing lol
bruh
ok so I did the rt thing with getEyeLocation
and stuff
but now it's raytracing onto me XD
cause Im the first entity
Well offset it
lmao
yes :/
and rt it again
ideally I would want it to ignore Player
but idk how to use Predicate or whatever it's call so :/
can i make rayTraceEntities ignore blocks?
hmm how do double jump work
i don't think a plugin can detect the pressing of spacebars
do the server get an input whenever the client pressed the spacebar?
Usually the answer is flying
step 3.
ctrl c ctrl v
Since the toggle flight event is called when you double tap space, then you just cancel it and launch them
theirs a lot of code tbh
gl
there should be a onSpacebar press event?
no
gogoling....
it's impossible
wah?
Jumping is client side
cause if the client know the player isn't on ground
no packet is sent
so it's impossible
Flight is what’s used
i can say for sure it is possible
wdym
.
Correct
then disable fly and do shit
That is how flying works
Yes
oh found it
hmm theres only .ischarge and .setcharged
can I launched a witherskull?
i can tp it
okie
hmm is the wither turning color documented in the api?
theres no special command in the wither docs
Believe it’s based on the age NBT tag
Huh, I really thought that would be exposed in the API
what would be exposed?
NBT?
also how do I spawn aprojectile?
okay thanks
woah this is like a mod
i never knew plugiins can do this
https://pastebin.com/rsK083px question is why doesn't it cancel the task?
the Entity class does not have a .setEyeDirection command or something related?
wait what?
im trying to make a mob turn their head
hmm i am not sure
i never canceled a task
,yet
getEyeLocation.setDirection iirc
is .getEyeLocation a valid method?
uhh which class is it in
Entity?
Probably
package index
?jd
oh just realized that the overview had a search function
you kill armorstand with armourStand.remove() right
Mhm
thax
anyone knows how long does the wither do the blue and black blinking thing till it explodes?
around 4 sec?
how do I summon an invisible entity without it appearing for a moment
packets?
thx
https://pastebin.com/r66YHCwJ the problem is canceltask is not work
what do you mean mark
like differentiate a specific wither
you could always get the entity's unique id
Create an array list don't use emptyList
yea i was dumb i fixed it by changing it into an arraylist
also is there a way to disable a SPECIFIC entity to be unable to push other entities but still take damage?
ping if you can help imma afk
You'd have to use teams
okie
.setCollidable also works i think
also is canceling hitboxes WITHOUT messing with packets a thing?
nah the .setCollidable worked for my case
Aight
btw boolean doesnt have to be like this boolean == false in if statement just do this
!boolean means if its false
boolean means if its true
Didn't setCollidable work?
How do I check if a player's inventory is full? I need to give him an item in the nearest empty slot.
I found a bug in my FoundDiamond plugin. If a players inventory is full it will not give them anything. Is there a way that I can make it so if there...
try this btw https://paste.md-5.net/qohaderuyu.java
Does this method take into account armor slots? If they are not filled!
I mean do you want to count armor slots?
wdym
if you don't, you could always Inventory#getStorageContents().firstEmpty(), if there isn't an empty slot it returns -1
declaration: package: org.bukkit.inventory, interface: Inventory
What are you trying to do with hitboxes
Not. I need to give the item to the inventory. If the slots for the armor are not filled then this method will consider that the inventory is not full?
weirdly enough now after i set my collision to false im still getting pushed
trying to disable pushing
the snippet I showed will get the first empty slot where the player can store items
You might have to setCollidable on the wither too
hmm okie
is there a server shutodwn event
or reload
I don't understand why player.getInventory(). GetStorageContents().
doesn't give me the method firstEmpty()
ohh now this is weird
im still getting pushed
it's getStorageContents and that returns an Inventory, which should have that method 🤔
with the player's inventory why doesn't he give it to me
getStorageContents returns an ItemStack array... lol
just a different one than getContents
I'm gonna head to bed lmao
i gues i'll try the teams
can you make team in the plugin?
or do you have to do commands in-game
You can do it in your plugin
okay
can some one pls help me i am stuck every time i try to load a world i get this error java.io.IOException: The process cannot access the file because another process has locked part of the file bukkit version 1.16.5
restart PC
that will stop all programs
which includes whatever that is locking the files
just tried it still didnt work
unless its a malware or something taht is locking it
Send your code
very unlikly
who the frick would make a malware to lock someone's minecraft files lol
i have an idee what it could if i execute the command that gets the file into a worldcreator for the first time it gives some other error i check real quick
can I make the console not warn about players moving too quickly when using p.teleport?
if i execute the load command for the first time i get: Caused by: net.minecraft.server.v1_16_R3.ResourceKeyInvalidException: Non [a-z0-9/._-] character in path of location: minecraft:classicbwmaps\classicbedrock\parent
You can't use backslashes
who do you mean?
Don't use \
can I prevent regular vanilla recipe from being made with my custom items?
like if I have an enchanted piece of cobblestone (indicating it's special), you can't use it in vanilla recipes
like a furnace
Yes. Check all craft prepare events and loop through the items
if it contains your item -> cancel the event
but it would also cancel recipes that actually uses the custom item rho?
Does someone know the best way to start runnables per entity?
and to cancel them per entity
how can i get the pdc of a door/ trapdoor? (interface Openable)