some ge changes
This commit is contained in:
@@ -32,6 +32,11 @@ object GrandExchange : CallBack {
|
||||
while(true) {
|
||||
SystemLogger.logGE("Updating offers...")
|
||||
OfferManager.update()
|
||||
if(OfferManager.dumpDatabase){
|
||||
SystemLogger.logGE("Saving GE...")
|
||||
OfferManager.save()
|
||||
OfferManager.dumpDatabase = false
|
||||
}
|
||||
Thread.sleep(60_000) //sleep for 60 seconds
|
||||
}
|
||||
}.start()
|
||||
|
||||
@@ -382,7 +382,6 @@ object OfferManager {
|
||||
if (!offer.isActive) {
|
||||
return
|
||||
}
|
||||
GE_OFFER_LOCK.lock()
|
||||
for (o in OFFERS_BY_ITEMID[offer.itemID]!!) {
|
||||
if (o.sell != offer.sell && o.isActive) {
|
||||
exchange(offer, o)
|
||||
@@ -392,7 +391,6 @@ object OfferManager {
|
||||
}
|
||||
}
|
||||
buyFromBots(offer)
|
||||
GE_OFFER_LOCK.unlock()
|
||||
}
|
||||
|
||||
private fun getBuylimitAmount(offer: GrandExchangeOffer): Int {
|
||||
|
||||
@@ -18,7 +18,6 @@ import rs09.game.system.SystemLogger
|
||||
import rs09.game.system.command.Command
|
||||
import java.util.*
|
||||
import java.util.function.Consumer
|
||||
import kotlin.reflect.jvm.internal.impl.load.kotlin.JvmType
|
||||
|
||||
/**
|
||||
* Represents a class used to handle the loading of all plugins.
|
||||
@@ -62,7 +61,7 @@ object PluginManager {
|
||||
var result = ClassGraph().enableClassInfo().enableAnnotationInfo().scan()
|
||||
result.getClassesWithAnnotation("core.plugin.Initializable").forEach(Consumer { p: ClassInfo ->
|
||||
try {
|
||||
definePlugin(p.loadClass().newInstance() as Plugin<JvmType.Object>)
|
||||
definePlugin(p.loadClass().newInstance() as Plugin<Object>)
|
||||
} catch (e: InstantiationException) {
|
||||
e.printStackTrace()
|
||||
} catch (e: IllegalAccessException) {
|
||||
|
||||
Reference in New Issue
Block a user