To make a spawn server, you just need to make the command "::item" available to all.
To do this, you would need to go into "Commands.java", located in
Code:
com.rs.game.player.content
Once you've opened it up, we need to locate the "item" command.
Do CTRL + F and search for
(Or whatever the spawn command is)
You just now want to COPY + PASTE this whole command into the playerCommands section of the Commands.java - which located at the bottom (You could just search for
Code:
processNormalCommand
)
To make certain items unspawnable, you need to make a String at the top of commands.java declaring the various unspawnable items, such as this:
Code:
private static final int NotSpawnable[] = {11694, 11695, 14484, 14485};
Now you need to add a check statement to the item command, like so:
Code:
if (command[0].equals("item")) {
int itemId = Integer.parseInt(command[1]);
for (int id : NonSpawnable) {
if (id == itemId) {
player.sendMessage("This item is not obtainable.");
return;
}
}
if (command.length == 3) {
player.getInventory().addItem(Integer.parseInt(command[1]),
Integer.parseInt(command[2]));
} else {
player.getInventory().addItem(Integer.parseInt(command[1]), 1);
}
player.getInventory().refresh();
}