#help-development
1 messages · Page 1885 of 1
Try see which is the one giving the null value
I assume this is line 33?
yea then before that line executes try finding out which step gave that null
is it p? p.getWorld()?
did you execute it using console? lol
Does anyone know how i can place a log that is looking sideways? Every log that my script places is looking upwards
don't know crap about script, can only help ya if you're coding with Java and spigot lol
lmfao
is there a method in java that allow you to run c code
doubt it lol
Yes it's called don't
sounds like a mess waiting to happen lmao
wasnt there a way to execute JS code tho?
Yes java has a native JS reader boi
i thought i saw it somewhere
oh yes that
if you want to execute it directly from java code hmm
you cant execute C code directly
you can however, call methods from C shared libraries
(dll on windows, dylib on mac, so on linux)
pulsebeat C enthusiast 😮
i wish
lol
yea, that's what i meant when I say run C code hahaha
It is deprecated though
I think it is actually no longer available on newer Java versions
Nashorn4j exploit
How can I save a hashmap and load it back in on reload?
public static Map<String, Integer> playerIDs = new HashMap<>();
That's the hashmap that I wanna store, I've tried in-built bukkit methods and looked up docs for the past 3 hrs but I can't find anything on it
I don't know how to save in the first place tho 😢
I'll watch that vid again, I watched it earlier but couldn't get it working but I'll try again
its maybe not the best way
I got the read part working but not the write part
the writing part isnt difficult as you work with primitives
Well, wrappers of primitives
well they both arent
true
easier than like itemstacks
but what does that data represent?
Also, I personally prefer DataOutputStream if you don't need it to be writable by a human. Saves on a lot of memory overhead imposed by yaml parsing
And will it auto save to config.yml?
Something like this would basically be
try (DataOutputStream out = new DataOutputStream(new FileOutputStream(new File(getDataFolder(), "ids.dat")))) {
out.writeInt(playerIDs.size());
for (Map.Entry<String, Integer> entry : playerIDs.entrySet()) {
out.writeUTF(entry.getKey());
out.writeInt(entry.getValue());
}
} catch (IOException e) {
throw new RuntimeException(e);
}
or just use the fileconfig api
Reading would be
try (DataInputStream in = new DataInputStream(new FileInputStream(new File(getDataFolder(), "ids.dat")))) {
int size = in.readInt();
if (playerIDs == null) {
playerIDs = new HashMap(size);
} else {
playerIDs.clear();
}
for (int i = 0; i < size; i++) {
playerIDs.put(in.readUTF(), in.readInt());
}
} catch (IOException e) {
throw new RuntimeException(e);
}
See, much nicer and far more compact on memory!
finally someone who uses try with resources :D
Anyone know how I can get an NMS ComposterBlock from a regular BukkitBlock?
((CraftBlock)bukkitBLock).getHandle() returns a LevelAccessor
I need an NMS block though
if doing a calculation with an Integer object, it will call .intValue() right?
Found it out:
Block nmsBlock = ((CraftBlock)block).getNMS().getBlock();
For anything but ==, yes
ah right
its weird that you cant just do like a Dictionary<string, int> in c#
with primitives
it is automatically unboxed though
yea
because primitives does not extend object
and something that extends object is required
But it probably will be possible in next java versions
yep; thats the generics contract
It’s required because the compiler removes the <T> and replaces it with just Object types
Bukkit.getServer().getServicesManager().register(Permission.class, instance, pl, ServicePriority.Highest);
is this the correct way to implement a vault service
You don’t have to explicitly require it to extend Object, any class always extends from Object automatically
or just <?>
yeah, and, and in the future primitives will extend Object aswell, objects will be as fast as primitives
Right, I’m merely stating why it’s different from other languages
oh
For example, in C++ the template system compiles a separate version of the templated class for each “type”
Fastutil will became useless
So if my program uses vector<int>, vector<ClassA> and vector<ClassB>, the compiler is going to compile 3 versions of vector, with all the templates changed to each type respectively
In Java we instead compile just one, and replace everything with Object
so its much easier for the compiler?
Ah, thats similar to how fastutil works
Int2Object Map, Long2DoubleMap, Char2ShortMap...
anyone? i cant really test it because the plugin is large but there are still fundamental parts missing so i cant really run it
Thats where modularity starts helping
it depends on the whole plugin
Mock some parts
ok i looked at vault source thats how they do it so thats how i will do it
yep, that is the correct way to do it
A secure way of saving private credentials on plugins?
Properties file can be read as txt, json or yaml files?
Or they save content like hash/with protection
• Developer & Technician
• Java, and others```
🤔
Is there an event that can detect if a players armour breaks?
itembreakevent? is there one?
The problem is that i need to save on my plugin an api key from my website
what credential?
There is that, but it seems to only be for items, not armour
armour is an item ._.
What does this api key do?
declaration: package: org.bukkit.event.player, class: PlayerItemBreakEvent
its used to hash the plugin data (name, version) sent to my api
You should limit its powers as much as possible, there is no real way to store it "safely"
Properties file can be read as txt, json or yaml files?
Or they save content like hash/with protection
Ah okay, and then I just check the item that has just broken to see if it is (for example) a netherite chestplate?
np!
If you are really paranoid about it, use JNI and use the API key there. As soon as it gets into the JVM you are out of luck
Its a mc plugin
I cannot use JNI
You can as far as I know
Lol really?
You might not be able to publish it to spigotmc though
I mean you're API key is only as secure as the system it's running on. Once you load it it's in memory
If the damage of having the API key published publicly is next to nil, do not bother. To limit damage you can e.g. have a 1 key per jar type of thing
Plus having any protection on anything will just pull attention towards it.
Its for MCM, there you can do what ever for example your plugins can be heavly obfuscted and depend from intertnet
Ah you make reference to having 1 key hash each plugin let say
Thanks
No, 1 key hash each download/user. Would require dedicated infrastructure, but possible
Im between NodeJS RestAPI or C# Websocket
I have seen that from java you can execute C# methods
So i will think a trick
When i use remmapped mojang spigot nms i have that error, why? maybe my maven md-5 plugin is wrong configuredfix Caused by: java.lang.ClassNotFoundException: net.minecraft.world.entity.EntityType$EntityFactory at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] ... 12 more
can you send pom ?
You could just have a regular http server written in java
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.18.1-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.18.1-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.18.1-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.18.1-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>```i want to us it on 1.18.1
For chonker amounts of text use pastebin please
not that much tbh
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>```
I have find this so i will take a look https://docs.oracle.com/cd/E27559_01/apirefs.1112/e27137/index.html
But thanks
hm @crimson verge how would I fix this?
Operator '==' cannot be applied to 'org.bukkit.inventory.ItemStack', 'java.lang.String'
if(p.hasPermission("test.playing") && e.getBrokenItem()=="NETHERITE_BOOTS"){
Material.NETHERITE_BOOTS
^
ahh okay thank you
And use getType() on the ItemStack
^^
Where the hell did you find this thing
righttt
That's Java 5 javadocs or something
E:\Coden\Java\Minecraft\Plugins\AirDropRebornNew\v1_17\src\v1_17\entitiy\AirDrop.java:68:103 java: cannot find symbol symbol: method sendPacket(net.minecraft.network.protocol.game.PacketPlayOutExplosion) location: variable a of type net.minecraft.network.NetworkManager
what does this error mean?
No matter i use Java 1.8
Btww
😂
I will definitly make a library for this new project
If not i would have amazing headaches
any ideas?
Hold on, so you mean e.getBrokenItem().getType(), sorry if im being stupid, just trying to get to grips with this
Yes
did you run buildtools with remapped cmd ?
yeah
how do i set a persistent data from config
hm, there still seems to be the same error
this is my code
e.getBrokenItem().getType()=="Material.NETHERITE_BOOTS"
remove the "
^^
okay
What are you trying to do
ah! that works thank you very much <33
always down to help haha
compiling
?paste the code
but here i copy and paste this plug from spigot forum. md-5 wrote this on 1.18, so I'm adding .1 in that to have 1.18.1, idk is that ok? should I change anything else?
cant see something there but you also need to run buildtools once with -remapped flag or smth
and also the 1.18.1 version
i did it
hmmm reloaded pom ?
is there any event to cancel when dragon breaks blocks
Livvy you type too damn fast, you've answered before I even read it 
i tried that but doesnt work
coding hand heheheh
import net.md_5.bungee.api.ChatColor;
Error is: The type net.md_5.bungee.api.ChatColor is not accessible
This isn't working for me, I'm not exactly sure why. I've tried a few things but haven't gotten it to work. Any ideas?
my b you want https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityChangeBlockEvent.html @quaint mantle
declaration: package: org.bukkit.event.entity, class: EntityChangeBlockEvent
hmmmm dont know ... had also some problems and somehow it worked with just trying some stuff
blockbreak is only players lol
r u using 1.18.1?
yes
and can u show that plugin in pom?
How are you adding Spigot as a dependency
?paste
if its not a problem,
thanks! it works <333
no worries :)
I have the api as a referenced library
Could you send a screenshot of the error?
i think you want to import import org.bukkit.ChatColor; instead
They still should be able to access the bungee ChatColor, expecially because I think it's required for working with components.
oh somehow i completely missed the bungee part lmfao
I can't send a screenshot here, should I just dm it to you?
You should verify so you can send screenshots 😄
🤦♂️ I didn't build with maven
😄
it happens xD

btw, why i have nosuchfieldexception here?
final Field suppliers = DefaultAttributes.class.getDeclaredField("SUPPLIERS");```
Because it's remapped to b
Weird. Can you send a screenshot of what library you're adding? Also try restarting Eclipse.
so i must use obfuscated names?
If you're using reflection you do
hmm, ok
Hello!
I've got a fairly obscure question; I want to add a new custom enchantment which is a curse. This is because the grindstone in Minecraft can remove enchantments but not curses from items. There used to be a function isCursed(), but it is now deprecated. I'm wondering how the grindstone checks if an enchantment is a curse, because it doesn't seem possible to give an enchantment a special "curse" attribute.
Alternate question: How do I make a new enchantment that can't be removed by the grindstine (same behaviour as curses).
and when i use remapped mojang, when i build using maven and i want to use plugin on the server i should use that normal file (xEntities-2022-01-13 21.09 i mean that :D)
-remapped iirc
I actually have an Enchantment API that can do all of that, if you're interested https://github.com/Dessie0/DessieLib/tree/master/enchantment-api
(Also isCursed() isn't deprecated afaik?)
it is sadly
Or is there a way to add an enchantment glow to an item that can't be removed by a grindstone?
Thank you Dessie! I will look into this! 🙂
I mean it's deprecated but still works
you would want to look for the enchantment you added everytime someone uses the grindstone and cancel it if it is your "curse"
but im sure dessie's is much easier
also yes it does still work deprecated lol
then the server will know what to do? because in this file I will be renamed if I'm not mistaken.
yes
but i dont believe you can make a new item cursed
Mine is quite literally just calling setCanRemoveWithGrindstone(false); lol
there's a few APIs in there that are useful and they're all somewhat documented lol
Okay it seems the error only happens when i'm specifically using bungeecord.jar, so i've removed it from the build path and there is a new error (which I think is why I tried adding it in the first place)

Ah eclipse what a rare sight
That looks like Eclipse being dumb and trying to import literally net LMAO
eclipse is big dum
Friendly reminder that custom enchantments are unsupported
Reimport it
but yeah spigot includes bungee stuff lol
What are you even talking about
sorry new messages didnt load
When I try to auto import it the only option is org.bukkit.ChatColor, it doesn't seem to see the bungee one
Where did you get that jar file

The spigot-api-1.17.1 one
Are you enjoying your newfound ability to use external emotes? 
very much so 
i took one of my boosts from my home server for this i gotta make it worth it heheh
I got it from buildtools, maybe I messed something up while doing that
Add the -shaded one
I think the one you included doesn't have the Bungeecord stuff with it.
PacketPlayOutPlayerInfo probably
Or ClientboundPlayerInfoPacket if you're using moj maps
can I somehow move the jar file of my plugin built with maven to the plugins folder on my server so that I can debug? (localhost server)
Create a symlink to your jar and put it in the plugins folder
That's the result from just the shaded one
wat
Does anyone know what kind of inventories a hopper can fill? I know it can fill furnaces and brewing stands, but what about e.g. enchantment table, loom, beacon, anvil, etc?
and how can i edit the name of the jar after building it? there is a name and it sticks a version that is different for me every time. I just wish I had a name
Do you really change the version that often
its time
time is version, so i can see which build is latest
perfect, thanks!
nvm, i have it
Try restarting again, Eclipse is being dumb I think.
Because that JAR has all of those.
Or switch to a different IDE that isn't Eclipse lol
intellij idea is so much better
Agreed
i started on eclipse and didnt know what i was missing lol
Had the same problem with Eclipse being dumb. It frustrated me so much I ended up switching to Intellij and never looked back.
what is wrong here?
mklink /D D:\srv\#debug-server-1.18.1\plugins\xEntities.jar D:\GitHub\xEntities\target\xEntities.jar```
or you mean symlink in pom? it is it possible
algum br ai nessa pouha?
that makes no sense
/D is for directories
just remove the /D at the beginning
english pls
aren't hoppers supposed to move a book into a lectern?
because that doesn't work for me lol
Should I create my own file to store player data or use PDC??
You can upvote this to get that https://feedback.minecraft.net/hc/en-us/community/posts/4411314392589-Lecterns-get-hopper-and-dispenser-functionality
weird because the wiki says this is already a thing
Where?
oh I am stupid
it's listed here but it says it is NOT possible
I just saw it in the list and thought it should work then
Can you make an array / list of blocks?
sure, why not?
Nvm I’m a dumbass Xd
I was getting an error and I forgot to define the var for the block array 🤦♂️
lmao that got me too sometimes
that normal one works too
--remapped is for when you need to access NMS
if you don'T use NMS, it doesn't matter whether you use --remapped or not
im using nms, and jar without --remapped, it works too
yeah lol
but you have the obfuscated mappings
e.g. fields and methods will be called a, b(), c instead of playerConnection, getPosition(), etc
and you will have to change your code on every new MC release when not using --remapped
yes, when writing code i use remapped nms but when i add a plugin to the server does it matter?
If you're not using the maven plugin to remap it won't work
You need to put the dragon in to the packet
Im using
With smoke particle how can I make it last longer? For the extra on spawning particle what would I put?
Having some troubles with maven resolving a local module in my project as a dependency
this is my project structure
does API depend on server, or other way around?
did you install the API with mvn install?
np 🙂
Or is there a dif way?
Would I just make a loop of spawning the particle over and over?
Nvm I can use a bukkit runtasktimer
mans got some stairs
i dont like hiding middle packages, idk why
Can someone please explain data leaks to me?
Java is juggling with references, so why does it matter how big an object that you are storing is?
I thought that all objects exist somewhere else in memory, and all that's being kept when you make a variable is a reference to that object
that's correct
but imagine you do not need an object anymore but keep a reference to it. that object will now forever take up memory
if you get rid of your reference, garbage collection will eventually free up the memory again
when doing block.getRelative(BlockFace.UP).getType(); if it is an air block it should return Material.AIR right? or does it return null
I think I figured out what the problem is, but not how to fix it
If I try to import org.anything the error is "org.anything cannot be resolved"
But if I try to import net.anything the error is "net cannot be resolved". I'm going to try intellij
BEAT ME TO IT. reeeeeeeee
well i got an error when trying to check the material and it says it returns null but javadoc said it returns Material.AIR so didnt know xd
do anyone have anyidea why this doesnt work
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<links>
<link>https://guava.dev/releases/17.0/api/docs/</link>
<link>https://javadoc.io/doc/org.yaml/snakeyaml/1.25/</link>
</links>
<stylesheetfile>${basedir}/javadocs.css</stylesheetfile>
<show>public</show>
</configuration>
</plugin>
?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.
Does not working, prefect engmislsh™️
what is the difference between ADD_SCALAR and MULTIPLY_SCALAR_1 for attribute operations? they seem to do the exact same thing from my testing, which is just multiplying by the given value
hit the maven reload button so that it downloads it
adding adds... i think
show the full maven output pls
thats what i did
i used 2 as the value, set the modifier to the former, checked
+200% damage
changed the modifier to the latter, still +200% damage
just add a background?
that's not the full error
anyway, the plugin is in maven-central, it should be able to find it
try mvn clean package -U
well, this isn't a plugin.. so mvn clean install -U
maven-javadoc-plugin
what was it?
sonarlint fears my big brain
Id there an event for button click or just playerInteractEvent
maven doesnt recognise it in <plugins> you have to put it as a dependancy to dwnload
then remove it
😄
that's normally not required lol
but the javadocs plugin goes into <reporting> and not into <build>
well it now works :DDDDDDDD ❤️
maybe that was the mistake?
Or is there a check or smth if they click button
is there a way to get a Server instance from an ItemStack?
Hey @ivory sleet you forgot to fix this
how would i make something like essentialsx's variable home system? [like rgsmputilities.home.limit.15] since I imagine you don't want to code in hundreds of perm nodes manually. i'm still new to java so its probably a dumb question but it'd help
They let you configure them via the config
So you basically add your own nodes as needed
alright
but i just want it so they can have it be an integer instead of a set name pretty much
aight
You could use getEffectivePermussions and loop their permissions
Though wouldn't surprise me to see permissions plugins break that, what with their Regex permissions and all
so a while loop pretty much? i wanna just have it go from 1-25 so computation power isnt too much of an issue
Real estate mogul
i still need to figure out how to store homes but
how do i read what blocks an itemstack is allowed to break or be placed on?
Does anyone know if you can force close a book? I can't seem to find anything on it.
I don’t think we actually have an API for that
nms?
is it doable through that?
id know how to do it if nms itemstacks still had a getTag() method but they dont seem to anymore so i dunno
Use remapped
if you have a jni file you cannot get its source or yes? Im confused because with C# you cannot. And Java yes you can
Thanks
RE: This. At least for our server we just have a pre-defined set of permissions in an array and check for those.
If you're making a public plugin, you could go with user-defined permissions as well, which is what I was considering doing in VeinMiner for maximum vein sizes
hm
interesting
i'll probably go with what essentials does and have it be a list checkup. time to learn configs : D
it's probably gonna end up being named SimpleTeleports [tpa, home, sethome, maybe warp and setwarp]
Just in your config,
max_home_permissions: [ 1, 5, 10, 25 ]
Then you can just iterate over that array
Check if they have the permission + "." + value
thanks
i barely know while loops so this is pretty helpful
How should I save the homes then?
I'm going with files because I don't wanna hurt my brain with databases too right now, but should it just be pure coords or something like a miniocnfig
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.18.1-R0.1-SNAPSHOT'
}```
yeah but should it be something like
[uuid]
|
L_______ [Home1]
L_______ [Home2]
or
[uuid.yml]
I would do 1 file per user
so just .yml? ok
yeah
i'd do something like BukkitObjectInputStream in = new BukkitObjectInputStream(new FileInputStream(filePath)); then i guess
Why, spigot has a yaml api
oh it does?
YamlConfiguration.loadConfiguration
send javadoc link if you could
ty
public String grabDataAsString(String dir, String file, String key) {
YamlConfiguration yC = YamlConfiguration.loadConfiguration(new File("directory path"));
return (yC.get(key) != null ? yC.get(key) : "None");
}```
heres a method i use for it
whats the 3rd line, eli5 please
basically just returns the value in the config from the given key
ah ok
and if the value is null, it returns "None"
oh smart
pretty sure it's called like the ellis operator or smth
how do i write to it then?
Elvis operator
ah
can please help
sorry me no know :C
Probably the 1.18 jar its not in that repository
If you want i can send you my FileHandler based on YamlConfiguration
I have notice something that i never seen before
sure why not
Do you want the .class or the paste link?
Here you have. If you have any dudes dm me/tag me
What's the [dev.alex.net.utilities.Utilties] import?
Its the main plugin class
ah aight
I explain you
If boolean parent:
-
True -> It will create a file with the content from your resource file (Like you should first create your file inside your jar)
-
False -> It will just create an empty file which you can add, remove, get, etc parameters
If you need more help Tag me or dm me
whenever i spawn a particle for example campfire smoke it goes flying at like 400 mph one direction, how can i make it spawn a particle like smoke and stay in. the same place and just fade away like it should
i think i'll use wally's version for locations
if anyone respondes ping me
Either your location has a vector or you are using the wrong spawn method and are adding a velocity
can someone give me the link to the docs that tell you what gradle/maven build stuff to enter for the spigot api?
all the sudden my old api links arent working now in my gradle.build
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I feel like I losing my mind with pitch and yaw coords
when I do getDirection it looks like they are flipped
as in yaw becomes pitch and pitch becomes yaw
😔
Yaw and Pitch are rotations. getDirection returns a Vector.
yeah, a vector pointing towards the direction of the pitch and yaw
if I set the pitch to 0 and yaw to 66 and teleport to that location I end up looking at the floor
but if I do math on the direction vector it shifts the y value but not the x or z values
sorry
if I do math on the direction it shifts x or z but not y
and if I invert it I shift y on the vector and teleport with a different horizontal viewing coord
depends on the math I guess. Unless you are applying a rotation.
I am trying to use RecipeChoice.MaterialChoice with 1.17.1 API, but my IDE and gradle compiler says that it can't find that symbol.
here's the perfect example:
[EliteMobs] Developer message: Location: Location{world=CraftWorld{name=em_primis},x=1407.0,y=20.0,z=362.0,pitch=0.0,yaw=66.0} direction: -0.9135454576426009,-0.0,0.4067366430758002
yaw is 66
pitch is 0
on the direction, y is 0
that doesn't make sense
yaw should be the value setting the vertical value
actually looking at the API
double rotX = this.getYaw();
double rotY = this.getPitch();
can someone do a sanity check for me, I am pretty sure the api got it backwards
Maybe this is the problem:
This class is not legal for implementation by plugins!
yaw in minecraft is your horizontal (left/right) facing
pitch is your vertical (up/down)
actually i think thats how rotations work in general
yep
I suspect updating a location's pitch / yaw doesn't modify its direction? so it shifts freely and in somewhat unpredictable ways
?jd
Hey everyone, does anyone know how to get the name of a block? For example: if I rename a button in an anvil, and then press the button, how do I know the name? I have tried .getMetadata and .getBlockData but can't seem to find anything. Thanks!
Doesn't the name go back to default when placed?
A block or an item?
As far as I know like SayWhatHappened said, when placed t he name resets iirc
yes
It's a block (placed down), thanks, I'll look into that!
Please help me. Im having this inssue while installing forge server. Via the installer
java.io.FileNotFoundException: C:\Users\Usuario\Desktop\Server-1.16.5\libraries\de\oceanlabs\mcp\mcp_config\1.16.5-20210115.111550\mcp_config-1.16.5-20210115.111550-mappings.txt (Acceso denegado)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at net.minecraftforge.installertools.McpData.process(McpData.java:122)
at net.minecraftforge.installertools.ConsoleTool.main(ConsoleTool.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.installer.actions.PostProcessors.process(PostProcessors.java:226)
at net.minecraftforge.installer.actions.ServerInstall.run(ServerInstall.java:118)
at net.minecraftforge.installer.InstallerPanel.run(InstallerPanel.java:423)
at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:175)
at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:147)
Failed to run processor: java.io.FileNotFoundException:C:\Users\Usuario\Desktop\Server-1.16.5\libraries\de\oceanlabs\mcp\mcp_config\1.16.5-20210115.111550\mcp_config-1.16.5-20210115.111550-mappings.txt (Acceso denegado)
See log for more details.
Serious Spigot and Bungeecord programming/development help
#help-server would be better
Allright
Sir this is a spigot’s
Its not the same owner?
even if it is the same owner....
if (nameData.has(new NamespacedKey(HTTPPost.getPlugin(), key:"message"), PersistentDataType.STRING)) {
p.sendMessage(ChatColor.GRAY + "There is already a command stored in this item!");
p.sendMessage(ChatColor.GRAY + "Message: " + ChatColor.GREEN + nameData.get(new NamespacedKey(HTTPPost.getPlugin(), key:"message"), PersistentDataType.STRING));
} else {
nameData.set(new NamespacedKey(HTTPPost.getPlugin(), key:"message"), PersistentDataType.STRING, message,toString());
item.setItemMeta(meta);
p.sendMessage(ChatColor.GREEN + "Message Stored!");```
Just followed a tutorial on persistent data storage, does anyone know why eclipse throws "The method has(NamespacedKey, PersistentDataType<T,Z>) in the type PersistentDataContainer is not applicable for the arguments (NamespacedKey, PersistentDataType<String,String>)" on ```nameData.has``` ?
Sorry if it's a dumb question, but what is wrong with key:"message"?
Java doesn’t let you pass arguments by name
Oh okay I think I get it, thanks!
That's why you should download an IDE :)
Wait sorry you did
That's why you should understand the language :)
I'm trying I'm trying!
?learnjava
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.
Afaik you can’t
But you can remove them from the list in the PlayerCommandSendEvent(?)
Then they won’t show up when the player tries to tab complete them
I think they can still use them tho? Idk
Impossible to intercept the tab completion before they add an argument
It will
But that isn’t intercepting the tab completion, it’s just removing it from them entirely
Hi, would this be a good approach to make a list add out of bound?
The goal here, is to be able to have for example, a list and then be able to add at any index even if the list isn't that long yet
public static <T> List<T> insertToIndex(List<T> list, T toAdd, int indexToInsert)
{
if(indexToInsert >= list.size())
{
int loopAmount = indexToInsert - (list.size() - 1);
for(int i = 0; i < loopAmount; i++)
{
list.add(null);
}
}
list.set(indexToInsert, toAdd);
return list;
}
ArrayList has an ensureCapacity method.
Oh, so I could directly do an ensureCapacity and then set the actual index right ?
Yeah basically.
Ok thanks ^^
No
It fires when the commands are sent to the player
Which is usually when they join
Does the getblock from the block break event get the block broken on the server side, or the client side? If it is the server side, how would I get the block broken on the client side?
Sounds like a design issue tbh
Server side, of course
How can I get the block broken on the client side?
I would like to use it like a preset array but with the possibility to dynamically change the size of that array
…?
If you have changed the block on the client side it will change back as soon as they click it anyway
Hi I was making a custom mob plugin and I tried to add a wither every 30 seconds but it won't let me do this java WorldServer world = ((CraftWorld) loc.getWorld()).getHandle(); world.addEntity(EntityWither.class); I have no idea why but can someone help me?
Not if you cancel the interaction?
Then you aren’t breaking the block
Cancelling PlayerInteractEvent also cancels breaking client side blocks?
you do not need nms for this
I know but I was making a custom entity
wait I dont need nms to do the like spawn entity thing?
should I just do it the regular way?
with spigot?
maybe he is cancelling that
if he is storing the fake block
then he can get the fake block
if it is custom
then yes, nms
if not
use the api
How do I go about storing a string in a placed lever? Or within a lever item, which is callable when the lever is placed?
For the item you can use pdc
For the block you can use https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/
Alrighty I'll have a go, thanks!
What brand server are you running
best part is his forEach is map
Guys im new to particles, why do particles burst out in random directions whenever I spawn them?
Is there a way for them to not move
Oh so Integer will govern the speed
Ah ok thanks!
How may I use arraylist in an interface? I need it for CraftLivingEntity for different versions?
dk if its even a thing
I'm trying to get what's inside of public static ArrayList<CraftLivingEntity> Zombies = new ArrayList(); but I can't do it since I'm doing the whole version thing and I can't find a way to use it in multiple versions since I cant put CraftLivingEntity inside of the Arraylist in the interface
what is your goal
but why not a list of LivingEntity
thats cross version
CraftLivingEntity implements LivingEntity
Zombies.add((CraftLivingEntity) location);
I can't do that, that's the issue
actually nvm, I don't think I need it afterall
need what
The arraylist, I don't think I actually need it
btw why don’t you follow java naming conventions
why did you name the list like that
I just did i guess, ima fix it tho
Did this fix it? I had the exact same issue and asked the exact same legit word for word question earlier xd
No it doesnt
Im thinking it is offset instead
Offset seems to be a value for a target location
Not spawn location as I thought it would be
Ohh weird
Im testing it
Set that to 0
This is what someone said the issue was to be but
This is the correct way
Just tested
I assume particles are assign random vectors when you spawn it
Yep
Kk ty
Well you know the conventions?
in that case since its static make it ZOMBIES
otherwise if not static make it zombies
Isn’t that only static final
only static final and if immutable
Quick question...
Can I detect a model id for an item through code?
If not can I check through protocol lib?
Like the custom model data value?
i think he wants those methods from ItemStack#getItemMeta()
panel-1:
perm: default
rows: 5
title: '&8Generated panel-1'
empty: BLACK_STAINED_GLASS_PANE
item:
'20':
material: DIAMOND
stack: 1
name: '&d&lBUY VIP+ ROLE'
commands:
- 'paywall = 300000'
- 'add-data= vip+ bought'
- 'msg= Thank You For Buying Vip+!'
- 'console= lp user %cp-player-name% parent set vip+'
'24':
material: GOLD_INGOT
stack: 1
name: '&6&lBUY VIP ROLE'
commands:
- 'paywall = 100000'
- 'add-data = vip bought'
- 'msg= Thank You For Buying Vip!'
- 'console= lp user %cp-player-name% parent set vip'```
i wanna add a notif like where if they buy it they cant buy it again how do i fix this?
seems like you use some api to use a config file to generate an inventory
but its not the spigot api ^^
i use commandspanel plugin
i dont know what to add on the buttom to make it like say them "Youve Already Bought This!" like that
since i cant understand a thing on the videp the developer sent me
since iam from the philppines and i cant understand the code in the video
yeah but how should we know how a plugin works ^^
is the video java and in english ?
yes
Yeah
So can I check if someone is eating a golden apple with a certain model tag then run another code if that is happening?
panel-1:
perm: default
rows: 5
title: '&8Generated panel-1'
empty: BLACK_STAINED_GLASS_PANE
item:
'20':
material: DIAMOND
stack: 1
name: '&d&lBUY VIP+ ROLE'
commands:
- 'paywall = 300000'
- 'add-data= vip+ bought'
- 'msg= Thank You For Buying Vip+!'
- 'console= lp user %cp-player-name% parent set vip+'
'24':
material: GOLD_INGOT
stack: 1
name: '&6&lBUY VIP ROLE'
commands:
- 'paywall = 100000'
- 'add-data = vip bought'
- 'msg= Thank You For Buying Vip!'
- 'console= lp user %cp-player-name% parent set vip'```
and heres the code i have rn
Yes? Use the interact event?
just add the thing that notifs when u already bought it it says when they tryna buy it again it says "You Already Have This Role" thingy when they tryna buy it again
So I can check for a certain model tag and it won't screw up?
Why would it
you want me to add this ?
yes
i also dont want them to buy it when they already have bought this role
i am (and i think almost everyone else here) not here to code stuff for you ^^
if you use an other plugin to do stuff and dont know how to use it - we maybe dont know how it works too ?
you will need to understand their plugin and if you have a problem you should contact the plugin-dev
hmmm wondering if this is bannable here
everything ok with you ?
Component better
@ivory sleet @tender shard can you get this guy away from here pls (ping a mod or smth i dont know a mod)
"are" tho
where the fuck i am
?ban @thorn bane inappropriate
Done. That felt good.
because they are boosted ^^ 😄
(no they just know more then i and.... conclure can ban somehow :D)
no
conclure is taff
how do i check if the helmet slot is null but other slots are?
to check all slots except helmet slot, do i need to add those slots to an arraylist?
or do i need to check them one by one
I think there’s a .getEquipment() or .getHelmetSlot() method within a PlayerInventory Object
there is getHelmet method
There are 5 approaches:
EntityEquipment equipment = player.getEquipment();
ItemStack helmet = equipment.getHelmet();
ItemStack chestPlate = equipment.getChestplate();
ItemStack leggings = equipment.getLeggings();
ItemStack boots = equipment.getBoots();
PlayerInventory inventory = player.getInventory();
ItemStack[] armor = inventory.getArmorContents();
ItemStack helmet = armor[3];
ItemStack chestPlate = armor[2];
ItemStack leggings = armor[1];
ItemStack boots = armor[0];
PlayerInventory inventory = player.getInventory();
ItemStack helmet = inventory.getHelmet();
ItemStack chestPlate = inventory.getChestplate();
ItemStack leggings = inventory.getLeggings();
ItemStack boots = inventory.getBoots();
PlayerInventory inventory = player.getInventory();
ItemStack helmet = inventory.getItem(EquipmentSlot.HEAD);
ItemStack chestPlate = inventory.getItem(EquipmentSlot.CHEST);
ItemStack leggings = inventory.getItem(EquipmentSlot.LEGS);
ItemStack boots = inventory.getItem(EquipmentSlot.FEET);
PlayerInventory inventory = player.getInventory();
ItemStack helmet = inventory.getItem(103);
ItemStack chestPlate = inventory.getItem(102);
ItemStack leggings = inventory.getItem(101);
ItemStack boots = inventory.getItem(100);
aight so lets say i've one of these approaches
if the slot is empty and i call isEmpty method, will it call true?
depends what you do
if youre checking the helmet
you can use .getHelmet() and check if its null
itll either be null or Material.AIR
i'm checking if the helmet is not null and other slots are
if youre checking the type
in those examples helmet, chestPlate, leggings and boots can all be null
@lost matrix are empty slots considered null or air?
If its in the players hand then its air. Otherwise its null.
yea thats where my head is confused
Inventory is null
does the .getMaterial() method on a null itemstack return Material.AIR?
Null dont have methods
oh right
so i should say helmet != Material.AIR if i want helmet not to be null right?
If you call anything on null then it throws an NPE
Material is for the type
Im almost certain that armor is null if not present
oh ok
so you would do "inventory.getHelmet() != null"
panel-1:
perm: default
rows: 5
title: '&8Generated panel-1'
empty: BLACK_STAINED_GLASS_PANE
item:
'20':
material: DIAMOND
stack: 1
name: '&d&lBUY VIP+ ROLE'
commands:
- 'paywall = 300000'
- 'add-data= vip+ bought'
- 'msg= Thank You For Buying Vip+!'
- 'console= lp user %cp-player-name% parent set vip+'
'24':
material: GOLD_INGOT
stack: 1
name: '&6&lBUY VIP ROLE'
commands:
- 'paywall = 100000'
- 'add-data = vip bought'
- 'msg= Thank You For Buying Vip!'
- 'console= lp user %cp-player-name% parent set vip'```
bruh they didnt pay the paywall but still got vip+ and vip 😐
how do i fix this
so you need to get the persistent data container value
so you would do container.get(new NamespacedKey(<Plugin variable>, <String key>), PersistentDataType.<Data type>);
RANKSHOP:
perm: default
rows: 5
title: '-------- RANKSHOP --------'
empty: BLACK_STAINED_GLASS_PANE
item:
'20':
material: DIAMOND
stack: 1
name: '&d&lBUY VIP+ ROLE'
commands:
- 'paywall = 300,000'
- 'add-data = vip+ bought'
- 'msg= Thank You For Buying Vip+!'
- 'console= lp user %cp-player-name% parent set vip+'
lore:
- '&b&lDO NOT BUY AGAIN AFTER BUYING!'
- '&b&lIT WILL TAKE YOUR MONEY AGAIN!'
'24':
material: GOLD_INGOT
stack: 1
name: '&6&lBUY VIP ROLE'
commands:
- 'paywall = 100,000'
- 'add-data = vip bought'
- 'msg= Thank You For Buying Vip!'
- 'console= lp user %cp-player-name% parent set vip'
lore:
- '&b&lDO NOT BUY AGAIN AFTER BUYING!'
- '&b&lIT WILL TAKE YOUR MONEY AGAIN!'```
i need help! they didnt pay the "paywall" but still got the vip role !!! how do i fix this!?
This channel is for development related questions
Oh you want to get all the keys? or search the keys by value?
can we check if a key has a value that we ask for
thanks for letting me know
Like check if the key has a value?
thanks 😄
or check the datatype of the key?
no
lets say i want a key that has "blabla" value but i didnt create it. i want to check if the item has any key with that value
Hmm
you might be able to do the .getKeys() method, loop through those and see if it matches ur value
theres a very low chance youll get interfearing keys from other plugins
you can make the key to basically whatever you want
got it thx
@coarse shadow btw when you use the .getKeys() and use the .forEach() method, the variable will be the namespacekey itself
so youll have to do key.getKey()
You should never use PDCs like that
PersistentDataContainer container = player.getPersistentDataContainer();
container.getKeys().forEach(key ->{
if (key.getKey().equals("your_key")) {
// Do something
}
});
as smile said, this is often unneeded and you really shouldnt be making PDC without having a reasonably unique key
This is how you should use PDCs.
private final NamespacedKey tagKey = Objects.requireNonNull(NamespacedKey.fromString("some-namespace:some-key"));
// Sets or overwrites a tag
public void tagItem(ItemStack itemStack, String tag) {
ItemMeta meta = itemStack.getItemMeta();
PersistentDataContainer container = meta.getPersistentDataContainer();
container.set(tagKey, PersistentDataType.STRING, tag);
itemStack.setItemMeta(meta);
}
public boolean isTagged(ItemStack itemStack) {
ItemMeta meta = itemStack.getItemMeta();
return meta.getPersistentDataContainer().has(tagKey, PersistentDataType.STRING);
}
// returns a String or null if not present
public String getTag(ItemStack itemStack) {
ItemMeta meta = itemStack.getItemMeta();
PersistentDataContainer container = meta.getPersistentDataContainer();
return container.get(tagKey, PersistentDataType.STRING);
}
Ok nvm
or float f = (float) 20D;
1.0 is a double 1.0F is a float
I was thinking why F isnt working, the method doesnt accept float :)

too bad it cant be D20
or
float x = nat;
would be 20
0xABDFF
Wait what
public DustOptions(Color, float)
And yet
Ide says not compatible?
Prediction: wrong color import
if i add armor slots that i declared to an arraylist then call isEmpty method, will it call true if the player arent wearing anything on those slots
javafx.scene.paint.Color
Huh?
Some code pls...
float myFloat = (float) (long) (double) 5.0
Hi all, is there an event with which I can undo the damage that an anvil suffers after being used?
?paste
Sure. AnvilDamagedEvent
Why is not searchable in https://hub.spigotmc.org/javadocs/bukkit/?
Esists in paper and not spigot maybe
Nope this will never be empty.
do i need to check if they are null one by one?
Yes
okay
i see
Try events that might make sense like the BlockDamageEvent
it looks like this is a paper event?
Already tryed and is not fired for Anvils
I'll go on with Paper. Thanks
I'm not a mod lol
I think spigot has actually no event on this
BlockPhysicsEvent?
Have you seen this?
https://www.spigotmc.org/threads/solved-anvil-damage-event.49811/
i know but i can remember that you pinged other mods last time someone trolled
yea but how do i prevent it to give error when the helmet is null
to be frank; learn java
or
if helme is null: dont print npe
use try catch
you should not use try catch
Im joking, before you actually do that
?learnjava
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.
if(helment != null || chest != null)
// what do you think can be null here
itemstacks are nullable... you have to check always if the getItem or smth related to getting items returns you something that is null
Im getting this error
java.lang.IllegalArgumentException: Plugin already initialized!
This is my main class
package dev.goldenedit.mcbacore;
import dev.goldenedit.mcbacore.commands.CheckPoints;
import dev.goldenedit.mcbacore.commands.ResetPoints;
import dev.goldenedit.mcbacore.events.EntityResurrect;
import dev.goldenedit.mcbacore.events.PlayerDeath;
import dev.goldenedit.mcbacore.events.PlayerItemBreak;
import dev.goldenedit.mcbacore.events.PlayerJoin;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.HashMap;
public final class MCBACore extends JavaPlugin{
@Override
public void onEnable() {
getLogger().info("MCBA Core has started");
getLogger().info("https://goldenedit.dev");
/*getServer().getPluginManager().registerEvents(new PlayerJoin(), this);
getServer().getPluginManager().registerEvents(new PlayerItemBreak(), this);
getServer().getPluginManager().registerEvents(new EntityResurrect(), this);
getServer().getPluginManager().registerEvents(new PlayerDeath(), this);*/
getCommand("resetpoints").setExecutor(new ResetPoints());
getCommand("points").setExecutor(new CheckPoints());
}
public HashMap<Player, Integer> score = new HashMap<Player, Integer>();
}
You are not allowed to create instances of JavaPlugin classes yourself.
?paste your error pls
Some additions to that:
- Never make data structures public.
- Dont use Player as a key unless you properly clean it up
How can I access the hashmap from other classes then?
Via mutators and accessors.
public void setPoints(Player player, int score)
public void addPoints(Player player, int points)
public void getPoints(Player player)
and so on.
Btw you are somewhere creating an instance of MCBACore
In spigot you are not allowed to instanciate JavaPlugin classes.
You are probably doing this in your ResetPoints or CheckPoints constructor
7smile7 pink again 👀
MCBACore core = new MCBACore(); yeah that is how i was accessing the hashmap
and then core.score.get(target)
- Every new instance of MCBACore has its own HashMap. So this wouldnt work in the first place.
- You are not allowed to create instances of JavaPlugin classes in spigot.
ohh right
So what you want to do is add a parameter to your ResetPoints and CheckPoints constructors like this
private final MCBACore plugin;
public CheckPoints(MCBACore plugin) {
this.plugin = plugin;
}
And then call them in your onEnable with the current instance you are in:
getCommand("points").setExecutor(new CheckPoints(this));
There is only one single instance of MCBACore.
And you need to makes sure that other classes become this one instance provided.
I'm a bit confused. Heres my code https://github.com/GoldenEdit/MCBACore
Example for CheckPoints.class:
public class CheckPoints implements CommandExecutor {
MCBACore core = new MCBACore();
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
...
To
public class CheckPoints implements CommandExecutor {
private final MCBACore core;
// This is your contructor
public CheckPoints(MCBACore core) {
this.core = core;
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
...
Dont create a new instance of MCBACore.
Let the the caller of new CheckPoints(MCBACore) pass an instance of MCBACore
But those are Java basics. And i mean basics you should know after at most 2 Weeks of Java.
Maybe 3
?learnjava when?
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.
is there a set format of uuids for minecraft accounts? I want to find a player by a UUID that has no dashes, UUIDs dont have set placement of them, they can sometimes change. Are the format of them always the same for minecraft accounts (for example {6}-{6}-{8}-{12} etc)
unless there's some mojang request that allows you to get it from an undashed uuid, I feel like ive seen something like that before
This is a common format for UUIDs in general.
oh I thought they changed sometimes, do you happen to know the proper lengths of each section?
(thank you)
String pattern = "(\\p{XDigit}{8})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}+)", "$1-$2-$3-$4-$5";
String shortID = "5231b533ba17478798a3f2df37de2aD7";
UUID id = UUID.fromString(shortID.replaceFirst(pattern));
is there a way to hook into CommandSender#hasPermissionfor a player
(or CraftHumanEntity#hasPermission for the implementation)
thanks so much!
Define "hook into"
???
i want to replace the default implementation
You'd like to make a permissions plugin?
Hey guys, How can I use my IDE to launch my server and plugin to debug it (I am using IntelliJ)
i rmb a link
wdym
ok
ty
What block should I change to a luckyblock texture? I want to change a rarely used block to become the luckyblock
also it shouldnt generate in the vanilla world so players cant find it (or if theres a way to disable it generating)
Player head maybe the most suitable
sponge
Tbh
but a lot of players might use it
gold block?
is there a way to get which player's head is the head (getting the owner's name)
thats really used
beacon?
there's a way to get the owner from the block yeah
Yes, but you might wanna search online on this
It depends on how the player skull is created
Vastly
You can use unused mushroom block states
if you use gradle there's a plugin called iron
I see i see
Do u think using heads would be a good idea, as that doesnt require a custom pack
But going for playerheads is probably better as they are PersistentDataHolder
Yes, my idea is very good
whats a PDH?
Hee just...
declaration: package: org.bukkit.persistence, interface: PersistentDataHolder
Blocks do not have pdc
Event doesnt want to work
thanks
Someone that holds a PersistentDataContainer
Hey, all of a sudden gradle can't seen to find WorldGuardWrapper although it could find it not long ago and I haven't changed any of my gradle stuff... any advice?
the name xD
Does it implement Listener?
EventHandler annotation?
Show your imports
Nvm im blind
why can I not do if(int 5 == 5) {} ?
int 5 would be declaring a variable
and a variable has to start with _ or a letter
int 1 = 0;
return 1 == 0; // what will this return
well does 1 = 0?
nvm found out what I did wrong XD but thank you guys
a simple s can make code not work crazy
You can’t even define a variable with name 1
That's what i am trying to illustrate to @vague swallow
x = y
Then x2 = xy
Subtract the same thing from both sides:
x2 – y2 = xy – y2
Dividing by (x-y), obtain
x + y = y
Since x = y, we see that
2 y = y
Thus 2 = 1, since we started with y nonzero
Subtracting 1 from both sides:
1 = 0
Dividing by 0
ty!
sshh
Factually incorrect
There are almost no limitations on names for variables
Sure
You can’t do it lmfao
I'll send you the class file
In before he sends a working program
Your IDE will complain
Hold on, renewing my IntelliJ subscription
Javac wont compile sth Like that. The JVM would Accept Hand Made bytecode for it though
Item qty doesnt go down, or adds the effect after the right click on block interaction
does getItemInMainHand() return a copy
If it does neither then the code is not run. Show more pls.
The ItemMeta equality wont work like that
Use PDC to identify custom items
Is there a way to give the ability of double jumping and tripple jumping so they can jump once again in the air
Cocaine should be all caps
Would use slowness instead of speed 🙃
You need to make a fly check.
?
Double jumping could be fly
Double jumping is detected for when the player wants to start flying
also detected when he is in survival?
PDC = ?
