private void createBtn_Click(object sender, RoutedEventArgs e)
 {
     //errorC = false;
     if (tabRItemSlot.SelectedIndex < 0)
     {
         tabRItemSlot.SelectedIndex = 0;
     }
     if (tabRItemItem.SelectedIndex < 0)
     {
         tabRItemItem.SelectedIndex = 0;
     }
     if (tabRItemHide.SelectedIndex < 0)
     {
         tabRItemHide.SelectedIndex = 0;
     }
     string replaceItemStr = "";
     if (tabRItemEntity.IsChecked == true)
     {
         replaceItemStr += "/replaceitem entity " + atStr + " ";
         //if (tabRItemSlot.SelectedIndex == 0) errorC = true;
         //if (tabRItemItem.SelectedIndex == 0) errorC = true;
         AllSelData asd = new AllSelData();
         replaceItemStr = replaceItemStr + asd.getSlot(tabRItemSlot.SelectedIndex) + " " + asd.getItem(tabRItemItem.SelectedIndex) + " " + tabRItemCount.Value + " " + tabRItemMeta.Value;
         string meta = tabRItemGetBackMeta();
         if (tabRItemHasEnchant.IsChecked == true || tabRItemHasNL.IsChecked == true || tabRItemHasAttr.IsChecked == true)
         {
             replaceItemStr = replaceItemStr + " {" + meta + "}";
         }
         finalStr = replaceItemStr;
     }
     else if (tabRItemBlock.IsChecked == true)
     {
         //if (tabRItemSlot.SelectedIndex == 0) errorC = true;
         //if (tabRItemItem.SelectedIndex == 0) errorC = true;
         replaceItemStr = replaceItemStr + "/replaceitem block ";
         if (tabRItemXNum.IsChecked == true)
         {
             replaceItemStr = replaceItemStr + "~ ~ ~ ";
         }
         else
         {
             replaceItemStr = replaceItemStr + tabRItemX.Value + " " + tabRItemY.Value + " " + tabRItemZ.Value + " ";
         }
         AllSelData asd = new AllSelData();
         replaceItemStr = replaceItemStr + asd.getSlot(tabRItemSlot.SelectedIndex) + " " + asd.getItem(tabRItemItem.SelectedIndex) + " " + tabRItemCount.Value + " " + tabRItemMeta.Value;
         string meta = tabRItemGetBackMeta();
         if (tabRItemHasEnchant.IsChecked == true || tabRItemHasNL.IsChecked == true || tabRItemHasAttr.IsChecked == true)
         {
             replaceItemStr = replaceItemStr + " {" + meta;
         }
         if (tabRItemUnbreaking.IsChecked == true && (tabRItemHasEnchant.IsChecked == true || tabRItemHasNL.IsChecked == true || tabRItemHasAttr.IsChecked == true))
         {
             replaceItemStr += ",Unbreakable:1}";
         }
         else if (tabRItemUnbreaking.IsChecked == true && tabRItemHasEnchant.IsChecked == false && tabRItemHasNL.IsChecked == false && tabRItemHasAttr.IsChecked == false)
         {
             replaceItemStr += " {Unbreakable:1}";
         }
         else if (tabRItemUnbreaking.IsChecked == false && (tabRItemHasEnchant.IsChecked == true || tabRItemHasNL.IsChecked == true || tabRItemHasAttr.IsChecked == true))
         {
             replaceItemStr += "}";
         }
         finalStr = replaceItemStr;
     }
     else
     {
         //errorC = true;
         //finalStr = "初始选择错误,请检查!";
     }
 }