What I'm Working On
+2
BrotherArcadius
Dot145
6 posters
:: WowCraft :: General Chat
Page 1 of 1
What I'm Working On
Hi, some of you might know (if you browse the undergrounds of the forums) I decided I would attempt to make a plugin for bukkit for our server to use. So I pondered for a day and I've come up with two ideas, and asked friends who play minecraft but aren't on the server what they think.
First Idea:
A math plugin.
Basically, you type /math [math problem] and it calculates it and displays it. For example, you type in "/math 5 + 3 - 2" and it says "6" (or something like that). This is the one I'm currently working on, and I'm still not 100% sure if it will work. I enjoy it because it's challenging but not upsetting.
Second Idea:
A bed "alarm".
This one is simple; when someone enters a bed, it'll say something like "[playername] is going to sleep; you should too! Players not in bed: [players not in bed]" I haven't started working on it yet because I haven't figured out how to send a message to ALL players and because the previously mentioned one is interesting and complex.
In case anyone's interested in the code, I might post parts of it here.
First Idea:
A math plugin.
Basically, you type /math [math problem] and it calculates it and displays it. For example, you type in "/math 5 + 3 - 2" and it says "6" (or something like that). This is the one I'm currently working on, and I'm still not 100% sure if it will work. I enjoy it because it's challenging but not upsetting.
Second Idea:
A bed "alarm".
This one is simple; when someone enters a bed, it'll say something like "[playername] is going to sleep; you should too! Players not in bed: [players not in bed]" I haven't started working on it yet because I haven't figured out how to send a message to ALL players and because the previously mentioned one is interesting and complex.
In case anyone's interested in the code, I might post parts of it here.
- Spoiler:
- Here's what I have at the time of composing this post. It's super incomplete.
- Code:
package me.Dot145.MathPlugin;
import org.bukkit.event.player.PlayerChatEvent;
import org.bukkit.event.player.PlayerListener;
import org.bukkit.entity.*;
public class MathPluginPlayerListener extends PlayerListener
{
public static MathPlugin plugin;
public MathPluginPlayerListener(MathPlugin instance)
{
plugin = instance;
}
public void onPlayerCommand(PlayerChatEvent event)
{
String[] split = event.getMessage().split(" ");
Player player = event.getPlayer();
if((split[0].equalsIgnoreCase("/math")))
{
double[] num = null;
int i = 1;
while(i <= split.length)
{
if(split[i] != "+" && split[i] != "-" && split[i] != "*" && split[i] != "/")
num[i] = Double.parseDouble(split[i]);
else if(split[i] == "+")
{
double nextnum = Double.parseDouble(split[i+1]);
double prevnum = Double.parseDouble(split[i-1]);
split[i + 1] = Double.toString(prevnum + nextnum);
}
}
}
}
}
Last edited by Dot145 on Fri Aug 19, 2011 11:25 pm; edited 1 time in total
Re: What I'm Working On
The bed alarm is the best idea since man first made kitchens for women to work in.
BrotherArcadius- Forum legend
- Posts : 129
Join date : 2011-07-03
Age : 36
Location : USA
Re: What I'm Working On
yeah the bed alarm would be really nice!
wow135- Server Owner
- Posts : 512
Join date : 2011-01-08
Age : 27
Location : Far up north...
Re: What I'm Working On
Could someone make some kind of playerlist plugin? I really wanna know who is online
SlayerSl123- Forum legend
- Posts : 783
Join date : 2011-02-13
Age : 28
Location : Notch
Re: What I'm Working On
there is lots of those plugins and wowcraft has one but wow decided not to enable playerlist for users
Jonix55- Server Manager
- Posts : 187
Join date : 2011-03-12
Age : 27
Location : Portugal
Re: What I'm Working On
I did? ... oh crap
wow135- Server Owner
- Posts : 512
Join date : 2011-01-08
Age : 27
Location : Far up north...
Re: What I'm Working On
Oh okeydowkey than
SlayerSl123- Forum legend
- Posts : 783
Join date : 2011-02-13
Age : 28
Location : Notch
Re: What I'm Working On
I think I'm done with the bed plugin. I need to compile it as a .jar for use (as wow and any other server admin would know). After that, I need to test it and, if it works, we can use it! ;D
Re: What I'm Working On
Awesome Sauce! :3
wow135- Server Owner
- Posts : 512
Join date : 2011-01-08
Age : 27
Location : Far up north...
:: WowCraft :: General Chat
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum