Categories
Programare Minecraft in Python

BukkitRunnable

from org.bukkit import Bukkit
from org.bukkit import Location
from org.bukkit.util import Vector
from org.bukkit.entity import EntityType
from org.bukkit.entity import Snowball
from org.bukkit.entity import *
from org.bukkit.projectiles import *
from time import *
from org.bukkit import Effect
from mcapi_spigot import *
from org.bukkit.event.block import BlockPlaceEvent
from org.bukkit.scheduler import BukkitRunnable
from java.lang import Math
class JythonRun(BukkitRunnable):
def __init__(self):
pass

def calculateTotal(self, cost, tip, tax):
return cost + tip + tax

if __name__ == “__main__”:
calc = JythonRun()
cost = 23.75
tip = .15
tax = .07
print “Starting Cost: “, cost
print “Tip Percentage: “, tip
print “Tax Percentage: “, tax
print Math.round(calc.calculateTotal(cost, tip, tax))