• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

TUTORIAL: How to make an advanced move

OmniCypher

Staff member
Lead Developer
Administrator
Plugin Developer
Well, the ting about java is its sometimes difficult trying to figure out its system of speach.
Take commanglocks for example, they are much easier to use being that there language is simple. (Summon this armor stand here with x items on its head in x and y position and detect for a player comming near it, if the player gets within X blocks of the armor stand kill him)
Where as java i dont know its system of operation, i can figure out if its declaring things but i have no idea why and , what order its supposed to be in, and will it take simle commands like if i were to tell it to give me armor after i shift at a iron block then destroy the block, can it take commands that simple without adding a bunch of other random code?
Well the first thing I hope you realize is that you really shouldn't compare python and java, they are quite different outside of syntax. Python is meant to not include things like static declarations and be very verbose. Python is suppose to be very concise, so to you adding things like variable declarations, method declarations, and class declarations when in Java, a much bulkier language by nature, will appear like a bunch of "other random code" but it is a very important and required part of the language. You'll need to just get use to it.
 

P0W3RK1D

Verified Member
Well the first thing I hope you realize is that you really shouldn't compare python and java, they are quite different outside of syntax. Python is meant to not include things like static declarations and be very verbose. Python is suppose to be very concise, so to you adding things like variable declarations, method declarations, and class declarations when in Java, a much bulkier language by nature, will appear like a bunch of "other random code" but it is a very important and required part of the language. You'll need to just get use to it.
i can actualy read some java without having to go through google to see what it means, its just things like double words that stump me such as "Player player = event.getPlayer();" my mind starts shouting WTF DOES THAT MEAN>?!
and im having this weird error that i don't think google not wants to help me solve. the GeneralMethods keeps showing up as an error saying "GeneralMethods cannot be resolved" anyone know how to solve that?
 

jedk1

New Member
i can actualy read some java without having to go through google to see what it means, its just things like double words that stump me such as "Player player = event.getPlayer();" my mind starts shouting WTF DOES THAT MEAN>?!
and im having this weird error that i don't think google not wants to help me solve. the GeneralMethods keeps showing up as an error saying "GeneralMethods cannot be resolved" anyone know how to solve that?
Okay lemme explain "Player player". "Player" is the class. "player" is the instance of that class. Then "= event.getPlayer()" is saying, "Okay, please make 'player' the same as the player in the event"
Also GeneralMethods is a class in pk 1.7.0 beta 2 or higher.
 

P0W3RK1D

Verified Member
Okay lemme explain "Player player". "Player" is the class. "player" is the instance of that class. Then "= event.getPlayer()" is saying, "Okay, please make 'player' the same as the player in the event"
Also GeneralMethods is a class in pk 1.7.0 beta 2 or higher.
ok.......(i can do this so much easier with command blocks) darn it java)
 

P0W3RK1D

Verified Member
Okay lemme explain "Player player". "Player" is the class. "player" is the instance of that class. Then "= event.getPlayer()" is saying, "Okay, please make 'player' the same as the player in the event"
Also GeneralMethods is a class in pk 1.7.0 beta 2 or higher.
do u happen to know where i can find the base code for earth armor, not earth armor+ that one is verry confuzing, just earth armor base. i want to use the base mechanics to create a skill if you may ?
 

P0W3RK1D

Verified Member
Okay lemme explain "Player player". "Player" is the class. "player" is the instance of that class. Then "= event.getPlayer()" is saying, "Okay, please make 'player' the same as the player in the event"
Also GeneralMethods is a class in pk 1.7.0 beta 2 or higher.
its because i tried to make the ability, but when i compiled it into a jar and placed it into the abilitys folder the move never even showed up in the game. i used earth armor+ to try and make it but its verry confuzing, i need the base earth armor because it has the base things so all i have to do is switch stuff around, add some effects and mabey, just mabey i can perfect the move,
 

P0W3RK1D

Verified Member
Okay lemme explain "Player player". "Player" is the class. "player" is the instance of that class. Then "= event.getPlayer()" is saying, "Okay, please make 'player' the same as the player in the event"
Also GeneralMethods is a class in pk 1.7.0 beta 2 or higher.
sry if im spamming you inbox bu just lto let u know i just found the earth armor base code :D
https://github.com/ProjectKorra/ProjectKorra/blob/master/src/com/projectkorra/ProjectKorra/earthbending/EarthArmor.java
 

P0W3RK1D

Verified Member
Okay lemme explain "Player player". "Player" is the class. "player" is the instance of that class. Then "= event.getPlayer()" is saying, "Okay, please make 'player' the same as the player in the event"
Also GeneralMethods is a class in pk 1.7.0 beta 2 or higher.
next problem presents itself, i tweaked the plugin just a bit (changed the name) but when i put the plugin in a jar it dosent even show up in the server, i did the path,yml but i dont know if i did it right.
all i got is the "MetalMan.java" files "path.yml" and all i did was Copy and Paste the base eartharmor code in and just change the name of "EarthArmor" to "MetalMan" other than that i just fixed any errors that come with that, then i created the path.yml file and the only code inside of it is : "main class: com.jedk1.korra.MetalMan.MetalManAddon" all i did in this was change the name of EarthArmor to MetalMan.
am i doing it right or am i still missing somthing?
 
Top