Advertisement
Guest User

Item Serializer Utility source code

a guest
Nov 27th, 2020
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None
  1. package mc.iaiao.isu;
  2.  
  3. import org.bukkit.configuration.file.FileConfiguration;
  4. import org.bukkit.configuration.file.YamlConfiguration;
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7.  
  8. public class Main extends JavaPlugin {
  9.     @Override
  10.     public void onEnable() {
  11.         getCommand("isu").setExecutor((sender, cmd, s, args) -> {
  12.             FileConfiguration config = new YamlConfiguration();
  13.             config.set("item", ((Player) sender).getInventory().getItemInMainHand());
  14.             getLogger().info(config.saveToString());
  15.             return true;
  16.         });
  17.     }
  18. }
  19.  
Advertisement
RAW Paste Data Copied
Advertisement