#help-development
1 messages ยท Page 490 of 1
Now I just need to fix the errors for the maven dependencies
did you take a look at what I entered?
i sent you the link from where I copied it from
Ok
Take a look at that pom and you will see how it needs to be structured
And then it should be easy to know where to put the plugin block section at
So you need certain things in the pom. Should notice in mine at the top it has the modelversion
You always need that
Then it has a dependency section, and that is how you specify all your dependencies. And then it has a respository section. Any depedency that is not in maven central you need to specify the repo where maven can find it
And then there is the build tag section where all your plugin blocks go and basically dictates how maven should do some things
Hopefully its all making sense now lol
Can I add the plugin extention thing i sent you a paste of at the end of it
will that work
Plugin block sections have to be inside the build tag section
In my pom you should see i specify multiple plugins inside the build tag
Like this?
<!--Spigot API-->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.14.4-R0.1-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-chat</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
thats a block right?
Yep. Might want to fix that version tag at the end on the first dependency
Unless its just discord messing with it
So I just need to change the version to get the version I want
org.spigotmc:minecraft-server:1.18-R0.1-SNAPSHOT:txt:maps-mojang
1.18-R0.1-SNAPSHOT
in version
So how you read that
wdym?
Is like so. The group is org.spigotmc artifact minecraft-server version 1.18-R0.1-snapshot classifier maps-mojang
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-chat</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
Is this correct?
Before you go
I just need to change all the group ids
and artifact ids
to match my project?
No
<groupId>pw.hwk</groupId>
<artifactId>servertutorial-parent</artifactId>
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>```
Group ids and artifacts are specific to the dependency.
multimodule?
??
Yeah delete the parent stuff you dont need it unless you want to make a multi module project
Wdym by multimodule
Which is probably a bit more advanced at the moment for you
ignore it, you are starting with Maven you shoudl not be even looking at multimodule entries
?maven is all you need
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
with a basic pom
Edgar how do I fix my errors?
Should I send the whole thing
why do you even have the deploy plugin?
I just copied the pom file from frost
ah
and made slight adjusmtnets
Yeah you werent suppose to copy it
I'll remove unneeded things later
oh ok
this is a fairly basic pom. remove teh dependencies you don;t need https://github.com/ElgarL/PermTrigger/blob/master/pom.xml
That might be better to look at lol
actually thats old to now
Anyways going to drive home now
still has source/target in properties
Bye
Still have three errors
you can;t just copy the pom, you have to customize to fit your plugin
groupId, ArtifactId, version, description
I just changed a bit, the three errors im getting seems to be something else, cannot read maven project, modelVersion missing even though its there, and some problems encountered while processing the poms
Hello?
Oh
Heh
i told em my errors
no you posted a screenshot with some random errors and said you'd changed some bits
I didnt say I resolved the errors
Ohh
I see the misunderstanding, anyways
I still get the errors
?paste your pom
@/md5
Ok, ill make a new one
The nice thing about the mc plugin for intellij is it saves the need to fix pom's. I hate reading pom files
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.spiderunderurbed</groupId>
<artifactId>onutillities</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>```
My pom
any errors now?
The middle error is now, "project build error, model version is missing"
right click your pom and select update project
Wait, so it knows where to find spigot mc
I didnt send a link
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
It downloaded as a depenedencie
maybe it was included properly when I had a previous pom file, and carried over
idk
Do I need gradle?
to start working on my project
looking at the website
I assume i do
no]
I just need to know how do I set my Main.java file and ill be on my way, for a pom file, I been looking at this website and i still dunno how
Hi. is there a way to create an NPC without using NMS? I'm using 1.19.4 API
Citizens api
Google maven jar plugin main class
Otherwise, no
sorry but I don't want to use any external libraries.
Then you need NMS
So my group id has to refer to the starting file directory
I assume
Is it normal that armorstand teleports are laggy as hell?
Just make a class and put the name in plugin.yml
Classes go in src/main/java and plugin.yml in src/main/resources
Any tutorial should cover this
I keep my starting files in main/java ?
last question to you
OH WAIT
Well every *.java file goes into src/main/java
Thankks
Do I need ti make a package?
Everything else (I.e. *.yml files) goes into src/main/resources
You should
I am not sure whether you need to, but it is the best if you do
What do packages do?
Make sure nothing goes haywire
The exact meaning of packages is not that interesting to you at the moment
forgot to mention, other then maven central you have what is called local repo. If you have dependencies in there maven will pick them up too
packages just means directory. Java projects in term of how its organized is just a series of directories
Just don't give packages generic names (such as "org.example.pluginname" or "pluginname" - instead use something like "com.gmail.username.pluginname")
you can navigate to the project directory and take a look to see for yourself ๐
Caused by: java.lang.IllegalArgumentException: Directory 'plugins/oNUtillities.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
name: oNUtillities
version: 1.0
api-version: 1.17```
^ my yml
why setPlayerListHeaderFooter() is deprecated?
Hey um, are you avalible>
yes as I am home now ๐
is the plugin.yml inside your jar?
Yes
you checked?
the resources file should take whatever is in it to the root
I mean, im looking at it now in editor
this is what is supposed to happen, however this does not mean that is what really happened during compiling. Occasionally maven will deviate and not do that lol
so, open up the jar and see if the yml file is actually inside there. Odds are it probably isn't
What editor can I use to open a jar?
Ok
It disappeared
what disappeared ?
well, now we know why the error is being thrown
and now know maven isn't doing what it should for some reason
lets see what your pom looks like now
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.spiderunderurbed</groupId>
<artifactId>onutillities</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>```
that is it?
yes
you need a build tag
Umm how do I go about making one
<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.spiderunderurbed</groupId>
<artifactId>onutillities</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>onutillities</finalName>
<defaultGoal>package install</defaultGoal>
<!-- BUILD PLUGINS -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<file>target/classes/plugin.yml</file>
<replacements>
<replacement>
<token>maven-version-number</token>
<value>${project.version}</value>
</replacement>
</replacements>
</configuration>
</plugin>
</plugins>
</build>
</project>
I added the replacer plugin, which is going to make it easier for you to update the version number in plugin.yml. so update the plugin.yml file and in the version spot, put maven-version-number
<build>
<defaultGoal>clean package</defaultGoal>
<sourceDirectory>src</sourceDirectory>
<resources>
<!-- Include all resources -->
<resource>
<directory>resources</directory>
<filtering>true</filtering>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
</build>```
couldnt you use resource filtering and remove the replacer plugin
sometimes maven doesn't update certain things in the plugin.yml
ill try this
the replacer plugin has always been reliable for me
filtering does the job, you just have to not parse nbt/zip files
by that statement seems still better to continue using replacer plugin and not have to worry about such technicalities
I'd test replacer if I were you
I know filtering corrupts the BOM on compressed files
replacer plugin doesn't filter
it looks for a token in files in a specified directory or in a specified file if just a single file is listed
@eternal oxide @wet breach
Turns out, the yml file is kept in a folder called resources, not the root
so it isnt detecting
now that I added the build tag\
and if it finds the token, it replaces it with the key you specify, in this case in the above I have it set to use the project.version of the pom
yes, I told you that is where it goes. So in source format for the project that is the correct place. If your pom is setup correctly, maven will take all files in the resources directory and place those files in the jar root
So my pom is missing something that takes the resources and moves it to the root
can you just send me or tell me what block i need
Yes
you seen my pom
i just have the build tag and dependencies
then add this inside the build tag
<resources>
<!-- Include all resources -->
<resource>
<directory>resources</directory>
<filtering>true</filtering>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
eclipse is weird sometimes when it comes to maven
normally you don't have to specify this
but, its fine we can beat maven with a stick if need be
<defaultGoal>clean package</defaultGoal>
<sourceDirectory>src</sourceDirectory>
<resources>
<!-- Include all resources -->
<resource>
<directory>resources</directory>
<filtering>true</filtering>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
</build>```
@wet breach I already had it
it still stays in the resources folder
There is nothing in the directory called target
then, build the project. Make sure you are telling eclipse to build with maven
and not that the IDE should be trying to build it
Export, Jar, Click project (Export generated class files and resources), thats all
thats my steps
yeah don't export
thats not building with maven
that isn't using maven
Umm, ima search how to build
do you have a green arrow icon in your IDE?
like it looks like a play button
if you do, just click that
Right click pom, run as -> Run Configurations. Then create a new task under maven build for your project
[[1;31mERROR[m] Source option 5 is no longer supported. Use 7 or later.
[[1;31mERROR[m] Target option 5 is no longer supported. Use 7 or later.
[[1;31mERROR[m] -> [1m[Help 1][m
[[1;31mERROR[m]
[[1;31mERROR[m] To see the full stack trace of the errors, re-run Maven with the [1m-e[m switch.
[[1;31mERROR[m] Re-run Maven using the [1m-X[m switch to enable full debug logging.
[[1;31mERROR[m]
[[1;31mERROR[m] For more information about the errors and possible solutions, please read the following articles:
[[1;31mERROR[m] [1m[Help 1][m http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException```
thats is not your pom
o.O
did you remove the build block again?
are you trolling us?
I think they didn't save the file XD
that is also NOT the pom which is giving that error
Wait ima re-run it
still not the pom that gave that error
Wtf is that formatting?
Will i have to go digging for that pom, or can I edit it in my pom
well, the odd thing is. What happened to your pom that we spent some time helping you create?
Wdym? this is it:
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.spiderunderurbed</groupId>
<artifactId>onutillities</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package</defaultGoal>
<sourceDirectory>src</sourceDirectory>
<resources>
<!-- Include all resources -->
<resource>
<directory>resources</directory>
<filtering>true</filtering>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
</build>
</project>```
its missing the compiler plugin
You guys said I should make my own pom
doesn;t need it on Eclipse, but it doesn;t hurt
if its missing, the IDE will use whatever default for java version. Compiler plugin is needed for specifying java version
OH
thats why its saying 5
ah
I find it weird that eclipse defaults to java 5 though and not 6
Hello, how to work with MaterialData in v1.12.2?
For example if I want to set a block to Spruce Wood (Spruce Log), have I missed something with the code below?
Block block = world.getBlockAt(...);
block.setType(Material.LOG);
block.getState().setData(new Tree(TreeSpecies.REDWOOD));
it wouldn;t
of course it has to be different from all the rest
well, java 5 isn't maven default either
it would default ot whatever java is installed
which is why I'm startign to belive he's trolling
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
</plugins>
<defaultGoal>clean package</defaultGoal>
<sourceDirectory>src</sourceDirectory>
<resources>
<!-- Include all resources -->
<resource>
<directory>resources</directory>
<filtering>true</filtering>
<includes>
<include>*.yml</include>
</includes>
</resource>
</resources>
</build>
that is an even more scarier explanation XD
his error clearly stated target/source
I'll try that
move the plugins portion below resources
I am sure it probably doesn't make a difference, but convention wise it looks better
?maven and you need the repository. So it won;t error on a new PC
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
It built
YES
so ima export it and look at it
no, you no longer export
it should be in your target directory now
find it in the target folder
it should be in the target/ not target/maven-status
do you not know how to open a file on a pc?
just go to the project folder
in there there is a directory called target and in there should be a jar
now if you open that jar up, it should all be correct now
that is the jar you should put in the plugins folder for mc
I tried the zip method, I dont see the plugin.yml
lmao
<directory>src/main/resources</directory>```
I'll add that then rebuild
replace the current one which says resources
add that in the resources part
well, glad we have finally gotten to some progress
I compiled it again, it made a new folder called testCompile and there is no jar in the directory
?paste your current pom
delete line 32
love the odd formatting on the end portion
do you build with package or clean package
Building jar: C:\Users\DuttR\eclipse-workspace\onutillities\target\onutillities-1.0.jar
but it says it copied 0 resources
I dont get that part, why wouldn it copy
is there a jar at that location?
There is no jar at:
C:\Users\<Censored>\eclipse-workspace\onutillities'
I didn;t say there
I told you EXACTLY where to look
C:\Users\DuttR\eclipse-workspace\onutillities\target\onutillities-1.0.jar
makes sense since clean, deletes the target directory
I guess he's only looking in his IDE
and if you were viewing the directory when this happened, windows desyncs
nah windows would be fine. If you are viewign a folder maven will not delete it, only its contents
ima try it in the server
results vary for this, on my system if a directory is deleted that I am viewing at the time I end up with a ghost view
on some other systems, windows will close out the view
I am using win7 so my system is probably more stable than yours ๐
how do you run anything
I've yet to find anythign which can't run
also why 7 not 8 or something
well any games that need directx 12 wont run on windows 7
windows 8 fuckin blows
windows 8 was such a flop microsoft quickly ditched it after having released it
they all support 11 anyways
they didn't ditch it that fast
otherwise there wouldn't be windows 8.1
If they stopped trying to make my PC look like a tablet/phone I'd consider upgrading.
windows 10 isn't all that bad if you get the pro version
great selling point, not too bad if you get pro ๐
well I mean, xp was the same way
windows 7 is a bit worse on that end
because it has like 6 different versions
yeah I used pro on xp
Ultimate on win7
I have windows 7 Ultimate
best OS ever, other than DOS
but it sounds like you use the best versions anyways, so it shouldn't be a surprise that windows 10 pro is the best to use
but I use windows 10 pro ๐
haven no need for my windows 7 no more
if I could make it look like win7, behave like 7 and have no telemetry I'd consider using 10.
yep can have this
you can completely disable telemetry in windows 10 pro
mostly
all of it
they are inserting "ads" in the start menu now
although they are not calling them ads
you can even do the same with windows 10 home if you make a single windows 10 pro system the domain controller ๐
I have 0 ads in my start menu
i'm getting this error whenever a specific config is loaded, which i think shows that somewhere a material entry doesn't exist right? how would i go about finding that
looks like you have a Static ItemStack
i don't no
can't do that are init time
its not as helpful as you might imagine
it just happens when i call .get() on a Config
it's trying to deserialize an ItemStack
yeah i do
some of us are quite aware in how to read the stack traces and error messages
what version?
1.14
then you can only use 1.14 Materials
oh is that how that works
so you should really be using the latest api version there then
will run on systems as far back as...
You should have been here an hour ago NukerFall
well, it makes sense that there would be free java lessons in places given java is free
sorry just woke up
would have gotten a maven lesson
that explains why an item editor plugin i made doesnt work with newer materials lmao
goofy ahh
We could have dumped a headache on you.
well didn't help the person kept deleting their pom or not saving it
Magic ๐ช
like, it create an armor stand?
yes
๐ซข
ty
so if i use api version 1.19 if i go on lower versions it nags about that, if i use a lower api version i cant use the materials, and without api version it nags about a lack of legacy constants
so tf do you do
if you have api version 1.14 but the server is a 1.16 you shoudl have access to 1.16 materials.
you just can't load items created on 1.16 into a 1.14 server
so if you are supporting 1.14 servers you are limited to 1.14 materials
right that makes sense, im not doing that though
uhh, sec
i should clarify though even though it said 1.14 im supporting 1.16.5+ only, i just hadnt changed that api version in a while
no one said it is easy to support multiple versions ๐
https://paste.md-5.net/okikanaxaf.yml
one of the configs thats complaining is this one, im testing on 1.16.5 and the item versions here are 2586 which im pretty sure are of 1.16.5
if i understand it right though if i were to use something like mangrove logs in one of these configs and i test on 1.16.5, it'll throw that error
it'll consider the material null basically
every itemstack looks to be QUARTZ
deepslate is only in 1.17+
i think im understanding why people choose to serialize itemstacks in their own way, so this doesnt happen
in all the places where you have the block set to deepslate variants, this will only work for 1.17+ as that does not exist in 1.16
i understand and in my code i made it so that if the material is unrecognized the entry is skipped
i thought that would be plenty
i didnt think calling the config itself would throw errors if itemstacks with such materials were used
well its serialized
deserializing requires the reading of everything to get it back to what it was
can't nitpick serialized stuff, otherwise it really isn't serialized then
thats fair
when the config is loaded all deserialization happens
so first touch on the config causes deserialization
would be nice if it specified which materials are considered unrecognized then
would make it quicker to patch
this is generally why people use multi-modules
or just version specific jars
but, I think what you should add to your config
is the mc version it was created in
this way, you could just use that to know what needs to be looked out for. And yes, the reason for custom serialization is because the serialization you are looking it, is human readable serialization
and not really a true serializing where it would indeed be compact
i use guis to populate the configs so i didnt consider human readability as high of a priority
then, use a better serialization method
yeah i gotta make one lol
well there is plenty that exist already
and I was stating the serialization method you are using is human readable format
not the other way around, so if you don't need human readability, switch to a different serialization format that is more ideal ๐
it may just solve your problem too
the plugin is already being used by 200ish servers so far so its a little difficult for me to simply use different serialization, though i could do the lazy thing and just ditch 1.16 support
in any case, i got work cut out for me ๐
its not hard to create an auto converter
in your new format just add an identifier. Instead of using yaml api to load the config initially just use the java file api to parse the file to read the lines at the top. If you don't see your identifier you know its the old format
99% of my commands return the usage any idea why?
i have 1 command that woeks
works
and the others dont
even tho i made sure they look the same in every way
Return true for no usage
Whatโs your problem?
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
.
its two different versions but it should work on 1.8.8 too
1.16.5
Give us more info dude.
@quaint mantle Did you register the event?
yes
Show
getServer().getPluginManager().registerEvents(new onJoin(), this);
?
event.getPlayer.setScoreboard?
At Player p = (Player) e.getPlayer()
Nope, the above^
ok
Your stacktrace should have told you.
bonk.
Looks like it
yh but what is wrong now
@worldly ingot i have a new pr for you, annote everything in bukkit and spigot with an @Since
Does it compile with you ignoring the IDE?
no
Did we already discuss this
You did
idk
That would imply that spigot supports older versions
the api does
No it doesn't
how else am igonna know that XYZ method was added way back in 1.14
Is ConfigUtil a class of yours?
yes
its 2 different plugins but config util looks exactly the same
same folder too
package*
Hello, is this correct ?java Bukkit.getScheduler().runTaskAsynchronously(this, (Runnable) new BukkitRunnable() { @Override public void run() { GenOre(event, -60, 20, Instrument.BANJO, 0, Note.Tone.G); } });
I don't know how to make a BukkitRunnable running asynchronously
How i can check if player is on ground? I know method player#isOnGround but is deprecated. There's other way to check this?
I'm creating a double jump plugin and I want when the player is on the ground to reset their jump series
idk why not
Okay, thank u.
because it's completely useless and might lead to the conclusion you don't want know a cast is
But you are casting it to a Bukkit Player
I am not casting anything to player. I just said that casting something that already is player, to player again, makes no sense
It looks like an apple, smells like an apple and tastes like an apple, but we better DNA test it to be sure.
Yes, I know I meant that you are casting the player to a Bukkit player with Player p = (Player) e.getPlayer()
Where do you think the Player object is coming from? o.O
what is "e" supposed to be that getPlayer() doesn't already is a bukkit player?
Yes from it but then you only have to say p instead of e.getPlayer() and yes I know you can make Player p = e.getPlayer but I am doing it like this idk why like I already said
What're you doing
First, both e and p are bad variable names
Second, you can save the player as field/var even without casting it
Third, a player will never be a string
Watch me ๐
String player = (String)event.getPlayer()
this didn't make much sense to me. so getPlayer returns the bukkit player. Which is Player. There is indeed a non-bukkit player but you can only access that via nms and it is called CraftPlayer
so, that being said there is no reason to cast getPlayer to Player and you should remove it to keep with conventions. the compiler automatically removes it since it is the same type
Oh sorry just let me do it like i am doing it
Bro can't be real
I got a new dog today but the wifes not happy (Dog) event.getSheep();
Lmao
String player = (String)String.valueOf(event.getPlayer().toString());```
Genius
got to be safe
last time I checked, string did not implement player though ๐ฅฒ
Watch me
how? string is a final class
public class String extends String implements Player
you cannot extend string
Nothing that you can't do with an open source jdk ๐
Starting in Java 21 String will implement player class
Stay mad losers
Wait is it work?
why would that not work?
if you want "player" to be Player@a825162... then sure, that will work
the use cases are limited, at best, though lol
I thought it call getName()
toString() turns an object into string representation. Doesn't mean it will automatically convert the data the object was holding into a string or display it
anything that is an extension of Object has toString()
he meant that you missed the ()
can't have code that doesn't compile
unless you're using eclipse compiler lol
well not like discord is a decent IDE
lol
source code cannot be executed.
nah we just imagine the code we create running to know if it works or not
technically it can
CTRL + ALT + E my IntelliJ Build shortcut
probably just cast it to long, then hope for the best
mines F4
just be careful to not press ALT and then F4 xD
in case you're in Windows
It is not an interpreted language ๐
You're not an interpreted language
then oracle would sue you
split at the @ and you have the hashcode in hexadecimal format
Java is an interpreted language
Java 11+ allows you to execute java source code without compiling
it doesn't depend. Java requires a JVM for it to execute
therefore it is an interpreted language
Bruh
this is what oracle claims about java:
the JLS sounds like a lawyer wrote it
The null type has one value, the null reference, represented by the null literal null. A null literal is always of the null type (ยง4.1).
for those that want to read the JLS
you may find some interesting things in there
like learning what word tearing is
Are those requirements for a jdk
I forget sometimes a language is separate from a jdk
class Test {
class A {
A(Test Test.this) {}
// OK: the receiver parameter represents the instance
// of Test which immediately encloses the instance
// of A being constructed.
void m(A this) {}
// OK: the receiver parameter represents the instance
// of A for which A.m() is invoked.
class B {
B(Test.A A.this) {}
// OK: the receiver parameter represents the instance
// of A which immediately encloses the instance of B
// being constructed.
void m(Test.A.B this) {}
// OK: the receiver parameter represents the instance
// of B for which B.m() is invoked.
}
}
}
fancy
My plugin is giving me this error when i start the server do you knwo why?
error: https://paste.md-5.net/omazenaleb.bash
code: https://paste.md-5.net/ewokubojuj.cs
I want to spawn particle.
When i try to spawn REDSTONE particle works fine, but when i try to spawn NOTE particle error:
data should be class java.lang.Void got class org.bukkit.Particle$DustOptions
I spawn particles using:
player.spawnParticle(
particle.getType(),
player.getLocation(),
count, offsetX, offsetY, offsetZ, extra,
new Particle.DustOptions(getColorFromName(particle.getColor()), particle.getSize())
);
How i can check if particle needs DustOptions?
check if it returns an error
Note does not have any data
Ye i know, but how i can check if needs data
either check the javadocs, i added all the data types there once, or check whether Particle.YOUR_PARTICLE_TYPE.getDataClass() returns sth
โฌ๏ธ check if it returns an error and if it, do spawnParticle without DustOptions
if it doesn't mention anything here, that particle just doesn't have any additional data
Hello, with what can I replace this who is deprecated ?java ChunkData chunk = createChunkData(world);
where is that method supposed to come from?
from this :java public class ChunkGen extends ChunkGenerator { @Override public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biome) { ChunkData chunk = createChunkData(world); } }
you are not supposed to create your own ChunkData object, but instead just use the one passed into as parameter
e.g. generateCaves(...) has ChunkData as last parameter, and all other methods where you'd need it, have it too
okay thanks
Sorry for ping, how i can check that?
getDataType cannot be null
then check if it returns Void
if getDataType() == Void.class, there is no additional data
Thank u.
Question regarding PlotSquared if someone have ever used their api how can i pass the Location Bukkit to the PlotSquared Location format
Not sure if I buy that to the fullest degree
BukkitUtil class translates between PS and bukkit objects
so why do a bunch of classes in Spigot have #spigot() methods and interfaces? i guess once upon a time it was a hard separation of Bukkit and Spigot API, but why don't they just include the methods directly nowadays? deprecate the old interface methods in favor of ones that actually belong to the relevant classes?
yeah it's pretty pointless imho
i mean it seems like a strange practice in any case, yeah, lol
It probably is like that because it always used to be like that
a lot of things are still like they are because that's just how it was made, lol. like we never made a big conversion from legacy text to components
though it's in progress apparently
pog
Choco has a PR to add it everywhere where it is missing IIRC
But sadly I fear that it will end in the same part of the dumping bin as the Material API rewrite
You will find 90% of the issues and dumb stuff Is still there as noonee cba to fix em
Player and offline player are an infuriating example of it imo
Player: works for online players...
Offline player: Works for both
God forbid we change the names to OnlinePlayer and Player ๐
cannot access com.plotsquared.core.location.Location someone knows why im using mvn install
Well doing that would cause ultimate chaos
what is the BlockData for all crops?
Ageable?
I need to stop the player from putting certain items into the offhand slot, but If I just cancel the event it lets the player put the items into the slot, but not take em out
i have this under an inventoryclickevent
if (e.getSlot()==40)
{
e.setCancelled(true);
}
fuc
dont blame them, material is referenced thousands of time
I am pretty sure that PR is "done" by now
how
?jd-s there are plenty of inventory events
I'd also cancel the InventoryDragEvent
there's only one of each item tho?
minecraft can be funky sometimes
also I have gone thorugh them and I'm fairly certain inventoryclick is the correct one
Yeah ordinarily it is but apparently not
Unless you have something that is causing your lines to be irrelevant
it ain't the others tho
doeds it maybe get the item on the cursor maybe?
as it's not technically placed in the slot?
Hence inventoryDragEvent is the only plausible one
imma check
You'd need it regardless anyways just in case they drag it into the offhand slot
I'm fairly certain it's impossible
I'm gonna do some checking later but I don't think it'll be an issue
I'm sure you can drag it into "normal" slots and then into the offhand slot
oncursor was correct
The InventoryClickEvent can be tricked into thinking it's actually the InventoryDragEvent if someone is rapidly clicking in the GUI.
looks like you were correct
A lot of PRs are "done" but I assume MD does a lot of testing with them to look for edge cases
Plus yknow, he does have an actual job to do
Literally impossible
Do attribute modifiers need unique names? kinda annoying if so
Just use a random uuid
Hello everybody! Is it possible to intercept the packet of changing the player's health interface to the health of an entity (for example, when the player prays to a horse) and cancel it, so that the player has his health interface?
maybe it's possible with ProtocolLib : https://www.spigotmc.org/resources/protocollib.1997/
Thanks, Iโll try
Hello, I have a problem with sending the ENTITY_METADATA packet. I would like to send this packet to set the swimming animation for a particular player so that it looks like crawling. I have seen that this can be achieved by sending such a packet, but unfortunately I don't know how to send it correctly. Currently, nothing is happening. I would be so gratefull if someone could help.
THERE IS NO ERROR IN THE CONSOLE BTW
CODE:
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
PacketContainer packet = manager.createPacket(PacketType.Play.Server.ENTITY_METADATA);
packet.getModifier().writeDefaults();
List<WrappedWatchableObject> wwo_list = new ArrayList<>();
wwo_list.add(new WrappedWatchableObject(1, 0x10));
packet.getIntegers().write(0, (int) p.getEntityId());
packet.getWatchableCollectionModifier().write(0, wwo_list);
for(Player target : Bukkit.getOnlinePlayers())
{
manager.sendServerPacket(target, packet);
}
you may need to transform any future packets too
wdym?
basically any future entity metadata packets could change the metadata and revert your changes
Well, if it was me, Ill go with NMS
Where can i find a good ArmorWearEvent?
java.lang.RuntimeException: File 'plugins/WaterTranslator-1.0.0.jar' failed to load!
at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:59) ~[paper-1.19.4.jar:git-Paper-507]
at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.lambda$registerProviders$2(DirectoryProviderSource.java:32) ~[paper-1.19.4.jar:git-Paper-507]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:30) ~[paper-1.19.4.jar:git-Paper-507]```
What is this?
ohh
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:340) ~[?:?]
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:282) ~[?:?]
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:327) ~[?:?]
at java.util.jar.JarVerifier.update(JarVerifier.java:239) ~[?:?]
at java.util.jar.JarFile.initializeVerifier(JarFile.java:762) ~[?:?]
at java.util.jar.JarFile.getInputStream(JarFile.java:845) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:173) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.loadPlugins(CraftServer.java:423) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:219) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:975) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[21:35:53] [Server thread/ERROR]: This crash report has been saved to: /home/container/./crash-reports/crash-2023-04-27_21.35.53-server.txt``` when using spigot
If I don't have WaterTranslator installed, I don't get this error
a plugin
Player#hidePlayer
Hello, I don't know why my custom populator is not working, I'm using Spigot 1.19.4 :
https://pastecord.com/pyqetuxari
I register it using this :
@EventHandler
public void onWorldLoad(WorldInitEvent event) {
getLogger().info("Gen");
event.getWorld().getPopulators().add(new CustomOreGen(this, -60, 20));
}```
I get this in my console :```bat
Preparing level "world"
[SimplesOres] Gen```And nothing after
**PLEASE HELP MEEE ๐ฅบ **
You need to also generate new chunks with it
?? how ?
yes
Use jstack
After a long time, the game doesn't respond (and the server crash)
what do I need to modify ?
Oh right - does watchdog crash the server?
In that case you don't need to use jstack since watchdog already gives you the stacktraces
no, this is only too long ticking, chunks doesn't respond
but you don't get any crash report after waiting a minute or so?
when I use WorldJoinEvent instead of WorldInitEvent
but else I haven't got any error or crash
there is just... nothing
Then we need jstack. You can execute jstack with the pid of the minecraft server. You can find the pid via jps
The jps and jstack binaries are found next to the java binary within your JDK install
Run jstack 6972 (on unix - under windows it might be different; it may also be the case that you need to use the full path to the jstack binary)
okay
Running 2 - 3 times will get a good idea where it starts hanging
Okay the server thread is parked - no good
Ah yep I see now
what is it ?
You are causing a deadlock by obtaining a chunk that isn't loaded yet
so I need to load it ?
Don't use chunk.getBlock(x, y, z)
what do I need to use ?
Ah no - the Chunk chunk = world.getChunkAt(chunkX, chunkZ); is the critical piece of code. But the same result
If I had to guess you need to use LimitedRegion but let me look
Use the LimitedRegion it gives you
okay
no this is patrick
Check the javadocs
any explanation of how to use it ?
Like a normal World apparently
thanks ๐ซ
does this server finally support fancy formatting
The official video for โNever Gonna Give You Upโ by Rick Astley
โHold Me In Your Armsโ โ deluxe blue vinyl, 2CD and digital deluxe out 12th May 2023 Pre-order here โ https://rick-astley.lnk.to/HMIYA2023ID
โNever Gonna Give You Upโ was a global smash on its release in July 1987, topping the charts in 25 countries including Rickโs native UK and...
fuck me in the wide hole
Okay
.-.
oh so funny
fix your logic
๐คฃ I'm a kid
if action != right click air && action != right click block return
I wish discord didn't add embeds automatically
I'll check this doc (unfortunately...) ๐ซก
You probably can easily do https://hub.spigotmc.org/javadocs/spigot/org/bukkit/RegionAccessor.html#getType(int,int,int)
okay
Wish me good luck ๐ซก I'll check a doc
How can I create a DamageIndicator? When I tried getting the finalDamage off of EntityDamageByEntityEvent it only triggered when I was damaging a player not another entity. Got any tips?
That event does trigger for all living entities
Correct the error, please
is there a cap on how high I can set a mobs health
I can set a spiders health to 200 but not 2000
I get this errors :bat Failed to schedule load callback for chunk [4, -6] java.util.concurrent.CompletionException: net.minecraft.ReportedException: Exception generating new chunk at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?] at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1159) ~[?:?] at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] at net.minecraft.server.level.ChunkTaskQueueSorter.b(SourceFile:62) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.util.thread.ThreadedMailbox.h(SourceFile:91) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.util.thread.ThreadedMailbox.a(SourceFile:146) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.util.thread.ThreadedMailbox.run(SourceFile:102) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] Caused by: net.minecraft.ReportedException: Exception generating new chunk at net.minecraft.server.level.PlayerChunkMap.lambda$31(PlayerChunkMap.java:740) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.6.jar:?] at net.minecraft.server.level.PlayerChunkMap.lambda$30(PlayerChunkMap.java:721) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?] ... 11 more Caused by: java.lang.IllegalArgumentException: Coordinates 10, 8, 6 are not in the region at com.google.common.base.Preconditions.checkArgument(Preconditions.java:453) ~[guava-31.1-jre.jar:?] at org.bukkit.craftbukkit.v1_19_R3.generator.CraftLimitedRegion.getType(CraftLimitedRegion.java:191) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at fr.paulem.simplesores.CustomOreGen.populate(CustomOreGen.java:34) ~[?:?] at net.minecraft.world.level.chunk.ChunkGenerator.applyBiomeDecoration(ChunkGenerator.java:461) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.world.level.chunk.ChunkGenerator.a(ChunkGenerator.java:444) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.world.level.chunk.ChunkStatus.lambda$11(ChunkStatus.java:149) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.world.level.chunk.ChunkStatus.a(ChunkStatus.java:276) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.server.level.PlayerChunkMap.lambda$31(PlayerChunkMap.java:723) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.6.jar:?] at net.minecraft.server.level.PlayerChunkMap.lambda$30(PlayerChunkMap.java:721) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?] ... 11 more
With this : https://pastecord.com/sevityzoza.java
You need to add the world pos ontop of the chunk coords
Caused by: java.lang.IllegalArgumentException: Coordinates 10, 8, 6 are not in the region
They are't chunk relative coordinates
Yes, I saw but normally it's good
You need to use coordinates relative to the world spawn
so what do I need to add exactly please ?
ah okay
so I need to get the spawn location ?
chunkX * 16 to x and chunkZ * 16 to z
I'll try
@quiet ice Perfect :bat Caused by: java.lang.IllegalArgumentException: Coordinates 33, 11, 0 are not in the region at com.google.common.base.Preconditions.checkArgument(Preconditions.java:453) ~[guava-31.1-jre.jar:?] at org.bukkit.craftbukkit.v1_19_R3.generator.CraftLimitedRegion.getType(CraftLimitedRegion.java:191) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at fr.paulem.simplesores.CustomOreGen.populate(CustomOreGen.java:34) ~[?:?] at net.minecraft.world.level.chunk.ChunkGenerator.applyBiomeDecoration(ChunkGenerator.java:461) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.world.level.chunk.ChunkGenerator.a(ChunkGenerator.java:444) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.world.level.chunk.ChunkStatus.lambda$11(ChunkStatus.java:149) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.world.level.chunk.ChunkStatus.a(ChunkStatus.java:276) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.server.level.PlayerChunkMap.lambda$31(PlayerChunkMap.java:723) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-6.0.6.jar:?] at net.minecraft.server.level.PlayerChunkMap.lambda$30(PlayerChunkMap.java:721) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?] at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] at net.minecraft.server.level.ChunkTaskQueueSorter.b(SourceFile:62) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.util.thread.ThreadedMailbox.h(SourceFile:91) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.util.thread.ThreadedMailbox.a(SourceFile:146) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at net.minecraft.util.thread.ThreadedMailbox.run(SourceFile:102) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3739-Spigot-d1bd3bd-63cad7f] at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Also it's X = random.nextInt(16); not X = random.nextInt(16) + chunkX; (probably)
No - actually it's X = random.nextInt(16) + chunkX * 16; if you didn't add the chunkX * 16 somewhere else
oh, I did X = random.nextInt(16) * chunkX;
Yeah no - that won't work
I'm relaunching ๐ค
no errors...
incredible
this is a dream
there is no other explaination
this can't be real...
it's preparing the world...
it's slow but it's working ๐คฃ
@quiet ice thank you so much, and thanks to the others
finally, after 3 days, it's working
hello vein
Is there a way to create a single line of String out of a ItemStack array?
StringBuilder and a for loop
You forgot a part of the package name in the plugin.yml
How can I create a Hashmap
That stores a UUID, Integer
But that I can do a progressive sum
As in, if the UUID exists, add whatever was there before to the new value. But default to 0 if it isn't there
Is this possible in 1-2 lines? Cause I know I can do if but I thought it would be nicer by having any non-existing values default to 0 so it doesn't crash
๐ That's what it was!
Sick
so i was wondering how to make it so my command wont register
like it would be red
but still work
use the player command pre process event
I have done some sort of wand claiming system. But i have some sort of bug (mainly self coding error) where all the blocks marked in red are not being protected (like if they werent part of the region). Its just protecting all the blocks between the red ones
what are you using to check if they are in the zone
?paste
your code for that
https://paste.md-5.net/nujumucowa.java - Sort of break listener, which is the same for all the other events
Just inflate the region by 1 block to each side : problem solved
are you using a bounding box? iirc they include the blocks on the outside
Region finder by location:
public Region getRegion(Location location) {
return regions.values().stream()
.filter(region -> region.getCuboid().contains(location))
.findFirst()
.orElse(null);
}
Cuboid class = https://paste.md-5.net/maxawehazo.java
Hey guys, I need your help. Could someone explain to me why this does not work?
I think it should be;
Location loc = config.get("path", Location.class);
what is Region? is that not your own code
Is my own code region represent your claims let say
oh If you aren't using bounding boxes I would
but otherwise just inflate by one as geol said
its probably the easiest way
BoudingxBox == Cuboid
Yeah that the issue right?
uea
So each vector property + 1 right
just add +1 too a named constant
๐คฆโโ๏ธ
Is that what you mean by inflating?
inflating just means + 1 to x and z
Really thanks to both of you mates!
I would make that a named constant though so you know what it does much later on incase things end up changing
Hey, I tried that but it doesnt work, it works for a friend but it doesnt for me :/ (screenshot from my friend)
like
public static final int INCLUDE_BORDER = 1;
Well depends the version of the api too
For example in 1.8x getLocation() method exists, but for newer api version does
He is using 1.16.5 and I am on 1.8.8
Thats the reason haha
How can I do that in 1.8x then?
If you are on 1.8 there is not getLocation() method
not possible
old pvp can be replicated new features can't
I now your feeling of people telling to upgrade version, i dont really agree with them. So if you need 1.8 help just ping me
You use the next code:
// saving it to config
Location current;
getConfig().set("myLocation", current);
// loading it from config:
Location locaiton = getConfig().get("myLocation", Location.class);
if (location == null) return; // Just in case the location is null
what is the reason to use such an old version
besides hte pvp which can be replecated
Thank you very much sir, I will try it now :D
Idk , preferences. I have discuss many times that and i dont want to do it. Less with a friend tho
anyone know a api or atleast a working documentation on how to make a message listener for spigot>bungee
show us the yml
you check the imgur link and ask that agani lol
lol
morice do you use messagelisteners?
no for likebungeecoord
PluginMessageListener
spigot>bungee
well idk anything else
could you help me out?
I use pterodactyl if that matters
yeah im trying to connect a player
to a different servwer
its outdated
it doesnt work
damn
stuck with bungeeguis and citizens dont even support it
ill make a request to update forms
do you have a spigot account bajka
you have to verify
./verify
image perms
lol
read the error
I dont know, you should test it ๐
Hi bro, im again sorry. Could you give me a hand designing a opened menu tracking system? So every menu you open is tracked on a LinkedMap<Player, Menu> so then you can: get the current menu opened, the menu opened before the current one and also the next menu
Im not really sure how to track each menu let say
I'm attempting to switch from 1.19.4 to 1.8.9
I've configured all my plugins to go with the switch but the only thing is I cant find a bungeecoord jar
you need waterfall
what's that?
bungeecord for 1.8 - made by paper
is it alot of changes?
oh really?
huh i have been misinformed.
the reason I'm going to 1.8 is because of the 1.19 plugin messaging missup
just run folia instead of 1.8
Wat
bungeecoord aint registering the pluginmessage
event.getPlayer().performCommand("staff");
i tried a numerousof ways
Sir this is spigot
?nocode
Itโs hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
1.8 isnt gonna fix it
wut
let me undo my delete rqw
You are not running spigot
out.writeUTF("Connect");
out.writeUTF(args[0]);
player.sendPluginMessage(this, "bungeecord:main", out.toByteArray());```
true, my bad.
The channel is BungeeCord
And I know for a fact it does
๐ฟ
Why did you decide โhmm this isnโt working in the latest versionโฆ letโs try one from 7 years agoโ
ughh cant find the msg ill try again
Is the wiki outdated or should the string just be "BungeeCord"?
Now im using spigot, now can someone explain me this?
is there a way to apply data to a flying enderpearl
It should be โBungeeCordโ
projectile
player.getInventory().clear();
Object inv = config.get("inventory");
ItemStack[] inventory = (ItemStack[]) inv;
player.getInventory().setContents(inventory); // Line highlited
player.sendMessage();
Itโs an entity
You should be able to using Metadata.
So it has PDC
inv is nukk
Or metadata
oh okay thx
ill stick to pcd since i know how to use it more then metadata
im loading it when the player executes the command
damn
im never creating...
https://paste.md-5.net/jobihojuza.java
hows this?
you should indent your if statements
indent?
im just stating my opinion
yikes
I tried diffrent options too
help me fix it then ill change to dark lol
Anyone avalible?
@young knoll speak
EpicEbic
he uses intellij
Oof
Who huh what
he needs help with eclipse
I think he pinged you to help w my thing
and please go through how to turn on dark mode ๐
How do I finish this? what option do I need? and yes, i tried finding the awnser myself
?eclipse
how eclipse
I just wanna make a class ๐ญ
And eclipes gives me that option
// TODO Auto-generated method stub
int i = 0;
while (i < 10) {
System.out.println((i*10) + "%");
i++;
}
if (config.getBoolean("test")) {
// do something
System.out.println("Sucess!");
}
Bukkit.getPluginManager().registerEvent(new SignEvents(), plugin: this);
//super.onEnable();
}
```
Just making a normal class all I need to add is a name
Will it register w Bukkit.getPluginManager().registerEvent(new SignEvents(), plugin: this);
I think it may want a proper super class
Why not just use a for loop
Any class that extends Listener can be registered with that method
Sorry, implements
How do I make one for sign events?
Make a new class
Call it whatever
Add implements listener to the class declaration
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
my lord that list looks horrible
Learn java from your backyard neighbour
...
I am following a tutorial ๐ญ
anyways
seems they got the best eclipes

