-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b67dcb9
commit e9dd7b3
Showing
12 changed files
with
361 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
api/src/main/java/com/craftmend/openaudiomc/api/exceptions/InvalidRegionException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.craftmend.openaudiomc.api.exceptions; | ||
|
||
/** | ||
* An exception representing a fatal error during region lookup | ||
*/ | ||
public class InvalidRegionException extends Exception { | ||
|
||
public InvalidRegionException(String message) { | ||
super(message); | ||
} | ||
|
||
public InvalidRegionException() { | ||
super("The given region (with an unknown id) could not be found."); | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
api/src/main/java/com/craftmend/openaudiomc/api/exceptions/InvalidThreadException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.craftmend.openaudiomc.api.exceptions; | ||
|
||
/** | ||
* Throw when a method is called from an invalid thread | ||
*/ | ||
public class InvalidThreadException extends Exception { | ||
|
||
public InvalidThreadException() { | ||
super("This method can only be called from the main thread"); | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
api/src/main/java/com/craftmend/openaudiomc/api/exceptions/UnknownWorldException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.craftmend.openaudiomc.api.exceptions; | ||
|
||
/** | ||
* An exception representing a fatal error during world lookup | ||
*/ | ||
public class UnknownWorldException extends Exception { | ||
|
||
public UnknownWorldException(String worldName) { | ||
super("There is no world with the name '" + worldName + "' loaded. Please ensure that it's typed correctly and that it's loaded."); | ||
} | ||
|
||
public UnknownWorldException() { | ||
super("The given world (with an unknown id) could not be found."); | ||
} | ||
|
||
} |
51 changes: 51 additions & 0 deletions
51
api/src/main/java/com/craftmend/openaudiomc/api/regions/RegionMediaOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.craftmend.openaudiomc.api.regions; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* Represents media options for a region, this is not a full subset of the normal media options | ||
*/ | ||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class RegionMediaOptions { | ||
|
||
/** | ||
* If the media should loop | ||
*/ | ||
private boolean loop = true; | ||
|
||
/** | ||
* If the media should be faded in and out (in milliseconds) | ||
*/ | ||
private int fadeTime = 500; | ||
|
||
/** | ||
* The volume of the media, 0-100 | ||
*/ | ||
private int volume = 100; | ||
|
||
/** | ||
* The source of the media | ||
*/ | ||
private String source = null; | ||
|
||
// utility constructors | ||
public RegionMediaOptions(String source) { | ||
this.source = source; | ||
} | ||
|
||
public RegionMediaOptions(String source, int volume) { | ||
this.source = source; | ||
this.volume = volume; | ||
} | ||
|
||
public RegionMediaOptions(String source, int volume, int fadeTime) { | ||
this.source = source; | ||
this.volume = volume; | ||
this.fadeTime = fadeTime; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
BUILD_NUM="1430" | ||
BUILD_NUM="1431" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.