Jump to content

DrPiggy

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by DrPiggy

  1. But that only gets me the player being attacked, i also need the attacker to check if they are on the same team
  2. Hey, im making a minigame, and im trying to prevent team killing, so i wanted to know if theres an event for when a player hits another player so i can check and cancel it if needed
  3. i only have access to the latest.log in the hosting file manager ;-; but it looks like the fml-server-latest i have on my local test server, so i hope it helps https://ufile.io/95d2b (i cut it short because there are like 30k more lines of that error)
  4. Hey, i run a server, with several mods, and suddenly today this happened: java.io.UTFDataFormatException: encoded string too long: 65536 bytes at java.io.DataOutputStream.writeUTF(DataOutputStream.java:364) at java.io.DataOutputStream.writeUTF(DataOutputStream.java:323) at net.minecraft.nbt.NBTTagString.func_74734_a(NBTTagString.java:29) at net.minecraft.nbt.NBTTagCompound.func_150298_a(NBTTagCompound.java:386) at net.minecraft.nbt.NBTTagCompound.func_74734_a(NBTTagCompound.java:44) at net.minecraft.nbt.NBTTagList.func_74734_a(NBTTagList.java:32) at net.minecraft.nbt.NBTTagCompound.func_150298_a(NBTTagCompound.java:386) at net.minecraft.nbt.NBTTagCompound.func_74734_a(NBTTagCompound.java:44) at net.minecraft.nbt.NBTTagCompound.func_150298_a(NBTTagCompound.java:386) at net.minecraft.nbt.NBTTagCompound.func_74734_a(NBTTagCompound.java:44) at net.minecraft.nbt.CompressedStreamTools.func_150663_a(CompressedStreamTools.java:149) at net.minecraft.nbt.CompressedStreamTools.func_74800_a(CompressedStreamTools.java:139) at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_75821_a(AnvilChunkLoader.java:288) at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_75814_c(AnvilChunkLoader.java:274) at net.minecraft.world.storage.ThreadedFileIOBase.func_75736_b(ThreadedFileIOBase.java:34) at net.minecraft.world.storage.ThreadedFileIOBase.run(ThreadedFileIOBase.java:26) at java.lang.Thread.run(Thread.java:745)
  5. hey, i am using: player.inventory.armorInventory[2] = new ItemStack(Items.leather_chestplate); but how do i make that leather_chestplate red?
  6. no, i dont understand what Phase means
  7. Hey, i want to do a 60 seconds countdown and every second announce something in chat, but i cant find any scheduler built into forge. what can i use?
  8. well, i have an item that it's config allows you to choose a texture from a list, and that texture is chosen on the server that you are joining, so i thought i could register the item with the specific texture when i join the texture, if not, is there a way to just change the texture of an item when you join a server?
  9. Hey, i wanted to know, if there is anyway of adding items after the actual loading finishes maybe when you join a server etc etc.
  10. of course its forge, its just a kcauldron server so i wanted you guys to know its also partily bukkit. the code is: package com.drpiggy.eventsystem.commands; import java.util.ArrayList; import java.util.List; import com.drpiggy.eventsystem.data.DataManager; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.util.ChatComponentText; public class CommandJoinTeam implements ICommand { private final List<String> aliases; public CommandJoinTeam() { aliases = new ArrayList<String>(); aliases.add("jointeam"); aliases.add("joint"); } @Override public int compareTo(Object paramT) { return 0; } @Override public String getCommandName() { return "jointeam"; } @Override public String getCommandUsage(ICommandSender sender) { return "jointeam <team name>"; } @Override public List<String> getCommandAliases() { return this.aliases; } @Override public void processCommand(ICommandSender sender, String[] arguments) { if (arguments.length == 0) { sender.addChatMessage(new ChatComponentText("[EventSystem] Please enter the name of the team!")); return; } if (!DataManager.AddTeamPlayer(arguments[0], sender.getEntityWorld().getPlayerEntityByName(sender.getCommandSenderName()))) { sender.addChatMessage(new ChatComponentText("[EventSystem] That team does not exist!")); return; } sender.addChatMessage(new ChatComponentText("[EventSystem] Team changed!")); DataManager.get(sender.getEntityWorld()).markDirty(); } @Override public boolean canCommandSenderUseCommand(ICommandSender sender) { return true; } @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] arguments) { return null; } @Override public boolean isUsernameIndex(String[] p_82358_1_, int p_82358_2_) { return false; } } but non op players cant use it
  11. Hey, i added a command and in the canCommandSenderUseCommand i just put in return true; but still on the bukkit server the none ops dont have permission to use it. is there something im missing here?
  12. Hey, im going over every item in a chest, and giving it to a player, but the inventory desyncs! and the only way for the inventory to update is to relog or go to another dimension, is there a way to send an update packet or something? thanks.
  13. Hey, i would like to get the uuid of a player by username (Even if he was not in the server before), so i know theres the mojang api on https://api.mojang.com/users/profiles/minecraft/<username> but i dont know how to use it with forge or if its even the uuid of the player.
  14. i even tried doing that, didnt work, bump.
  15. oh that was my first idea, but thats pretty stupid performance wise as im testing this every playertick
  16. not a good idea as getBoundingBox() in player returns null
  17. make sure --username is your email and not your actual username
  18. Hey, im currently using this: if (AxisAlignedBB.getBoundingBox(area.getLocA()[0], area.getLocA()[1], area.getLocA()[2], area.getLocB()[0],area.getLocB()[1], area.getLocB()[2]) .intersectsWith(AxisAlignedBB.getBoundingBox(event.player.posX, event.player.posY,event.player.posZ, event.player.posX, event.player.posY + 1, event.player.posZ))) { to check if a player is inside an area, the problem is, it doesn't work! it always says false, even if i am in the area.
  19. If i have a different question, which is related to this, should i ask it here, or open a new thread with the fitting title to help other people that may search for it someday?
  20. Welp, thanks! thats easier then this if (event.player.posX >= area.getLocA()[0] && event.player.posY >= area.getLocA()[1] && event.player.posZ >= area.getLocA()[2] && event.player.posX <= area.getLocB()[0] && event.player.posY <= area.getLocB()[1] && event.player.posZ <= area.getLocB()[2]) {
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.