Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Evert

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by Evert

  1. Like i wrote before. It works, but when items are dropped from the inventory screen, they seem to disappear for a while, but they're not really lost. They reappear after some other action with the inventory or a reconnect. Since mc 1.4.6, I had to change one line: ItemStack itemStack = event.entityItem.func_92014_d();
  2. I belief this is a problem that can only be solved with cooperation of the developers of the mods that provide those machines and/or the Forge team. I've tried to find a way to protect against this for my own mod (Chunk Protection) and haven't been able to do so. There has been no response from the machine mod developers. It were those mods that I would like to combine my/a protection mod with, so now I'm seriously considering stopping the project, because a server without those mods can be protected fine already with a Bukkit server.
  3. As far as I know, none of the mods/plugins that do protect against stealing/destructing by players directly, can protect against those players abusing machines to do the grieving for them. It can be very frustrating for players and server owners to see their creations being destructed or stolen from. And then not even be able to find out who did it. Server owners now choose to disable (parts of) mods that are great to play with, but that are being abused by a minority. It would be very helpful if there were some sort of standard within Forge that mods would have to use to alter the world, so protection mods can detect which mod/player combination is at work here and use that for logging or permissions. My suggestion is to let mods alter the world through a fake player, that has a name that combines the names of the mod and the player that controls that machine. For example. If I would use a ComputerCraft Mining Turtle to break blocks, it would call PlayerInteractEvent with as fake playername [computercraft]evert79 This way, a mod that makes a log, could save that information and if I abuse the turtle to destroy something that is build by an other player, the server admins could find it and ban me from the server. Or a mod that offers protection could stop the turtle from breaking in an area where the fake player doesn't have explicit permission.
  4. I installed a test server with BukkitForge, Factions plugin and ComputerCraft mod. Factions seems to work fine (did very little testing). A piece of land claimed by one player couldn't be destroyed or build upon by other players. But if an other player made a ComputerCraft turtle, they could use that to break blocks in the protected area.
  5. In the Events API A small thing: In META-INF/MANIFEST.MF keepcalm.mods.blockbreak.asm.BlockBreakLoadingPlugin should be keepcalm.mods.events.asm.BlockBreakLoadingPlugin like it is in BlockBreakNin.jar and a bigger problem (for me it is) After adding mcp.properties and obf.properties to the src/minecraft folder and changing some of the variables in ItemInWorldManager.java from private to public, it works when running from Eclipse. After recompile and reobfuscate, there is now the file "ir.class" in the minecraft folder. I can add this to the coremod .jar file, but it doesn't seem to be loaded. It gives this error when trying to break a block:
  6. I am trying to get this fixed by using the Events API that keepcalm extracted from the BukkitForge project, but as of now, I can't get it to work.
  7. Thank you for the Events API, but I can't get it to work. I tried it with a fresh MC146, MCP725, Forge489 and BlockBreak source downloaded on 2012-01-15. Eclipse gives a few problems in keepkalm.mods.events ForgeEventHelper.java, but it still compiles. import org.bukkit.Bukkit; --- remove unused import --- public static boolean onBlockDamage(ItemInWorldManager man) { // mcp has ridiculously long names if (man.curblockDamage % 2 == 1) { return false; } PlayerDamageBlockEvent ev = new PlayerDamageBlockEvent(man.thisPlayerMP, man.partiallyDestroyedBlockX, man.partiallyDestroyedBlockY, man.partiallyDestroyedBlockZ, man.theWorld, man.curblockDamage, man.durabilityRemainingOnBlock); MinecraftForge.EVENT_BUS.post(ev); if (ev.isCanceled()) { return true; } return false; } --- with man.xyz, change visibility of xyz to public --- Without the BlockBreakNin.jar in the coremods folder, it runs, but doesn't work. With the jar in the folder it gives a runtime error: 2013-01-16 09:49:10 [iNFO] [ForgeModLoader] Forge Mod Loader version 4.6.17.515 for Minecraft 1.4.6 loading 2013-01-16 09:49:11 [iNFO] [sTDERR] Exception in thread "main" java.lang.RuntimeException: java.lang.ExceptionInInitializerError 2013-01-16 09:49:11 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:175) 2013-01-16 09:49:11 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.relaunchServer(FMLRelauncher.java:133) 2013-01-16 09:49:11 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.handleServerRelaunch(FMLRelauncher.java:33) 2013-01-16 09:49:11 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:1375) 2013-01-16 09:49:11 [iNFO] [sTDERR] Caused by: java.lang.ExceptionInInitializerError 2013-01-16 09:49:11 [iNFO] [sTDERR] at keepcalm.mods.events.asm.transformers.events.BlockEventHelpers.<init>(BlockEventHelpers.java:37) 2013-01-16 09:49:11 [iNFO] [sTDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 2013-01-16 09:49:11 [iNFO] [sTDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) 2013-01-16 09:49:11 [iNFO] [sTDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 2013-01-16 09:49:11 [iNFO] [sTDERR] at java.lang.reflect.Constructor.newInstance(Unknown Source) 2013-01-16 09:49:11 [iNFO] [sTDERR] at java.lang.Class.newInstance0(Unknown Source) 2013-01-16 09:49:11 [iNFO] [sTDERR] at java.lang.Class.newInstance(Unknown Source) 2013-01-16 09:49:11 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.registerTransformer(RelaunchClassLoader.java:75) 2013-01-16 09:49:11 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchLibraryManager.handleLaunch(RelaunchLibraryManager.java:238) 2013-01-16 09:49:11 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:155) 2013-01-16 09:49:11 [iNFO] [sTDERR] ... 3 more 2013-01-16 09:49:11 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException 2013-01-16 09:49:11 [iNFO] [sTDERR] at java.util.Properties$LineReader.readLine(Unknown Source) 2013-01-16 09:49:11 [iNFO] [sTDERR] at java.util.Properties.load0(Unknown Source) 2013-01-16 09:49:11 [iNFO] [sTDERR] at java.util.Properties.load(Unknown Source) 2013-01-16 09:49:11 [iNFO] [sTDERR] at keepcalm.mods.events.asm.transformers.events.ObfuscationHelper.<clinit>(ObfuscationHelper.java:140) 2013-01-16 09:49:11 [iNFO] [sTDERR] ... 13 more
  8. I will look into changing that so the player can't die until logged in. Thanks
  9. My mod would only use BlockDestroyEvent and PlayerBucketEmptyEvent. If possible, a small API, like the BlockBreakEvent, would be great, otherwise I could try to use the whole BukkitForge as dependency. Anyway, thanks for your replies and the mods/APIs
  10. I successfully integrated the BlockBreakEvent mod into my mod, but it only triggers when a player breaks a block, but not when a ComputerCraft turtle does. Is this right? I would like my mod to detect when a block is broken by a turtle or any other mod machine, and to be able to cancel it, if that mod or a specific machine doesn't have permission. My mod, Chunk Protection, lets players claim a private chunk on a server, where other players can't build or break. An important thing that in still missing from my mod is that it lets machines still break things, so grievers can bypass the protection.
  11. For server-side mods that protect blocks or regions so a player can own or claim something that others can't build on, break, enter or steal from. It is easy to protect from direct player interaction, by using @ForgeSubscribe with PlayerInteractEvent, but unfortunately this doesn't detect when a block is placed or broken by a quarry, mining laser or turtle. I get a lot of request to add protection against machines to the Chunk Protection mod, but at this point that doesn't seem possible. If there already is a way to do this, please let me know. I've seen mods having 'fake players' before, but i guess that was added with Bukkit ports, because I can't find it anymore in the mods configuration files.
  12. The only thing I can think of here, is that you may have Power Login installed as well. Then you have to register and login before you can use any commands. Or do you have any other mods installed that add something with permissions?
  13. Block Break Event Would this work to notify my mod that a block is broken by a creeper or IC2 mining laser? Does your code need to run on the client side as well, because I'm making a server side only mod? I tried to use this in my mod for Chunk Protection, but it doesn't seem to work. I tried placing your source code "keepcalm\mods\blockbreak" in "src\common" or "src\minecraft" There are no error messages. This was the first time I tried to use outside code with my own mod, so I may be missing something. public class ProtectEventHookContainer { @ForgeSubscribe public void blockBreak(BlockBreakEvent event) { event.player.sendChatToPlayer("Block Event Test"); } } And in the main mod: @Init public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new ProtectEventHookContainer()); } There are other event handling methods in that EventContainer that do work.
  14. It gets automatically generated when the mod is started the first time. Only ChunkProtection makes a file, "powertools_chunkprotection.cfg". It is in the "config" folder.
  15. Thank you. I'll keep using my old method for now, because EntityEvent.EnteringChunk is called so often with mobs moving.
  16. There is some information in the javadoc online: http://jd.minecraftforge.net/ downloads: http://files.minecraftforge.net/ I think it has most or all classed documented, but there are no examples or anything. For me it's often hard to find out how to use it, but I'm just starting to make mods.
  17. Thank you. That works. It is a bit buggy. When an item is dropped with Q it gets replaced immediately, but when it is dropped with the right click from the inventory screen, it seems to disappear. It reappears later with an inventory change or after reconnecting. public void itemEvent(ItemTossEvent event) { if ( event.isCancelable() ) { ItemStack itemStack = event.entityItem.item; event.setCanceled(true); event.player.inventory.addItemStackToInventory(itemStack); } }
  18. For a server-side mod that makes some chunks private. When a player enters a chunk he/she receives a message if that chunk is already claimed. I now use a class that implements 'IScheduledTickHandler' that every 5 ticks checks the coordinates of all the players to see if they moved to another chunk. This works, but I would guess that using an event would be less demanding on the server. I tried it with 'EntityEvent.EnteringChunk', but that is called with non-player entities as well. I couldn't find out if it was a mob or a player that was causing the event to be called. I couldn't find if something exists like -PlayerEvent.EnteringChunk-. Thank you.
  19. For a server-side mod, that can make some areas private, so other players can't break or build there. I want to make that those players also can't drop(Q) items there. I can use 'ItemTossEvent', but if that is canceled, the item disappears completely. I tried 'ItemEvent', but that is called with item events where no players are involved and I can't find a way to determine what player dropped the item, so there is no way of knowing if the event has to be canceled. What I'm looking for is: - A method to return the lost item when using 'ItemTossEvent'. or - A method to determine the player name that dropped an item when using 'ItemEvent'. or - Some other way to make this work. Thank you.
  20. [1.4.2][1.4.4][1.4.5][1.4.6] Minecraft [6.0.1][6.3.0][6.4.x][6.5.0] Forge Players can claim a private chunk where other players can't break or build. /chunk gives information about the chunk you are standing on. /chunk claim lets you claim the chunk you are standing on. /chunk unclaim makes it public again. /chunk add [player1] [player2] .. adds players that are allowed to build in this chunk. /chunk remove [player1] [player2] .. will remove players from the list. /chunk clear clears the list of players that are allowed to build on this chunk. /chunk info [on|off] switches the displaying of information when crossing chunk borders. /chunk maxchunks [playername] [max] changes the number of chunks that player can claim. /chunk playerinfo [playername] tells how many chunks that player can claim and how many are claimed. /chunk unclaimall [for ops:[playername]] Make sure the right versions of Forge and Power Tools Shared are installed. Place the Chunk Protection ".zip" file in the "mods" folder of your Minecraft Forge server. Changelog 0.1.4 QuickFix: Now protects against water and lava buckets as well. 0.1.2 QuickFix: Maximum players from 1024 to 8192. Maximum chunks from 1024 to 65536. 0.1.1 Variable amount of chunks per player. /chunk maxchunks [playername] [max] changes the number of chunks that player can claim. /chunk playerinfo [playername] tells how many chunks that player can claim and how many are claimed. Added command /chunk unclaimall and for ops /chunk unclaimall [playername] 0.1 Chunks will automaticly be unclaimed after 7 days of not being visited by their owner. Can be changed in config file. Set to 0 to disable. Op's can now claim for other players. Use /chunk claim [playername] Added config file setting AllPlayersCanClaim=true. Change to false so only op's can claim chunks. 0.0.9 Fixed bug that gave chat spam with more than one player online. Added config file with setting for maximum amount of chunks players are allowed to claim and default setting for display of info when crossing chunk borders. 0.0.8 It still has the bug from 0.0.7 that gives chat spam with more than one player online, but /chunk info off is now default, so you don't see it. Op's can now add or remove players from chunks and unclaim chunks owned by other players. 0.0.7 Added /chunk info [on|off] command to turn off the info that shows when crossing chunk borders. 'chunkinfo.dat' will now be stored in 'powertools' folder. When upgrading, make a new folder 'powertools' in the folder the server runs from and move 'chunkinfo.dat' into it. Fixed bug where chunks couldn't be unclaimed. Some small changes with colors. 0.0.6 The owner of a chunk can now add a list of players who are allowed to build and break there as well. Added chat colors. For the chat filter, use: /chat normal for the default chat mode. /chat player [player1] [player2] .. for player mode, chat is sent only to selected players. /chat remove [player1] [player2] .. to remove players from the list. /chat clear to remove all players from the list. Download from: http://powerbeat.org/minecraft/server_mods/
  21. I'm making a server mod and would like the mod to give a message to the player on login. I figured out how to give a message when the player breaks a block or types a command, but still need to know how the mod can notice when a player logs in. [SOLVED] I made a new class package my_package; import net.minecraft.src.EntityPlayer; import cpw.mods.fml.common.IPlayerTracker; public class PlayerTracker implements IPlayerTracker { @Override public void onPlayerLogin(EntityPlayer player) { player.sendChatToPlayer("You just connected to this server."); } @Override public void onPlayerLogout(EntityPlayer player) { MyMod.playerLogout(player.getCommandSenderName() ); } @Override public void onPlayerChangedDimension(EntityPlayer player) { // TODO Auto-generated method stub } @Override public void onPlayerRespawn(EntityPlayer player) { // TODO Auto-generated method stub } } And in the class MyMod @Init public void init(FMLInitializationEvent event) { GameRegistry.registerPlayerTracker(new PlayerTracker()); }
  22. I had the same problem. I've read somewhere on the minecraft forums, that in Windows XP, you need to change the file extensions from .zip to .jar. It worked for me. Don't know why.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.