mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 11:54:47 +00:00
Optimize Imports
This commit is contained in:
1 parent
ec78673fa2
commit
e46b78ff71
149 files changed
+931
-1029
No files matched your search
@@ -31,7 +31,10 @@ import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.constants.EnumQuestRepeat;
|
||||
import noppes.npcs.constants.EnumQuestType;
|
||||
import noppes.npcs.containers.ContainerCustomGui;
|
||||
import noppes.npcs.controllers.*;
|
||||
import noppes.npcs.controllers.CustomGuiController;
|
||||
import noppes.npcs.controllers.DialogController;
|
||||
import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.controllers.QuestController;
|
||||
import noppes.npcs.controllers.data.*;
|
||||
import noppes.npcs.entity.EntityDialogNpc;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
@@ -55,14 +58,14 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
super(player);
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the displayed name of the player
|
||||
*/
|
||||
public String getDisplayName(){
|
||||
return player.getDisplayName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the players name
|
||||
*/
|
||||
@@ -235,12 +238,12 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
return;
|
||||
removeQuest(quest.getId());
|
||||
}
|
||||
|
||||
|
||||
public boolean hasFinishedQuest(int id){
|
||||
PlayerQuestData data = PlayerDataController.Instance.getPlayerData(player).questData;
|
||||
return data.finishedQuests.containsKey(id);
|
||||
}
|
||||
|
||||
|
||||
public boolean hasActiveQuest(int id){
|
||||
PlayerQuestData data = PlayerDataController.Instance.getPlayerData(player).questData;
|
||||
return data.activeQuests.containsKey(id);
|
||||
@@ -330,7 +333,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
data.factionData.increasePoints(faction, points-getFactionPoints(faction), player);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @param faction The faction id
|
||||
* @return points
|
||||
*/
|
||||
@@ -342,11 +345,11 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
public void sendMessage(String message){
|
||||
player.addChatMessage(new ChatComponentTranslation(NoppesStringUtils.formatText(message,player)));
|
||||
}
|
||||
|
||||
|
||||
public void sendMessage(String message, String color, boolean bold, boolean italic, boolean underlined) {
|
||||
sendMessage(message, color, bold, italic, underlined, false, false);
|
||||
}
|
||||
|
||||
|
||||
public void sendMessage(String message, String color, boolean bold, boolean italic, boolean obfuscated, boolean strikethrough, boolean underlined) {
|
||||
EnumChatFormatting c = getColor(color);
|
||||
|
||||
@@ -365,7 +368,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
|
||||
player.addChatMessage(chat);
|
||||
}
|
||||
|
||||
|
||||
private EnumChatFormatting getColor(String color) {
|
||||
switch (color) {
|
||||
case "black": return EnumChatFormatting.BLACK;
|
||||
@@ -394,14 +397,14 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
public int getMode(){
|
||||
return player.theItemInWorldManager.getGameType().getID();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param type The gamemode type. 0:SURVIVAL, 1:CREATIVE, 2:ADVENTURE
|
||||
*/
|
||||
public void setMode(int type){
|
||||
player.setGameType(WorldSettings.getGameTypeById(type));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 1.7.10d
|
||||
* @return Returns a IItemStack array size 36
|
||||
@@ -519,7 +522,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param id The items name
|
||||
@@ -530,10 +533,10 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
public boolean giveItem(String id, int damage, int amount){
|
||||
Item item = (Item)Item.itemRegistry.getObject(id);
|
||||
if(item == null)
|
||||
return false;
|
||||
return false;
|
||||
return player.inventory.addItemStackToInventory(new ItemStack(item, amount, damage));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Same as the /spawnpoint command
|
||||
* @param x The x position
|
||||
@@ -550,7 +553,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
public void setSpawnpoint(IPos pos){
|
||||
this.setSpawnpoint(pos.getX(),pos.getY(),pos.getZ());
|
||||
}
|
||||
|
||||
|
||||
public void resetSpawnpoint(){
|
||||
player.setSpawnChunk(null, false);
|
||||
}
|
||||
@@ -639,7 +642,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
}
|
||||
return player.func_147099_x().hasAchievementUnlocked((Achievement) statbase);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param permission Bukkit/Cauldron permission
|
||||
* @return Returns whether or not the player has the permission
|
||||
@@ -655,7 +658,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
public int getExpLevel(){
|
||||
return player.experienceLevel;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 1.7.10c
|
||||
* @param level The new exp level you want to set
|
||||
@@ -664,7 +667,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
player.experienceLevel = level;
|
||||
player.addExperienceLevel(0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Requires pixelmon to be installed
|
||||
* @since 1.7.10d
|
||||
|
||||
Reference in new issue
Block a user