#help-development
1 messages · Page 1993 of 1
so my question is more like 'can i read in structures or schematics as Block[][][] array'
net.md_5.bungee.api.chat.TextComponent
There is no good API for schematics afaik
I mean you can import WorldEdit... but don't.
time to do it manually i guess
The alternative is just reading schematic data manually via an NBT library.
can you recommend one?
umm how to use it?
I've never really liked NBT tbh
oh scrape
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
you can use TextComponentBuilder tho if you need more complicated stuff
R.I.P.
okei thx!
It's just ComponentBuilder
oh right havent used it in a while
Most of the time, legacy text is just kinda better anyway :p
i should create a wrapper around that lol to make it more easily to use
Like
I have a util in a project I made called Messager
That is basically a wrapper around RedLib's Messages that also allows for multiline and string formatting
i read Massager lmao
And uhh it originally used the component API
but I found it made it harder to actually work with
('specially since Messages handles & legacy color codes)
😍
how to name the class extending JavaPlugin
<your plugin>Plugin
watch me add it into my lib
Main
The problem with ComponentBuilder is how strange it is.
you still didnt add me
i am working on making commands work
It defies common expectations for builders
yep there is no gh yet
so make one
it only applies stuff on the previously added component and that confused me for a while
i need to flame your commits
Yeah, exactly.
yeah i just need to remove an old package to never show the world what i made there
and then i am good
'll wait
done that
kekw
FGF;KGF
just look at it
it doesnt seem that bad
so does anyone here know how to use "canvas" the spigot gui api?
M A T H
these things are giving me headaches sometimes
Read the documentation :)
private methods true.. i mean...
Ooh send me that test
create a static factory method and override the private method and here we go 🧝
idk if you'll see them all
https://www.geeksforgeeks.org/java-inheritance-question-5/?ref=leftbar-rightbar
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
i got confused with a few things lol
Oh nvm this test is shit
even better rawr
furry
how is it called
its still old readme
i meant to make it a plugin core but i am just making it a libs lib
oh cant find it on your profile lol
I saw Satan
you mean the stack serializer?
Yes
whoa
Also we don't need more command libs imo, Lamp is the best one lol
nahhhhhhhhh
look at how clean mine is atm
@SubCommand(value = "list", previous = "info")
hmm where are the brackets mate ._.
i don't know
Nah that's perfectly acceptable.
yes
this makes a sub command
whose name is list, and the previous node is the sub command "info"
yeah i wanted to do this
why did i not do this
i need to do that
So basically you're just gonna reimplement Lamp now?
no
Seriously, use Lamp lmao
Also I wish Revxrsal was in this server
Mine is much more flexible than lamp (in my todo list ofc)
I'd love to talk to them
programmers dont eat
I am part-Italian
where in the single player world folder do structures get saved?
return providers.computeIfAbsent(plugin, PluginInventoryProvider::new).register(id);```kekw 
Help with canvas spigot gui api
if you review mine you will throw up frrr
Most of my projects have decent code.
smh
i like the inventory thing lol gets me thinking at redlibs inventory thing
ok
i made a new server and how do i [portfoward it
again'
i forgot how i did my old one
Maybe you should ask Google
lets try my new command handling thing, probably a bunch of errors 
ok
i accidenta;ly opend the .dat file with notepad
will that effect anything
cuz my server is saying that its overloarding
oh no i found the old code i've written
i got it to work
that wouldnt work
you missed the providers.put(plugin, provider)
wait i forgot the plugin
im bad lmao
doesnt computeIfAbsent also puts?
i thought so
lol it does
if absent
If the specified key is not already associated with a value (or is mapped to null), attempts to compute its value using the given mapping function and *enters it into this map unless null.*
commandhandler thinks nah lol
week of work
Cast world to craftworld and then getHandle
no
lol i havent set comments so i forgot what my method does lol
ye mb
ew, do multi module
yoy can, however,set an event listener
name is misleading
have to figure out what this is doing 🤔
what if i make it run a command that triggers that method
goes through shouldMatch with the hope that previous is in it
and returns the index of previous in shouldMatch
im getting an arrayoutofbounds for the str = ...
however, the index is misleading since if it can't find any match the index will be 1
and yeah
it will continue till it found something
and u can get an arrayoutofbounds too
probably have to change the loop condition to && index < shouldMatch.length
ye
ugh thats jank - make a listener that calls that method
first of all you should init the index as -1
then change the condition
- break the while if found
/ return directly
How do you add a recipe to the player knowledge book without an actual recipe
as you're using events
is it only possible with nms?
Creating a team via NMS... hoooow would I go about that with the remapped 1.18 NMS?
use the api
Scoreboard API has existed since forever
better?
No excuse whatsoever to use NMS for it
just searching for the string i assume
decompile it
is that fine
ik
What if I don't want it to like actually create the teams and mess with other plugins- or has that been fixed?
i do it sometimes lol
i dont find a discoverRecipe method in my version lol
its CraftHumanEntity
pain
so its actually impossible to add a recipe to a player recipe book, without an actual recipe
what?
Nvm
i compiled a plugin with the remapped mojang plugin, which of the three files is the one i am allowed to publish
theres <name>-remapped.obf.jar, <name>.jar and original-<name>.jar
iirc its <name> and original-<name>
do you know whats the difference is?
the name for ex has shaded libs
if you use original you get the compiled code + maven's text replacing stuff
such as adding ${project.version} in the plugin.yml
thanks
Location location = player.getLocation();
player.playSound(location, Sound.ENTITY_GHAST_SCREAM, 1, 2);```
how to set the sound pitch into float? like 2.5
2.5f
Guys, does anyone know how I can reduce the size of my .jar? I'm using JDA for my plugin and it weighed 10MB, I removed some things from opus because I'm not going to work with audio but it still weighs 8MB and I can't upload it to spigot
wdym cant upload it
if you are using maven and above 1.16 you can use startup loading of maven repos
you just can upload 4mb of files
oh you said spigot
can you help me with it?
yeah opening one of my projects that uses it
are you using 1.16 and up tho
I'm interested in this too
do you wan't to see my pom?
okay
in your plugin.yml
libraries:
- groupId:artifactId:version
you can have multiple, here's an example in my plugin:
libraries:
- org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin.version}
now, to upload just upload original-ProjectName.jar
done
so i need to do it just with jda right?
yeah
okay i'll try
it must be on maven central tho
is there
i need to remove it from pom?
but set it as provided
maven will generate the following files in target/
FILENAME.jar
original-FILENAME.jar
use original-FILENAME
you can also rename it
yep
ok 1sec
this goes in plugin.yml
it doesn't appear lol
List<String> gun_lore = yamlFile.getStringList("header " + ".item.lore");
plugin.sendMessage("size:" + gun_lore.size());
if (gun_lore != null) gun.setLore(gun_lore);```
why the size is 0
💀
i will try both
ill brb
Looks like you didnt re-obfuscate
is install
i got one 8kb
now time to try if it works
Hmm?
When I build the plugin I have to re-obfuscate all the remapped classes? Or something like that?
damn 💀
Pretty clear. Your plugin.yml is broken.
nah
it doesn't compile with my plugin
https://paste.gg/p/anonymous/456b892a1be443a6987af8ed4faf5b2e
anyone know issue with this. Its a 1.18.2 server what do i need to change in the plugin
Discuss that with the plugin's developer, not much you can do.
could you help me?, I have never compiled in this way, I only used artifact
i have the plugin source
Looks like you are trying to fetch a no-args constructor which is not available
Ah alright
it works on 1.18.1
not .2
Then in 1.18.2 there is no no-args constructor available
Guys how to craft hearts
What exactly is a "heart"?
You mean a heart of the sea?
no a normal heart
Are you using maven? Then just throw it into the resources folder.
let me try
There is no "heart" item in all of minecraft
no i added lifesteal plugin
This channel is for development related help. Go ask in #help-server or ask the plugin dev
can some1 help me with tat
Why is your "header " in quotes?
Ty
whats wrong with <<<<<<<
What do you mean whats wrong with <<<<<<< what makes you think that this is valid xml?
okay why now it does not detect this library? 😟
it’s a forked respotory it should work
Did you add the library in your pom?
Dont ever use external jars when working with maven.
Dont add them to your project for artifact building. In fact remove every dependency that you added manually.
okay
If you use maven then you should not tinker with anything but your pom.xml
ok done but now how can i add it to pom
this library is not in maven-central
🤔
is it better do to Bukkit.getPluginManager.getPlugin() or to store a copy of the plugin instance and do MainClass.getPluginInstance()
What library is it?
The latter
that is a merge conflict
is one from one plugin
Not quite sure how it got into the repo you pulled
Not a sentence i can make sense of
this onehttps://github.com/Itzzbenzz/KOTH/releases
Ok this is not a maven project which makes depending on it a bit hard. Let me write you a
quick command
Okay thanks
for my plugin i need to use spigot 1.18, JDA, and the one from above
I think the 2 first are done on pom
Go into the folder that has the KOTHAPI.jar in it.
Shift + Rightclick -> Open Powershell here
Then type in:
mvn install:install-file -Dfile="KOTHAPI.jar" -DgroupId="KOTH-API" -DartifactId="com.benzimmer123" -Dversion="2.4" -Dpackaging="jar"
After that you add it in your pom:
<dependency>
<groupId>com.benzimmer123</groupId>
<artifactId>KOTH-API</artifactId>
<version>2.4</version>
</dependency>
Everything has to be added to your pom. Forget manually adding jars every again.
Thats fine. But you need to adapt when using new tools.
You get those data below from the pom of that .jar, right?
I want to know to do it on my own later
ayy man
spigot isSimilar just does not work
even if i take two diamond swords out from creative
just does not work they are not similar
but they are same item
spigot isSimilar method is broken
I doubt that
I just made all that data up.
You could also just call it group: "moon.flower.xyz" version: "100trillion" artifact: "spaghetti"
if you want to
It has been around for a long time, more than likely you just screwed it up
or maybe the serialization broke it
like one diamond sword is serialized into yml and reloaded into ItemStack
If you think "the api is broken" then you 99% just messed something up yourself
Oh
bruh
I need info more than just me screwing up,if any of you have experience in using isSimilar
?jd
wth
Used it hundreds of times. Always worked as expected.
but it just doesnt work for me lol
Maybe read what it says
did you all try yml serialization with one of the stack
You are probably misusing it
yes
No I didn't because I know that won't work
I have read it thousand times
Apparently you don't understand it though
oh alr,then i might have messed up sth
what?
im using isSimilar not equals
Yes i know that part where size is ignored
You're pretty insufferable
what?you are trollng
You claim to have read it but you haven't?
What does the docs say about isSimilar
This method is the same as equals,but does not consider stack size(amount).
Yes OMG I KNOW
And I checked the other item is not null,so nullable does not sheild the effect of false
What does equals do
are you trolling?
Damn dawg why you raging at someone tryna help you
I'm trying to walk you through this
depends on the equals
You have 2 items.
yes.
two vanilla,no itemmeta or whatsoever diamond sword.
one serialized before and one is dragged out of creative mode.
equals compare with like all the values of a certain object,instead of comparing the memory address like ==
I know what it means
no, == compares instance
Memory address?? LMFAO what
yes,which is the memory address,but whatever
yes instance
dude whatever i dont care pls
so what is your conclusion bro
that you aint a dev
Have you tried watching YouTube tutorials?
show some code please. Maybe we misunderstood you.
stfu
i think you misunderstood me
wait hold up
Dawg stop snapping back and show your code
Holy
Hey, so I've got some blockvector3 locations from a world edit region I've looped in the onEnable stage and I'd like to get bukkit world location stuff once i pasted it anybody able to help?
blocked,troll
Oh no!
oh no!
I guess I came in at a bad time?
this is too advanced for you @solid forge
You should be able to get each coordinate or just the location from the BV3s
please learn to use a computer
Nah you're all good
I got blockvector3's but I'm trying to find the bukkit location from it
Haven't checked it out in a bit but yeah
Yeah but can't you get each coordinate
So just do like
Ah shit, should I make a thread? I didn't know that existed
@lost matrix @vocal cloud sorry for being emotional or whatsoever but heres part of the code
if(qoua.getFirst()!=null&&ai.getItem(0)!=null&&((original1.isSimilar(qoua.getFirst())||ConfigSettings.USE_WEAK_ITEM_CHECK)&&(!ConfigSettings.USE_WEAK_ITEM_CHECK||QuestValidater.weakItemCheck(original1, ai.getItem(0), true)))) {
Bukkit.getLogger().info(original1.getItemMeta().toString());
Bukkit.getLogger().info(ai.getItem(0).getItemMeta().toString());
Bukkit.getLogger().info("rejected 0");
owner.getInventory().addItem(ai.getItem(0),qoua.getFirst().clone());
return false;
}
The blockvector3 is just x, y and z. You can easily get a Block or a Location from that
but bruh the code is like so long
nice, doesn't know what newlines are
I think this might need to be a thread thing as it's more than just that
Here is the answer to your question
yes i know,
I am aware of some properties that might make isSimilar false
such as repair cost and such
You should split up your boolean statement into several smaller methods or separate statements.
but the two I am comparing are the same
In other words the method works fine you've made a mistake
i accidentally put ice covered water on my headset
two are both dragged from creative mode
but one is serialized and deserialized
now i gotta clean
Then your method is messed up
I have a feeling you play Minehut
so like the method works but its too messy so the complex logic has messed it up?
my friend has a mh server, and they be goin good, so idk if minehut is an insult tbh
np
stfu
btw
Ehhh I made like 15k off that and dipped
use that
But all the server owners who try to come and spam channels for answers are just a fiesta of terror
I imagine your code has serialized it or de-serialized it wrong. Check to make sure nothing extra has been added you didn't intend
yes
Skript, Java, all the same community on their end
yep its serialized right away after I have dragged it out fresh from creative modew
nah
i used to be really, really good at sk, but then mh added custom plugins and i immediately forgot it
Yeah me too
I was a maker and all that
Got bored though
Still probably have a few MBs of skripts on my drive
what happens when you become a maker?
Minehut pays you to post content and stuff
You gotta get accepted by them blah blah
Was really poorly done by their end sadly
i think its better now tho
ik
Not the same like it was in 2016
can i ask a programming related question?
go for it
does anyone know if this library has javadoc? I'm still trying to turn structure.nbt files into arrays of blocks
I just dont know how to properly parse the nbt
https://github.com/Querz/NBT
doesn't seem so
also i know its possible because opening the files in intelliJ gives me a decompressed file that looks a lot like json
issue is
y'know
can i have a ss
it is json
use this to parse
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
</dependency>
```Lib name is GSon
idk if gson can parse it
It is different from the JSON format; hence, any JSON used in NBT, such as raw JSON text, must be enclosed within a string tag.
thats a sketchy url lol
Just a screenshot tool lol
Has a few hundred k users so not sure
I know, but still lol
I'll implement it into my website soon so it doesn't look sketchy lol
I know the domain is weird instead of just https://kodirati.com
its just missing the "" around tags imo
give ideas for libraries
I am working on a lib
won't give you my ideas
YOU'LL NEVER CATCH ME ALI-
no but srsly
ig what are you good at?
Lmao I am doing the same thing
an inventory lib
NOO
I have a channel of stuff I'm gonna implement, like 200 things
7s literally gave u the idea while he was giving it to me lel
lmfao
come up with one
cant
Bukkit geomoetry api, so for instance create stuff like BlockPopulators with a workload distributor option, as well as regions, and not just classic AABB regions
who names a thread named Thread
Please rename them
i can't
It’s very unhelpful for people who might look at them in the future
no but i can probs help
that must be cool but does anyone even need that
I am not the best at NMS but i am sorta familiar with it
NMS makes me cry
hey, i am trying to disable mongo logging by using
((LoggerContext) LoggerFactory.getILoggerFactory()).getLogger("org.mongodb.driver").setLevel(Level.WARN);
But i'm getting a classcastexception
I’d if you would do it well
Added to my to do list for omnilib
Caused by: java.lang.ClassCastException: class org.apache.logging.slf4j.Log4jLoggerFactory cannot be cast to class ch.qos.logback.classic.LoggerContext (org.apache.logging.slf4j.Log4jLoggerFactory is in unnamed module of loader java.net.URLClassLoader @504bae78; ch.qos.logback.classic.LoggerContext is in unnamed module of loader 'cosmicsky-1.0-SNAPSHOT.jar' @3ae0ea7b)
at me.kill05.cosmicsky.mongo.MongoManager.<clinit>(MongoManager.java:40) ~[cosmicsky-1.0-SNAPSHOT.jar:?]
... 12 more
what are regions, and block populators lmao
A region is a set of blocks, a closed dimension of blocks basically
i've done some research and i wasn't able to find any other way
ic
it seems strange to me too
One moment let me look into my old Mongo stuff
Block populators are just objects that store a set of configurations for you and they have a populate method to populate a given area/dimension based on the settings given
wdym populate
I’ve seen one lib which had that before but it was vulgar and underdeveloped
the worst part about nms is that they renamed all the classes and put it in a bundler or some sort of thing
block material manipulation
Or block state/ block data manipulation
aight
https://www.github.com/IkeVoodoo/OmniLib - Keep looking at this conclure, i might just add it xD
Veri nice
thats the page i've found the code in
i also remember it used to work for another project of mine
very strange
I have a question, what do I fill in for $BUNGEE_IP ?
yes its now confirmed that my complex logic messed the isSimilar all up
ip of your bungee server
ig that's cool, but not something many people would need tbh
"complex"
It is
thankyou so much @lost matrix @vocal cloud
omegalol
so like localhost:25565 or-
too confident with my brain
If you incorporate stuff like schematics, nice api and what not
It’d be quite useful
There's so many but you gotta have stuff people just haven't thought of
so any ideas
i would make many libs instead of one big lib
And there’s not really a big competition on this @grim ice sure WE and FAWE provides apis to do this, but not standalone framework classes
its a lib, with alot of sub libs
theres no code for the lib itself
its just a boundle
ic
(New ones) Command libs, inventory libs will scarcely be useful because the competition is already extremely sharp

any other idea maybe
So many command libs
Myes
GEOMETRY!?!?!
its a cool idea tho ill store that
Yet I use the default spigot command api
yes
Na
Never that
Gotta use the ones that implement Minecraft's new command framework
What's it called lemme think
you can see my full todo list right here, i gotta still update with the geometry stuff tho
ACF is good but somewhat pro-annotations which I don’t prefer
and i gotta make my todo list better
Nice
The CommandAPI one is fire but I don't wanna use it just as a CommandAPI in one whole plugin
EntitySerializer idea was a cool one imo tho
it also worked from first try so yeah that was a very hot experience
Thhhaattt guyyy
whats luckoey
A clutch to the community
He writes quite good code yeah
wait
I just thought about that like how much I use his stuff
Lucko
some person alr made EntitySerializer?
myeah
hi, im making 2 file, main.java and alpha.java
main.java extend JavaPlugin
but alpha.java also need extend JavaPlugin, because i run .scheduleSyncDelayedTask on that
i tried put this inside alpha.java
private Plugin plugin;
public alpha(Plugin plugin) {
this.plugin = plugin;
}```
but still show `Cannot resolve method 'scheduleSyncDelayedTask(com.vanezzz.ngckevent.alpha, anonymous java.lang.Runnable, long)'`
He also has helper which a lot of networks nowadays look for skills with it in developers
Helper is decent, somewhat too coupled for my taste but yeah
Yeah
I can't work with other people's API's too much for some reason
I like my own feel and touch to things
Even if I adapt it off of theirs
I mean, I do very much hate libraries that offer bad apis
such as nms
Some just have too many annotations, some just are a bit offputting with how they impl things
NMS isn't an API lol
Some of the nms is excellent
And some of the nms is code you’d just throw away if that would be your code
I'm heavily stuck on NMS right now
Actually building this plugin now which I never had an issue with
It sort of is
you dont always need nms
For a custom tablist?
It has its own abstraction layers internally
e.g EntitySerializer lib i made
its a kind of library but not intended for others' use
it would be impossible to get that idea without gizmonster tho
So in that sense it offers api for itself, between layers
tablist is now possible without nms
wth
Custom tablists
you can do that without nms?
I believe the spigot api provides methods to do it tho
yeah that needs packets 100%
Ehhh I haven't found any
No
YO
and what happened?
I even bought like $200 in libs back in the day for it
They haven't been updated since 1.17
Sadly
conclure i am getting working on it
declaration: package: org.bukkit.entity, interface: Player
o
No?
a lib for it?
Aye
o
almost got rectangular regions
ok then i wont do it
with populators
That’s nice
Nah I'm jk do whatever
r u making it tho
Good
can i talk about my problem about port here
kodi did u look at ur code for that mongo thing
Did that one post not help you figure anything out?
thats the page i had checked and i had tested various methods
yeah but that doesnt make the stuff like this
the only one that worked was the one i have sent code fo
only header and footer
it used to not throw a classcastex
Oh probably not
That is my point :)
Mojmaps
mostly because of this
luckily yes non legacy has mappings
I know how to order this a bit cleaner 😄
10 times better
remembered i gotta add a tablist api
You can make them look rlly ood
I KNOW MAN IM TRYING TO FIGURE THAT OUT
HELP ME
Gorgeous
Yeah but are your skins gray
nah i would make that before u
I would have to look at it again. It has something to do with the gameprofile name which can be different from the actually displayed name
Yeah I know
I'm using EntityPlayer's and then a tablist display name
Trying to figure out teams for sorting but I accidently messed my Intelli up and now I cant compile absolutely anything
Oh im not using teams for sorting
one moment
final GameProfile profile = new GameProfile(playerID, " " + index);
final MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
final WorldServer worldServer = ((CraftWorld) Bukkit.getWorlds().get(0)).getHandle();
final EntityPlayer player = new EntityPlayer(server, worldServer, profile);
player.listName = new ChatMessage(display);
This: The name of the profile is just an incremented index while the listName can be different.
This way i can just get a line in the tab list by index and edit it whenever i want without missing
up the structure.
Ah alright, well I want the name to be displayed something differently without messing up it's order.
Alright, got a working rectangular region
Wait would that work then?
Yes. The Gameprofile name is used for ordering. The listName can be whatever.
BoundingBox?
Ahhhh okay, hold up :>
Wait how would that support multiple players using different tablists though?
Or would it not...
Because can player names clash?
Region#populate(RegionPopulator);
```Every region has that
it gives you block and region you are populating
I'll have to look into it tbh
tho it only returns mat for now
My system actually maintains a tab view for every player.
The player even has the option to change what should be displayed where. They got a UI where they can
select certain display components and order their tablist as they like.
Hmmm I see
Alright yeah I'll look into it, hopefully I can get my uhhhhhhhh compiling working again
player.listName = new ChatMessage(display);
How does that work lol wot
Its a 1.17 snippet without using mappings. So the names are different.
Ah
"rasse" 🤨
is it possible to copy a block
are there libs for t
yeah thats sad
.getState
i wish it was harder
like... rpc races.
i was a bit scared 😅
i wanna make a world copier but this also exists
yikes
WAIT
is there a library for copying chunks?
:)
watch me
Anyways regions are now added
gotta add polygonal regions
i think thats their name
wait
yep not that
just polygon
ok
I half expected it to not be that
How could i remove an item from a players inventory every second?
so i could make a "timer" with items
?scheduling
thanks
stop copying stuff smh
well its called omni lib
copyinglib uwu
Entity tnt = player.getWorld().spawn(player.getLocation(), TNTPrimed.class);
((TNTPrimed)tnt).setFuseTicks(20);
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I get this error when trying to summon tnt at a players location
why do I always get random pings in this channel
and why doesn't discord let me jump to the latest ping in a channel?
you cant interact with the server asynchronously
on a different thread
or anything like that
ok how would i do it then?
do it on the main thread
thanks! i am off to learn about threads 🥲
thats wrong
you cant interact with the server off thread*
and yes i have tried running it again
E i am so confused now
this might be what causing it but not sure
Hi, how to update update spigot libraries in intellij ?
why all the casts lmao
ummmmmmmm
java.lang.NoClassDefFoundError: net/querz/nbt/io/NBTUtil
so thing is
i followed the installation instructions
hmm i cant quite see what ya talking about
https://cdn.byswiizen.fr/screen/idea64_rQ2vWsBYTL.png @brave goblet
I'm new to java
Uh well what does the spigot api even do :')
i just followed a tutorial
ahh yes, thats to get the persistentdatacontainer, might be able to compress it a bit but should that really make java crash?
just download and replace ?
the casts are totally obsolete
getItemMeta already returns itemMeta
get with datatype string already returns string
so would that be better?
the damaged entity and the itemstack weapon also dont need to be cast
i still need help with this btw
say i have
static {
// register new instance of this class
}
```and in another class i have
```java
// Inside a method
MyClassWithStatic inst = Registry.get(MyClassWithStatic.class);
Would the static method be callsed before the method runs
or after
I honestly forgot
wait nvm i can just test it
do 1.18 plugins need to be on java 17
block break event?
that's only for when a player breaks it
im also placing them not on walls
which means if they update, they break
oh and i don't think i can use nms or packets
0,world.getMinY(),0
and
15,world.getHeight-world.getMinY,15
you got it faster than me
😛
uh ok lemme check rq
nope doesn't work
sadge
i checked all the block related spigot events, i didn't find anything
getMaxHeight u mean?
dont know how its implemented.... but maxHeight would be the maxY probably and then its just that
@EventHandler
public void onExplode(BlockExplodeEvent e) {
e.setCancelled(true);
}```? @lean gull
and why do u do -world.getMinY()
that's not the only way they can break
getHeight would be the range of the world ... subtract( means to add minY) would give you the maxY too
would be +getMinY if you wanne do it right with the full range of the world
i need an event or smth for general breaking, like when it breaks not when it gets broken by something
so is
final int minX = chunk.getX() << 4;
final int minZ = chunk.getZ() << 4;
final int minY = world.getMaxHeight() - world.getMinHeight();
final int maxX = minX | 15;
final int maxY = world.getMaxHeight();
final int maxZ = minZ | 15;
Fine
hey i need some advice for design
im trying to make a plugin and i want to provide maximum customisability
im just not sure including everything in the config is very practical
should i like
make a wiki and make users add the values as they want to the config or have the values pre set in the config
to get the chunk borders
pre set
like the whole chunk
with alot of comments
otherwise people won't figure it out
they still won't
but it will help a bit
what are you trying to do there?
i just provide them for the sake of it
make an ingame gui for changing data
get the whole chunk
so pre-set it is?
yep
mine is like
Desc
Default
option: value
for every single one
even ones that have specific names
okay so practically a wiki in the config
im trying to make a structure out of a chunk
if you have
toggleThisToEnableThisVerySpecificPartOfThePlugin
document it
people won't know what it means
even if you write a sentence as an option
they still won't
set-this-to-true-to-enable-the-plugin:
yeah they won't figure what that means
believe me
people where so dumb they where changing the comments for the options
THE COMMENTS
type-true-right-after-the-":"-to-enable-the-plugin-enabling-the-plugin-will-allow-you-to-use-the-plugin-if-you-dont-change-anything-it-should-be-true-anyways: true
nope won't udnerstand
.__.
I'm trying to connect a forge server to my bungee server but I can't connect to the lobby server through the modpack. Is there a way to fix this?
https://gyazo.com/98000ed6e45934d1d1eababc99c786d2
https://gyazo.com/f850003417962926680da12b9a2de6be
I also have forge support turned to true
whats that dc server?
my support disc
kk
um
18:32:50.070 <log4j:Event logger="dzb" timestamp="1646501570069" level="INFO" thread="Render thread"> <log4j:Message><![CDATA[[CHAT] �����j�0��+Kv�����Y;g���(�D;X����!��n����;�^B�_�Ed�����7�lu��f-��^��0�s�-/���Tp������O<w7�,��&Lk01�����v���aX;k��g]0��u��.���������qg0������w�uy� �0l>0l>0l>0l>0�����Ak����l%�����%����Y_OCL��4�i������y^�a�5��\�4��rRxs�]]></log4j:Message> </log4j:Event> 18:32:50.070 XML_ERROR_PARSING_CDATA
Hello, I need help with this error, I have bungeecord version 1.18, java 8 to 17, premium minecraft launcher - **Internal Exception: io.netty.hadler.codec.DecoderException: java.lang.IndexOutOfBoundsException: Index 83 out of bounds for length 5 **, error only applies to connection via public IP address. What may be the problem?
How can I differenciate between a config value being an int and a list
some plugin is doing wacky things
Get it as object and check type
wdym "getting" the chunk?
like
value instanceof Integer
"isInt" and "isList"?
that's builtin
do I need NMS for creating an NPC?
yes
you could use a library
I plan on storing several types of information in all monster entities that spawn. Should I create a PersistentDataType for this to store in their PDC, or just create multiple containers and store the information with existing types
which uses NMS
yeah
can u send me one?