#help-development
1 messages ยท Page 180 of 1
a xD
Use admin craft perhaps??
I think what change this https://aadnk.github.io/ProtocolLib/Javadoc/com/comphenix/protocol/async/AsyncMarker.html#incrementProcessingDelay() and ListenerOptions.ASYNC
That didn't work for what I want cause if I want do another thing in my item i can't add a lot data on this item, I think I really need to check if this string is inside the lore
you cna add a lot of data in the PDC. More than in the lore
oh ok I go try it so
You can add as much data as you want and its much easier to track
your java is too old
i just installed jdk 17
:/
reinstalled
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
The java you are running on is too old, not the version you are building against
but i just installed the latest version of java 17
and it says java.version 17
it my pom.xml
at command prompt type java -version
you are using JDK 17 butr running yoru server on JRE 8
wait if i update that will i sstill be able to play on 1.8 minecraft for hypixel
ok good
also how do i check what my servers mc version is
i installed it a while ago i forget
top of the latest.log file
and is this what i want for jre update?
https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html
wait no thats not it
i cant find how to update to jre 17
set it to which directory?
your java 17 bin folder
yeah but where is that i just spam click next during installations
well i installed it from oracle like 15 min ago
reinstalled
idk where jdk 17 is stored :/
might be because i installed 19... and not 17 ๐คฆโโ๏ธ
not many here use Oracle these days
didnt notice this little thing
does intellij have an installer then?
most here use openJDK due to the behaviour of Oracle trying to copyright API's
does using openJDK actually benefit me in any way?
or just because a large corporation is doing naughty things lol
yep, its purely morals
looks good
some website says i should add it to path too, is that true?
sometimes
you set home and path?
yeah
typing java at the command prompt will search the path
make sure the path doesn;t have a java entry to 8 before your 17 entry
i mean i dont see it
idk what happened lol
2 months ag oit worked fine
i come back cus i get reinterested in learning and not playing mc 24/7
and its all broken
move your java home to the top
is there anyway to get/make permanent head texture?
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
there was a texture on this link. but it got reset
http://textures.minecraft.net/texture/e92089618435a0ef63e95ee95a92b83073f8c33fa77dc5365199bad33b6256
how? any demo/example about it?
Helloo friends, I got a question.
In mc 1.8, how would one store any kind of data in an item that I could use so that when I left click with the item on hand it opens a gui?
I know about PDC but sadly that only applies to later versions of the game
That too, I can't for the love of me figure out how that plugin works
their spigot page has examples on how to use nbt api
Agree
Reason I'm creating support for 1.8 in my plugin is that usage of 1.8 clients for pvp in my country is still pretty high, and I'm creating a pvp plugin
how?
I dont kno why people dont look on google
I would make it on javascript
literally for reading and writing
as far as I know this kind of texture never get deleted. but it happened.
Hmn
So make your own api
๐
Its simple you follow their rules or you make your own api
๐ฌ
if I want to use CraftPlayer I need to install the build tools right?
Yes
Depends. You should already have BT to create Spigot anyway
^
I installed buildtools but now some Materials dont exist anymore
how do I get stuff like SKELETON_SKULL or RED_DYE?
missing API version from your plugin.yml
thanks
Is it bad to use Optional to be a fancier way of dealing with errors?
In the sense of returning an empty one, if an error occured?
Atleast if you know that only one particular error can be thrown from that code.
A matter of style
In Java though, the convention is to throw a derivative of Throwable if something goes unexpectedly wrong in an exceptional way
Iโve seen people return Pair<Optional<E>,Optional<T>> or some shit to represent a possible failure and possible success

But overall Optional is java by convention is used for returning merely
That somewhat looks like Rust if I remember correctly
JavaScript devs doing Java:
Caching it in variables and passing it through params is a nogo in Java
(Mainly due to the disadvantage type erasure provides Iโd assume)
Nevertheless, dealing with exception handling is extremely difficult to do well
The issue is mainly this, cause I hate using try and catches, wich just add 5 lines minimum to smth
Especially when you have these abstraction layers
Myeah its what it is
Generally I believe checked exceptions is one of the best exception tools out there along with try catch statements
But thats my take
Well nevertheless thx for your opinion.
I probably will just deal with both and look what is more fitting to use in different circumstances.
A matter of "trial and error" <3
Yeah
Though one thing, its good to deal with exceptions in lower module layers if possible
is it possible to add texture on PLAYER_HEAD from image?
In this particular situation it was a method that was basically the public method, to be used in different places.
Dealt with the other stuff in the lower levels already via exception handling.
Yeah, though generally I argue for that dealign with exception handling as high up as possible in the infrastructure of abstraction layers lead to leaky abstractions
I assume you mean that the end-user can then deal with them as they see fit?
end user, as in api users?
yes-ish, what I mean by this, is that I'd like to know how to work with exceptions if I were to make an API
well, usually the api is a relatively high level abstraction, which infers that the specified behavior is well known, thus usually exceptional cases should be rare in your api
Should we move to a thread, kinda cluttering up the chat?
sure
thats true
and they're slightly faster in terms of invocation
invokespecial vs invokevirtual iirc
?scheduling
I wrote some stuff concerning lambdas in that wiki page some time ago
API exception handling
ough
you could
yeah
you can do sth like
int[] timer = {4};
((Runnable)() -> {
timer[0]--;
}).run();
(using a singleton array)
never understood why that is valid, but not using int = 4;
well
internally
during runtime
the variable is copied
which is why it needs to be effectively final
idk, feels like an underhanded way to do it. But Atomic references are klunky to work with too
was about to roast conclure for casting that to a runnable but then saw the .run();
๐ฅฒ
task only
or well
like Consumer<? super BukkitTask>
?scheduling goes over that
:>
yeah and they enforce flushing of caches
since atomic stuff is used
is it possible to add texture on PLAYER_HEAD from image?
forEach(rankHandler::loadRank)
Use what conclure sent :p
method reference or whatever its called
Yes
yes
if the args of the Consumer is the same as the params of the method you can use :: otherwise you need to map them inbetween
i find it really counter intuitive that to continue in a foreach you have to use return
Yeah but it does make sense when you think about how they work
yeah sure, its just weird
good to know, never really thaught about it
I'll hate you for that
And what about Stream#flatMap()
tbh, never really worked with that
Though I'm interested to use that form of functional programming more.
Mainly only use map, filter, foreach, etc.
Flatmap is something I have been hesitant to use, cause I am unsure of it's use
need something that takes a term of T and returns a term of Stream<R> right?
my dad thinks his phone is possessed because he cant call somebody
i love this
yes
by not using Arrays.asList
whynot use an inline for loop instead of converting to a list?
and using the normal for each loop
Oh ๐คข
to use forEach i guess
I'd have done it that way, though @sterile token might not like that, apparently?
||My basis of that claim is this: #help-development message||
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
why would it look better
Arrays.asList is cheap (its literally just a wrapper to the array)
but why would you use it

why don't forEach persist in arrays tho

java devs explain
hiya, im good, you?
because oracle
??
I am guuuddd
arrays arent objects, you cant have object methods on them
what they said^
i just got an offer for a uni place 
people with a pink name are the only cool people, or people with orange/blueishgreen/green names

i was tempted to become a blue guy
nooo ๐ญ
nitro classic looks kinda a good deal
basic*
or basic
wait actually
LMAO
yea
like the emojis are all i care about
i thought it would be similar to cpp where its just pointers
Wait arrays are objects
For some reason I thought they were also just pointers
spend moneyto become good? nah
Best rapper on earth
tho only dynamic arrays are pointers
true
you can init static array
it is
nah it's not
then what is it?
that's hard to explain
no way!
that just means you dont know
but you can't find length field with reflection
it's a special byte-code thing
not an actual field
Wanna bet I'll do it I'll do it right now ๐ ๐ ๐ค ๐คช
Jkjk
tho you can't find clone() too
I got an internship offer from a cloud computing company here
they are not seen using reflection
simply said no
wat??
no it's not
Reflection sees all
since instanceof Object returns true for arrays
why lol
and every object has a clone method
I don't work for free lmao
sad yeah?
been professionally coding for 6 years (truly coding for 11), I don't need another internship
except if its removed or smth dunno
Work for free it's for "work experiencr" we definitely won't treat you like shit
I mean
I don't think they can give me a proper contracted offer given I'm legally a minor but still
My time is worth more than free and so is yours:P
He still has a lot to work on, and might get confused when actually scaling his code
I literally consult for minigame servers that want to scale
Lol who said that
guy that offered internship

Wow he went in on u a bit there
he also suggested I used a cloud management system for my final project after I literally made my own version of it
openjdk btw
so basically you go down to cpp level to get length
so length is not a field in java
tho every array implements Clonable and Serializable
can you show clone() sources of array? @floral drum
and is instanced with new so is an object
yeah
I mean arrays r special from top to bottom
ye
and they don't have length field
but for some reason they only implement clonable and serializable
but not iterable sadly
depends on what u define a field to be
if its by the definition of being obtainable by reflection, or do u mean simply that it must be explicitly declared
well since length is not a field you can't obtain it as a field with reflection
its a field then
๐ค
and length field is not declared
Easy way to settle this is to reflect the shit out of the array class and print out all its members at runtime
its a field by specification
uh
but yeah its a special field
Uh wat tf lol
seems like arrays work in a weird way similar to autoboxing
.
array basically depends on jni everywhere
idk maybe i'm wrong somewhere
yeah nuker
which is why I asked for ur definition of a field
but i tried to read as much as possible
hey if anyone out there is free, i would like some help with importing spigot api for 1.19 uisng spigot maven respitory
to get some answer
What do you need help with?
How can i get a hashmap key from the value?
there is no way
loop through the map
You should use a BiMap for that honestly
A value can have multiple keys
and if key's stored value == yourValue return the key
well my question was
why don't devs add forEach to array
Hey why are sending too much mensssages
i guess jvm has some limits then
close discord
Array is an object
bro im learning russian and i just noticed that the sound effect of a game i play in, is in russian
free russian lessons
what game tho
Russia shity, learn Spanish or chinmeses which are more useful
its a roblox shooting game but its detailed
yeah it is
no.
spanish useless
and sounds ass, no offense to its speakers
but where is java.lang.Array or smth
russian sounds awesome + its useful since russia is pretty huge
it's not
Russia is large but empty
why
it still has 150 million people in it
russia is just swag
and usa
but has twice more people then russia
https://en.wikipedia.org/wiki/Bangladesh even Bangladesh has more people then russia
Bangladesh (; Bengali: เฆฌเฆพเฆเฆฒเฆพเฆฆเงเฆถ, pronounced [หbaลlaหdeส] (listen)), officially the People's Republic of Bangladesh, is a country in South Asia. It is the eighth-most populous country in the world, with a population exceeding 165 million people in an area of 148,460 square kilometres (57,320 sq mi). Bangladesh is among the most densely populated ...
nice racism
@ancient plank u have some work here
Oh my bad
?
I wasnt wondering to discriminar
russia is swag, u cant deny it
one of the swaggest countries
isn't it c++ code tho
yes
I mean Russia 8s swag but its a dictadura
That why they pretty....
we are living in default capitalism rn tho
even have more parties at government than usa
I really hate Russia because of their ussless presidente who thought that being presidente he can do what his ass songs
https://openjdk.org/projects/jdk/17 released 2021-09-14 - jdk17/jvm.cpp at master ยท openjdk/jdk17
for Clone
well being president lets you do what your ass sings so like
this way you should blame Hitler for being president
๐คท๐ปโโ๏ธ
Also what do cloning vs just assign it?
plus russia is well developed, their presidents are not useless
It wasnt the case we were talking about Russia dont mix things
dont blame a country for war, that's just how life works lol
you blame one person for russian life
You can't really do much by changing presidents every 4 years
i can say Putin is a puppet too
not a topic for #help-development
and he doesn't do what he want
Yes puttin is little child
no one is asking questions here anyways
oh no would get banned again
Discord colores didnt load
discord helper
also english only @fluid river
i'm only using english
where the heck did i use russian
adele what
doesn't matter
Adele sorrt for swearing you
play russian games also
talking to natives wont work since im not that good at it yet
that's how i basically learnt english
but you want to get good at it
yeah but i wouldnt understand the natives at all
well you can try talking to me
at your free time
i know both rus and english well enough i guess
alr after i learn a bit more
this should change texture of cape and player skin right?
no russian on this forum xD
.
alr
idk why
move to general
or ask 2Hex directly ๐
he answered why he wants to learn russian tho
somewhere above these messages
Hey guys, what is the command (or class) to print screen text (with position) to the client?
With position?
You mean like the actionbar?
Would love to supply an offset of the screen. but any position is fine at the moment
No, i mean like a information / text bar which i can update with player information (Hp/money) like a titan bar in wow
You cannot specify specific locations with a class
You can shift characters around with a resource pack
I keep coming back at the boss bar API
Yeah the bossbar is what you'd use if you want on top of the screen
Actionbar is above the hotbar
, action bar sounds best then
gonna look into action api then, thnx for the direction
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.Spigot.html#sendMessage(net.md_5.bungee.api.ChatMessageType,net.md_5.bungee.api.chat.BaseComponent)
https://www.spigotmc.org/wiki/the-chat-component-api/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
declaration: package: org.bukkit.entity, interface: Player, class: Spigot
Can someone help because my plugin doesn't load because my API is an unknown dependency also I can't add the API to the server because it doesn't extend JavaPlugin as I heard it shouldn't and people here said to me that I should add the API to the server
You need to shade your API
How do that
Are you using maven or gradle?
maven
Relocate the API so it doesn't cause issues later
Link shows how to shade and relocate
How do I fix unknown dependency
where can I find the jlib maven repo?
Because the server console says that my API is an unknown dependency
Kumina you were given your answer
what API are you trying to use?
My own
Whcih annotated command framework do you recommend me?
acf is nice
?
I cannot find it on gth
oh ok
aikar/annotation command framework
damn
thanks for ping
seems like I fucked up the cron
huh does your ISP do ssl offloading? looks good to me
the cert hasnt changed since late september o0 weird weird
oh I see the problem. Fourteen sent "www.blog.jeff-media.com" but the cert is only valid for that address without www.
so yeah. it's only blog.jeff-media.com and NOT www.blog.jeff-media.com
๐คก
?
world wide web lol
Yeah but nobody cares about the subdomain
doesnt a browser places www in front of you query if you dont
it's pointless afaik.
Which is the operation to getting the amount of blocks inside a cuboid region?
Do i need to calculate the area?
math, volume of a cuboid
volume?
volume is 3d area
V = a3?
CuboidRegion#getVolume is a thing
Im pretty idiot with math
xyz
oh yeah i suppouse because the volume formula is a3
i missed the *
Thanks mates!
๐คฆ
I also have another question, is the amount of block inside a cuboid region the size of it?
๐ค
Because my idea is to display in the region info, the size of it based on blocks
use Math.ciel on each x,y,z then multiply them all
ok
that will give you how many blocks
so blocks amount == region size?
only ciel IF using doubles
what?
google translate moment
yes
To conclude, the blocks amount is the same as the region size
max-min
hmnn
(maxX - minX) * (maxY - minY) * (maxZ - minZ)
If I shade my api to my plugin when I relocate it why does it remove all my code and the jar file only includes the api
Maybe you are not doing correctly something
build.gradle or pom.xml pls
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.kumina</groupId>
<artifactId>EssentialsCore</artifactId>
<version>1.3.7</version>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.kumina-dev</groupId>
<artifactId>KuminaCore</artifactId>
<version>37f0cc13fe</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>ml.kumina</pattern>
<shadedPattern>ml.kumina.api</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
?paste
Whoops
Something off topic are u the same user as Lumina?
Never heard
perfect dont worry
Took this name of a plant which is in english "cumin"
How do I then fix this
What are you trying to do with EssentialsCore?
Making a lightweight version of Essentials with only the useful commands
for my server
you need to be more specific in your relocation so you only relocate your API not all yoru code
relocating me.kumina is including all your code
It's ml.kumina, but yeah. How do I be more specific to only relocate the API
I don't know your code structure
Example?
relocating ml.kumina.api to api would move everything from ml.kumina.api to api.ml.kumina.api
Well I did something and now all code is in ml.kumina.api
and it was that I changed the pom groupId on the plugin from me.kumina to ml.kumina
How could I make it that the API would be in ml.kumina.api and plugin code in ml.kumina.base
if its an api you start off with it at ml.kumina.api
Okay it's fixed now
Umm.. I got errors that it fails enabling and also fails disabling
even tho I have made onEnable and onDisable
I get these errors
https://paste.md-5.net/sopohujilo.md
Is posible to use MessageFormat object to do a method like the one here. My idea is to learn if posible to use that class to make pairs of each input and then replace it with it value
So let do an implementation:
send(user.getPlayer(), "%name%", user.getPlayer().getName(), "%coins%", user.getCoins());
void send(Player player, Object... placeholders);
new MessageFormat("{0} got shot by {1}").format(player.getName(), killer.getName()) or smth yes
Hmn
I like to do it more like using your own pattern
so you can decide if the placeholder would like: %name%, {name}, etc
then String::replace is the way ig
ok, but what about agrouping then?
I dont like to have hundre of lines just for the placeholders
I use pairs for that
yet but i its looks weird
to pass a Pair<String, Object>
Wdym it's clean
i just use String.formatted with a "{0} {1}" string
And it can be done infinitely
It's not rly user friendly
just for myself
Ah sure then
Something none programming related but what its more secure?
Passing parameters thru the http body or request?
when u realize String::formatted is just regex under the hood 
mmh
Can someone help. I am having a problem onEnable and onDisable
API consolemsg code is here: https://paste.md-5.net/falorunotu.cpp
Plugin main code is here: https://paste.md-5.net/wowusitine.cpp
What could make the error?
what error
Errors in the console: https://paste.md-5.net/odixilejuq.cs
Forgot to add the error like on the help message
do plugin = this before loggin
log method requires plugin singleton to be setup but its not
Oh yeah my API has a setPlugin thing and I forgot to use it :D
I think that could be the problem
It was
But now I get this error: https://paste.md-5.net/osecequtud.cs
Is there anything else that can Cause and Error like org.bukkit.plugin.InvalidPluginException: Abnormal plugin type than a missing nullary constructor
You asked me?
Cause I don't see any error with org.bukkit.plugin.InvalidPluginException
Check highlighted clases and lines
Somethings null thag shouldn't be
Make a constructor in your enum class
Decompile it
The jar should be in your m2
Or whatever gradle is if you use that
You can do the weightage based on enum.values() if you dont want to use the constructor
Yep
You need to add a getter for your power value tho
Yes otherwise just use static constants if you want it to just be an int
This is at PlaceholderAPI:71 return REPLACER_PERCENT.apply(text, player, PlaceholderAPIPlugin.getInstance().getLocalExpansionManager()::getExpansion);
and this at PlaceholderAPI:99 return setPlaceholders(((OfflinePlayer) player), text);
This is at CharsReplacer:42 @Override
You can also do Permissions.MODERATOR.ordinal()
Prob something null there then
Note for ordinal though If you add a rank in between all ordinal will change
This is the code where the error comes
https://paste.md-5.net/sedutoziye.js
Prob config is returning something null add sysout check to see
ordinal is the order in which the enum item is declared
"its position in its enum declaration, where the initial constant is assigned an ordinal of zero"
Yeah having your own declared field is more accurate
getPower Mr c#
I'm allergic to Microsoft sorry
I'm deathly allergic to their conventions
๐ณ
You can keep your upper Carmel case in class names mr c#
Don't worry
Yes you are
Oh God you use Java script never mind gross get out ๐ณ
Lol
I love python
Uhmm c# cuz cringe
And that's it
Nothing reat against js even though it's mid it's not the poor web devs fault
I use type script myself
Instead of js
But some companies have legacy js code based
I'm a react plus type script guy myself
Im testing some things inside mc and doing sin(30ยฐ) is giving negative
yes it weird sin(30) should not be negative
Well
30 deg
sin(30) certainly is negative
okay
via plugin is a way
command:
cmd-name:
permission-message: "bla bla"
well i dont use command executor haha
I use airkar commands
no
that sends the usage message
in general tho
there is Bukkit.getPermissionMessage()
which you can send
How would I look through the follow config section?
example:
a: "1"
b: "2"
c: "3"
you would loop through it
for (var key : getConfig().getConfigurationSection("path.to.example").getKeys(false)) {
}```
ty
yes, myb
some examples of looping through configs
missing nms added to ur classpath
you can add the server jar as a dependency (run build tools + depend on spigot as an artifact)
Yes
As long as you know what youโre doing
Indeed
What do u have rn?
You remove -api from spigot-api
and the def targetJavaVersion wont work
use java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
Oh
Actually they might set it below
Idk
But ye
Ah okay
Yeah thata fine then
Na
Just do what I said
And reload ur gradle project
Also you need to have ran buildtools for 1.19
?
Which jar file?
The one from BuildTools?
Ah
It uses a different one
BT copies the generated one to another directory
Which is the one that will be used
Nice
:)
Your welcome sir
Save up a bit and spend money
Any reason youโre not using moj mappings?
Ah
buildtools in gradle is rather annoying
add
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = "https://repo.papermc.io/repository/maven-public/" }
}
}
on the top of your settings.gradle file
then
plugins {
id 'java'
id 'io.papermc.paperweight.userdev' version "1.3.7"
id 'xyz.jpenilla.run-paper' version "1.0.6" // Adds runServer and runMojangMappedServer tasks for testing
}
at the top of your build.gradle
yeah sounds like a you problem, you can't do it with just spigot
just limit yourself to not using paper's api
just base spigot functionality
yeah
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT'
paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.18.2-R0.1-SNAPSHOT")
}
for example
make sure to add the paper repo
bruh moment discord
Did you add the paper repo
and the thing on settings.gradle
hey guys so i'm making a 1.19 project with spigot api and i'm using spigot maven respitory to add to the pom.xml my code in the pom looks like this:
`<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.scribble2</groupId>
<artifactId>scribble2</artifactId>
<version>1</version>
<name>scribble2</name>
<description>A very scribbly project</description>
</project>
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--This adds the Spigot API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19</version>
<scope>provided</scope>
</dependency>
</dependencies>`
For some reason i'm getting an error message where it says: The markup in the document following the root element must be well-formed can anyone help
?
still having the issue if anyone knows the answer pls help ๐
welcome to java
how do you teleport people into a certain dimension, like the nether for example
final Location location = new Location(Bukkit.getWorld("nether"), here is the loaction in the world);
get the entity/player here.teleport(location)
it isn't needed to create a variable "location" you could just do "get entity/player here.teleport(new Location(Bukkit.getWorld("nether"), here is the loaction in the world) but if you are going to use that location in that class more, it is easier to just make a variable
Getting an error here
?
ok ty
np
pls help
me
true
yey, tyty
nice empty section
im confused what ur tryina do
tryna paste a schematic every chunk (16 blocks)
and
i have an error with the pasting function
new discord feature
chat request
like friend request
but just chat
no
idk why
it's a beta feature
just dont copy&paste code
im new ;-;
and you always will be if you just copy&paste without understanding
Oh i understand it
I read the resources as well
just having trouble with this but
thats it
you seemingly dont
^
Probably true
otherwise you would understand that you are trying to use 2 variables you dont have
i have those variables as integers
but with this feature you can chat with everybody who accepted request
without being friends
ur ide says u dont have the variable
s
hence the red text
they arent set to anything
๐
for what reason you create variables instead of just not using them
if they are equal 1
now ur gonna place schematic at 16, 40, 16
why do you even need them
true
yeah tbh u dont even need em
should I make it a for loop?
uh ok never done this before but u could try looping it and adding x1 more each time
dunno if its gonna work
i like your cut g
they meant to do /s
its an enclosed space
the player spawns in the schematic
and the schamtic isnt that big
no backrooms ๐
tf
also already have that
for the api
the backrooms schematic is around the same size as your average skyblock island however
its going to load into every chunk to fit seemlessly
as an infinite maze
morice
from what i see you are kinda ?learnjava guy
wanna code something
quick
random plugin idea
first i need halp
umm what
infinite maze...
seems boring
there are monsters
mc is hard to make scary
more levels
oh
yea ik
i used to code Roguelike in minecraft once
but u needa make some texture packs to make scary
who knows
wha
for (int mult = 1; i < chunksAmount; mult++) {
your mult is 1 then 2 then 3
}
tyty
yea
until hits highest number which i defined as chunksAmount
so imma make a variable for chunksAmoutn
idk
you didn't give full description of what you actually need
paste schematic is the only thing i figured out from what you need
well this my idea, loading and then subsequently pasting a schematic as long as players load new chunks
chunkLoadEvent
public void chunkLoad(ChunkLoadEvent e) {
ClipboardFormat format = ClipboardFormats.findByFile(file);
try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
// Stuff here
} catch (FileNotFoundException ex) {
Bukkit.getLogger().severe("Schematic file doesn't exist!");
ex.printStackTrace();
} catch (IOException ex) {
Bukkit.getLogger().severe("Error reading schematic file!");
ex.printStackTrace();
}
if (e.isNewChunk()) {
try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(e.getWorld()))) {
int getX = 0;
int getZ = 0;
int chunksAmount = 10000;
int i = 1;
for (int mult = 1; i < chunksAmount; mult++) {
your mult is 1 then 2 then 3
}
Operation operation = new ClipboardHolder(clipboard)
.createPaste(editSession)
.to(BlockVector3.at(getX * 16, 40 ,getZ * 16))
.build();
Operations.complete(operation);
}
}
}
this is wut i have rn
umm
you would need to get chunk coordinates
from event
and just multiply by 16
to get blockX and blockY and blockZ
so
And then paste schematic on the block
how do i get chunk coordinates ๐
event.getChunk().getX() i guess
yea ik
cool
@EventHandler
public void chunkLoad(ChunkLoadEvent e) {
ClipboardFormat format = ClipboardFormats.findByFile(file);
try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
// Stuff here
} catch (FileNotFoundException ex) {
Bukkit.getLogger().severe("Schematic file doesn't exist!");
ex.printStackTrace();
} catch (IOException ex) {
Bukkit.getLogger().severe("Error reading schematic file!");
ex.printStackTrace();
}
if (e.isNewChunk()) {
try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(e.getWorld()))) {
int getX = 0;
int getZ = 0;
int chunksAmount = 10000;
int i = 1;
for (int mult = 1; i < chunksAmount; mult++) {
e.getChunk().getX();
e.getChunk().getZ();
}
Operation operation = new ClipboardHolder(clipboard)
.createPaste(editSession)
.to(BlockVector3.at(getX * 16, 40 ,getZ * 16))
.build();
Operations.complete(operation);
}
}
}```
this is what i have nwow
bro
i told you i may mess it up badly ๐
im really dumb doe ๐
if (!e.isNewChunk()) return;
try (EditSession editSession = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(e.getWorld()))) {
Operation operation = new ClipboardHolder(clipboard)
.createPaste(editSession)
.to(BlockVector3.at(e.getChunk().getX() * 16, 40 , e.getChunk().getZ() * 16))
.build();
Operations.complete(operation);
}```
idk never used Chunk class
k ill use getBlockX
bruh
that's chunk x and z
which you need to multiply by 16
to get block
yeah
copy paste instead your last part
with new chunk
test then
