Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.bukkit.techguard.ishop;
- import java.util.ArrayList;
- import org.bukkit.Location;
- import org.bukkit.World;
- import org.bukkit.block.Sign;
- /**
- * @author 'TechGuard
- */
- public class SignUpdate {
- private String world;
- private Location location;
- private String[] lines;
- public SignUpdate(World w, Location l, String[] li){
- this.world = w.getName();
- this.location = l;
- this.lines = li;
- }
- public static void update(final iShop plugin, final ArrayList<SignUpdate> listToUpdate){
- if(listToUpdate.size() < 1)return;
- plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
- @Override
- public void run() {
- for(SignUpdate su : listToUpdate){
- Sign sign = (Sign)plugin.getServer().getWorld(su.world).getBlockAt(su.location).getState();
- sign.setLine(0, su.lines[0]);
- sign.setLine(1, su.lines[1]);
- sign.setLine(2, su.lines[2]);
- sign.setLine(3, su.lines[3]);
- sign.update();
- }
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement