Java Skript Expression

Status
This thread has been locked.

Innings

Reputable Seller
Supreme
Feedback score
28
Posts
879
Reactions
267
Resources
0
I am in need of a java skript expression that links into deluxemenu. This would just simply check if a player is holding a pickaxe in their hand or not, any type of pickaxe.

I would like to get this for a vouch but not sure how complex it is.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Vierdant

Explorer
Supreme
Feedback score
20
Posts
627
Reactions
312
Resources
0
Can you please explain what you mean by "java skript"
Like skript-mirror or java script?
 

FireFlower

Feedback score
6
Posts
228
Reactions
48
Resources
0
I think the guys a little confused on what Java vs Java Script is. I think he's looking for an if statement. If he is that'd be very easy to write (like 30 seconds)
 

Innings

Reputable Seller
Supreme
Feedback score
28
Posts
879
Reactions
267
Resources
0
I think the guys a little confused on what Java vs Java Script is. I think he's looking for an if statement. If he is that'd be very easy to write (like 30 seconds)
I am certainly confused, but glad to hear that. Will it work with deluxe menus?
 

FireFlower

Feedback score
6
Posts
228
Reactions
48
Resources
0
Are you looking for code or a plugin? I'd recommend talking to the guy who sent you the info in the gayzo because you guys don't seem to be on the same page.
 

FireFlower

Feedback score
6
Posts
228
Reactions
48
Resources
0
Oh interesting, that actually probably requires java script. I can't find it on the dulexmenus page, could you link me to that document?
 

FireFlower

Feedback score
6
Posts
228
Reactions
48
Resources
0
Okay, you'll need to start by checking if you have the placeholder which states what item the player has in there hand. I forget the command to evaluate papi expresions. You'll need to see if you have the %player_item_in_hand% placeholder. If you don't you'll need to install that extension. See https://www.spigotmc.org/wiki/placeholderapi-placeholders/ for installing placeholders.

I'm not sure whether %player_item_in_hand% gives you the material name (i.e. diamond_pickaxe) or the name of the itemstack, so you'll have to test that this doesn't work with items renamed to have pickaxe in their name.
'"%player_item_in_hand%".toLowerCase().contains("pickaxe");'
Haven't tested this. Lmk if it works

Edit: Changed the code to hopefully work, also you'll need dif code if you want it to work with the main item in hand and not the main item
 
Last edited:

Innings

Reputable Seller
Supreme
Feedback score
28
Posts
879
Reactions
267
Resources
0
Okay, you'll need to start by checking if you have the placeholder which states what item the player has in there hand. I forget the command to evaluate papi expresions. You'll need to see if you have the %player_item_in_hand% placeholder. If you don't you'll need to install that extension. See https://www.spigotmc.org/wiki/placeholderapi-placeholders/ for installing placeholders.

I'm not sure whether %player_item_in_hand% gives you the material name (i.e. diamond_pickaxe) or the name of the itemstack, so you'll have to test that this doesn't work with items renamed to have pickaxe in their name.
'"%player_item_in_hand%".toLowerCase().contains("pickaxe");'
Haven't tested this. Lmk if it works

Edit: Changed the code to hopefully work, also you'll need dif code if you want it to work with the main item in hand and not the main item
Does not work. When I try to open it it just says you need to be holding a pickaxe.

https://gyazo.com/04da232758928ce1eb7083d4656dcbbd

that is it in config.[DOUBLEPOST=1546830577][/DOUBLEPOST]^ But I am holding a pickaxe, I tried named pickaxe, default pickaxe, and something named just "pickaxe" and none worked.
 

FireFlower

Feedback score
6
Posts
228
Reactions
48
Resources
0
Could you send a pic of the result when you evaluate the placeholder %player_item_in_hand% when you're holding a pickaxe?[DOUBLEPOST=1546830958][/DOUBLEPOST]I think it's /papi parse %player_item_in_hand%
 
Last edited:

FireFlower

Feedback score
6
Posts
228
Reactions
48
Resources
0
Can you download a papi extension using /papi ecloud download Player and then try /papi parse %player_item_in_hand% again?
 

Innings

Reputable Seller
Supreme
Feedback score
28
Posts
879
Reactions
267
Resources
0
Can you download a papi extension using /papi ecloud download Player and then try /papi parse %player_item_in_hand% again?
I did it, and got the same thing. I already downloaded the player tho.
 

FireFlower

Feedback score
6
Posts
228
Reactions
48
Resources
0
Ok I tried it on my server, you have to do /papi reload, or reload your server. Also, if you're using a 1.8.8 server, you'll have to downgrade your version of the Player pack otherwise you'll get "An internal error occured while attempting to perform this command".
 

Innings

Reputable Seller
Supreme
Feedback score
28
Posts
879
Reactions
267
Resources
0
Ok I tried it on my server, you have to do /papi reload, or reload your server. Also, if you're using a 1.8.8 server, you'll have to downgrade your version of the Player pack otherwise you'll get "An internal error occured while attempting to perform this command".
How do I downgrade my version of player pack?
 
Status
This thread has been locked.
Top