Skip to content
This repository has been archived by the owner on May 6, 2018. It is now read-only.

Update Skript.java #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/main/java/ch/njol/skript/Skript.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,12 @@ public final class Skript extends JavaPlugin implements Listener {

public static Skript getInstance() {
final Skript i = instance;
if (i == null)
throw new IllegalStateException();
if (i == null) throw new NullPointerException("Instance is null.");
return i;
}

public Skript() throws IllegalStateException {
if (instance != null)
throw new IllegalStateException("Cannot create multiple instances of Skript!");
if (instance != null) throw new IllegalStateException("Cannot create multiple instances of Skript!");
instance = this;
}

Expand All @@ -174,8 +172,7 @@ public Skript() throws IllegalStateException {

public static Version getVersion() {
final Version v = version;
if (v == null)
throw new IllegalStateException();
if (v == null) throw new NullPointerException("Version is null.");
return v;
}

Expand Down