|January 10, 2014
Posted by forumadmin
I am creating a minecraft plugin based on the movie InTime and am trying to create code that on death of the player the player will lose 25% of their time.
Current code is:
String minus = itapi.getTimeString(player.getName());
ItemStack book = itapi.createTimeCard("Death of " + player.getName(), minus, 1);
itapi.removeTime(player.getName(), minus * 0.25);
Though line 4 flags “
The operator * is undefined for the argument type(s) String, double“
I know it is probally a real simple fix but im out of ideas any suggestions?
TimeString has to be a
More Related Questions
- Java help 25% of time I am working on developing a minecraft plugin based on the Movie InTime. When a player kills you you are susposed to lose 25% of your time and drop it in the form of a TimeCard (Book). The […]
- Is there a more efficient way to write to files? I'm writing a Bukkit (for those that don't know: "Mod and plugins that simplify running and managing Minecraft servers. Includes forums and documentation.") plugin that stores user's […]
- Converting the left over decminal to weeks, days, hours, min, seconds Right now I am finding out 25% of a persons years and for example if you had 5 years 25% is 1.25. Though the plugin im making cant remove 1.25 years from you the .25 needs to be converted […]
- Minecraft Black Screen Ubunutu 12.10 using Java 7 I get these errors when trying to run minecraft.
ian@ian-Beast:~$ cd ~/.minecraft
ian@ian-Beast:~/.minecraft$ cd /.bin
bash: cd: /.bin: No such file or […]
- Minecraft Framerate Drop after 5 minutes I installed 13.10 last night on a Dell Precision M6500 and I was amazed that I could get ~50 FPS, but then after about 5 minutes, it took a sudden drop to about 2 FPS. This happens every […]
- Cant Execute .desktop File I'm new to ubuntu and linux...
I'm trying to make a minecraft launcher .desktop file, and when I execute it, it says me:
"There was an error launching the application"
My code […]
- Java cant launch minecraft, these errors happen. Using Java Oracle These errors happen when I launch minecraft, First error happens when I launch the login menu ( It still boots up ). Second when I actually launch the game. […]
- Accessing a process after closing the consol Basically I am using Ubuntu to run a minecraft server via a VPS and I’m using putty to control it.
once I have started my server and everything is running, I’m in control of the server […]
- How to allocate more ram to minecraft? Minecraft lags badly in my linux than windows! in windows i dont find trouble playing it!
My system specs :
processor : AMD Athlon x2 260 3.2ghz dual core
- Why doesnt Location.add(0, 1, 0) set a new location one block above? I want to, if the player breaks a block, break the block above, too, but this code will just drop the original block (brokenBlock) and not even break the block above...
What did I do […]