Remove useless files

This commit is contained in:
Him188 2019-10-09 17:47:20 +08:00
parent b9720385f0
commit 4cccd854cc
2 changed files with 0 additions and 61 deletions

View File

@ -1,31 +0,0 @@
/**
* @author Him188moe
*/
public class NetworkTest {
public static void main(String[] args) {
/*
System.out.println(Short.valueOf("37 13", 16));
System.out.println(1040400290L & 0x0FFFFFFFF);
System.out.println(Long.valueOf("3E033FA2", 16));
*/
}
public static String bytesToHex(byte[] bytes) {
StringBuffer sb = new StringBuffer();
for(int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(bytes[i] & 0xFF);
if(hex.length() < 2){
sb.append(0);
}
sb.append(hex);
}
return sb.toString();
}
}

View File

@ -1,30 +0,0 @@
package event
import net.mamoe.mirai.event.Event
import net.mamoe.mirai.event.broadcast
import net.mamoe.mirai.event.subscribeAll
import kotlin.reflect.KClass
/**
* @author Him188moe
*/
open class SuperEvent : Event() {
companion object : KClass<SuperEvent> by SuperEvent::class//方便 subscribe
}
open class ChildEvent : SuperEvent()
open class ChildChildEvent : ChildEvent()
class ChildChildChildEvent : ChildChildEvent()
suspend fun main() {
SuperEvent.subscribeAll {
always {
println(it.javaClass.simpleName)//ChildChildChildEvent
}
}
ChildChildChildEvent().broadcast()
}