Jump to content
  • 0
Sign in to follow this  
ahmed

Making Spawn for everyone, But With Coins

Question

Who can help me with this and gimme a command that works for everyone (PLAYERS+STAFF+DONOR), to make them able to spawn But with COINS?

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
Project insanity

Share this post


Link to post
Share on other sites
  • 0
Assuming you this is what you were asking for, I made a command that should work if you are using a [PI] 317. Any player should be able to use it depending on where you put it in your Commands.java file.

[CODE]if (playerCommand.startsWith("coins")) {
if (c.inWild())
return;
try {
String[] args = playerCommand.split(" ");
if (args.length == 2) {
int newItemAmount = Integer.parseInt(args[1]);
if ((newItemAmount <= 2000000000) && (newItemAmount >= 0)) {
c.getItems().addItem(995, newItemAmount);
System.out.println("Coins spawned by: " + c.playerName);
} else {
c.sendMessage("Try Again.");
}
} else {
c.sendMessage("Use as ::coins 995 100");
}
} catch (Exception e) {

}
}[/CODE]

It's pretty simple and I tried it out on my [PI] 317, and it worked. Any feedback would be great! I am new at coding. Edited by samyett

Share this post


Link to post
Share on other sites
  • 0
do you mean like when you spawn item its worth coins?

Share this post


Link to post
Share on other sites
  • 0
YES ! Thats what i meam Beaveryy

Share this post


Link to post
Share on other sites
Sign in to follow this  

×