mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 07:22:20 +00:00
Scripting for Effects and Profiles
This commit is contained in:
1 parent
ce1f652d53
commit
d7d968bf86
13 files changed
+18
-126
No files matched your search
@@ -1,33 +0,0 @@
|
||||
package kamkeel.npcs.controllers.data;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface IProfile {
|
||||
|
||||
|
||||
/**
|
||||
* @return the IPlayer attached to the Profile
|
||||
*/
|
||||
IPlayer getPlayer();
|
||||
|
||||
|
||||
/**
|
||||
* @return The profiles current Slot ID
|
||||
*/
|
||||
int getCurrentSlotId();
|
||||
|
||||
|
||||
/**
|
||||
* @return Map of all Slot IDs
|
||||
*/
|
||||
Map<Integer, ISlot> getSlots();
|
||||
|
||||
|
||||
/**
|
||||
* @return FULL NBT of the Profile
|
||||
*/
|
||||
NBTTagCompound writeToNBT();
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package kamkeel.npcs.controllers.data;
|
||||
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.IPlayerData;
|
||||
|
||||
public interface IProfileController {
|
||||
|
||||
IProfile getProfile(IPlayer player);
|
||||
|
||||
boolean changeSlot(IPlayer player, int slotID);
|
||||
|
||||
boolean hasSlot(IPlayer player, int slotID);
|
||||
|
||||
boolean removeSlot(IPlayer player, int slotID);
|
||||
|
||||
IPlayerData getSlotPlayerData(IPlayer player, int slotID);
|
||||
|
||||
void saveSlotData(IPlayer player);
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package kamkeel.npcs.controllers.data;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface ISlot {
|
||||
/**
|
||||
* @return id of slot
|
||||
*/
|
||||
int getId();
|
||||
|
||||
/**
|
||||
* @return Name of Slot
|
||||
*/
|
||||
String getName();
|
||||
|
||||
|
||||
/**
|
||||
* @param name - New name of slot
|
||||
*/
|
||||
void setName(String name);
|
||||
|
||||
/**
|
||||
* @return Last time Slot was Saved
|
||||
*/
|
||||
long getLastLoaded();
|
||||
|
||||
/**
|
||||
* @param time - Long time for when it was last saved
|
||||
*/
|
||||
void setLastLoaded(long time);
|
||||
|
||||
/**
|
||||
* @return if the slot is temporary
|
||||
*/
|
||||
boolean isTemporary();
|
||||
|
||||
/**
|
||||
* @param temporary - Setting a slot to temporary won't save it to Profile
|
||||
*/
|
||||
void setTemporary(boolean temporary);
|
||||
|
||||
/**
|
||||
* @return A map of all the NBTs within a slot
|
||||
*/
|
||||
Map<String, NBTTagCompound> getComponents();
|
||||
|
||||
void setComponentData(String key, NBTTagCompound data);
|
||||
|
||||
/**
|
||||
* @param key - The KEY of the NBT for the Slot: [CNPC+, DBC... etc]
|
||||
* @return NBT for that that key
|
||||
*/
|
||||
NBTTagCompound getComponentData(String key);
|
||||
|
||||
/**
|
||||
* @return The full NBT of the Slot
|
||||
*/
|
||||
NBTTagCompound toNBT();
|
||||
}
|
||||
@@ -4,6 +4,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.data.IProfile;
|
||||
import noppes.npcs.api.handler.data.ISlot;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package kamkeel.npcs.controllers.data;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.api.handler.data.ISlot;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
Reference in new issue
Block a user