Rename and clean up MapleItemInformationProvider

This commit is contained in:
P0nk
2021-09-09 22:45:55 +02:00
parent 8f54b3e5de
commit 9c8abf6f62
81 changed files with 545 additions and 414 deletions

View File

@@ -28,7 +28,7 @@ import client.Client;
import client.Stat;
import client.command.Command;
import constants.inventory.ItemConstants;
import server.MapleItemInformationProvider;
import server.ItemInformationProvider;
public class FaceCommand extends Command {
{
@@ -46,7 +46,7 @@ public class FaceCommand extends Command {
try {
if (params.length == 1) {
int itemId = Integer.parseInt(params[0]);
if (!ItemConstants.isFace(itemId) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
if (!ItemConstants.isFace(itemId) || ItemInformationProvider.getInstance().getName(itemId) == null) {
player.yellowMessage("Face id '" + params[0] + "' does not exist.");
return;
}
@@ -56,7 +56,7 @@ public class FaceCommand extends Command {
player.equipChanged();
} else {
int itemId = Integer.parseInt(params[1]);
if (!ItemConstants.isFace(itemId) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
if (!ItemConstants.isFace(itemId) || ItemInformationProvider.getInstance().getName(itemId) == null) {
player.yellowMessage("Face id '" + params[1] + "' does not exist.");
}

View File

@@ -28,7 +28,7 @@ import client.Client;
import client.Stat;
import client.command.Command;
import constants.inventory.ItemConstants;
import server.MapleItemInformationProvider;
import server.ItemInformationProvider;
public class HairCommand extends Command {
{
@@ -46,7 +46,7 @@ public class HairCommand extends Command {
try {
if (params.length == 1) {
int itemId = Integer.parseInt(params[0]);
if (!ItemConstants.isHair(itemId) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
if (!ItemConstants.isHair(itemId) || ItemInformationProvider.getInstance().getName(itemId) == null) {
player.yellowMessage("Hair id '" + params[0] + "' does not exist.");
return;
}
@@ -56,7 +56,7 @@ public class HairCommand extends Command {
player.equipChanged();
} else {
int itemId = Integer.parseInt(params[1]);
if (!ItemConstants.isHair(itemId) || MapleItemInformationProvider.getInstance().getName(itemId) == null) {
if (!ItemConstants.isHair(itemId) || ItemInformationProvider.getInstance().getName(itemId) == null) {
player.yellowMessage("Hair id '" + params[1] + "' does not exist.");
return;
}