Mtihc / TreasureChest

The TreasureChest plugin for CraftBukkit
dev.bukkit.org/server-mods/treasurechest
10 stars 39 forks source link

Internal Error #14

Closed skipperguy12 closed 12 years ago

skipperguy12 commented 12 years ago

I get "An internal error occurred while trying to perform this command".

Console error: 18:52:27 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'tche st' in plugin TreasureChest v8.1 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:16 6) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:4 79) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler. java:821) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)

    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:7

8) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:567) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.NullPointerException at com.mtihc.minecraft.treasurechest.v8.plugin.TreasureChestPlugin.onCom mand(TreasureChestPlugin.java:100) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 12 more

Mtihc commented 12 years ago

Which command did you execute?

The NullPointerException happens at line 100. You're using version 8.1. I made such a mess, I don't know what happens on line 100 of version 8.1. So this error is not very useful to me.

Here is version 8.2 https://docs.google.com/open?id=0B7bfEg9oSsnAMG03OWJKVU1EMGM

See if the error happens again. If so, show me that error :)

skipperguy12 commented 12 years ago

Another internal error: 21:38:43 [SEVERE] Error occurred while enabling TreasureChest v8.2 (Is it up to date?) java.lang.NoClassDefFoundError: net/milkbowl/vault/economy/Economy at com.mtihc.minecraft.treasurechest.v8.rewardfactory.rewards.MoneyRewar dFactory.(MoneyRewardFactory.java:19) at com.mtihc.minecraft.treasurechest.v8.plugin.TreasureChestPlugin.onEna ble(TreasureChestPlugin.java:72) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader .java:337) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage r.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:256) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:238 ) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:381) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:368) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:197) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ClassNotFoundException: net.milkbowl.vault.economy.Economy at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more

On Thu, Jul 19, 2012 at 7:10 PM, Mitch < reply@reply.github.com

wrote:

Which command did you execute?

The NullPointerException happens at line 100. You're using version 8.1. I made such a mess, I don't know what happens on line 100 of version 8.1. So this error is not very useful to me.

Here is version 8.2 https://docs.google.com/open?id=0B7bfEg9oSsnAMG03OWJKVU1EMGM

See if the error happens again. If so, show me that error :)


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7118102

Mtihc commented 12 years ago

Thank you. My bad!

It's fixed in this version: https://docs.google.com/open?id=0B7bfEg9oSsnATE1YdXpKOTZaV1E It also has some awesome new rewards.

I like having a tester like you, before uploading it to bukkit.org :)

On Fri, Jul 20, 2012 at 3:41 AM, skipperguy12 < reply@reply.github.com

wrote:

Another internal error: 21:38:43 [SEVERE] Error occurred while enabling TreasureChest v8.2 (Is it up to date?) java.lang.NoClassDefFoundError: net/milkbowl/vault/economy/Economy at com.mtihc.minecraft.treasurechest.v8.rewardfactory.rewards.MoneyRewar dFactory.(MoneyRewardFactory.java:19) at com.mtihc.minecraft.treasurechest.v8.plugin.TreasureChestPlugin.onEna ble(TreasureChestPlugin.java:72) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader .java:337) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage r.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:256) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:238 ) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:381) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:368) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:197) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ClassNotFoundException: net.milkbowl.vault.economy.Economy at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more

On Thu, Jul 19, 2012 at 7:10 PM, Mitch < reply@reply.github.com

wrote:

Which command did you execute?

The NullPointerException happens at line 100. You're using version 8.1. I made such a mess, I don't know what happens on line 100 of version 8.1. So this error is not very useful to me.

Here is version 8.2 https://docs.google.com/open?id=0B7bfEg9oSsnAMG03OWJKVU1EMGM

See if the error happens again. If so, show me that error :)


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7118102


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7120320

skipperguy12 commented 12 years ago

Mitch, i'm a new plugin dev. Do you think you can help me with this plugin i'm making that has been annoying me for a long time?

On Fri, Jul 20, 2012 at 2:04 AM, Mitch < reply@reply.github.com

wrote:

Thank you. My bad!

It's fixed in this version: https://docs.google.com/open?id=0B7bfEg9oSsnATE1YdXpKOTZaV1E It also has some awesome new rewards.

I like having a tester like you, before uploading it to bukkit.org :)

On Fri, Jul 20, 2012 at 3:41 AM, skipperguy12 < reply@reply.github.com

wrote:

Another internal error: 21:38:43 [SEVERE] Error occurred while enabling TreasureChest v8.2 (Is it up to date?) java.lang.NoClassDefFoundError: net/milkbowl/vault/economy/Economy at com.mtihc.minecraft.treasurechest.v8.rewardfactory.rewards.MoneyRewar dFactory.(MoneyRewardFactory.java:19) at com.mtihc.minecraft.treasurechest.v8.plugin.TreasureChestPlugin.onEna ble(TreasureChestPlugin.java:72) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader .java:337) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage r.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:256) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:238 ) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:381) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:368) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:197) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ClassNotFoundException: net.milkbowl.vault.economy.Economy at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more

On Thu, Jul 19, 2012 at 7:10 PM, Mitch < reply@reply.github.com

wrote:

Which command did you execute?

The NullPointerException happens at line 100. You're using version 8.1. I made such a mess, I don't know what happens on line 100 of version 8.1. So this error is not very useful to me.

Here is version 8.2 https://docs.google.com/open?id=0B7bfEg9oSsnAMG03OWJKVU1EMGM

See if the error happens again. If so, show me that error :)


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7118102


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7120320


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7122998

skipperguy12 commented 12 years ago

It works, no error, but it deletes my treasure sometimes.

On Fri, Jul 20, 2012 at 10:34 AM, Neil Johari neiljohari@gmail.com wrote:

Mitch, i'm a new plugin dev. Do you think you can help me with this plugin i'm making that has been annoying me for a long time?

On Fri, Jul 20, 2012 at 2:04 AM, Mitch < reply@reply.github.com

wrote:

Thank you. My bad!

It's fixed in this version: https://docs.google.com/open?id=0B7bfEg9oSsnATE1YdXpKOTZaV1E It also has some awesome new rewards.

I like having a tester like you, before uploading it to bukkit.org :)

On Fri, Jul 20, 2012 at 3:41 AM, skipperguy12 < reply@reply.github.com

wrote:

Another internal error: 21:38:43 [SEVERE] Error occurred while enabling TreasureChest v8.2 (Is it up to date?) java.lang.NoClassDefFoundError: net/milkbowl/vault/economy/Economy at com.mtihc.minecraft.treasurechest.v8.rewardfactory.rewards.MoneyRewar dFactory.(MoneyRewardFactory.java:19) at com.mtihc.minecraft.treasurechest.v8.plugin.TreasureChestPlugin.onEna ble(TreasureChestPlugin.java:72) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader .java:337) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage r.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:256) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:238 ) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:381) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:368) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:197) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ClassNotFoundException: net.milkbowl.vault.economy.Economy at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more

On Thu, Jul 19, 2012 at 7:10 PM, Mitch < reply@reply.github.com

wrote:

Which command did you execute?

The NullPointerException happens at line 100. You're using version 8.1. I made such a mess, I don't know what happens on line 100 of version 8.1. So this error is not very useful to me.

Here is version 8.2 https://docs.google.com/open?id=0B7bfEg9oSsnAMG03OWJKVU1EMGM

See if the error happens again. If so, show me that error :)


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7118102


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7120320


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7122998

skipperguy12 commented 12 years ago

Ok, heres whats happening:

If I make one unlimited chest, it works. As soon as I tchest set another chest, the first chests contents disappear.

On Fri, Jul 20, 2012 at 11:19 AM, Neil Johari neiljohari@gmail.com wrote:

It works, no error, but it deletes my treasure sometimes.

On Fri, Jul 20, 2012 at 10:34 AM, Neil Johari neiljohari@gmail.comwrote:

Mitch, i'm a new plugin dev. Do you think you can help me with this plugin i'm making that has been annoying me for a long time?

On Fri, Jul 20, 2012 at 2:04 AM, Mitch < reply@reply.github.com

wrote:

Thank you. My bad!

It's fixed in this version: https://docs.google.com/open?id=0B7bfEg9oSsnATE1YdXpKOTZaV1E It also has some awesome new rewards.

I like having a tester like you, before uploading it to bukkit.org :)

On Fri, Jul 20, 2012 at 3:41 AM, skipperguy12 < reply@reply.github.com

wrote:

Another internal error: 21:38:43 [SEVERE] Error occurred while enabling TreasureChest v8.2 (Is it up to date?) java.lang.NoClassDefFoundError: net/milkbowl/vault/economy/Economy at com.mtihc.minecraft.treasurechest.v8.rewardfactory.rewards.MoneyRewar dFactory.(MoneyRewardFactory.java:19) at com.mtihc.minecraft.treasurechest.v8.plugin.TreasureChestPlugin.onEna ble(TreasureChestPlugin.java:72) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader .java:337) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage r.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:256) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:238 ) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:381) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:368) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:197) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ClassNotFoundException: net.milkbowl.vault.economy.Economy at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more

On Thu, Jul 19, 2012 at 7:10 PM, Mitch < reply@reply.github.com

wrote:

Which command did you execute?

The NullPointerException happens at line 100. You're using version 8.1. I made such a mess, I don't know what happens on line 100 of version 8.1. So this error is not very useful to me.

Here is version 8.2 https://docs.google.com/open?id=0B7bfEg9oSsnAMG03OWJKVU1EMGM

See if the error happens again. If so, show me that error :)


Reply to this email directly or view it on GitHub:

https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7118102


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7120320


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7122998

Mtihc commented 12 years ago

Are you sure that is a bug?

Do you know about the anti-camper/anti-ninja feature? It goes like this.... When a player opens tchest... he doesn't really open the chest.... but he opens a "fake inventory". After a minute (or something) that inventory disappears... to preserve memory.... That's why it might look like the contents disappeared.

Do you think this may be what's happening?

On Fri, Jul 20, 2012 at 5:27 PM, skipperguy12 < reply@reply.github.com

wrote:

Ok, heres whats happening:

If I make one unlimited chest, it works. As soon as I tchest set another chest, the first chests contents disappear.

On Fri, Jul 20, 2012 at 11:19 AM, Neil Johari neiljohari@gmail.com wrote:

It works, no error, but it deletes my treasure sometimes.

On Fri, Jul 20, 2012 at 10:34 AM, Neil Johari <neiljohari@gmail.com wrote:

Mitch, i'm a new plugin dev. Do you think you can help me with this plugin i'm making that has been annoying me for a long time?

On Fri, Jul 20, 2012 at 2:04 AM, Mitch < reply@reply.github.com

wrote:

Thank you. My bad!

It's fixed in this version: https://docs.google.com/open?id=0B7bfEg9oSsnATE1YdXpKOTZaV1E It also has some awesome new rewards.

I like having a tester like you, before uploading it to bukkit.org :)

On Fri, Jul 20, 2012 at 3:41 AM, skipperguy12 < reply@reply.github.com

wrote:

Another internal error: 21:38:43 [SEVERE] Error occurred while enabling TreasureChest v8.2 (Is it up to date?) java.lang.NoClassDefFoundError: net/milkbowl/vault/economy/Economy at com.mtihc.minecraft.treasurechest.v8.rewardfactory.rewards.MoneyRewar dFactory.(MoneyRewardFactory.java:19) at com.mtihc.minecraft.treasurechest.v8.plugin.TreasureChestPlugin.onEna ble(TreasureChestPlugin.java:72) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader .java:337) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage r.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:256) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:238 ) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:381) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:368) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:197) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.ClassNotFoundException: net.milkbowl.vault.economy.Economy at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more

On Thu, Jul 19, 2012 at 7:10 PM, Mitch < reply@reply.github.com

wrote:

Which command did you execute?

The NullPointerException happens at line 100. You're using version 8.1. I made such a mess, I don't know what happens on line 100 of version 8.1. So this error is not very useful to me.

Here is version 8.2 https://docs.google.com/open?id=0B7bfEg9oSsnAMG03OWJKVU1EMGM

See if the error happens again. If so, show me that error :)


Reply to this email directly or view it on GitHub:

https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7118102


Reply to this email directly or view it on GitHub:

https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7120320


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7122998


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7133038

Mtihc commented 12 years ago

The problem you explained.... I heard it before.... And I don't what's happening. I hope you're just confused about that "fake inventory" stuff.

About the plugin you are making. Uhm, how can I help? Do you have it on GitHub?

skipperguy12 commented 12 years ago

I'm pretty sure it doesn't work. I made a little testing area, and made one unlimited treasure chest, and it worked, then I made another one 3 blocks away and it worked, but the first ones contents vanished. I can't find my way around github. Here is what I've been trying to make:

A plugin that when someone gets killed by another player, lightning happens on the spot (harmless) and then fire (harmless) appears where they died. Here's what I got:

SmightyPlayerListener.java:

package com.github.skipperguy12.Smite;

import java.util.ArrayList;

import java.util.TimerTask;

import org.bukkit.Bukkit;

import org.bukkit.ChatColor;

import org.bukkit.Location;

import org.bukkit.World;

import org.bukkit.entity.Player;

import org.bukkit.event.entity.EntityCombustEvent;

import org.bukkit.event.entity.PlayerDeathEvent;

import org.bukkit.event.EventHandler;

import org.bukkit.event.EventPriority;

import org.bukkit.event.Listener;

/**

  • Handle events for all Player related events
  • Original author TheGag96, recreated for different purposes by

    skipperguy12

*/

public class SmightyPlayerListener implements Listener {

ArrayList<Location> lightningFires = new ArrayList<Location>();

Location loc;

@EventHandler(priority = EventPriority.NORMAL)

public void onPlayerDeathEvent(PlayerDeathEvent event){

    // Player who died

    Player deadPlayer = (Player) event.getEntity();

    //Get the deadPlayers location

       loc = deadPlayer.getLocation();

    // If the killer was a Player

    if (deadPlayer.getKiller() instanceof Player) {

        //Get the killer

        Player killerPlayer = (Player) deadPlayer.getKiller();

        //Get the players world

        World world = deadPlayer.getWorld();

        //Make a nice lightning effect ON the deadPlayer

        world.strikeLightning(loc);

        lightningFires.add(loc);

        //Set that same player on fire (to look awesome)

        deadPlayer.setFireTicks(0);

        //Broadcast that deadPlayer was slain by killerPlayer

        Bukkit.getServer().broadcastMessage(ChatColor.RED +

"[HungerCraftGods]: " + deadPlayer.getName() + " was slain by " + killerPlayer.getName() );

    }else{

        //Get the players world

        World world = deadPlayer.getWorld();

        //Make a nice lightning effect ON the deadPlayer

        world.strikeLightning(loc);

        lightningFires.add(loc);

        //Set that same player on fire (to look awesome)

        deadPlayer.setFireTicks(0);

        //Broadcast that deadPlayer was slain by killerPlayer

    Bukkit.getServer().broadcastMessage(ChatColor.RED +

"[HungerCraftGods]: " + deadPlayer.getName() + " has died of natural causes or mobs!" );

}

    java.util.Timer delayTimer = new java.util.Timer();

    delayTimer.schedule(new TimerTask() {

        public void run() {

                  lightningFires.remove(loc);

        }

    }, 2000);

}

@EventHandler

public void onEntityCombustEvent(EntityCombustEvent e){

if(lightningFires.contains(e.getEntity().getLocation())) {

e.setCancelled(true);

}

}

}

Smighty.java:

package com.github.skipperguy12.Smite;

import org.bukkit.plugin.PluginDescriptionFile;

import org.bukkit.plugin.java.JavaPlugin;

/**

  • A plugin that you can use to smite your enemies with lightning 'til

they're dead and kick them, all with command!

*

*

  • Original author TheGag96, recreated for different purposes: skipperguy12

    */

public class Smighty extends JavaPlugin {

public void onDisable() {
PluginDescriptionFile pdfFile = getDescription();

System.out.println( pdfFile.getName() + " version " +

pdfFile.getVersion() + " has been disabled!" );

}
public void onEnable() {
this.getServer().getPluginManager().registerEvents(new

SmightyPlayerListener(), this);

PluginDescriptionFile pdfFile = getDescription();

System.out.println( pdfFile.getName() + " version " +

pdfFile.getVersion() + " is enabled!" );

}
}

On Fri, Jul 20, 2012 at 12:12 PM, Mitch < reply@reply.github.com

wrote:

The problem you explained.... I heard it before.... And I don't what's happening. I hope you're just confused about that "fake inventory" stuff.

About the plugin you are making. Uhm, how can I help? Do you have it on GitHub?


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7134214

Mtihc commented 12 years ago

I will get back to you on that lightning-plugin. It looks good btw.

About the disappearing contents. I tried it out myself. But I have no problem. I should join your server... so you can show me. Can you give me the ip?

Anyway this is what I did:

  1. Place chest
  2. Put dirt in it
  3. /tchest set
  4. /tchest unlimited
  5. Open it... (without a chest in my hand, because that would open the chest normally) There was unlimited dirt.

I did the same steps with another chest. There was also unlimited dirt.

Now I went back to the 1st chest. I opened it... and there was still unlimited dirt. You say I should get no dirt?

Mtihc commented 12 years ago

About your Smite plugin.

https://docs.google.com/document/d/1ZMWO5GewukXt65W_BahdSvN-4jmxVqenztbGwx_azOA/edit

I changed your EventHandler, so that there is no more double code. I changed the lightningFires to ArrayList(String). Just to be safe (in case yaw and pitch are also checked) I changed deadPlayer.setFireTicks(0) to 1000. Because, in your comment, you wrote that you wanted to set the player on fire.

And I added some Logger stuff. As you can see... when you test it... The player's Z coordinate is different than the fire's Z coordinate. Which is weird. Also... when you get hit by lightning... the EntityCombustEvent is spaaaaammmmed!!

Maybe you should look for another solution.

Maybe you can try to disable the fire that comes with the lightning. And then create a harmless fire-block. I don't know... I'm just saying things.

EDIT: The Z coordinate is always 1 off. So you could als do this... Don't add only the fire-location. But also the locations next to it.

skipperguy12 commented 12 years ago

Ok, I will let you join my server, also, can we make plugins together? You can help me get started. I'm new to java, but I love programming and minecraft in general. My server is notchcraft.zapto.org. I'm gonna need your IGN before you come in (white-list).

It seems to work with one or two chests now, but some remain empty. Quite confusing sometimes.

For the lightning, I don't exactly want to set the player on fire. Have you ever played HungerCraft? A couple of bukkitdevs made thirst plugins and lightning stuff. I'm trying to replicate it. What they did was when a player was slain, lighting effect happens where the deadplayer died and fire that is harmless, and that you can walk through appears right where the lightning hit, on the dead player.

On Fri, Jul 20, 2012 at 3:18 PM, Mitch < reply@reply.github.com

wrote:

I will get back to you on that lightning-plugin. It looks good btw.

About the disappearing contents. I tried it out myself. But I have no problem. I should join your server... so you can show me. Can you give me the ip?

Anyway this is what I did:

  1. Place chest
  2. Put dirt in it
  3. /tchest set
  4. /tchest unlimited
  5. Open it... (without a chest in my hand, because that would open the chest normally) There was unlimited dirt.

I did the same steps with another chest. There was also unlimited dirt.

Now I went back to the 1st chest. I opened it... and there was still unlimited dirt. You say I should get no dirt?


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7138811

skipperguy12 commented 12 years ago

Never mind, it works now! Maybe I was confused at the time, or something just went wrong. It works now! Can you modify this plugin and make another plugin that changes the contents randomly every time opened, but only items you tell it to? Like the hunger games cornucopia. Me and my friend made an arena using Voxel sniper, world edit, world guard, and your plugin, treasure chest. We kinda want a cornucopia that can be re looted every 5 minutes by EVERY player. So, it does not refill until five minutes, and once a player takes something, its gone for every player. Basically, auto-fill chests plugin with scramble items, and custom message before refill.

On Fri, Jul 20, 2012 at 5:50 PM, Neil Johari neiljohari@gmail.com wrote:

Ok, I will let you join my server, also, can we make plugins together? You can help me get started. I'm new to java, but I love programming and minecraft in general. My server is notchcraft.zapto.org. I'm gonna need your IGN before you come in (white-list).

It seems to work with one or two chests now, but some remain empty. Quite confusing sometimes.

For the lightning, I don't exactly want to set the player on fire. Have you ever played HungerCraft? A couple of bukkitdevs made thirst plugins and lightning stuff. I'm trying to replicate it. What they did was when a player was slain, lighting effect happens where the deadplayer died and fire that is harmless, and that you can walk through appears right where the lightning hit, on the dead player.

On Fri, Jul 20, 2012 at 3:18 PM, Mitch < reply@reply.github.com

wrote:

I will get back to you on that lightning-plugin. It looks good btw.

About the disappearing contents. I tried it out myself. But I have no problem. I should join your server... so you can show me. Can you give me the ip?

Anyway this is what I did:

  1. Place chest
  2. Put dirt in it
  3. /tchest set
  4. /tchest unlimited
  5. Open it... (without a chest in my hand, because that would open the chest normally) There was unlimited dirt.

I did the same steps with another chest. There was also unlimited dirt.

Now I went back to the 1st chest. I opened it... and there was still unlimited dirt. You say I should get no dirt?


Reply to this email directly or view it on GitHub: https://github.com/Mtihc/TreasureChest/issues/14#issuecomment-7138811

Mtihc commented 12 years ago

About that problem. I'm glad it's solved.

For future reference: I know it is confusing. The "fake inventory" stuff. Just remember... When you are updating the contents of a tchest, you must make sure.. that you are not looking in a "fake inventory". To open the real inventory... click a tchest, with a chest in your hand. I explained some of this stuff in the change-log. On dev.bukkit.

About the random chests. The TreasureChest plugin already has a feature. Command /tchest random It's kindof limiting. But I am not planning to change that. About the cornucopia thing. Maybe command "/tchest reward add bankrobber" can be useful. But it relies on kill/disconnect.

This stuff is not really useful to you. You said it right... you basically want auto-refill, random chest.

We could make a new plugin, that hooks into TreasureChest. Because I made some events: TreasureChestFoundEvent, TreasureChestFoundAlreadyEvent, TreasureChestFoundUnlimitedEvent. These are all Cancellable. And always after one of the other events comes TreasureChestOpenEvent.

Maybe I will make something for it. I'm not gonna promise anything ;)

Mtihc commented 12 years ago

I'm closing this issue.

If you wanna chat more... PM me on dev.bukkit.org. My name is Mtihc there too.