mirror of
https://github.com/zeshan321/ActionHealth.git
synced 2024-11-14 23:05:11 +01:00
Added v1_17_R1 support
This commit is contained in:
parent
3278a39d5d
commit
64ad990db8
@ -7,10 +7,10 @@ import com.zeshanaslam.actionhealth.commands.HealthCommand;
|
||||
import com.zeshanaslam.actionhealth.config.ConfigStore;
|
||||
import com.zeshanaslam.actionhealth.events.HealthListeners;
|
||||
import com.zeshanaslam.actionhealth.utils.HealthUtil;
|
||||
import com.zeshanaslam.actionhealth.utils.Metrics;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
@ -3,10 +3,10 @@ package com.zeshanaslam.actionhealth.config;
|
||||
import com.zeshanaslam.actionhealth.LookThread;
|
||||
import com.zeshanaslam.actionhealth.Main;
|
||||
import com.zeshanaslam.actionhealth.action.ActionStore;
|
||||
import com.zeshanaslam.actionhealth.utils.Metrics;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
11
src/com/zeshanaslam/actionhealth/support/NewAction.java
Normal file
11
src/com/zeshanaslam/actionhealth/support/NewAction.java
Normal file
@ -0,0 +1,11 @@
|
||||
package com.zeshanaslam.actionhealth.support;
|
||||
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class NewAction {
|
||||
public NewAction(Player player, String message) throws ClassNotFoundException {
|
||||
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(message));
|
||||
}
|
||||
}
|
@ -268,7 +268,9 @@ public class HealthUtil {
|
||||
message = ChatColor.translateAlternateColorCodes('&', message);
|
||||
|
||||
try {
|
||||
if (plugin.configStore.mcVersion.equals("v1_16_R1") || plugin.configStore.mcVersion.equals("v1_16_R2") || plugin.configStore.mcVersion.equals("v1_16_R3")) {
|
||||
if (plugin.configStore.mcVersion.equals("v1_17_R1")) {
|
||||
new NewAction(player, message);
|
||||
} else if (plugin.configStore.mcVersion.equals("v1_16_R1") || plugin.configStore.mcVersion.equals("v1_16_R2") || plugin.configStore.mcVersion.equals("v1_16_R3")) {
|
||||
new PreAction(player, message);
|
||||
} else if (plugin.configStore.mcVersion.equals("v1_12_R1") || plugin.configStore.mcVersion.startsWith("v1_13") || plugin.configStore.mcVersion.startsWith("v1_14_") || plugin.configStore.mcVersion.startsWith("v1_15_")) {
|
||||
new LegacyPreAction(player, message);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.bstats.bukkit;
|
||||
package com.zeshanaslam.actionhealth.utils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
Loading…
Reference in New Issue
Block a user