Annotation and type fix

Just clean up annotations on primatives and instance v InstanceContainer
This commit is contained in:
KrystilizeNevaDies 2020-12-08 09:12:42 +10:00
parent 99f4c8f2d3
commit 061c1600e7

View File

@ -1,11 +1,7 @@
package net.minestom.server.event.instance; package net.minestom.server.event.instance;
import javax.annotation.Nullable;
import org.jetbrains.annotations.NotNull;
import net.minestom.server.event.Event; import net.minestom.server.event.Event;
import net.minestom.server.instance.InstanceContainer; import net.minestom.server.instance.Instance;
/** /**
* Called when an instance processes a tick * Called when an instance processes a tick
@ -13,9 +9,9 @@ import net.minestom.server.instance.InstanceContainer;
public class InstanceTickEvent extends Event { public class InstanceTickEvent extends Event {
private final int duration; private final int duration;
private final InstanceContainer instance; private final Instance instance;
public InstanceTickEvent(@NotNull long time, @Nullable long lastTickAge, InstanceContainer someInstance) { public InstanceTickEvent(long time, long lastTickAge, Instance someInstance) {
this.duration = (int) (time - lastTickAge); this.duration = (int) (time - lastTickAge);
this.instance = someInstance; this.instance = someInstance;
} }
@ -25,7 +21,6 @@ public class InstanceTickEvent extends Event {
* *
* @return the duration * @return the duration
*/ */
@NotNull
public int getDuration() { public int getDuration() {
return duration; return duration;
} }
@ -35,8 +30,7 @@ public class InstanceTickEvent extends Event {
* *
* @return the instance * @return the instance
*/ */
@NotNull public Instance getInstance() {
public InstanceContainer getInstance() {
return instance; return instance;
} }
} }