I was thinking of a plugin called "Phantom Plugin", which would add a phantom which would "haunt" the server, kind of like Herobrine. Whenever an effect happens the phantom will give you a message in dark red. The message would look like &4[PHANTOM] Message... The effects are based on how many steps you take. Here are some of the effects that would happen: Minor Effects: (every 300-500 steps) 1. Get hurt, taking half a heart of damage (like 1 fist hit) Message: Tag, your it... 2. Instantly turn around 180 degrees. Message: Behind you... 3. Get the effect slowness 2 for 10 seconds. Message: Slow down... 4. Get the effect nausea for 5 seconds. Message: You probably shouldn't have eaten that... 5. 2 blocks of dirt appear like a wall in front of you. Message: Oops, I dropped those... Medium Effects: (every 1000-1500 steps) 1. Get lit on fire for 4 seconds. Message: BURN... 2. Get the effect blindness for 10 seconds. Message: Watch where you're going... 3. Get thrown up 8 blocks into the air. Message: You go up, you come down... 4. A random item from your inventory gets dropped onto the ground. Message: You dropped something... 5. You cannot move for 4 seconds. Message: FREEZE... Major Effects: (every 2500-3500 steps) (All major effects come with blindness for 10 seconds) 1. Your health instantly goes down TO half a heart. Message: I WILL WATCH TO SEE IF YOU CAN SURVIVE... 2. Stationary lava appears on the block in front of you. Message: DIE! DIE! DIE!... 3. 2 creepers spawn in front of you. Message: GO, MY MINIONS. DESTROY HIM... 4. Lit tnt appears in front of you. Message: BLOWN TO BITS... 5. You instantly run out of food and start starving to death. Message: THE HUNGER WILL OVERWHELM YOU... Extreme Effects (Every 10000-12000 steps) 1. Your entire inventory is cleared. Message: HOW WILL YOU SURVIVE NOW?... 2. You get blindness for 5 seconds while being spammed with the message: I WILL REAP YOUR SOUL!!!!! Then you die. There would also be another Phantom, whose messages would appear like this: &3[PHANTOM] Not All Phantoms Are Evil! This phantom would give good effects to the player every 1000-1500 steps. 1. Instantly heals your health and food bar. 2. Gives you speed 3 for 60 seconds. 3. Gives you 5 diamonds. 4. Gives you a full set of gold armor 5. Gives you a full set of gold tools 6. Gives you a golden sword with sharpness 3, knockback 2, and fire aspect 1.
Ok, so I have looked into it some. Unless another developer knows of a way, I cannot figure out how to detect the number of block traveled without lagging the server. I can, however, make it work on a timed basis
Just count the number of blocks each player has traveled. Code:java HashMap<String, Integer> stepCount = new HashMap<String, Integer>(); @EventHandlerpublic void onPlayerMove(PlayerMoveEvent e) { if (e.getFrom().getBlockX() == e.getTo().getBlockX() && e.getFrom().getBlockZ() == e.getTo().getBlockZ() && e.getFrom().getBlockY() == e.getTo().getBlockY()) return; String playerName = e.getPlayer().getName(); if (!stepCount.containsKey(playerName)) stepCount.put(playerName, 0); stepCount.put(playerName, stepCount.get(playerName) + 1);}
Sounds cool, and could you please make the time (or blocks stepped if you use Skye's code) customizable? I was also wondering if it would be possible to disable the plugin in a world, because I dont really want the effects to take place in my minigames world. If thats too hard to code in though its ok. And thanks for coding it!
UPDATE: The plugin loads PhantomEffects from a config file and they can be tested with a command. You can specify potion effects, message to display, and health changes/sets from the config. I am working on making a decent, non-laggy way of applying the phantom effect. Are there any requests other than inventory stuff and mob/block placement for the config? Code: positive: boost: potion: speed: level: 2 time: 60 freq: 20 skipWorlds: - world - miniGame healFull: healthSet: 10 hungerSet: 20 freq: 10 negative: tag: message: Tag, you're it healthChange: -1 freq: 5 BukkitDev page for when it gets finalized: http://dev.bukkit.org/bukkit-plugins/serverspook/ EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Nope. Not yet at least. When do you think it will be finished? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Sorry, real-life stuff came up. I can get back to it this afternoon. Pretty much all that's left is to add the timer cycle.
I don't think counting the amount of blocks the player has traveled is a good idea. Instead, use the time. This seems like I nice idea and I am going to try making it but I am probably going to change some of the effects you thought of such as the extreme effects. Also, I probably going to make these effects more severe when it is night time in the game. I will see how it goes.
How do you think a timer works? The only difference is that a block counter only runs when the player actually moves.
Quick check on the concept, do you want the timer to be for each player or for the server as a whole? as in, each player has a chance of an effect every 20 minutes, or one player on the server every 20 minutes? (just as an example time)
Each player should have a chance of an effect every 20 minutes, and only one effect should happen at a time.