Code:
if (playerCommand.startsWith("item") || playerCommand.startsWith("pickup")) {
if (c.inWild() || c.isInArd() || c.isInPbox() || c.isInFala() || c.inFunPk())
return;
try {
String[] args = playerCommand.split(" ");
int[] unspawnable = {995,13510,13512,13514,13516,13518,13520,13522,13524,13526,13528,13530,13532,13534,13536,13538,9470,9005,8901,11021,11018,11016,1672,11020,6726,6727,10566,9946,9944,9945,10939,10940,10945,9944,2631,10692,13810,11789,11790,8908,9948,9949,10646,9470,1,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,
11718,11719,11720,11721,11722,11723,998,11724,11725,11726,11727,11695,11696,11697,11698,11699,11700,11701,11702,11703,11704,11705,11706,11707,11708,11709,11710,11711,11712,11713,11714,11715,10330,
10331,10332,10333,10334,10335,10336,10337,10338,10339,10340,10341,10342,10343,10344,10345,10346,10347,10348,10349,10350,10351,10352,10353,
8839,8840,8841,8842,8843,11663,11664,11665,999,13889,13902,15000,15001,15018,15019,15020,15220,13736,13738,13740,13742,13744,9789,989,990,
9790,9813,9814,10662,2422,13500,13502,13504,13506,10654,11676,10611,10734,11675,11674,11278,15037,15038,15039,15040,2661,10637,10556,
13899,13902,9096,9084,9091,9092,9093,9097,9098,9099,9100,9101,9102,9103,9104,9105,9106,10609,11367,11368,11369,11370,11371,11372,11373,11374,
11375,11376,11377,11378,11379,11380,11381,11382,11383,11384,11385,11386,11387,11388,11389,11390,11391,11392,11393,11394,11395,11396,11397,
11398,11399,11400,11401,11402,11403,11404,11405,11406,11407,11408,11409,11410,11411,11412,11413,11414,11415,11416,11417,11418,11419,11420,
10556,10637,10778,2662,10043,10041,10042,10044,10045,10046,10047,10048,10049,10050,10051,10052,10053,10054,10055,10056,10057,10058,10059,10060,
10061,10062,10063,10064,10065,10066,10067,10068,9921,9922,9923,9924,9925,13540,13542,13544,13546,13548,13550,13552,13554,13556,13558,13560,13562,
14484,14485,14486,13738,13740,13742,13744,18786,19780,19784,15486,15487,13746,
13747,13748,1349,13750,13751,13752,13753,18333,18334,18335,18349,18350,18351,
18352,18353,18354,18355,18356,18357,18358,18359,18360,1635,12158,12159,12160,12161,12163,12168,
13884,13885,13886,1890,13891,13892,13896,13897,13898,13902,13903,13904,
13908,13909,13910,13914,13915,13916,13920,13921,13922,13926,13927,13928,
13887,13888,13889,13893,13894,13895,13899,13900,13901,13905,13906,13907,
13911,13912,13913,13917,13918,13919,13923,13924,13925,13929,13930,13931,
13858,13859,13860,13861,13862,13863,13864,13865,13866,13867,13868,15272,15271,15273,15275,15270,15276,15277,
13869,13932,13933,13934,13935,13936,13937,13938,13939,13940,13941,13942,13943,
13870,13871,13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,
13944,13945,13946,13947,13948,13949,13950,13951,13952,13953,13954,13955,13956,13957,
11283,11284,11285,6570,
13362,13360,13358,13355,13354,13352,13350,13348,13346,13344,13342,13340,13370,13336,
13450,13451,13452,13453,13461,20072,15018,15019,15020,15220,8839,8840,8841,8842,11663,11664,11665,
4724,4725,4726,4727,4728,4729,4730,4731,4904,4905,4906,4907,4910,4911,4912,4913,
4916,4917,4918,4919,4922,4923,4924,4925,4716,4717,4718,4719,4720,4721,4722,4723,4880,4881,4882,4883,
4886,4887,4888,4889,4892,4893,4894,4895,4898,4899,4900,4901,
4732,4733,4734,4735,4736,4737,4738,4739,4928,4929,4930,4931,
4934,4935,4936,4937,4940,4941,4942,4943,4946,4947,4948,4949,4708,4709,4710,4711,4712,4713,4714,4715,4856,4857,4858,
4859,4862,4863,4864,4865,4868,4869,4870,4871,4874,4875,4876,4877,4753,4754,4755,4756,4757,4758,4759,4760,
4976,4977,4978,4979,4982,4983,4984,4985,4988,4989,4990,4991,4994,4995,4996,4997,
4745,4746,4747,4748,4749,4750,4751,4752,4952,4953,4954,4955,4958,4959,4960,4961,4964,4965,4966,4967,
4970,4971,4972,4973,
19590,19591,11814,11815,11816,11817,11818,11819,11820,11821,19594,19595,19598,19599,19578,19579,19576,19577,
19574,19575,19572,19573,15332,15333,15334,15335,
4860,4861,4866,4867,4872,4873,4878,4879,4932,4933,4938,4939,4944,4945,4950,4951,
4908,4909,4914,4915,4920,4921,4926,4927,4956,4957,4962,4963,4968,4969,4974,4975,
4980,4981,4986,4987,4992,4993,4998,4999,4884,4885,4890,4891,4896,4897,4902,4903};
if (args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
int itemID = Integer.parseInt(args[1]);
for(int i : unspawnable) {
if(c.playerRights <= 2) {
if(itemID == i) {
c.sendMessage("You cannot spawn this item.");
return;
}
}
}
if ((newItemID <= 30000) && (newItemID >= 0)) {
c.getItems().addItem(newItemID, newItemAmount);
//System.out.println("Spawned: " + newItemID + " by: " + c.playerName);
c.sendMessage("Spawned: " + newItemID + "");
} else {
c.sendMessage("That item ID does not exist.");
}
} else {
c.sendMessage("Wrong command or doesn't exist");
}
} catch (Exception e) {
}
}