mirror of
https://github.com/ayunami2000/ayunEagVidMap.git
synced 2024-12-21 22:24:10 -08:00
amazing...
This commit is contained in:
parent
e37f74136e
commit
e219717db6
|
@ -34,7 +34,6 @@ public class Main extends JavaPlugin implements CommandExecutor, Listener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable(){
|
public void onEnable(){
|
||||||
MessageHandler.initMessages();
|
|
||||||
this.saveDefaultConfig();
|
this.saveDefaultConfig();
|
||||||
this.rlConfig();
|
this.rlConfig();
|
||||||
syncTask = this.getServer().getScheduler().scheduleSyncRepeatingTask(this, this::syncToAllPlayers, 10000, 10000); // sync every 10 seconds
|
syncTask = this.getServer().getScheduler().scheduleSyncRepeatingTask(this, this::syncToAllPlayers, 10000, 10000); // sync every 10 seconds
|
||||||
|
@ -49,6 +48,7 @@ public class Main extends JavaPlugin implements CommandExecutor, Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rlConfig() {
|
private void rlConfig() {
|
||||||
|
MessageHandler.initMessages();
|
||||||
audioLoc.setX(this.getConfig().getDouble("audio.x"));
|
audioLoc.setX(this.getConfig().getDouble("audio.x"));
|
||||||
audioLoc.setY(this.getConfig().getDouble("audio.y"));
|
audioLoc.setY(this.getConfig().getDouble("audio.y"));
|
||||||
audioLoc.setZ(this.getConfig().getDouble("audio.z"));
|
audioLoc.setZ(this.getConfig().getDouble("audio.z"));
|
||||||
|
@ -89,7 +89,9 @@ public class Main extends JavaPlugin implements CommandExecutor, Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
syncToPlayer(event.getPlayer());
|
Player player = event.getPlayer();
|
||||||
|
videoMapCodec.beginPlaybackBukkit(videoMapCodec.getURL(), videoMapCodec.isLoopEnable(), videoMapCodec.getDuration()).send(player);
|
||||||
|
syncToPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -164,6 +166,7 @@ public class Main extends JavaPlugin implements CommandExecutor, Listener {
|
||||||
case "p":
|
case "p":
|
||||||
case "play":
|
case "play":
|
||||||
case "pause":
|
case "pause":
|
||||||
|
if (args.length > 1 && args[1].equalsIgnoreCase("force")) urlChanged = true;
|
||||||
if (urlChanged || videoMapCodec.isPaused()) {
|
if (urlChanged || videoMapCodec.isPaused()) {
|
||||||
if (urlChanged) {
|
if (urlChanged) {
|
||||||
urlChanged = false;
|
urlChanged = false;
|
||||||
|
|
|
@ -34,8 +34,8 @@ public class VideoMapPacketCodec {
|
||||||
this.posX = posX;
|
this.posX = posX;
|
||||||
this.posY = posY;
|
this.posY = posY;
|
||||||
this.posZ = posZ;
|
this.posZ = posZ;
|
||||||
this.volume = 1.0f;
|
this.volume = volume;
|
||||||
this.frameRate = 60;
|
this.frameRate = 30;
|
||||||
this.requiresPositionPacket = true;
|
this.requiresPositionPacket = true;
|
||||||
this.requiresFullResetPacket = true;
|
this.requiresFullResetPacket = true;
|
||||||
this.isDisabled = true;
|
this.isDisabled = true;
|
||||||
|
|
|
@ -4,7 +4,7 @@ usage:
|
||||||
- "&7&o/ayunvid [h|help] &3- Show this message."
|
- "&7&o/ayunvid [h|help] &3- Show this message."
|
||||||
- "&7&o/ayunvid <u|url> [url] &3- Specify the video URL to use, or get the current one. &l(Must be CORS-compatible!)"
|
- "&7&o/ayunvid <u|url> [url] &3- Specify the video URL to use, or get the current one. &l(Must be CORS-compatible!)"
|
||||||
- "&7&o/ayunvid <l|loc|location> [x y z] &3- Specify the location that the audio will come from. If no arguments are supplied, this will default to the sender's position."
|
- "&7&o/ayunvid <l|loc|location> [x y z] &3- Specify the location that the audio will come from. If no arguments are supplied, this will default to the sender's position."
|
||||||
- "&7&o/ayunvid <p|play|pause> &3- Toggle playback of the video. This also loads the new video after the video URL is changed."
|
- "&7&o/ayunvid <p|play|pause> [force] &3- Toggle playback of the video. This also loads the new video after the video URL is changed. Optionally force a reload of the video."
|
||||||
- "&7&o/ayunvid <s|size> [<width> <height>] &3- Sets or gets the size of video, in maps. E.g., a width of 2 and a height of 3 would result in a video using 6 maps."
|
- "&7&o/ayunvid <s|size> [<width> <height>] &3- Sets or gets the size of video, in maps. E.g., a width of 2 and a height of 3 would result in a video using 6 maps."
|
||||||
- "&7&o/ayunvid <rl|reload> &3- Reloads the configuration file."
|
- "&7&o/ayunvid <rl|reload> &3- Reloads the configuration file."
|
||||||
currentUrl: "&3Current URL: {0}"
|
currentUrl: "&3Current URL: {0}"
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user