Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.vilsol.bridges.commands;
- import java.awt.Toolkit;
- import java.awt.datatransfer.StringSelection;
- import org.bukkit.Location;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- public class CommandL implements CommandExecutor {
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
- if(!(sender instanceof Player)) return true;
- Player plr = (Player) sender;
- Location l = plr.getLocation();
- String s = "new Vector(" + l.getBlockX() + ", " + l.getBlockY() + ", " + l.getBlockZ() + ")";
- Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(s), null);
- plr.sendMessage("Clipboard set!");
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement