Skip to content

Commit

Permalink
adding allweapons console command to give all weapons
Browse files Browse the repository at this point in the history
  • Loading branch information
Flet committed Mar 12, 2012
1 parent 48f8f70 commit 82fb44f
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions src/com/mojang/mojam/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,58 @@ public void doCommand(String[] args)
}
};

public Command allweapons = new Command("allweapons", 1, "Gives all weapons")
{
@Override
public void doCommand(String[] args)
{
args[0].trim();
Player player = MojamComponent.instance.player;
int i;

log("Giving player a shotgun");
if(!player.weaponInventory.add(new Shotgun(player))) {
log("You already have this item.");
}

log("Giving player a rifle");
if(!player.weaponInventory.add(new Rifle(player))) {
log("You already have this item.");
}

log("Giving player a veonomshooter");
if(!player.weaponInventory.add(new VenomShooter(player))) {
log("You already have this item.");
}

log("Giving player an elephant gun");
if(!player.weaponInventory.add(new ElephantGun(player))) {
log("You already have this item.");
}

log("Giving player a lesson in boxing");
if(!player.weaponInventory.add(new Melee(player))) {
log("You already have this item.");
}

log("Giving player a raygun");
if(!player.weaponInventory.add(new Raygun(player))) {
log("You already have this item.");
}

log("Giving player a machete");
if(!player.weaponInventory.add(new Machete(player))) {
log("You already have this item.");
}

log("Giving player a cannon!");
if(!player.weaponInventory.add(new Cannon(player))) {
log("You already have this item.");
}
}
};


public Command give = new Command("give", 1, "Gives a weapon")
{
@Override
Expand Down

0 comments on commit 82fb44f

Please sign in to comment.