Reformatting

This commit is contained in:
Paul Reilly
2023-06-02 17:58:08 -05:00
parent 9a56a404af
commit e160868967
27 changed files with 280 additions and 244 deletions

View File

@ -3,6 +3,7 @@ package me.totalfreedom.provider;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -21,6 +22,7 @@ public class ContextProvider
toInt(string),
toLong(string),
toFloat(string),
toMaterial(string),
toPlayer(string),
toWorld(string),
toLocation(string),
@ -92,6 +94,11 @@ public class ContextProvider
}
}
private @Nullable Material toMaterial(final String string)
{
return Material.matchMaterial(string);
}
private @Nullable Player toPlayer(final String string)
{
return Bukkit.getPlayer(string);