mirror of
				https://github.com/PlaceholderAPI/PlaceholderAPI
				synced 2025-10-31 06:12:28 +01:00 
			
		
		
		
	Merge pull request #873 from PlaceholderAPI/fix/872-fix-inxonsisten-parsing
Fix inconsistent parsing command behaviour
This commit is contained in:
		| @@ -30,7 +30,6 @@ import me.clip.placeholderapi.PlaceholderAPIPlugin; | |||||||
| import me.clip.placeholderapi.commands.PlaceholderCommand; | import me.clip.placeholderapi.commands.PlaceholderCommand; | ||||||
| import me.clip.placeholderapi.expansion.PlaceholderExpansion; | import me.clip.placeholderapi.expansion.PlaceholderExpansion; | ||||||
| import me.clip.placeholderapi.util.Msg; | import me.clip.placeholderapi.util.Msg; | ||||||
| import net.md_5.bungee.api.chat.TextComponent; |  | ||||||
| import org.bukkit.Bukkit; | import org.bukkit.Bukkit; | ||||||
| import org.bukkit.OfflinePlayer; | import org.bukkit.OfflinePlayer; | ||||||
| import org.bukkit.command.CommandSender; | import org.bukkit.command.CommandSender; | ||||||
| @@ -123,13 +122,9 @@ public final class CommandParse extends PlaceholderCommand { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     if (broadcast) { |     if (broadcast) { | ||||||
|       Msg.broadcast(message); |       Bukkit.broadcastMessage(message); | ||||||
|     } else { |     } else { | ||||||
|       if (!(sender instanceof Player)) { |       sender.sendMessage(message); | ||||||
|         Msg.msg(sender, message); |  | ||||||
|       } else { |  | ||||||
|         ((Player) sender).spigot().sendMessage(TextComponent.fromLegacyText(message)); |  | ||||||
|       } |  | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @@ -156,7 +151,8 @@ public final class CommandParse extends PlaceholderCommand { | |||||||
|     final String message = PlaceholderAPI |     final String message = PlaceholderAPI | ||||||
|         .setRelationalPlaceholders(((Player) targetOne), ((Player) targetTwo), |         .setRelationalPlaceholders(((Player) targetOne), ((Player) targetTwo), | ||||||
|             String.join(" ", params.subList(2, params.size()))); |             String.join(" ", params.subList(2, params.size()))); | ||||||
|     Msg.msg(sender, message); |      | ||||||
|  |     sender.sendMessage(message); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user