#help-development
1 messages · Page 469 of 1
Does anyone know how to get the PersistentDataContainer of a sign?
okay
what are you trying to do?
?
cya later
cast the blockstate or BLockData to Sign
might be the state
not sure which one is correct
and then get a boolean in that file and stuff
as you can see it only goes to 1.12 and not 1.8.8 or 1.8.9 which is the version i want to make my mc plugin in. I'm using intellij and im using the "Minecraft Development Plugin" in Intellij
why do you even need getResource
Change api version in pom.xml
just go for 1.12, then edit your pom.xml manually
oh alr
idk, just wanted to use it
bc in the modules it shows the 1.12 api
It’s the block state
what should i use it then?
State handles pdc
idk if that'll effect it
"1.19.4-R0.1-SNAPSHOT"
I did this
Sign sign = (Sign) e.getBlock().getState();
but Sign#getPersistentDataContainer() isn't a method
get the FileConfiguration
what do you want to use it for
select it and in pom.xml change 1.12 -> 1.8.8
get Resource is getting resource inputstream from your jar file
then you're not on 1.14+ I guess
maybe blockdata then
PDC is 1.14+
or version mismatch as alex said
hello nuker
hi
get the resource uuidfromplayer.yml and get a boolean, if its false, let the player execute the command if its true, dont let him use the command
Using 1.19 😳
half past three 4 me
where can I find the pom.xml for 1.8.9 or 1.8.8 if 1.8.9 doesnt exist?
thats not how it works
you have fileconfiguration for that lol
getResource gets it from your jar, not from the datafolder
im new to mc plugin coding but i know some java
try blockdata
1.8.8 is the latest server for 1.8.
so, what should i do
use this
I am confused. Do you have any pom.xml in your plugin's project folder? in your IDE?
Like this?
BlockData sign = (BlockData) e.getBlock().getState();
Same thing, no .getPersistentDataContainer()
yes but it has 1.12 like this and idk if you need another for 1.8.8
It’s on the state
im new to using spigot api and stuff
¿?
cool now you go fileConfiguration.getBoolean()
k thanks
correct, but you should use new File(JavaPlugin#GetDataFolder, "userdata/")
change 1.12 to 1.8.8
oh alr i thought it would be harder
he might be trying to access userdata of the server, if there's even a folder for that
which spigot version?
k
that isnt stored yaml
1.19.4
getting an error
i dont even remember if there is a folder with this name
reload maven
i thought it's all in world foler
top right
k
yeah
k thanks u both
@proper iron @plush nest Please both open a thread. You both have similar questions, you better both open a thread, otherwise answers to you will get mixed up etc
thank you so much it worked
oh alr
unless ofc you already got it working, in that case - great, nvm then lol
This is why people want a forum channel :p
yeah but forums suck
because IIRC then you don't have any "general" channel anymore
You do
Just not a general #help-development
But you could always just have 2 channels
We have a forums channel, silly
?forums
Really? We don't have a command for that?
Colour me shocked
tecnically this will get the messages.yml in resources folder and save it in plugin folder?
yes
i would recommend checking if the file exists first, otherwise you wil get "Couldnt save file X because it already exists"
but you should check whether the file alreaedy exists ^
ye
thanks
That messages sucks
yeah it's kinda stupid
We literal specify with the Boolean that we don’t want it to replace it
if "plreace" is false, it should just silently shut up
So don’t tell us that you aren’t replacing it
on the other hand, it makes sense
you tell it to "save a resource"
so it makes sense that it complains lol
imho the "replace" flag is useless
go make that message shut up
pr0n request?
I already have too many open :p
coll got too many pr0n requests open
Because Choco is cool
@worldly ingot can you do what coll wont
yeah @worldly ingot can you do what coll wont?!
What won't he do?
Oh I hate that message lol
You gotta be careful to not make a PR MD doesn’t like, otherwise you’ll suffer
@maven can you do what gradle can't?
maven be like
oh sure, I can
- use descriptive build files
- use build "scripts" that do not break on every new release of myself
- shade dependencies without a third party plugin written by some random person
- work without downloading a 150mb wrapper of myself. for every single repository that you have.
- use a JDK that doesn't have to be the same as the source/target version defined in my pom, errrrm I mean build.gradle or gradle.properties file
Choco once made a getTPS PR and that’s how he lost an arm
what about a leg
- show actually helpful error messages in case something actually goes wrong - which is unlikely in maven, because we use DESCRIPTIVE build files, instead of just random scripts
sorry but I can't help myself
Man was hurt by gradle at a young age
guess why i swapped to gradle
I also wanted to hate about how gradle breaks itself on every update but I realised, I already mentioned that in #2
i got a class unsupportered exception or what its called
and i didnt know how to fix it
chads use intellij build
update maven-shade-plugign to 3.4.0
that was the fix
i couldnt find anything online
i swapped to gradle
and it worked
I don't hate gradle, I just inherently dislike it
gradle is probably perfect if you study it for 56 months
i didnt study it at all and i can use it for my needs
real quickly would this work if I coded it since I see people list thigns like this in a specific way (ignore the minemen my goal is to recreate it as a personal project)
and are willing to use third party plugins written by random people
yeah you just copy/paste stuff from stack overflow
if it randomly breaks one day on a new gradle update i simply just downgrade
yeah he's still random because it's not builtin into gradle
it's like using "abzjohnny's hack to make windows 10 work with windows 8 graphics driver for KVM64"
you can, but the official docs dont tell you how
you say stuff breaks on new gradle updates, i just simply dont update
i just work around stuff i cant do
we can do anything we want
"it works, idk how - i just copied sth from SO, and have no clue how or why"
you spawn them like any other entity
Oh just like that
yes
erm no
well
yes/no
https://blog.jeff-media.com/use-consumers-when-spawning-custom-entities/ be sure to spawn them properly please!
every other plugin dev will thank you if you read this ^
Question about this and config
How to get console instance? lol
in .3 and below we always did ```java
entity = new ArmorStand(world, location.getX(), location.getY(), location.getZ());
Then set the properties and send the packet
that's fine if you wanna go the slughorn way
for bukkit.dispatchCommand now i need a sender, i wanna send it via console
So then
Bukkit.getConsoleSender()
For the new interactables
lol
Is it just new Interacble?
There is no "Interactable"
I meant Interaction
But the weird thing is
Interact in it's constructor requires another Entity
?xy
Asking about your attempted solution rather than your actual problem
tell us what you're trying to do pls
Ok.. again
Also use TextDisplay for holograms
^
Ok but I'm confused on something different I think
Hear me out
in .3 and below we used to have to spawn ArmorStands using nms, then packets to be able to display holograms.
Now, we have the option of those 4 classes that you mentioned above, but like, how much do they replace what we used to do?
If I want to adapt my .4 NMS class to support the new classes, I'm trying to figure out what changes
I mean
You never had to use NMS
People just did it for optimization
You don’t really need to resort to packets for these new entities
They don’t tick
Then, doing
new Interaction(net.minecraft.world.entity.EntityType<?> entitytypes, net.minecraft.world.level.Level world)
For some reason requires a entitytype in the constructor which I don't seem to understand why, and a world instead of a location, so I don't even understand wtf it really is
Ok so then that means I don't need packets
fOR .4
I'd avoid packets entirely for this, yeah
Ok good
Its "benefits" are null and void because those display and interaction entities are not ticked
They're nothing to the server
- you can hide entities with Player#hideEntity(), or do Entity#setVisibleByDefault() & Player#showEntity()
?jd-s
Do I treat the 4 new classes as another entity? #spawn()
Yeah they're all different entities
Cool
Lets see if I can figure out how to change from old version support to new classes
Hey Choco, can we talk in DM?
It's been so long since I spawned an entity I got vietnam flashbacks
maybe you can talk to choco about this in DMs lol
xd
Is this
What I think it is
I will cry
Ok and now since I'm using bukkit instead of nms I can no longer set the name to be a component
Back to nms
?stash
the server sends a unique packet for system chat and player chat to each player, how would i make it to where i can assign all of these into 1 id? so like if 10 ppl are online and a chat packet is sent it should be able to store 10 values with the same ID instead of a unique ID for each packet
You have to call save on config
oh
Or its JavaPlugin#saveConfig, I don't remember
Nah, its a external file
Not config.yml
but dont worry i know how to do it
Where can I see spigot/bukkit implementation on nms
Like for example, how spigot made their TextDisplay from NMS
?stash
Yeah but what part
I got a question. So I am setting some data to the block in a PersistentDataContainer during a SignChangeEvent. But then in a PlayerInteractEvent on that sign I can't retrieve the same PersistentDataContainer data. Thoughts?
I'm browsing
CraftBukkit
CraftTextDisplay most likely
Hmm?
Spigot has something called TextDisplay
❤️
Craft+something is usually implementation
So CraftTextDisplay would be impl of TextDisplay
Yeah I just found it
I hope we get that component support soon
I just still can't figure out why the nms constructor for TextDisplay requires a EntityType
I wonder how Chocos PR is going
Honestly haven't touched it in like 9 months
Ok but I still need to figure out how to do it
ngl
Are there changes currently requested?
I'm gonna commit sui
public (EntityType arg0, Level arg1)
Why does Display.TextDisplay() require those parameters
public (Level arg0, double arg1, double arg2, double arg3)
The other is the world
You know you can just summon the Bukkit entity
And then convert it to NMS to apply the components
Oh
Wait
((CraftEntity) entity).getHandle();
```?
final Display.TextDisplay nmsEntity = (Display.TextDisplay) ((CraftEntity) entity).getHandle();
OR
final Entity nmsEntity = ((CraftEntity) entity).getHandle();
Is it worth treating it like a TextDisplay or just a Entity
TextDisplay
Cool
It’s display content is different from its custom name iirc
Yeah it has different methods
Tjat'
Holy shit
We have a compiled build
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_19_R3.entity.CraftTextDisplay cannot be cast to class net.minecraft.world.entity.Entity (org.bukkit.craftbukkit.v1_19_R3.entity.CraftTextDisplay and net.minecraft.world.entity.Entity are in unnamed module of loader java.net.URLClassLoader @45fe3ee3)
Good try
Use CraftTextDisplay for the cast
Nono
Display.TextDisplay
CraftTextDisplay isn't liked either
I think I know why
Display.TextDisplay = ((CraftTextDisplay)entity).getHandle
What packet
Exactly
Since I used bukkit to spawn it
I don't need it
And I left it there
I need a plugin playground for all this new holo stuff
huh why cast to slughorn classes?
did I miss sth
lemme pretend to be md5: "there's api for that"
Not for components
oh ok
ok lemme rephrase it again: "@worldly ingot where's PR for displays so people can use it with components without having to use slughorn"?
(slughorn = new fancy name for NMS)
😩
how do i check if 2 components are the same
can i just do component.equals(component) 🤔
equals()
kk
yes
if one might be nullable, use Objects.equals
One of the reasons why I love java and dislike kotlin
kotlin be like
if(myComp1?!=myComp2?)
I should use Objects.equals more
It’s only the first pr too
xd
It only covers more player stuff and item lore/name
Good think I'm implementing components myself then
about 3-5
years
Do you use Components a bunch Coll?
Currently storing hologram lines as a List<String> and since I want components I thought List<Components> but I could've swore that components had a way to store a List of that
I was just thinking about how I wanted something to beable to check contains fast, insert and remove quickly. I spent hours stumped at what could possibly do this better than a list. Alas 😭 I somehow forgot about HashSet
I normal just use strings
Fair
Ok listen up
Now, I can make holograms with the new TextDisplay
But... they seem to be persistent....
Without doing anything
Meaning if you reload/restart once and you didn't keep track of the entity, I have no clue how to get it back
Track the uuid
Yeah yeah I know like]
The problem is
If you forget to implement something to track the UUID
It stays
How can I keep track between reloads temporarily, just to play around
Or do I need to implement a serialize/deserialize
I could just kill all entities
Just keep track of the uuid
Save them
Kill on disable it is, Just a playground rn
Or just add an identifier into the text displays pdc
Then you can grab it on chunk load
I’m curious why you need components here anyway
I'm making my library
And I want to be able to customize holograms with minimessages
You don’t need components for that
Unless you want to use something like a translatable component I guess
holograms dont need clickable or hoverable text so use strings and legacy serializer
Yes but translatable
language files
Boring solution
java.lang.StackOverflowError: null
at net.kyori.adventure.key.KeyImpl.examinableProperties(KeyImpl.java:85) ~[adventure-key-4.13.1.jar:?]
at net.kyori.examination.Examiner.examine(Examiner.java:45) ~[examination-api-1.3.0.jar:?]
at net.kyori.examination.AbstractExaminer.examine(AbstractExaminer.java:53) ~[examination-api-1.3.0.jar:?]
at net.kyori.examination.ExaminableProperty$1.examine(ExaminableProperty.java:79) ~[examination-api-1.3.0.jar:?]
at net.kyori.examination.AbstractExaminer.lambda$examine$0(AbstractExaminer.java:156) ~[examination-api-1.3.0.jar:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
...```anyone know why im getting tis massive error...
it's stackoverflow but i dont know why
and it doesnt trace back to any of my code
it just spams java.util and net.kyori
theres a lot wrong with that video'
feather client, server running with gui
Feather for multi-client
gui is myb
xd
I'm surprised at how smooth this is
It's a cool pattern
Oh well, 6 hours ago I just wanted to make interactable holograms
sounds painful
6 hours later I made my hologram manager for .4 compatible with components
And no interactable stuff yet
But, it looks sick
you either have to check if they click the armor stand or where its text is
I'm still using nms
So
My goal is not only gonna be making lines clickable consistently
you'd need to figure out where the text is and summon an interactable entity
But making words
I think I'm supposed to spawn the interactable entity from the start
No need to wait
what about making a specific word clickable
Separate a line into multiple entities
It's just math
I've studied math for years, it'll finally be useful now
Separate click HERE to whatever
Into 3 entities correctly spaced
I'll have to see how the boxes work tho
But I be "one of the first" ( to my knowledge ) to have clickable words efficiently
im pretty sure illusion did something like that
Nope
He did lines
Or he did "words"
Like sort of
With vectors
But it was pretty inaccurate
If you dont have billboard turned on you’ll need to move the entities as the player moves
i need some help understanding a machine learning anti cheat can someone some what break it down in easy terms
Easiest terms possible is that it has inputs, does some magic in between with weights and biases, then has output
Those weights and biases are constantly changing and to tell it how to change them, the methodology differs. Manual reinforcement, random genetic mutation, etc.
oki
I've been doing nms all night
And suddenly I can't extend EntitySlime
And it's added in my pom
oh mb
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>${spigotVersion}-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier>
</dependency>
... nvm
It works...
I was trying to extend EntitySlime
................
Machine learning is a very broad topic. You can achieve cheat detection with with
different models. The ones that come into mind from my last semester that could
be applicable here are:
- Support vector machine
- Naive Bayes (Maximum A Posteriori)
- K-Means
- K Nearest Neighbours
- Neural Networks (Both supervised and unsupervised are possible)
The best performance is probably achieved with a support vector machine because
you dont need a lot of learning data. The only problem is that you have only binary
classification (cheater or not) instead of probabilistic values. Same problem occurs
with K nearest neighbours. This could be mitigated by using a KNN variant called
expectation maximization in which a gaussian function is used to create probabilities
for every cluster.
The real problem is generating training data for any of those.
The simplest approach would probably throwing a NN together with a few layers
And simply feeding it with tons of data. That often works XD
im currently using the vault api but it has kept returning even though vault is installed on the server.
RegisteredServiceProvider<Economy> rsp = Bukkit.getServicesManager().getRegistration(Economy.class);
if (rsp == null) {
//returns here
return false;
}```
this is copied from the vault github page
Do you have a plugin that actually provides an economy?
Vault has no implementation. You need a plugin that actually
implements different currencies.
what do you mean by providing a economy? i thought vault was the economy? or stores the eco
Vault is just a platform that lets different plugins communicate over a common pipeline.
You still need a plugin that actually implements the Economy interface and registers
a service provider. You can also implement the Economy interface and register your
implementation as a service.
so something like this?
getServer().getServicesManager().register(Economy.class, new MinionEconomy(), this, ServicePriority.Normal);
RegisteredServiceProvider<Economy> rsp = Bukkit.getServicesManager().getRegistration(Economy.class);```
Well... you dont actually need the get the service back if you are already creating an instance of it
how do you guys always make yur code look so fancy in dc
?codeblock
You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
}
}```
Becomes:
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
}
}```
MinionEconomy economy = new MinionEconomy();
getServer().getServicesManager().register(Economy.class, economy, this, ServicePriority.Normal);
this.economy = economy;```
Just keep in mind that this will clash with other economy providers like Essentials for example
lowkey hella confused but I guess it works
well in that case he should make sure that he gets the order correct in that these plugins load no?
basically each plugin that uses vault will clash with each other?
Ususally those implementations are only provided by pure economy plugins.
So i would do your approach only if this is for a private project
Doesnt matter for Vault
Are you only trying to interact with an existing economy or do you want to
provide a whole economy implementation
ive copied the code straight from my other plugin that works fine but doesnt on this plugin? i dont understand why i need to implement these?
existing
Then dont implement Economy and dont register a service provider
Install an economy plugin like EssentialsX or something else
yes but funny enough essentialsX support told me to use vault <3
Yes. Vault + Essentials
okay then how would i get the economy from essentialsX? through their api?
No. Thats what Vault is for.
Vault gives you a standardized way of communicating with any economy plugin
by getting the service which was provided by the random economy plugin.
You always use Vault, no matter who implements the economy.
Thats the whole point of Vault. No need to know which economy
plugin is installed. You just communicate with Vault.
exactly but how would i do that? you told me to not implement my own economy but thats everything that vault docs say so i dont really know what to do
You get a registered service provider for the Economy class and use it.
Yes thats what i told you. You need an economy plugin installed.
i switched to gradle from maven, i used to be able to put ${project.version} in plugin.yml and it would automatically input the version
is there something like this with gradle
Yes
ok
You modify the processResources task
so you basically filter to make it only go through the plugin.yml or your resources folder
And then you expand
processResources.from(sourceSets.main.resources).expand version: project.version, name: project.name
I think
And then u can use $version and $name
Not used to groovy syntax so
The services are registered in onLoad. So i doubt that this is the problem.
You can still do this with maven
You just need to tell maven to filter the resources
i know
gimme c++ lessons about pointers instead
i already did do that
i just switched to gradle
from maven
and was wondering if i could still do that
You know they point to things
Not sure, memory is a weird thing
You shouldnt tinker with raw pointers in c++
smart pointers is what you want
ye true
also would this work or should i allocate it on the heap?
that it is destroyed before i work with it or smth
Got some weird linking errors that it cannot find a vtable ref lol
General rule is: The creator of an object has also the burden of destructing it.
Thats why methods should usually not create new objects on the heap and
pass them to their caller.
This creates a Tokenizer on the stack so there is no real issue i can see right away
Well i can see an issue... You are passing a reference to an object on the stack which is destroyed when the function exits
Uhu
One solution would be
const void Tokenizer::branchOff(int newPos, Tokenizer* target) const {
}
This would transfer the burden of destruction to the caller
God i hate c++
Ah and make it a const pointer
and newPos should probably be int&& newPos or else you are copying the int into a new variable
on the stack each time the function is called
how can I use my custom world generator to generate a world with multiverse? I'm not sure what the id is supposed to be
is it the plugin name?
oh yea it is nevermind
i should've tried ;-;
Oh you are asking how to copy the values of your current Tokenizer to the one on the pointer?
I believe i understand what you mean
Creating a mutable ptr, then calling that method with the ptr as param?
how do i add a new server to bungeecord through code, if that's possible?
You might be able to some extend, but you'd still need to edit the config for bungee as well.
they will only be temporary servers
for my minigame setup
?jd-bc
can you not just tell me if there is a way
have you looked at the javadocs?
i looked in all the places i think it would be
Yeah, that would be the closest thing from what I can see
i'm trying to get structures to generate in my custom chunkgenerator using worldedit schematics. I have made a method that works fine when called from a command, but the same method times out the server when used in chunk generation as soon as I start creating a world with multiverse
?paste
https://paste.md-5.net/wetifokina.md this is the stacktrace
Pasting a schematic in a chunk might cross the chunk border and cause other chunks to load nearby.
That is a problem. You cant use WorldEdit like that for chunk populations.
i had thought of that but i don't understand why would that time out the server
There are several reasons why this could time out the server.
If it triggers an infinite chain of chunk generations for example
wouldn't that cause a stackoverflow
Its not a recursive generation
I'd suggest not using multiverse inside chunk generation
you mean worldedit
Spigot has a StructureManager now which will allow pasting of schematics
You can take a look at this plugin:
https://github.com/MagmaGuy/BetterStructures/
It uses worldedit to populate the world with structures
it uses chunkload events
Eh... it looks like they dont use a generator at all. Its simply a listener that listens for new chunks and pastes
some random structures in it
The proper way would be to use a seed system and only generate those part of the structures that
fit in the current chunkj
Just fyi you are using paper
This may be a paper specific thing since they have chunks multi threaded
This just ate 2h of my time finding out...
Spigot doesnt. And i have never had an issue with pasting schematics into chunks that were unloaded unless it was a multi million block change in which case the server could lag for a couple of seconds
With spigot that is
hm that's an option
tho i would prefer my plugin to be paper compatible
You shouldnt paste schematics when generating topology
"But it works" is not an argument
Thats fine, but you are in spigot discord not paper
you're right
Got to love them typos
i was going to read the nms code to understand what times out the server and at runtime there are classes that are not present in my buildtools import
It times out because the server main thread gets paused when it needs to load chunks from disk. And then the network is paused because its waiting on the relevant packets to be sent
So if the chunks that need to be loaded cross over multiple region files, the server has to load those files and memor map them, then read them then modify the blocks and then send that to the clients
The network only allows for at most a 20 second pause
Then client disconnects
Or the server forces client to dc
ok now i've made it generate in the middle of the chunk and there is no way the schem crosses the border
lemme try
Its not so much the issue of chunk borders rather chunk borders between region files
A single region file holds 1024 chunks
You can use some math to determine which region file a chunk falls in
int regionX = (int) floor(chunkX / 32.0f);
int regionZ = (int) floor(chunkZ / 32.0f);
// bit shifts
int regionX = chunkX >> 5;
int regionZ = chunkZ >> 5;```
Relevant formula to finding the region file a chunk belongs to
wish i understood how bit shifting worked :<>
It is just shifiting the binary bits left or right
sure but that doesnt make sense to me
If you shift to the right 5 times, 5 bits get shoved off the end and are gone
imagine you got a number 10110. now you shift it two to the left. now it's 10110000
0001 << 3 = 1000, therefore 1 << 3 = 8
huhh?
bitshifting is like a croissant 🥐
so ur shifting the 1?
So if you want to get technical it would be 0001000
lol
Just that the leftmost bits there are 0 so they're nothing
so how is 1 << 3 8?
It should be noted that when shifting a negative to the right the sign is not preserved unless you use 3 arrows
shit that doesn't work either
Because 1 in binary is just 1, 8 in binary is 1000
because the ichunkaccess is invalid the next tick
So if you move that 1 bit to the left 3 times, you get 1000 which is 8
Have you tried with spigot?
this would probably be easier to understand if i also had a solid understanding of binary
which i dont
very helpful prerequisite, yes
8 | 4 | 2 | 1
=============
0 0 0 1
now move the 1 to the left 3 times:
8 | 4 | 2 | 1
=============
1 0 0 0
lemme download it hold on
ye, every bit just represents a multiple of two going leftwards
Add all the bits and you've got your number
If it works with spigot then it is a paper specific problem
and after turning 1 to 8 through << 3, one can finally dream about croissants again 🥐
why is my model leaving its head behind
i'll go ask on fawe's discord later
they might have the implementation wrong or something
the attack of the quartz
Possible or maybe they have two different versions for the implementations?
yes they have different implementations for spigot and paper
I do know world edit doesnt use paper api stuff specifically if i recall so that could be the issue as well
Again all paper specific stuff lol
ok so with a 0 tick delayed task it generated, but it still stopped the thread for 5-10 seconds
Binary is really not all that hard to understand. I think the hardest part with binary is when working with different bases
time to test on spigot
is there any resources you can recommend for me to read/ watch?
there's a million resources for that
There is plenty. About to drive home right now so will have to wait on the resources
so technically base64 is also binary?
I have some resources that are really good at breaking it down to make it easier to learn
or is that not how the bases thing works
well thats okay i can wait 🙂
Base means like base 16 which is hexadecimal. Base 10 is normal decimal or numbers
and computers use base 1 right?
Binary is base 2
oh right
a base 1 computer would only know False
thought it would include 0 :d
my kind of computer
Well it is more correct to say it only knows 1 state
base is basically number of digits/chars you can use to present some data
Binary is 2 states
fair enough
That's all you need, baby
Ternary is 3 states and so forth
and humans use base 10 then yea
Depends on region
speak for yourself, I use base 100
In large part yes
xD okay
because I am 10x the man choco is
:(
Tell that a french person
it's true
choco is base 0
i love 2 * 20 + 1
Ugh, 99 is a bitch
because he can't count
quatre-vingt dix neuf
Yeah, who the fuck
makes perfect sense
I‘d like to have two times 20 croissants and then three additional ones
but is base64 also considered binary or no?
this man doesn't understand the 4x20 lifestyle
I love me some warm croissants with butter
we blaze numbers up
binary means that something involves two things
in computer means, 0 and 1
Croissants and butter
right so only the zero's and ones are considered binary
ah well its kind of in the name
with "bi"
you can represent any number in binary
The reason working with different bases can be the harder part is because the base system doesnt equate to how many bits can be used. So base 3 for example. It doesnt mean only 3 bits are used rather it means that every pair is 3 bits wide at most.
No shit lol
hey leave me alone here
You can represent any number in any base
I‘m just here today to talk about croissants
ive noticed
give me some
you rlly like those huh?
I love the word
yea where are mine
It sounds funny
and then you have the special computer who say they identify as non-binary
croissant
im only one country over, il come over and get some from you
aka quantum computers
fresh from the oven... so yummy
aight?
i should really stop this
That would be great
thats is if you are still a proud german
Alright driving home now
epic fortnite gamer thanks cool
pg family friendly
Better get some croussants at the drive through
also why are ur pc component prices so low @tender shard, give us some of that
Are they? Idk
i mean, they are quite a bit cheaper as other places
Is there a way through NMS to send this to a player/modify it?
https://cdn.discordapp.com/attachments/879758215380873246/1096389047456366642/15830cc65a1506e75d4c661b55aa26cf7c5c3e18.png
i'm making a server system that creates and destroys servers when needed for my minigames
my servers are using pterodactyl, and i have setup the api key and stuff (also with bungeecord)
where should i put the server manager? was thinking bungee plugin but was wanting to see if anyone else had a better solution
You could maybe change the msg with a resource pack, idk
i also think the client will only ever show that message once
for each session at least
aw man I think I actually drank too much caffeine
Just use an anti chat report plugin
I like the one my Kacper
u cant ever get too much caffeine
nah you def can
What would that do?
Prevent the pop up
turns out the issue was multiverse
i've made world gen on my own and it worked fine
do you feel it looking into your soul and judging your for your sins?
looks sick
time to generate through chunks and see what happens
Isn’t that an amethyst elemental
Yeah
what am I some kind of rock guy
There minerals
I fully expect you to be a geologist, Magma
Same
well tbf I didn't make this model

Can we just ban this guy?
idk I think banning choco is a bit mean
it's not nice to discriminate against choco-type people
I'll be waiting for the bribe money choco
What is this for btw?
the rock bottom guard for the furry rp server choco commissioned me to make
HEY
Jesus Christ choco, they’re minerals
tbf that's only half the story
Put some maple syrup on that golem and give him antlers
they wouldn't believe the other half
As long as they don't find out about the smut fanfic lore wiki for the server
Shit...
you should see what he's guarding
woah
Well atleast you didn't delete it
Choco has already been caught in 4K several times
no uwu
yeah I'm not surprised you don't
How can i check if world is unloaded on spigot 1.12.2? On newer version i saw the isWorldLoaded() method, but nor on 1.12.2. And it's causing really strange behavior if i try teleport a player giving location of unloaded world, it's just teleporting to main world with no error or anything
I'm not saying you're a furry I'm just saying that I remember what your previous pfp was
Just doing Bukkit.getWorld(name) and checking if it's null will check if it's loaded
thx
halp pls
Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "live.kaminodev.hello.Main.getCommand(String)" is null
executor line:
public hello(Main plugin) {
this.plugin = plugin;
plugin.getCommand("hello").setExecutor(this);
}
plugin.yml:
name: helloworld
main: live.kaminodev.Main
version: 1.0.0
author: Kamino
commands:
hello:
aliases:
- hellowrld
- helloworld
description: says hi
permission: hellowrld.execute
idk whats wrong every spigot and bukkit forum just says that it isnt defined correctly in the yml
Do that in onEnable(), not in your plugin's constructor
Oh that's not your constructor
Probably to do with your spacing in the file. Keep it consistent. You have one with 2 spaces and another with 4
YAML is picky
should have used toml
Did toml exist when spigot was made back in 1873
You can always use toml :3
actually it didnt lol
in a plugin.yml? Lol
whats the point lol
And create a plugin.yml from toml
i have been using plugin annotations recently tbh
could it be the aliases having indentation from the alias identifier?
they should have indentation
I think the convention is actually to keep them on the same indentation but no that would have no effect
yeah i currently have it as this (command has 1 tab indent, aliases having 2)
tab indent?
never use tab indents. Use spaces
Like I said, picky
wow choco will not call it dumb
anything that uses space indentation is dumb
(no offense to anyone)
what 🤨
Rip spigot
always use spaces not tabs
ok yeah still no effect .-.
tabs look so bad on gh
it takes twice as long to type spaces than tabs
Who types them manually
LMAO
I prefer tabs myself, but yaml standards are spaces
Based editor
yeah intellij does that by default
probably all jetbrains ides
it it REALLY matters there
cause if you mismatch spaces and tabs in python you have to go through all of them and change one to the other
jetbrains has like almost no competition when it comes to professional IDEs
they so good
i was using spaces anyway then -_-
fleet is gross tho ngl
i found it a bit of a letdown
Why would you even use fleet
true
vscode > fleet however intellij > eclipse
intellij def top for java dev
indeed
In this video we look at the Binary number system. Our jumping off point is comparing and contrasting it to the Decimal number system, which is already familiar to us. This makes understanding Binary much simpler.
We then learn how to count in binary, and how counting in Binary is actually very similar to counting in decimal.
Then we look at ...
this guy explains it very well without using anything confusing
oh thanks, will take a look
once you learn how easy binary is, it then makes sense when you start shifting bits left and right
once you remember to flip left to right
can someone tell me whats wrong with my code ?
((Directional)e.getClickedBlock().getBlockData()).setFacing(BlockFace.WEST);
there is no error or exception on console it just ignores it
0110000101110000011100000110110001100101
Store teh BlockData so you can set it back on the block
418,498,243,685
BlockData blockData = ((Directional)e.getClickedBlock().getBlockData());
((Directional)blockData).setFacing(BlockFace.EAST);
like this ? ( it dosent working )
or store it as Directional ?
only if the encoding is ASCII
not sure why you would cast to directional when your type is blockdata
its so weird bc when i try to get the block facing it return the correct facing but when i try to set block facing it dosent work
bc i cant use setFacing or getFacing if i dont cast it
oh yeh
you are right
i just have to cast it 1 time
but it dosent solve anything , bruh
my block is anvil btw
have you tried calling setBlockData() after you set the face?
caffeine pills

Hi, I recently created a biome by nms. I would like it to be created like any other biome when generating worlds. Any ideas?
need to hook into the world generator stuff
why doesnt bukkit have mixins
i guess you could hook into a class loader or something as if you load your plugins before world gen most classes shouldnt be loaded yet
well you can define a plugin to take over world generation
yeah but then all vanilla generation disappears
which you can add back in your plugin
just because your plugin takes over, doesn't mean you have to override all the vanilla mechanics
pretty sure vanilla gen is more complex than just forwarding some chunk noise methods
well the idea is too smoothly hook into the vanilla gen
which i dont think is easy with current api
the easy route is to just let the vanilla mechanics do their thing and then on chunk load change the biome to your custom at whatever interval
Thanks for all the different ideas. I will try them one by one.
can someone help me as to why this doesn't work I looked at the spigotmc wiki and everything, it uses 1.8.8 api if you need to know that
add this in that paranthesis
oh wow it worked thank you very much
Store() requires something

first want to check that it is a number before parsing it as one, otherwise you will get a NAN exception
It throws NumberFormatException
yes this, either way point got across 😛
just catch the exception
while you could do that, that is the improper way to go about it
/store help
\d+ :>
mmh
private Pattern pattern = Pattern.compile("-?\\d+(\\.\\d+)?");
public boolean isNumeric(String strNum) {
if (strNum == null) {
return false;
}
return pattern.matcher(strNum).matches();
}
But also, \d or [0-9] class wont be able to match really large numbers
its an int so probably dont need the (\\.\\d+)?
but the super easy way since spigot has Apache Commons is this
StringUtils.isNumeric(CharSequence)```
Guys how can I set the pose of a player (NPC) to sleeping? I've looked online already and in the docs, but I'm getting lots of mixed answers.
In the latest version that is (1.19.4)
🙂
packets probably
So there isn't a simple way to do it with metadata?
idk
Oh ok np 🙂
there is a Player#getPose but i dont see a setPose
Yeah I noticed that.
How would I go about doing that?
