diff --git a/SigJobs/java/jobsmod/BlockBreakHandler.java b/SigJobs/java/jobsmod/BlockBreakHandler.java new file mode 100644 index 0000000..867497e --- /dev/null +++ b/SigJobs/java/jobsmod/BlockBreakHandler.java @@ -0,0 +1,12 @@ +package com.Alex.jobsmod; + +import net.minecraftforge.event.world.BlockEvent.BreakEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +public class BlockBreakHandler { + @SubscribeEvent + public void onBlockBreak(BreakEvent ev) { + //ev.getPlayer().addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GOLD+"You broke a block!")); + } + +} diff --git a/SigJobs/java/org/sig/jobs/ChannelHandlerJobsmod.java b/SigJobs/java/jobsmod/ChannelHandlerJobsmod.java similarity index 100% rename from SigJobs/java/org/sig/jobs/ChannelHandlerJobsmod.java rename to SigJobs/java/jobsmod/ChannelHandlerJobsmod.java diff --git a/SigJobs/java/org/sig/jobs/ClientProxy.java b/SigJobs/java/jobsmod/ClientProxy.java similarity index 100% rename from SigJobs/java/org/sig/jobs/ClientProxy.java rename to SigJobs/java/jobsmod/ClientProxy.java diff --git a/SigJobs/java/org/sig/jobs/CommonProxy.java b/SigJobs/java/jobsmod/CommonProxy.java similarity index 100% rename from SigJobs/java/org/sig/jobs/CommonProxy.java rename to SigJobs/java/jobsmod/CommonProxy.java diff --git a/SigJobs/java/jobsmod/EntityHandler.java b/SigJobs/java/jobsmod/EntityHandler.java new file mode 100644 index 0000000..50cbb46 --- /dev/null +++ b/SigJobs/java/jobsmod/EntityHandler.java @@ -0,0 +1,27 @@ +package com.Alex.jobsmod; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +public class EntityHandler { + @SubscribeEvent + public void onPlayerJoin(EntityJoinWorldEvent ev) { + if (ev.entity instanceof EntityPlayer) { + EntityPlayer p = (EntityPlayer)ev.entity; + //Initialize money amount if this player does not have money. + if (!p.getEntityData().hasKey("money")) { + p.getEntityData().setDouble("money", Jobsmain.STARTMONEY); //Start off with $100. + } + //Initialize jobs. + for (int i=0;i